-
Notifications
You must be signed in to change notification settings - Fork 610
feat(agents): add task completion rules, skills discovery, and Edit tool #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(agents): add task completion rules, skills discovery, and Edit tool #294
Conversation
…group With Claude Opus 4.5, the previous wording caused two issues: 1. Multiple task groups in single implementer - Claude often attempted to pass all task groups to a single implementer subagent, exhausting context 2. No subagent at all - Sometimes Claude implemented task groups directly in the current conversation window without spawning any implementer This fix adds: - CRITICAL instruction to spawn SEPARATE implementer for EACH task group - Execution strategy based on task group dependencies - Examples of parallel execution (independent groups) - Examples of sequential execution (dependent groups) Each subagent now gets its own context window for focused implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…etion rules
Problem:
Implementer agents were marking tasks as completed without actually executing
them. For example, tasks requiring "Run E2E tests" were marked done without
running tests, and parent tasks were marked complete while subtasks remained
incomplete. This led to false completion reports and unverified implementations.
Root causes identified:
1. Implementer did not read CLAUDE.md which contains project-specific rules
2. Implementer did not read project or global skills which may contain
mandatory requirements (e.g., E2E testing requirements)
3. No explicit rules about what constitutes task completion
4. No rules about parent/subtask relationships
Changes:
1. Added instruction to read CLAUDE.md from project root
2. Added instruction to read project skills from .claude/skills/
3. Added instruction to read global skills from ~/.claude/skills/
4. Added 6 critical task completion rules:
- Rule 1: Tasks complete only when actually executed
- Rule 2: Start services yourself, but don't install dependencies
(may conflict with parallel agents)
- Rule 3: Parent tasks require all subtasks complete
- Rule 4: TDD phases require actual test execution output
- Rule 5: Verification tasks require evidence (screenshots)
- Rule 6: Incomplete tasks must stay marked incomplete with explanation
This ensures implementer agents:
- Follow project-specific conventions and requirements
- Don't falsely mark tasks as complete
- Provide evidence for verification tasks
- Handle parallel execution safely (no dependency conflicts)
…ference Problem: The previous commit added instructions for implementer to read skills from specific directories (.claude/skills/ and ~/.claude/skills/). However, this approach has issues: 1. Hardcoded paths are Claude Code internal implementation details 2. Claude Code already pre-loads available skills as YAML frontmatter in the <available_skills> section of the system context 3. Subagents inherit the same context with available skills already visible 4. Reading files manually duplicates what Claude Code already provides Solution: Replace the two lines with specific paths with a single instruction that: - Points to <available_skills> section in system context - Instructs to use the Skill(skill_name) tool to invoke relevant skills - Removes dependency on internal Claude Code directory structure This makes the instructions more portable and aligned with how Claude Code actually handles skills discovery and invocation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tions All agent files previously had only Write and Read tools, which meant agents could only create/overwrite entire files but couldn't make targeted edits. This was inefficient when working with existing code. The Edit tool allows precise string replacements (old_string → new_string) without rewriting entire files. This is the preferred approach in Claude Code for modifying existing files, as documented in the official Claude Code skills reference. Changes: - implementer.md: added Edit tool - spec-writer.md: added Edit tool - tasks-list-creator.md: added Edit tool - spec-shaper.md: added Edit tool - spec-verifier.md: added Edit tool - implementation-verifier.md: added Edit tool - product-planner.md: added Edit tool - spec-initializer.md: added Edit tool 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…eritance Remove the `tools:` field from all 8 subagent YAML frontmatter configurations. Why this change was made: 1. **Default behavior is better**: When the `tools` field is omitted, subagents automatically inherit ALL tools from the main thread, including all MCP tools from user-configured MCP servers. 2. **MCP tools access**: With explicit `tools` field, subagents were restricted only to the listed tools. This meant MCP tools (like Playwright, Context7, or any user-installed MCP servers) required manual addition to each agent. 3. **Maintenance burden eliminated**: Previously, every new tool or MCP server required updating all agent files. Now subagents automatically get access to any tools available to the main Claude Code instance. 4. **Per Claude Code docs**: "Omit the tools field to inherit all tools from the main thread (default), including MCP tools" - this is the recommended approach for maximum flexibility. Affected agents: - implementer.md - implementation-verifier.md - spec-initializer.md - spec-shaper.md - spec-verifier.md - spec-writer.md - tasks-list-creator.md - product-planner.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…and compatibility In Claude Code 2.1.*, skills can be invoked via slash commands (typing `/` displays all skill names). However, skills with spaces in their `name` field fail to be found when selected from the menu. This change adds a new substep (3.1) to the improve-skills command that converts skill names to kebab-case format (lowercase, spaces replaced with hyphens). This ensures skills are properly discoverable and invocable via the slash command interface. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Do you have a fork of Agent-os that has all your improvements? I've been copying over bits and pieces here and there, but with none of these getting merged into Agent-OS and no recent releases of it, it's getting harder to remember what I've updated and what has not. @CasJam what is the plan for getting PR's reviewed for Agent-OS? |
Yes, of course, I have a fork of this project; otherwise, I would not be able to propose patches in this issue/pull request to which you have just replied. If you want to install my agent-os (that is, my version) “very easily and simply,” then I suggest the following: |
|
Also, just yesterday I added another commit that I believe is very important. The issue is that the latest code started converting skills into commands for loading. The problem is that when agent-os converts profile standards into skills, and then you additionally run the When you press the slash, you will see all skills, including those standards that were converted into skills. However, you will notice that if you select at least one of those skills, it will report that the command was not found. This appears to be related to an implicit or undocumented rule in Claude Code, according to which skill names are apparently required to be in kebab-case. That requirement is not met when agent-os converts standards into skills (even when |
fbcb1f4 to
a6027e7
Compare
… link Removed external Claude documentation links and embedded comprehensive skill-writing rules directly into the improve-skills command. Added: - Three-Phase Loading Model explanation - Supported/unsupported YAML frontmatter fields - Description patterns for maximum discoverability - Compactness Principle and File Structure Options - Quick Template and Quality Checklist Preserved Agent-OS specific content: - "Include all relevant instructions, details and directives" recommendation - Explicit mention of Agent OS standards files for linking Co-Authored-By: Claude <noreply@anthropic.com>
a6027e7 to
a386cf3
Compare
|
I have also just improved the I reworked this command. I already had my own, well-developed skills for writing skills, which I had carefully refined based on the Claude Code documentation. I enhanced the command using my own skill for writing skills, so that the Improve Skills command does everything it did before, but now contains the documentation on how to act directly within the command itself. This way, it does not need to go to the internet to search for anything, and its behavior is always aligned with a single, consistent prompt. |
|
Last commit: e7856f1 Add Impact Analysis to Spec Writing WorkflowProblemCurrent workflow searches for reusable code but not all affected code. When refactoring shared constants/types, specs miss:
Result: specs look complete but implementation breaks things. SolutionAdd impact analysis at three stages:
WhyWithout this, a spec for "modify constant X" might update the main package but miss another package that has its own copy of the same constant. The code compiles, tests pass in isolation, but production breaks. |
Problem: When writing specs for refactoring tasks that modify shared constants or types, the current workflow only searches for "reusable" code, not ALL affected code. This caused specs to miss critical areas like duplicate definitions in different packages. Solution: Add three layers of impact analysis: 1. write-spec.md - New Step 2.5 "Impact Analysis": - Search for ALL usages of constants/types being modified - Detect duplicate definitions across packages (RED FLAG) - Find hardcoded values that should use constants - Document all affected packages/modules 2. research-spec.md - New impact analysis question: - Ask users about OTHER packages that might be affected - Record affected areas for spec-writer to investigate 3. create-tasks-list.md - New Step 1.5 "Verify Spec Completeness": - Independent search before creating tasks - Compare results with files mentioned in spec - Flag and document any gaps found - Create additional task groups for missing areas This ensures refactoring specs capture ALL code that needs updates, preventing production issues from partially applied changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c623d14 to
e7856f1
Compare
When changing constants or types, the existing impact analysis finds direct usages, duplicate definitions, and hardcoded values. However, it missed related data structures like lookup tables and transformation functions that depend on those values. Added Step 2.5 point 5: "Find related mappings and transformations" - Search for *Mapping*, *Map*, *transform*, *convert* patterns - Explains why this matters (lookup tables, config objects, converters) - Added to "Document your findings" checklist - Added constraint buildermethods#4 about checking related mappings Example: when changing a shared constant, a lookup table that maps external values to that constant's values would be missed by direct grep searches but found by searching for *Mapping* patterns. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9e28df3 to
1db26af
Compare
…ery, and Edit tool
…me MCP tools Resolved conflicts: kept tools field removed from agent files (from PR buildermethods#294) while incorporating the Chrome tool expansion function in common-functions.sh
…er docs Changed `name` field from ambiguous "auto" to "**yes**" in Required column. Added clarification that name must match directory name. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…pstream PR buildermethods#294 Adapt improvements from buildermethods/agent-os PR buildermethods#294 to work with our JSON-based workflow system. These changes prevent false task completion and improve refactoring task handling. Changes to implement-tasks.md: - Add CLAUDE.md reading instruction for project-specific rules - Add skills discovery via <available_skills> section - Add 6 critical task completion rules: - Rule 1: Tasks complete only when actually executed - Rule 2: Handle missing prerequisites (start services, don't install deps) - Rule 3: Task groups require all tasks complete - Rule 4: TDD phases require actual test execution - Rule 5: Verification tasks require evidence - Rule 6: Incomplete tasks must stay incomplete Changes to create-tasks-list.md: - Add Step 1.5: Spec completeness verification for refactoring tasks - Run grep searches to find all affected files before creating tasks - Document gaps between spec and actual codebase impact Changes to research-spec.md: - Add Question 8 for impact analysis during requirements gathering - Add Impact Analysis section to requirements.md template - Capture affected areas for refactoring tasks Changes to write-spec.md: - Add Step 2.5: Comprehensive impact analysis for refactoring - Add "Files Requiring Modification" section to spec.md template - Check for duplicate definitions and related mappings Note: PRs buildermethods#301 (Chrome alias) and buildermethods#292 (separate subagents) were already merged. PR buildermethods#293 (init-spec clarity) not applicable due to JSON workflow rewrite. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Add strict task completion rules, improve skills discovery, and enable full tool inheritance for all subagents. This prevents agents from falsely marking tasks as complete without actually executing them, aligns skills usage with Claude Code's built-in mechanisms, and gives subagents access to all tools including MCP servers.
Linked item
Checklist
Documented steps to test
Skill(skill_name)tool to invoke relevant skills from<available_skills>section[ ]if any subtasks are incompleteNotes for reviewers
Problem 1: False task completion
Problem solved:
Implementer agents were marking tasks as completed without actually executing them. For example:
[x]without running tests[ ]Root causes addressed:
Changes:
Added instruction to read CLAUDE.md from project root
Added instruction to use available skills via
Skill(skill_name)tool.claude/skills/,~/.claude/skills/)<available_skills>section andSkill()toolAdded 6 critical task completion rules:
Problem 2: Limited tool access for subagents
Problem solved:
All agent files previously had explicit
tools:field in their YAML frontmatter listing only specific tools (Read,Write, etc.). This restricted subagents to only those listed tools, preventing access to:Solution:
Removed the
tools:field entirely from all 8 agent files:implementer.mdspec-writer.mdtasks-list-creator.mdspec-shaper.mdspec-verifier.mdimplementation-verifier.mdproduct-planner.mdspec-initializer.mdRationale:
Per Claude Code documentation: "Omit the tools field to inherit all tools from the main thread (default), including MCP tools." This approach:
Backwards compatibility
tools:field is additive - subagents gain access to more tools, not fewerReferences
Documentation sources used for these changes:
Claude Code Tools Documentation
Frontmatter Reference (tools/allowed-tools configuration):
https://github.com/anthropics/claude-code/blob/main/plugins/plugin-dev/skills/command-development/references/frontmatter-reference.md
Agent Creator (agent file structure with tools field):
https://github.com/anthropics/claude-code/blob/main/plugins/plugin-dev/agents/agent-creator.md
Key Documentation Excerpts
From the agent creator documentation regarding tool inheritance:
This is the recommended approach for maximum flexibility, allowing subagents to access: