Harness Intelligence Wiki
SpecsCLIHarness Phase Upgrades

Spec: Harness Phase Upgrades

Spec: Harness Phase Upgrades

User Input

TDD Hard law: no production code before failing test.

from superpowers. lets improve ours

Knowledge ce-compound, docs/solutions, ce-product-pulse. Compound wins on learning loop; Harness wins on canonical docs.

i dont want strategy and ideation. dont want pulse too.

no i want this to be integrated into docs-ingest-phase

Context

Harness already has phase wrappers, reusable shared skills, routed wiki/project docs, spec/plan artifacts, and CLI scaffolded prompt content. The useful steal from Superpowers is not another broad methodology layer; it is stricter RED/GREEN behavior wired into the existing phase lifecycle. The useful steal from Compound is not strategy, ideation, or product pulse; it is a compounding knowledge loop that turns implementation/debugging lessons into durable future guidance.

Shared reusable skills must be edited in /Users/stefan/Desktop/repos/wearedevpunks-skills first and then synced into this repository with bun run sync:skills.

Non-Goals

  • Add strategy-phase, ideation-phase, ranked ideas, or product pulse.
  • Add a new docs/solutions/ tree.
  • Add CLI parsers or enforcement code for TDD evidence in this delivery.
  • Create a second hidden learning system outside routed wiki/project docs.
  • Write memory notes for every learning artifact.

Acceptance Criteria

  • tdd declares the hard law for behavior-changing work: no production code before a failing public-interface test.
  • tdd documents the code-before-RED recovery path: write the RED test that proves the intended result, then patch production code to pass it; do not use reason_not_testable for forgotten RED.
  • create-plan requires task-level TDD evidence fields: tdd_status, tdd_target, red_command, expected_red_failure, green_command, reason_not_testable, red_evidence, and green_evidence.
  • implement-spec blocks task completion unless behavior-changing tasks have RED/GREEN evidence or an explicit non-testable reason.
  • review-phase treats missing RED/GREEN proof for behavior-changing tasks as a blocking review finding.
  • docs-ingest-phase owns the learning loop: capture, dedupe, update, consolidate, replace, delete, or mark stale scoped learning artifacts.
  • Learning artifacts distinguish learning_type: bug | knowledge, carry future-use hooks, and keep canonical knowledge in routed wiki/project pages.
  • Future discovery/planning/debugging/review phases are instructed to scan relevant routed learnings before acting.
  • Scaffolded root prompt content carries only the compact invariant, not the full mechanics.
  • Docs/runbooks explain the updated phase contracts and operator workflow.

Constraints

  • Preserve existing shared-skill sync model.
  • Keep changes surgical and source-of-truth first in wearedevpunks-skills.
  • Prefer phase contracts over new runtime enforcement code for this delivery.
  • Keep learning-loop mechanics inside docs-ingest-phase.
  • Keep root prompt guidance compact.

Technical Notes

  • apps/cli/src/content/prompts.ts owns scaffolded root AGENTS.md prompt content.
  • apps/cli/src/content/content.test.ts can prove the scaffold prompt carries the learning invariant.
  • Shared skill files sync into .agents/skills/* and apps/cli/skills/* through bun run sync:skills.
  • Existing routed project specs live under apps/wiki/content/docs/project/specs/cli/<spec>/.

Decision Log

DecisionRationale
Enforce TDD through phase contracts firstHarness already has plan/spec/review artifacts; proof can become auditable before CLI enforcement exists.
Use RED/GREEN evidence fields in PLAN.mdThe executor and reviewer need durable proof, not only prompt intent.
Recover code-before-RED by writing real behavior testsForgotten RED is a process failure, not a reason to skip testing.
Put learning-loop mechanics in docs-ingest-phaseThis preserves Harness canonical docs and avoids a parallel docs/solutions/ tree.
Keep only a compact root invariantDiscovery hooks matter, but root prompts should not become a full phase manual.

On this page