SpecsCLIIP-170-clawpatch-bug-lifecycle
Implementation Notes: IP-170 ClawPatch Bug Lifecycle Phases
Implementation Notes
Summary
- Implemented IP-170 ClawPatch bug lifecycle phases.
- Added shared
$bug-discovery-phaseand$bug-resolution-phaseskills inwearedevpunks-skills, then mirrored them into Harness CLI and repo-local agent skills. - Wired both phases into the CLI skill catalog, debug pack, ClawPatch tool catalog, scoped phase filtering, and
.devpunks/settings.jsonrequired tools. - Added routed wiki/root docs for the staged discover, inspect, choose, resolve lifecycle.
Execution Mode
- parallel
Deviations From the Plan
- Skill source changes happen first in
/Users/stefan/Desktop/repos/wearedevpunks-skills, then sync into Harness mirrors. baseline:buildwas not run because baseline artifacts are not tracked in this checkout; source catalog tests and CLI checks cover the bundled catalog path.
Surprises and Decisions
- T1 RED evidence produced the expected failures before implementation: debug pack missing new skills, skill catalog missing both skills, ClawPatch tool missing, and scoped phase filtering missing both phase names.
- The new skills belong under phase skill source paths, and the agnostic debugging default pack scaffolds them by listing them in the debug pack.
- T5 docs work initially exposed formatting issues in this thread's grill docs; those were formatted directly. Root formatting still fails only on unrelated
.tmp/landing-cli-proof/**files.
Sanity Checks
| Check | Result | Notes |
|---|---|---|
bun test --cwd apps/cli src/content/content.test.ts | Failed as expected | RED evidence for T1 before catalog/skill implementation. |
bun test --cwd apps/cli src/content/content.test.ts | Passed | T4 GREEN evidence after skill/catalog/tool/phase-filter wiring. |
bun run --cwd apps/cli check | Passed | CLI lint and format checks passed. |
bun run --cwd apps/wiki check | Passed | Wiki lint and format checks passed after formatting notes. |
bunx oxfmt --check <owned files> | Passed | Focused formatting passed for changed owned files. |
bun run check:repo | Failed | oxlint passed; oxfmt --check failed only under unrelated .tmp/landing-cli-proof/**. |
Acceptance Criteria Status
| Criterion | Status | Notes |
|---|---|---|
$bug-discovery-phase exists as a global phase entrypoint. | Met | Added to shared skills, CLI-vendored skills, .agents/skills, catalog, and debug pack. |
| Discovery records provider/model/scope/limit/jobs/report path and warns on Claude/Anthropic/metered routes. | Met | Encoded in bug-discovery-phase skill and reference. |
Discovery stays read/report/triage oriented and does not run fix --finding or open-pr by default. | Met | Encoded in skill contract, reference, and wiki lifecycle docs. |
| Discovery output separates finding ledger status from proven runtime root cause status. | Met | Encoded in skill output contract and wiki/root docs. |
| Findings can route to resolution, debugging, tech debt, false-positive triage, or blocked status. | Met | Encoded in resolution skill and lifecycle docs. |
$bug-resolution-phase exists as a global phase entrypoint. | Met | Added to shared skills, CLI-vendored skills, .agents/skills, catalog, and debug pack. |
| Resolution classifies selected findings and patches through normal Harness/Codex edits by default. | Met | Encoded in bug-resolution-phase skill and reference. |
Runtime-evidence findings route to $debugging-phase. | Met | Encoded in resolution skill and lifecycle docs. |
| False positives and resolved findings update or revalidate ClawPatch state. | Met | Encoded in resolution skill reference. |
| Tech-debt docs are created only after selected-finding classification. | Met | Encoded in resolution reference and docs. |
Bounded parallel: true resolution has explicit ownership and centralized final verification/revalidation. | Met | Encoded in resolution reference. |
Scaffold distributes both phases without scoped AGENTS.md primary-skill leakage. | Met | Catalog and phase filtering tests pass. |
| ClawPatch is represented as a required external tool. | Met | Added to tool catalog and .devpunks/settings.json; documented in external tool contract. |
| Wiki-facing docs present discover, inspect, choose, resolve and do not promote all-in-one as default. | Met | Added clawpatch-bug-lifecycle.mdx and linked from lifecycle metadata. |
Manual Review Checklist
| Area | Check | How to perform | Expected result |
|---|---|---|---|
| CLI catalog | Verify debug pack includes both new phase skills. | Run bun test --cwd apps/cli src/content/content.test.ts. | All content registry tests pass. |
| Skill source | Review shared skill source. | Open /Users/stefan/Desktop/repos/wearedevpunks-skills/skills/phases/bug-discovery-phase/SKILL.md and /Users/stefan/Desktop/repos/wearedevpunks-skills/skills/phases/bug-resolution-phase/SKILL.md. | Skills are concise, triggerable, and reference ClawPatch behavior accurately. |
| Wiki docs | Review lifecycle page. | Open /docs/harness/lifecycle-flows/clawpatch-bug-lifecycle in the wiki. | Page describes discover, inspect, choose, resolve and does not present all-in-one as default. |
| Provider warning | Check Claude/Anthropic cost language. | Inspect the lifecycle page and both skill references for provider warning text. | Warning is transparent and does not ban provider routes. |
| Formatting caveat | Decide whether to clean .tmp/landing-cli-proof. | Run bun run check:repo or inspect .tmp/landing-cli-proof/**. | Remaining failure is unrelated generated proof formatting, not IP-170 behavior. |
Pre-existing Issues
- Unrelated dirty file present before implementation:
apps/wiki/src/app/(home)/page.tsx. - Additional unrelated wiki app files under
apps/wiki/src/were dirty during final validation and were not touched intentionally by this implementation.
Out of Scope Observations
- Root
bun run check:repois blocked by unrelated.tmp/landing-cli-proof/**formatting drift. This implementation did not touch or format that generated proof tree.
Remaining Work
- None for IP-170. Optional cleanup: decide whether
.tmp/landing-cli-proof/**should be formatted, regenerated, or removed in a separate task.
Steering
| Date | Feedback | Changes |
|---|---|---|
| 2026-05-22 | Use full parallel mode and write reusable skill changes in ../wearedevpunks-skills first. | Execution mode set to parallel; plan assumptions corrected. |
| 2026-05-22 | Scaffold these phase skills through the agnostic debugging default pack. | Kept source paths under skills/phases/*; debug pack includes both skills. |