Harness Phase Upgrades Grill Log
Harness Phase Upgrades Grill Log
Initial Situation
Harness already has repo-local phase wrappers, scaffold packs, wiki routing, default skills, and validation gates. A recent comparison against Superpowers and Compound Engineering Plugin identified two narrow upgrades worth grilling before implementation:
- Superpowers-style TDD hard law.
- Compound-style typed learning loop and refresh model.
The current direction is to steal schemas, gates, and artifact lifecycles, not the full operating models. Harness should preserve its advantage: repo-local scaffold context, phase wrappers, skill packs, routed wiki authority, and CLI-driven receiving/updating.
Branch: TDD Hard Law
Q1
Question: Should Harness's TDD hard law apply to every production-code edit, or only to behavior-changing work?
Accepted answer:
- Apply the hard law to actual code changes that can change behavior: features, bugfixes, refactors with behavior risk, and other behavior-changing production-code edits.
- Allow explicit escapes for docs-only, formatting-only, generated-code-only, config-only, scaffold/bookkeeping-only, or truly non-testable tasks through
reason_not_testable. - The hard law is not only stricter skill prose. Harness should make RED/GREEN auditable through phase artifacts.
- Superpowers achieves strictness through context injection, mandatory skill routing, TDD-shaped plans, execution discipline, and completion verification.
- Harness should implement the equivalent through
tdd,create-plan,implement-spec,review-phase, default quality packs, and durable wiki/spec artifacts. - Axiom: for behavior-changing implementation work, a task is incomplete until it has RED evidence and GREEN evidence, or an explicit accepted
reason_not_testable. - Axiom: if behavior-changing production code was written before RED evidence, restart that implementation slice from the failing test or record why the slice is genuinely non-testable.
Q2
Question:
Should the TDD hard law be enforced only by skill and phase instructions, or should Harness also add a machine-checkable validation pass over PLAN.md and IMPLEMENTATION-NOTES.md?
Accepted answer:
- Start with phase-level hard enforcement, not a CLI parser or markdown validator.
tddshould carry the hard law language.create-planshould require explicit RED/GREEN evidence fields in each behavior-changing task.implement-specshould block task completion unless the task has RED evidence and GREEN evidence, or an explicitreason_not_testable.review-phaseshould fail behavior-changing tasks that lack proof instead of treating missing evidence as advisory feedback.- Park machine-checkable CLI/schema validation until the evidence shape stabilizes through real implementation runs.
- Axiom: hard enforcement can begin as a phase contract before it becomes a parser-backed CLI validation gate.
Q3
Question: Where should RED/GREEN proof live?
Accepted answer:
- Split intent from evidence.
PLAN.mdtask metadata stores the intended TDD contract:tdd_targetred_commandexpected_red_failuregreen_commandreason_not_testablewhen needed
PLAN.mdtask log stores the short actual evidence:red_evidencegreen_evidence- touched files
- deviations
IMPLEMENTATION-NOTES.mdstores non-obvious narrative only:- why a test shape changed
- why a task was non-testable
- why code-before-RED had to be restarted or accepted
- surprising validation details
- Axiom:
PLAN.mdis the auditable execution board for task completion proof. - Axiom:
IMPLEMENTATION-NOTES.mdpreserves judgment, surprises, and deviations, not a duplicate task database.
Q4
Question:
When implement-spec discovers behavior-changing production code was written before RED evidence, what should happen?
Accepted answer:
- Automatically recover through the TDD loop instead of only blocking the task.
- Write a RED test that proves the actual intended public result, not an implementation detail or a weak snapshot of the current code.
- Patch the production code until that intended-result test passes.
- Record the recovery in
PLAN.mdtask evidence:- what intended result the RED test proves
- the RED command and failure
- the GREEN command and pass
- any production code reconciled after the missing-RED discovery
- If the existing production code already makes the new test pass, the agent must not fake RED. It must either isolate the pre-fix state, revert the task slice enough to observe RED, or record why a true RED step cannot be reconstructed and treat that as an explicit deviation.
reason_not_testablecannot be used just because the agent forgot to write RED first.review-phasetreats unexplained code-before-RED or fake RED evidence as a blocking finding.- Axiom: code-before-RED recovery should produce a real intended-behavior test and a passing implementation, not just a written apology.
Q5
Question:
Should the final TDD task schema use tdd_target, red_command, expected_red_failure, green_command, reason_not_testable, red_evidence, and green_evidence, plus a compact status field?
Accepted answer:
- Yes.
- The final task schema should use:
tdd_statustdd_targetred_commandexpected_red_failuregreen_commandreason_not_testablered_evidencegreen_evidence
tdd_statusvalues are:requirednot_testablerecoverednot_applicable
tdd_statusgivesimplement-specandreview-phasea compact state before reading the full evidence.- Use
recoveredwhen code-before-RED recovery produced an intended-result test and patch-to-pass evidence. - Use
not_applicableonly for tasks outside the hard-law scope, such as docs-only, formatting-only, scaffold/bookkeeping-only, or generated-code-only work. - The TDD hard-law branch is closed for implementation planning.
Branch: Removed Scope
- Strategy and ideation are out of this initiative.
- Product pulse is out of this initiative.
Branch: Knowledge Loop
Q6
Question:
Should Harness create a separate Compound-style docs/solutions/ tree, or keep learning artifacts inside the existing routed wiki/project docs model?
Accepted answer:
- Keep learning artifacts inside the existing
docs-ingest-phaseand routed wiki/project docs model. - Do not create a separate
docs/solutions/tree. - Add a learning-artifact substep inside
docs-ingest-phase. - Store canonical learning in routed wiki/project pages.
- Keep memory notes as compact gotchas and routing aids, not canonical knowledge.
- Add duplicate detection before writing.
- Add refresh outcomes later:
keepupdateconsolidatereplacedeletemark_stale
- Axiom: learning artifacts should compound inside the existing Harness docs authority, not create a parallel knowledge surface.
Q7
Question: Should compounding rely only on future-use hooks from each learning artifact, or should phase skills also be instructed to consume prior learnings during discovery, planning, debugging, and review?
Accepted answer:
- Require both a consumer instruction and a future-use hook.
- Phase skills should explicitly scan relevant prior learnings when they enter discovery, planning, debugging, or review:
requirements-phaseandrequirements-grillwhen requirements depend on known project/domain behaviorcreate-specduring orientationcreate-planbefore task synthesisdebugging-phasebefore or during hypothesis constructionreview-phasewhile gathering evidence and local guidance
- Every learning artifact must expose at least one future-use hook:
- link from a relevant routed flow, concept, or runbook
- link from spec or implementation notes
- compact memory note for a hard-to-discover gotcha
- update a phase skill reference when the learning changes agent behavior
- add a prevention/test note to a validation or review checklist
- Root
AGENTS.mdshould carry only the compact invariant: when routed learning artifacts exist, consult relevant learnings during discovery, planning, debugging, and review. - Detailed mechanics belong in shared phase skills and docs-ingest references, not root prompt bloat.
- Axiom: a learning is not closed until future phases know to look for it and at least one artifact points back to it.
Q8
Question:
Should Harness use two learning artifact tracks, bug and knowledge, like Compound?
Accepted answer:
- Yes, with Harness-native field names and wiki/source metadata.
- Use
learning_type: bug | knowledge. - Shared fields:
datedomainmodulecomponentseveritysourcereferenced_filesfuture_use_hooks
- Bug-only fields:
symptomsroot_causeresolution_typeprevention
- Knowledge-only fields:
applies_whenguidancewhy_it_matters
- Compound's schema shape is useful, but Harness should map it into routed wiki authority, domain metadata, source links, and the future-use hook contract.
Q9
Question:
Should learning refresh be a separate phase/skill later, or integrated into docs-ingest-phase now?
Accepted answer:
- Integrate learning refresh directly into
docs-ingest-phase. docs-ingest-phaseis the compounding engine: it captures new learning, deduplicates it, updates old learning, consolidates overlap, replaces stale guidance, and marks ambiguous knowledge stale.- Do not create a separate
$knowledge-refresh-phasefor this initiative. - Every learning ingest must check existing routed learning artifacts before writing a new page.
- Existing learning artifact outcomes:
keepwhen current learning is still accurate and the new work adds nothing durableupdatewhen the same learning needs fresher facts, references, examples, or prevention notesconsolidatewhen overlapping learnings should become one canonical pagereplacewhen old guidance is misleading and a clear successor existsdeleteonly when the artifact is clearly obsolete, unreferenced, and no longer usefulmark_stalewhen evidence is ambiguous or a human decision is needed
docs-ingest-phasemay run scoped refresh only around the current ingest's domain/module/component/referenced files, not a broad repo-wide sweep by default.- Axiom: compounding happens inside
docs-ingest-phaseby maintaining the learning set as part of every relevant ingest.
Q10
Question:
Should docs-ingest-phase write memory notes for every learning artifact?
Accepted answer:
- No.
- Memory notes are only for hard-to-discover gotchas or routing aids that future agents are likely to miss during normal repo/wiki search.
- Canonical knowledge lives in the routed learning artifact.
- Future-use hooks provide navigation and discovery.
- Memory notes provide compact gotcha/routing support only.
- Do not write a memory note when the routed page and future-use hooks are enough.
- Axiom: memory must not become a hidden second learning tree.
- The knowledge-loop branch is closed for implementation planning.