Implementing a Task
Execute the implementation plan, track progress, and complete the task.
Announce at start: "I'm using the knowns.task.implement skill to implement task [ID]."
Core principle: CHECK AC ONLY AFTER WORK IS DONE.
The Process
Step 1: Review Current State
{{#if mcp}}
mcp__knowns__get_task({ "taskId": "$ARGUMENTS" })
{{else}}
knowns task $ARGUMENTS --plain
{{/if}}
Verify:
- •Plan exists and is approved
- •Timer is running
- •Know which ACs are pending
Step 2: Check for Applicable Templates
Before writing code, check if there's a template that matches:
knowns template list
If template exists:
- •Read linked doc for context
- •Use template to generate boilerplate
- •Customize generated code as needed
{{#if mcp}}
// Read template's linked doc
mcp__knowns__get_doc({ "path": "<template-doc>", "smart": true })
# Generate code from template (reduces context, ensures consistency) knowns template run <template-name> --name "MyComponent"
{{else}}
# Read template's linked doc knowns doc "<template-doc>" --plain # Generate code from template (reduces context, ensures consistency) knowns template run <template-name> --name "MyComponent"
{{/if}}
Why use templates:
- •Reduces context (no need to generate boilerplate)
- •Ensures consistency with project patterns
- •Faster implementation
Step 3: Work Through Plan
For each step in the plan:
- •Check for template (use if available)
- •Do the work (generate or write code)
- •Check related AC (only after work is done!)
- •Append progress note
{{#if mcp}}
// After completing work for AC #1:
mcp__knowns__update_task({
"taskId": "$ARGUMENTS",
"checkAc": [1],
"appendNotes": "✓ Done: brief description"
})
{{else}}
# After completing work for AC #1: knowns task edit $ARGUMENTS --check-ac 1 knowns task edit $ARGUMENTS --append-notes "✓ Done: brief description"
{{/if}}
Step 4: Handle Scope Changes
If new requirements emerge during implementation:
Small change: {{#if mcp}}
mcp__knowns__update_task({
"taskId": "$ARGUMENTS",
"addAc": ["New requirement"],
"appendNotes": "⚠️ Scope: added requirement per user"
})
{{else}}
knowns task edit $ARGUMENTS --ac "New requirement" knowns task edit $ARGUMENTS --append-notes "⚠️ Scope: added requirement per user"
{{/if}}
Large change:
- •Stop and ask user
- •Consider creating follow-up task
- •Update plan if needed
Step 5: Verify & Complete
When all ACs are checked:
1. Verify code quality:
npm test # or project's test command npm run lint # or project's lint command npm run build # if applicable
Don't complete if verification fails. Fix issues first.
2. Add implementation notes (REQUIRED for audit):
Document all changes made for audit trail. Use appendNotes to preserve history:
{{#if mcp}}
mcp__knowns__update_task({
"taskId": "$ARGUMENTS",
"appendNotes": "## Implementation Complete\n\n### Files Changed\n- `src/path/file.ts` - Added X\n- `src/path/other.ts` - Modified Y\n\n### Key Changes\n- Change 1: description\n\n### Testing\n- Test coverage / manual testing done"
})
{{else}}
knowns task edit $ARGUMENTS --append-notes $' ## Implementation Complete ### Files Changed - `src/path/file.ts` - Added X - `src/path/other.ts` - Modified Y - `tests/file.test.ts` - Added tests ### Key Changes - Change 1: description - Change 2: description ### Testing - Test coverage / manual testing done '
{{/if}}
IMPORTANT: Always use appendNotes (not notes) to preserve audit trail.
3. Stop timer and mark done:
{{#if mcp}}
mcp__knowns__stop_time({ "taskId": "$ARGUMENTS" })
mcp__knowns__update_task({
"taskId": "$ARGUMENTS",
"status": "done"
})
{{else}}
knowns time stop knowns task edit $ARGUMENTS -s done
{{/if}}
Step 6: Consider Knowledge Extraction
If generalizable patterns were discovered:
/knowns.extract $ARGUMENTS
Progress Tracking
Use concise notes:
{{#if mcp}}
// Good
mcp__knowns__update_task({
"taskId": "$ARGUMENTS",
"appendNotes": "✓ Auth middleware implemented"
})
// Bad (too verbose)
mcp__knowns__update_task({
"taskId": "$ARGUMENTS",
"appendNotes": "I have successfully completed..."
})
{{else}}
# Good knowns task edit $ARGUMENTS --append-notes "✓ Auth middleware implemented" # Bad (too verbose) knowns task edit $ARGUMENTS --append-notes "I have successfully completed..."
{{/if}}
Completion Checklist
- • All ACs checked
- • Tests pass
- • Lint clean
- • Implementation notes added (with file changes for audit)
- • Timer stopped
- • Status set to
done - • Knowledge extracted (if applicable)
Red Flags
You're doing it wrong if:
- •Checking AC before work is actually complete
- •Making changes not in the approved plan (without asking)
- •Skipping tests
- •Not tracking progress with notes
- •Marking done without verification
When to Stop
STOP and ask when:
- •Requirements unclear or contradictory
- •Approach isn't working after 2-3 attempts
- •Need changes outside approved scope
- •Hit unexpected blocker
If Verification Fails
Tests failing:
- •Keep task in-progress
- •Fix the issue
- •Re-run verification
Forgot to stop timer: {{#if mcp}}
mcp__knowns__add_time({
"taskId": "$ARGUMENTS",
"duration": "<duration>",
"note": "Timer correction"
})
{{else}}
knowns time add $ARGUMENTS <duration> -n "Timer correction"
{{/if}}
Remember
- •Check AC only AFTER work is done
- •Use templates when available
- •Track progress with notes
- •Ask before scope changes
- •Follow the approved plan
- •Verify before marking done
- •Always stop the timer
- •Consider knowledge extraction