.claude/skills/milestone/SKILL.md
Drive implementation forward incrementally with automatic progress tracking, LOC monitoring, and milestone checkpoint creation
npx skillsauth add synthesys-lab/assassyn milestoneInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill instructs AI agents on how to drive implementation forward incrementally, tracking LOC count, running tests, and creating milestone checkpoints when the 800 LOC threshold is reached without completion.
The milestone skill enables AI agents to implement large features step-by-step in manageable increments. It:
This skill is the core implementation driver used by /issue-to-impl and /miles2miles commands.
The milestone skill takes the following inputs (extracted from context):
Current branch context
git branch --show-current)issue-{N}-{brief-title}Plan reference
gh issue view {N}.milestones/issue-{N}-milestone-*.mdStarting LOC count (optional, for resume scenarios)
Current test status (determined by running tests)
The AI agent MUST track LOC count accurately to determine when to create milestones.
Use git diff --stat to measure code changes:
# Get stats for uncommitted changes
git diff --stat
# Example output:
# claude/skills/milestone/SKILL.md | 156 ++++++++++++++++++++++++++++++++++++++
# docs/milestone-workflow.md | 187 ++++++++++++++++++++++++++++++++++++++++++
# 2 files changed, 343 insertions(+)
Extract the total LOC count from the summary line:
X files changed, Y insertions(+), Z deletions(-)343 insertions(+), 25 deletions(-) → Total LOC = 368CRITICAL: Track cumulative LOC across multiple implementation chunks:
# Pseudocode for LOC tracking
cumulative_loc = starting_loc # From milestone or 0
while not all_tests_pass:
implement_next_chunk() # Implement 100-200 LOC
current_chunk_loc = get_git_diff_stat()
cumulative_loc += current_chunk_loc
run_tests()
test_status = parse_test_results()
# Check stopping condition
if cumulative_loc >= 800 and not all_tests_pass:
create_milestone(cumulative_loc, test_status)
stop_and_inform_user()
break
if all_tests_pass:
signal_completion()
break
cumulative_loc >= 800 AND tests are not all passingcumulative_loc < 800 OR all tests pass (nearing completion)The AI agent MUST follow this implementation loop:
First invocation (from issue):
gh issue view {issue-number} --json body --jq '.body'
Resume invocation (from milestone):
# Find latest milestone
ls -1 .milestones/issue-{N}-milestone-*.md | sort -V | tail -n 1
From the plan or milestone:
Chunk size guideline: Aim for 100-200 LOC per chunk
Implement the next logical piece of functionality:
Agent: Implementing [description of what's being implemented]
[Uses Edit/Write tools to modify code]
Agent: Changes made:
- path/to/file1.py: Added feature X logic (~120 LOC)
- path/to/file2.py: Updated helper functions (~45 LOC)
Best practices:
After implementing the chunk:
git diff --stat
Parse the output and add to cumulative count:
Agent: Chunk complete: ~165 LOC added
Agent: Cumulative LOC: 615 (starting from 450)
Execute the test suite after each chunk:
# If project has Makefile with test target
make test
# Or run specific test files mentioned in the plan
bash tests/test-feature.sh
# Or run all tests
bash tests/test-all.sh
Capture test output for parsing:
Agent: Running tests...
[test output]
Agent: Test results: 5/8 tests passed
Extract test status from output:
Passed tests (look for success markers):
✓ symbolFailed tests (look for failure markers):
✗ symbolExample parsing:
Test output:
✓ Test 1: Feature initialization
✓ Test 2: Config loading
✗ Test 3: Edge case handling
✓ Test 4: Error recovery
✗ Test 5: Integration test
✓ Test 6: Cleanup
Parsed status:
Passed: Tests 1, 2, 4, 6 (4 tests)
Failed: Tests 3, 5 (2 tests)
Total: 6 tests
Percentage: 67% (4/6)
After running tests, evaluate:
Condition A: All tests pass
if test_pass_percentage == 100%:
signal_completion()
return SUCCESS
→ Implementation is complete, ready for PR
Condition B: LOC threshold reached without completion
if cumulative_loc >= 800 and test_pass_percentage < 100%:
create_milestone()
inform_user_to_run_miles2miles()
return MILESTONE_CREATED
→ Checkpoint needed, stop for user intervention
Condition C: Continue implementation
if cumulative_loc < 800 and test_pass_percentage < 100%:
continue_loop() # Go back to step 2
→ Keep implementing next chunk
Condition D: Near completion exception
if cumulative_loc >= 750 and cumulative_loc < 850 and test_pass_percentage >= 90%:
continue_loop() # Push to finish
→ Close enough to completion, don't create milestone
When the stop threshold is reached (Condition B), create a milestone document.
# Count existing milestones for this issue
ls -1 .milestones/issue-{N}-milestone-*.md 2>/dev/null | wc -l
Milestone number = count + 1
From the original plan (in issue), identify which steps are not yet complete:
Original plan:
Step 1: Update documentation (150 LOC) ✓ DONE
Step 2: Create tests (100 LOC) ✓ DONE
Step 3: Implement core logic (250 LOC) ← IN PROGRESS (partial)
Step 4: Add edge case handling (150 LOC) ← NOT STARTED
Step 5: Integration (100 LOC) ← NOT STARTED
Work Remaining section:
## Work Remaining
- Step 3: Implement core logic (Estimated: ~100 LOC remaining)
- File: src/core.py - Complete validation logic
- File: src/utils.py - Add helper methods
- Step 4: Add edge case handling (Estimated: 150 LOC)
- File: src/core.py - Handle edge cases
- File: tests/test_edge_cases.sh - Verify edge case handling
- Step 5: Integration (Estimated: 100 LOC)
- File: src/main.py - Integrate with existing system
Based on current implementation state and remaining work:
## Next File Changes (Estimated LOC for Next Milestone)
- `src/core.py`: Complete validation logic and add edge case handling (~180 LOC)
- `src/utils.py`: Add helper methods for validation (~45 LOC)
- `tests/test_edge_cases.sh`: Verify edge case handling (~60 LOC)
**Total estimated for next milestone:** ~285 LOC
List all tests with their current status:
## Test Status
**Passed Tests:**
- test-agentize-modes.sh: All 6 tests passed
- test-c-sdk.sh: All tests passed
- test-feature.sh: 4/6 tests passed
- Test 1: Feature initialization
- Test 2: Config loading
- Test 4: Error recovery
- Test 6: Cleanup
**Not Passed Tests:**
- test-feature.sh: 2/6 tests failing
- Test 3: Edge case handling (FAILED)
- Error: Validation logic incomplete
- Test 5: Integration test (FAILED)
- Error: Integration code not yet implemented
Create the file .milestones/issue-{N}-milestone-{M}.md:
# Milestone {M} for Issue #{N}
**Branch:** issue-{N}-{brief-title}
**Created:** {current-datetime}
**LOC Implemented:** ~{cumulative_loc} lines
**Test Status:** {passed}/{total} tests passed
[Work Remaining section from Step 2]
[Next File Changes section from Step 3]
[Test Status section from Step 4]
IMPORTANT: This milestone document is for local checkpoint tracking only. It should NOT be committed to git (it's already excluded via .gitignore).
Use the commit-msg skill with milestone flag:
CRITICAL: Only commit implementation changes (code, tests, docs), NOT the milestone report file.
Invoke commit-msg skill with:
.milestones/issue-{N}-milestone-{M}.md (keep this local only)The commit-msg skill will:
[milestone][tag] prefixgit commit --no-verify to bypass pre-commit hooksExample commit message:
[milestone][agent.skill]: Milestone 2 for issue #42
claude/skills/milestone/SKILL.md: Implement LOC tracking and test parsing logic
docs/milestone-workflow.md: Add workflow documentation
Milestone progress: 820 LOC implemented, 5/8 tests passed.
Tests failing: edge case handling, integration tests.
NOTE: Milestone document (.milestones/issue-42-milestone-2.md) is NOT committed - it remains local for resumption.
Display message to user:
Milestone {M} created at {cumulative_loc} LOC ({passed}/{total} tests passed).
Next steps:
1. Start a new session
2. Run /miles2miles to resume implementation from this checkpoint
Work remaining: ~{estimated_remaining_loc} LOC
When all tests pass (Condition A), signal completion:
All tests passed ({total}/{total})!
Implementation complete:
- Total LOC: ~{cumulative_loc}
- All {total} tests passing
- Ready for PR creation
Next steps:
1. Review the changes
2. Use /open-pr to create a pull request
Do NOT create a milestone when all tests pass - this indicates completion.
The final commit should be a delivery commit (not a milestone):
--no-verify flaggit branch --show-current
If branch does not match pattern issue-{N}-*:
Error: Not on a development branch.
Current branch: {branch-name}
You must be on a development branch (issue-{N}-{brief-title}) to use the milestone skill.
Please run /issue-to-impl to start implementation on a proper development branch.
Stop execution.
If unable to find plan in issue or milestone:
Error: No implementation plan found.
Checked:
- GitHub issue #{N}: No "Proposed Solution" section
- Milestone files: No .milestones/issue-{N}-milestone-*.md found
Please ensure:
1. The issue has a plan created with /make-a-plan
2. You're running /issue-to-impl to start implementation
Cannot proceed without a plan.
Stop execution.
If tests fail to run due to syntax errors or import errors:
# Test output indicates syntax error
make test
# Output: SyntaxError: invalid syntax...
Create milestone with error notes:
## Test Status
**Critical Errors:**
- Syntax error in src/core.py:45
- Import error: module 'utils' not found
**Test Execution:** Failed to run tests due to critical errors.
**Next Steps:**
1. Fix syntax errors
2. Resolve import issues
3. Resume with /miles2miles
Then stop and inform user:
Critical errors detected. Milestone {M} created with error notes.
Errors:
- Syntax error in src/core.py:45
- Import error: module 'utils' not found
Please fix these errors and run /miles2miles to resume.
If unable to create milestone file:
Error: Failed to create milestone file at .milestones/issue-{N}-milestone-{M}.md
Possible causes:
- .milestones/ directory does not exist
- Permission issues
Please ensure .milestones/ directory exists and is writable.
Try to create the directory:
mkdir -p .milestones
Then retry creating the milestone file.
If still fails, stop and report error to user.
Context: User runs /issue-to-impl 42 for a feature with 8 test cases.
Agent behavior:
Agent: Starting implementation for issue #42...
Agent: Reading plan from issue...
Agent: Plan loaded: 5 implementation steps, estimated 950 LOC total
Agent: Step 1 complete: Documentation updated
Agent: Step 2 complete: Test cases created (8 tests)
Agent: Creating Milestone 1...
Agent: Milestone 1 created (0/8 tests passed)
Agent: Starting implementation loop...
Agent: Implementing Step 3: Core logic...
[implements chunk 1: ~180 LOC]
Agent: Cumulative LOC: 180
Agent: Running tests... 2/8 tests passed
Agent: Implementing Step 3: Validation logic...
[implements chunk 2: ~150 LOC]
Agent: Cumulative LOC: 330
Agent: Running tests... 3/8 tests passed
Agent: Implementing Step 4: Edge cases...
[implements chunk 3: ~200 LOC]
Agent: Cumulative LOC: 530
Agent: Running tests... 5/8 tests passed
Agent: Implementing Step 4: Error handling...
[implements chunk 4: ~180 LOC]
Agent: Cumulative LOC: 710
Agent: Running tests... 6/8 tests passed
Agent: Implementing Step 5: Integration...
[implements chunk 5: ~140 LOC]
Agent: Cumulative LOC: 850
Agent: Running tests... 6/8 tests passed
Agent: LOC threshold reached (850 >= 800), creating Milestone 2...
Milestone 2 created at 850 LOC (6/8 tests passed).
Work remaining: ~100 LOC (Step 5 partial completion)
Tests failing: Integration test, Performance test
Next steps:
1. Start a new session
2. Run /miles2miles to resume from Milestone 2
Context: User runs /miles2miles after Milestone 2 was created.
Agent behavior:
Agent: Finding latest milestone for current branch...
Agent: Found: .milestones/issue-42-milestone-2.md
Agent: Loading context...
Resuming from Milestone 2 for Issue #42:
- LOC implemented: 850
- Test status: 6/8 tests passed
- Work remaining: ~100 LOC
Agent: Reading work remaining from milestone...
Agent: Next work: Complete Step 5 integration
Agent: Implementing integration logic...
[implements chunk: ~85 LOC]
Agent: Cumulative LOC: 935 (850 + 85)
Agent: Running tests... 7/8 tests passed
Agent: Implementing performance optimization...
[implements chunk: ~45 LOC]
Agent: Cumulative LOC: 980 (935 + 45)
Agent: Running tests... 8/8 tests passed!
All tests passed (8/8)!
Implementation complete:
- Total LOC: ~980
- All 8 tests passing
- Ready for PR creation
Next steps:
1. Review the changes
2. Use /open-pr to create a pull request
Context: At 780 LOC with 7/8 tests passing (87.5%).
Agent behavior:
Agent: Cumulative LOC: 780
Agent: Running tests... 7/8 tests passed (87.5%)
Agent: Near completion detected:
- LOC: 780 (close to threshold)
- Tests: 87.5% passing
- Estimated remaining: ~50 LOC
Agent: Continuing to push for completion instead of creating milestone...
Agent: Implementing final test fix...
[implements chunk: ~35 LOC]
Agent: Cumulative LOC: 815
Agent: Running tests... 8/8 tests passed!
All tests passed (8/8)!
Implementation complete:
- Total LOC: ~815
- All 8 tests passing
- Ready for PR creation
Note: Even though cumulative LOC exceeded 800, the agent continued because:
commit-msg SkillThe milestone skill invokes the commit-msg skill for:
Milestone commits:
--no-verify to bypass pre-commit hooksDelivery commits:
fork-dev-branch SkillThe /issue-to-impl command uses fork-dev-branch to create the development branch before invoking the milestone skill.
open-pr SkillAfter milestone skill signals completion, user can invoke /open-pr to create a pull request.
Always run tests: Tests must be run after each chunk to track progress accurately
LOC is cumulative: Track total LOC across all chunks, not just the current chunk
Milestone commits are temporary: They allow bypassing hooks but should never be merged to main with incomplete tests
Chunk size matters: Keep chunks at 100-200 LOC for manageable progress and frequent test validation
Parse test output carefully: Accurate test status tracking is critical for milestone documents and decision-making
Handle errors gracefully: If tests fail critically, create milestone with error notes rather than continuing blindly
Near-completion judgment: Use discretion when close to 800 LOC with high test passage - sometimes better to finish than checkpoint
Milestone documents are immutable: Once created, milestone documents are snapshots in time - never edit them, only create new ones
Trust the process: The 800 LOC threshold is a guideline based on context window limits and maintainability - don't try to game it
Test status is gold: Milestone documents exist primarily to track test progress toward completion
Milestone documents are local-only: Milestone files in .milestones/ are excluded from git (via .gitignore) and should NEVER be committed. They exist only as local checkpoints for resuming work.
tools
Commit the staged changes to git with meaningful messages.
development
Systematic code review skill checking documentation quality and promoting code reuse
testing
Create comprehensive implementation plans with detailed file-level changes and test strategies
development
Create GitHub pull requests from conversation context with proper formatting and tag selection