-
Notifications
You must be signed in to change notification settings - Fork 541
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
Open
Perlover
wants to merge
5
commits into
buildermethods:main
Choose a base branch
from
Perlover:fix/implementer-task-completion-rules
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(agents): add task completion rules, skills discovery, and Edit tool #294
Perlover
wants to merge
5
commits into
buildermethods:main
from
Perlover:fix/implementer-task-completion-rules
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add strict task completion rules, improve skills discovery, and enable Edit tool for all implementer agents. This prevents agents from falsely marking tasks as complete without actually executing them, aligns skills usage with Claude Code's built-in mechanisms, and allows efficient file modifications.
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: Missing Edit tool
Problem solved:
All agent files previously had only
WriteandReadtools in their YAML frontmatter, which meant agents could only:But they couldn't use Edit for targeted string replacements (
old_string→new_string). This was inefficient when working with existing code, forcing agents to rewrite entire files for small changes.Changes:
Added
Edittool to all 8 agent files:implementer.mdspec-writer.mdtasks-list-creator.mdspec-shaper.mdspec-verifier.mdimplementation-verifier.mdproduct-planner.mdspec-initializer.mdRationale:
The Edit tool is the preferred approach in Claude Code for modifying existing files, as documented in the official Claude Code tool reference. It allows precise modifications without rewriting entire files, reducing the risk of accidentally losing content.
Backwards compatibility
References
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 frontmatter reference, the correct format for specifying multiple tools:
From the agent creator documentation, agent files support a
toolsfield:Important:
WriteandEditare separate tools with different purposes:Write- creates or completely overwrites a fileEdit- performs targeted string replacements (old_string→new_string)Both should be included when agents need full file manipulation capabilities.