@chrono-meta/fh-gate 1.4.41 → 1.4.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/AGENTS.md +2 -2
  2. package/CLAUDE.md +65 -130
  3. package/docs/CONTRIBUTING.md +2 -2
  4. package/knowledge/shared/dialogue/ai_dialogue_playbook.md +137 -0
  5. package/knowledge/shared/dialogue/claude_code_runtime_flow.md +170 -0
  6. package/knowledge/shared/dialogue/memory_intent_recall.md +209 -0
  7. package/knowledge/shared/harness-core/claude_md_gate_details.md +170 -0
  8. package/knowledge/shared/harness-core/companion_store_pluggable_cross_audit_2026-06-11.md +118 -0
  9. package/knowledge/shared/harness-core/crucible_mode.md +112 -0
  10. package/knowledge/shared/harness-core/deep_research_capability_ladder.md +122 -0
  11. package/knowledge/shared/harness-core/fh_detail_protocols.md +163 -0
  12. package/knowledge/shared/harness-core/fh_ecosystem_positioning.md +147 -0
  13. package/knowledge/shared/harness-core/fh_opencode_governance_wrapper.md +163 -0
  14. package/knowledge/shared/harness-core/fh_synergy_playbook.md +217 -0
  15. package/knowledge/shared/harness-core/gate_locality_principle.md +57 -0
  16. package/knowledge/shared/harness-core/goal_quench_anthropic_issue.md +104 -0
  17. package/knowledge/shared/harness-core/harness_6axis_framework.md +136 -0
  18. package/knowledge/shared/harness-core/harness_design_decision_lens.md +108 -0
  19. package/knowledge/shared/harness-core/harness_frontier_diagnosis_2026-06-02.md +102 -0
  20. package/knowledge/shared/harness-core/hub_compounding_loop.md +109 -0
  21. package/knowledge/shared/harness-core/hub_maturity_roadmap.md +201 -0
  22. package/knowledge/shared/harness-core/hybrid_orchestration_architecture_roadmap.md +196 -0
  23. package/knowledge/shared/harness-core/live_surface_automation_pattern.md +110 -0
  24. package/knowledge/shared/harness-core/measurement-integrity-checklist.md +54 -0
  25. package/knowledge/shared/harness-core/meta_harness_engineering_definition.md +116 -0
  26. package/knowledge/shared/harness-core/multi_model_sidecar_strategy.md +650 -0
  27. package/knowledge/shared/harness-core/persona_container_schema.md +172 -0
  28. package/knowledge/shared/harness-core/return_path_gate.md +120 -0
  29. package/knowledge/shared/harness-core/self_evolution_routine.md +268 -0
  30. package/knowledge/shared/harness-core/skill_quality_rubric.md +71 -0
  31. package/knowledge/shared/harness-core/tpa_schema.md +136 -0
  32. package/package.json +3 -2
@@ -0,0 +1,217 @@
1
+ ---
2
+ name: fh-synergy-playbook
3
+ description: Concrete workflow specifications for using FH governance alongside OpenCode, Hermes, and OpenHuman — grounded in empirical results, no unverified claims.
4
+ date: 2026-05-31
5
+ tags: [synergy, integration, opencode, hermes, openhuman, governance, playbook, marketing]
6
+ ---
7
+
8
+ # FH Synergy Playbook — How to Use FH with OpenCode, Hermes, and OpenHuman
9
+
10
+ This document describes **exact workflows** for combining forge-harness with three AI agent projects. Every outcome stated here is backed by a recorded experiment or a structural guarantee from the software itself. Nothing is promised without evidence.
11
+
12
+ ---
13
+
14
+ ## The Core Pattern (Abstract)
15
+
16
+ ```
17
+ AI agent generates or mutates code
18
+
19
+ FH governance pass (before merge)
20
+
21
+ Structured verdict: PASS | PENDING | BLOCKED
22
+
23
+ Merge (if PASS) or fix-cycle (if PENDING/BLOCKED)
24
+ ```
25
+
26
+ **What FH adds:** a structured verification layer that runs the same criteria every time, regardless of which model generated the code or which CI system is in use. It reads files the agent writes — no API integration, no runtime adapter.
27
+
28
+ **What FH does NOT do:**
29
+ - It does not fix the code for you (it produces findings, not patches)
30
+ - It does not replace CI (unit tests and FH governance are complementary, not competing)
31
+ - It does not guarantee zero bugs in output — it guarantees that structured verification ran
32
+
33
+ ---
34
+
35
+ ## With OpenCode — AI Code Generation + FH Quality Gate
36
+
37
+ ### The gap FH closes
38
+
39
+ OpenCode generates code rapidly. Its own CI (unit tests, type checks) validates syntax and basic behavior. What it misses: security-adjacent logic, arity/allowlist edge cases, AI-generated assumptions that pass tests but break real-world usage.
40
+
41
+ ### Workflow
42
+
43
+ ```bash
44
+ # 1. Let OpenCode do its work
45
+ opencode run "implement the feature"
46
+
47
+ # 2. Capture what changed
48
+ export FH_TARGET_FILES=$(git diff main..HEAD --name-only)
49
+
50
+ # 3. Run FH governance pass
51
+ ./scripts/fh-gate.sh "$FH_TARGET_FILES"
52
+ # → generates structured prompt for steel-quench + pipeline-conductor
53
+
54
+ # 4. Read the verdict
55
+ # FH_STATUS: SUCCESS
56
+ # FH_GATE_VERDICT: PASS | PENDING | BLOCKED
57
+ # findings: (YAML block — actionable issues with grade A/B/C)
58
+ ```
59
+
60
+ ### Evidence
61
+
62
+ **Controlled trial (2026-05-31):** Applied to `packages/opencode/src/permission/arity.ts` — 163 lines, AI-generated, 6 unit tests all passing, self-evaluation verdict: DONE.
63
+
64
+ FH governance verdict: **PENDING**.
65
+
66
+ Findings:
67
+ - **A-grade:** `prefix()` short-token path — permission allowlist may not cover bare commands. Untested execution path.
68
+ - **A-grade:** `npx`, `opencode`, `claude`, `bunx`, `uvx` absent from ARITY table — `npx <anything>` receives the same broad allow pattern, security model weakened.
69
+ - **B-grade:** AI-generated dictionary has no maintenance protocol.
70
+
71
+ **Causal attribution:** same code, same model (Claude), same CI — different methodology layer. The delta is attributed to the governance pass, not the model.
72
+
73
+ ### When to use
74
+
75
+ - After any OpenCode session that touches security-sensitive files (`permission/`, `auth/`, `token/`, `key/`)
76
+ - Before merging AI-generated code to main
77
+ - As part of a Stop hook: OpenCode exits → fh-gate.sh auto-triggers → verdict in git notes
78
+
79
+ ---
80
+
81
+ ## With Hermes — Skill Configuration Audit Before Dispatch
82
+
83
+ ### The gap FH closes
84
+
85
+ Hermes orchestrates agents through skill files. Skill configuration errors (missing validation, unsandboxed context, credential exposure) only surface at runtime — sometimes in production. FH governance catches these before the skill is dispatched.
86
+
87
+ ### Workflow
88
+
89
+ ```bash
90
+ # 1. After adding or modifying a Hermes skill
91
+ SKILL_PATH="skills/autonomous-ai-agents/opencode/SKILL.md"
92
+
93
+ # 2. Run FH governance on the skill file
94
+ export FH_TARGET_FILES="$SKILL_PATH"
95
+ export FH_CALLER="hermes"
96
+ export FH_GATE_LEVEL="standard"
97
+ ./scripts/fh-gate.sh "$FH_TARGET_FILES" "$FH_GATE_LEVEL" "$FH_CALLER"
98
+
99
+ # 3. Before dispatching the skill, check verdict
100
+ # If PENDING → review findings before allowing live dispatch
101
+ ```
102
+
103
+ ### Evidence
104
+
105
+ **Gemini sidecar review (2026-05-31):** Applied to Hermes `skills/autonomous-ai-agents/opencode/SKILL.md`.
106
+
107
+ Findings:
108
+ - **A-grade:** No pre-execution plan validation — OpenCode operates directly on `workdir` without a review step before file mutations. Destructive rewrites land unreviewed.
109
+ - **A-grade:** Secret ingestion risk — OpenCode may ingest `.env` files or `.git` history into prompt context, potentially exposing credentials to external LLM providers.
110
+ - **B-grade:** No convergence verification — background sessions can exit with success status while leaving codebase in broken state.
111
+
112
+ **Filed as:** Hermes issue [#35709](https://github.com/NousResearch/hermes-agent/issues/35709).
113
+
114
+ ### When to use
115
+
116
+ - Before committing any new Hermes skill that dispatches an external agent
117
+ - During Hermes skill review cycles
118
+ - As part of Hermes CI: run fh-gate.sh on changed skill files in PRs
119
+
120
+ ---
121
+
122
+ ## With OpenHuman — Memory Tree Staleness Audit
123
+
124
+ ### The gap FH closes
125
+
126
+ OpenHuman's Memory Tree stores persistent context (technical decisions, file paths, architectural claims). These are validated once at write time, then trusted indefinitely. FH's `memory-hygiene` + `phantom-quench` pattern re-verifies memory entries against live state.
127
+
128
+ ### Workflow
129
+
130
+ ```bash
131
+ # 1. Extract memory entries that reference file paths or technical claims
132
+ # (OpenHuman Memory Tree format — paths, decisions, URLs)
133
+
134
+ # 2. For each entry, verify it still holds
135
+ for entry in memory_entries:
136
+ verify file paths exist in current codebase
137
+ verify external URLs still reachable
138
+ verify technical claims match current code
139
+
140
+ # 3. Verdict per entry:
141
+ # GROUNDED — verified, safe to use
142
+ # STALE — entry exists but referenced reality changed (warn, prompt for update)
143
+ # BROKEN — hard reference failure (flag for immediate update)
144
+ ```
145
+
146
+ ### Evidence
147
+
148
+ **Structural analysis (2026-05-31):** OpenHuman's `pr-review-shepherd` skill documentation notes that "Composio catalog slugs occasionally drift" — an acknowledgment that the stale-but-confident failure mode exists in the project's own documentation.
149
+
150
+ **FH's `memory-hygiene` skill** implements this pattern for harness memory with a verified weekly cadence. The same algorithm applies directly to OpenHuman's Memory Tree.
151
+
152
+ **Filed as:** OpenHuman issue [#3069](https://github.com/tinyhumansai/openhuman/issues/3069).
153
+
154
+ ### When to use
155
+
156
+ - Weekly, or on session start if >7 days since last audit
157
+ - After major refactors that move or delete files
158
+ - After reversing a significant architectural decision
159
+
160
+ ---
161
+
162
+ ## Expected Outcomes (Honest Estimates)
163
+
164
+ Based on the controlled trial and sidecar experiments:
165
+
166
+ | Scenario | Expected FH Verdict | Finding Rate |
167
+ |---|---|---|
168
+ | AI-generated code, CI passing, no prior governance | PENDING (expected) | 1–3 A/B-grade findings per session (empirical: 2A+1B on arity.ts) |
169
+ | Hermes skill configuration, new external agent | PENDING (expected) | 1–2 A-grade findings per skill (empirical: 2A+1B on opencode skill) |
170
+ | Human-written code, existing tests passing | PASS (expected) | 0–1 B-grade; A-grade unlikely but possible |
171
+ | Previously FH-reviewed code, no changes | PASS | Near-zero new findings (compounding effect) |
172
+
173
+ **Important caveat:** These are estimates from a small sample. Your actual finding rate depends on code quality, domain, and how much adversarial pressure the governance pass applies. The finding rate is not guaranteed — the governance execution is.
174
+
175
+ ---
176
+
177
+ ## The "No Integration Required" Value Proposition
178
+
179
+ All three workflows above require:
180
+ 1. `git diff` to capture changed files
181
+ 2. `./scripts/fh-gate.sh` to generate a structured governance prompt
182
+ 3. Reading the verdict
183
+
184
+ No API integration. No OpenCode plugin. No Hermes adapter. No OpenHuman SDK.
185
+
186
+ FH reads files OpenCode / Hermes / OpenHuman write. The protocol is the interface.
187
+
188
+ This also means FH governance can be added **at any point in an existing workflow** — no architectural changes required.
189
+
190
+ ---
191
+
192
+ ## Compounding Effect
193
+
194
+ The first FH governance pass on a codebase finds the most issues. Each subsequent pass finds fewer — not because the tool is degrading, but because the codebase is improving. This is the governance dividend:
195
+
196
+ ```
197
+ Pass 1: PENDING (2 A-grade, 1 B-grade)
198
+ ↓ fix
199
+ Pass 2: PENDING (0 A-grade, 1 B-grade)
200
+ ↓ fix
201
+ Pass 3: PASS
202
+ ↓ future changes re-enter at Pass 1 only for the changed files
203
+ ```
204
+
205
+ Over time, the governance overhead per PR decreases while baseline code quality rises. The tool does not get harder to satisfy — the codebase gets easier to verify.
206
+
207
+ ---
208
+
209
+ ## References
210
+
211
+ - **Controlled trial (Experiment 2):** `tracks/_meta/fh_opencode_governance_experiment_2026_05_31.md`
212
+ - **Sidecar experiment (Experiment 1):** `knowledge/shared/harness-core/multi_model_sidecar_strategy.md`
213
+ - **Integration contract spec:** `knowledge/shared/harness-core/fh_integration_contract.md`
214
+ - **fh-gate.sh:** `scripts/fh-gate.sh`
215
+ - **OpenCode issue:** github.com/anomalyco/opencode/issues/30057
216
+ - **Hermes issue:** github.com/NousResearch/hermes-agent/issues/35709
217
+ - **OpenHuman issue:** github.com/tinyhumansai/openhuman/issues/3069
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: gate-locality-principle
3
+ description: A safety gate must live where the actor that needs it actually reads it — a gate defined in a place the enforcing actor never loads is decorative, not enforced.
4
+ type: reference
5
+ date: 2026-06-20
6
+ tags: [governance, gate-locality, multi-runtime, judge-robustness, field-harvest]
7
+ originProjects: [two restricted-env field harnesses]
8
+ ---
9
+
10
+ # Gate-Locality Principle
11
+
12
+ > **A safety gate must live where the actor that needs it actually reads it.**
13
+ > A gate defined in a place the enforcing actor never loads provides the *appearance* of safety
14
+ > with none of the enforcement. Locality is part of the gate's correctness, not an afterthought.
15
+
16
+ This is a sibling of the **judge-robustness / mechanical-anchor** spine: judge-robustness says *don't
17
+ let a foolable judge hold the terminal verdict*; gate-locality says *don't put the gate somewhere the
18
+ enforcer can't see it*. Both fail the same way — a control that looks present but cannot actually fire.
19
+
20
+ ## The failure mode (two observed shapes)
21
+
22
+ | Shape | Where the gate was | Who needed it | Why it didn't fire |
23
+ |---|---|---|---|
24
+ | **Code-locality** | absent from the write path entirely | the function that writes to JIRA | the writeback gate checked confidence but not provenance, so a self-inferred finding auto-posted as if verified |
25
+ | **File-locality** | only in a Claude-only `CLAUDE.md` | a Gemini/Codex orchestrator that auto-loads root `AGENTS.md`, not `CLAUDE.md` | the runtime assumed the commander *role* without inheriting the *gates* |
26
+
27
+ Both were found 2026-06-20 across **two field harnesses** (Harness-A: a provenance gate missing from a
28
+ write path; Harness-B + Harness-A: orchestration gates that lived only in a Claude-only file). The
29
+ recurrence across two contexts is what lifts this past a
30
+ single anecdote; it is N=2 within one operator's projects, so **cross-operator confirmation is the
31
+ upgrade path** that would harden it from a working principle to a validated one.
32
+
33
+ ## The fix pattern
34
+
35
+ Move the gate into the artifact the enforcing actor actually reads:
36
+ - **Code path** → put the guard *in the function that performs the irreversible action* (e.g. gate the
37
+ writeback candidate generator on `provenance == verified`, not in a doc that describes it).
38
+ - **Multi-runtime orchestration** → put orchestration gates in a **model-agnostic** file every
39
+ runtime loads (`AGENTS.md`), not in a Claude-only `CLAUDE.md`. A non-Claude orchestrator that never
40
+ reads `CLAUDE.md` otherwise gets the role without the governance.
41
+
42
+ ## Verification (how to know the locality fix worked)
43
+
44
+ A **blind target-tier sim** is the honest check: feed the enforcing actor ONLY the file/path it
45
+ actually loads (e.g. `AGENTS.md` alone, no `CLAUDE.md`) and present a trap the gate should catch
46
+ (e.g. a high-confidence but unverified finding to auto-write). Pre-fix the actor has no basis to
47
+ refuse; post-fix it refuses, citing the now-local gate. The behavioral delta *is* the proof of
48
+ locality — review alone cannot show it (review reads all files; the runtime does not).
49
+
50
+ ## Relationship to other FH assets
51
+
52
+ - **steel-quench** carries this as a Wave-1 attack angle ("Gate-locality — is every safety gate
53
+ readable by the actor that must enforce it?").
54
+ - **judge-robustness / mechanical-anchor** (`[[feedback_judge_robustness_mechanical_anchor]]`) — the
55
+ sibling principle for *verdict* placement; gate-locality is for *gate* placement.
56
+ - **Non-Model Ground** — multi-runtime orchestration is exactly where gate-locality bites, because
57
+ different runtimes load different files.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: goal-quench-anthropic-issue
3
+ description: Draft Anthropic GitHub issue — native /goal token budget + quality verification hook. Reference for when arXiv number is confirmed.
4
+ type: reference
5
+ date: 2026-05-31
6
+ tags: [goal, anthropic, feature-request, token-budget, quality-gate]
7
+ ---
8
+
9
+ # [Feature Request] /goal — native token budget control + quality verification hook
10
+
11
+ ## Summary
12
+
13
+ `/goal` is powerful but ships two structural gaps: no token budget enforcement and a binary completion evaluator (Haiku yes/no) with no quality signal. This issue proposes three native flags to close these gaps, with a userspace proof-of-concept as reference.
14
+
15
+ ---
16
+
17
+ ## Problem
18
+
19
+ ### 1. Token explosion with no mid-run intervention
20
+
21
+ `/goal` runs until Haiku says "done" or context is exhausted. There is no mechanism to:
22
+ - Set a token ceiling before the run
23
+ - Intervene at a percentage threshold (e.g., 80% consumed)
24
+ - Save and checkpoint progress when budget runs low
25
+
26
+ Real-world symptom: users report running `/goal "finish all of this"`, going to sleep, and waking to a fully exhausted context with no recovery path for incomplete work.
27
+
28
+ ### 2. Completion ≠ quality
29
+
30
+ Haiku's binary evaluator (`done? yes/no`) checks whether the stated goal condition is satisfied — not whether the output is correct, well-structured, or regression-free.
31
+
32
+ A session can reach `done = yes` while having introduced bugs, phantom references, or broken existing behavior. There is no hook for a quality gate on the completion verdict.
33
+
34
+ ### 3. No checkpoint / resume
35
+
36
+ When budget exhaustion forces a stop, there is no structured record of what was completed vs. what remains. The next session starts cold.
37
+
38
+ ---
39
+
40
+ ## Proposed Native Flags
41
+
42
+ ### `--budget <N>`
43
+
44
+ Enforce a token ceiling for the `/goal` session.
45
+
46
+ Behavior:
47
+ - At 70% of `N`: surface a warning to the user — "Budget at 70%. Recommend re-prioritizing remaining tasks."
48
+ - At 85% of `N`: pause the session. Prompt: "Budget at 85%. Options: (a) continue / (b) reduce scope / (c) stop and save."
49
+ - At 95% of `N`: force stop. Commit completed work. Output structured summary: `Completed: [...] | Remaining: [...]`
50
+
51
+ ### `--verify <command>`
52
+
53
+ Run a shell command when Haiku returns `done = yes`. Accept the completion verdict only if the command exits 0.
54
+
55
+ ```bash
56
+ # Example: test suite must pass before /goal accepts "done"
57
+ /goal "all tests pass" --verify "npm test"
58
+
59
+ # Example: FH quality gate before accepting completion
60
+ /goal "refactor complete" --verify "claude -p 'run pipeline-conductor --quick'"
61
+ ```
62
+
63
+ This separates the concerns that a single evaluator cannot serve simultaneously:
64
+ - **Haiku**: completion detection (fast, cheap, every turn)
65
+ - `--verify` command: quality gate (once, on completion, user-defined)
66
+
67
+ The same principle that motivated separating the Haiku evaluator from Claude's self-assessment (avoiding cognitive bias) applies here: the completion judge should not also be the quality judge.
68
+
69
+ ### `--checkpoint`
70
+
71
+ Auto-commit on structured sub-goal boundaries. Requires Haiku to output sub-goal markers (not just yes/no), which is a separate RFC — listed here for completeness.
72
+
73
+ ---
74
+
75
+ ## Reference Implementation
76
+
77
+ **forge-harness `goal-quench`** implements a userspace version of `--budget` + `--verify` using:
78
+ - Pre-run: `token-budget-gate` skill estimates cost and sets thresholds
79
+ - Mid-run: thresholds injected as session instructions (Claude self-enforces)
80
+ - Post-run: Stop hook detects `/goal` completion → triggers `pipeline-conductor --quick`
81
+
82
+ Limitations of the userspace approach (why native support is needed):
83
+ - Mid-run token ceiling cannot be hard-enforced without native hook
84
+ - Stop hook cannot invoke Claude recursively (verification triggers on next session, not immediately)
85
+ - Checkpoint requires manual commit — no structured sub-goal output from Haiku
86
+
87
+ **Paper reference**: forge-harness: A Meta-Harness Engineering Platform for Terminal-Native Claude Code Workflows. Zenodo DOI: 10.5281/zenodo.20397566. arXiv: [pending number].
88
+
89
+ ---
90
+
91
+ ## Adoption signal
92
+
93
+ `/goal` was introduced in Claude Code Week 20 (2026-05-11), absorbing the community `claude-goal` project (Stop hook implementation) 11 days after OpenAI Codex CLI v0.128.0 shipped a similar feature. Community demand is established. This request addresses the production-readiness gap that community implementations cannot close without native runtime access.
94
+
95
+ ---
96
+
97
+ ## Related issues / PRs
98
+
99
+ - `claude-goal` (community Stop hook implementation): [link if available]
100
+ - OpenAI Codex CLI `/goal` reference: v0.128.0 release notes
101
+
102
+ ---
103
+
104
+ *Drafted: 2026-05-31. Submit after arXiv number confirmed.*
@@ -0,0 +1,136 @@
1
+ # Harness 6-Axis Framework
2
+
3
+ > Top-level meta-framework for forge-harness operations. The 6 axes form a decision tree that governs all harness-level work — from initial structure through continuous improvement.
4
+
5
+ **Core principle (field harness)**: "A good harness gets simpler over time. If it's getting more complex, something is wrong."
6
+
7
+ **Meta-harness variant**: A good meta-harness *optimizes* over time — complexity is justified when it earns its scope. Red flags: orphaned skills (never invoked), redundant overlap (two skills doing the same thing), decorative structure (exists but doesn't change behavior). Complexity itself is not the warning signal.
8
+
9
+ **Completeness model (frame-wise ultimate)**: A harness is never *finally* complete — it is **frame-wise ultimate**. A *frame* is the scope one verification cycle can currently see: per-asset, an edit-manifest RECORD (Axis 3) → verify (Axis 5) cycle; for FH-as-a-whole, a release/version milestone (cf. a model's knowledge cutoff = its release frame's timestamp). A frame is *closed* — ultimate **for that frame** — when every **visible** gap is resolved or **named**: a named gap is evidence the frame closed (you saw the edge), not evidence against it; the only signal of incompleteness is an **un-named** gap. This reframes the existing completion-claim discipline (Axis 5 before "done", residuals declared) — growth is not the opposite of completeness but its **ladder**: Axis 6 carries one frame's closure into the next frame's baseline. **Two guards keep this honest, not self-congratulatory:** (1) never declare a frame closed before the gap-surfacing pass (Axis 5) has run — premature closure (e.g. "downloads ≠ validated usage"); (2) the verdict "are all *visible* gaps named?" is **judged, so it is adversarially paired** (Axis 5's challenger, or an external sister-GT) — never self-asserted, because an un-named gap is invisible *to the self-judge by construction*; only a non-self pass expands what is visible (mechanical-anchor / Non-Model-Ground principle, §Scope Hierarchy's no-self-commit kin). An *irreducible* gap (visible but unclosable — e.g. the 4-axis gate's autonomous-runner self-verification residual, documented honest in CLAUDE.md §FH 4-Axis Gate) closes its frame **at the ceiling**; the next frame opens only when a new capability changes what is visible.
10
+
11
+ ---
12
+
13
+ ## The 6 Axes
14
+
15
+ | Axis | Name | Question it answers |
16
+ |:---:|---|---|
17
+ | **1** | **Structure** | Where does this work live? (hub vs. project, rules vs. skills, knowledge vs. tracks) |
18
+ | **2** | **Context** | What does the AI need to know before starting? (session card, CATALOG, relevant docs) |
19
+ | **3** | **Plan** | What is the intended change and its predicted impact? (edit-manifest RECORD) |
20
+ | **4** | **Execute** | What is the minimal, reversible action? (direct edit, agent dispatch, parallel dispatch) |
21
+ | **5** | **Verify** | Did the change do what was predicted? (regression guard, adversarial, source-grounding) |
22
+ | **6** | **Improve** | What pattern is worth keeping? (harvest-loop, field-harvest, compounding loop) |
23
+
24
+ ---
25
+
26
+ ## Decision Tree (Condensed)
27
+
28
+ ```
29
+ New work arrives
30
+
31
+ ▼ Axis 1 — Structure
32
+ Where does this live?
33
+ ├── Hub meta (rules/skills/templates) → FH 4-axis auto-gate applies
34
+ ├── Field project → route via Agent dispatch or direct edit
35
+ └── Cross-project knowledge → knowledge/shared/
36
+
37
+ ▼ Axis 2 — Context
38
+ What must the AI know?
39
+ ├── Read session_card (reference_next_session_starter.md)
40
+ ├── Read CATALOG.md → candidate files only
41
+ └── Load LOCAL_SKILL_REGISTRY if cross-project dispatch
42
+
43
+ ▼ Axis 3 — Plan
44
+ What will change?
45
+ └── edit-manifest RECORD entry: branch, change, predicted_impact, verify_next
46
+
47
+ ▼ Axis 4 — Execute
48
+ Minimum viable action:
49
+ ├── Direct edit (simple, known file, absolute path)
50
+ ├── Single Agent dispatch (field task, one project)
51
+ └── Parallel Agent dispatch (2+ independent tasks — no asking, just dispatch)
52
+
53
+ ▼ Axis 5 — Verify
54
+ Did it work?
55
+ ├── Axis 1 (backward): regression_guard.sh
56
+ ├── Axis 2 (adversarial): steel-quench
57
+ ├── Axis 3 (forward): phantom-quench
58
+ ├── Axis 4 (record): confirm edit-manifest entry exists
59
+ └── Before claiming "done": attach (a) evidence (b) failure-checks run
60
+ (c) residual risk — bare "completed" does not pass (see Completion-claim discipline)
61
+
62
+ ▼ Axis 6 — Improve
63
+ Worth keeping as a pattern?
64
+ ├── 3+ repeats → skill-candidate tag → field-harvest
65
+ ├── Session end → harvest-loop (weekly cycle)
66
+ └── Compounding: hub_compounding_loop.md
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Axis 5 — FH 4-Axis Verification Gate (detail)
72
+
73
+ Applies automatically when any FH asset is modified (SKILL.md, rules, templates, CLAUDE.md, substantive knowledge/ docs).
74
+
75
+ | Gate axis | Tool | Class | What it catches |
76
+ |---|---|---|---|
77
+ | **Backward** | `regression_guard.sh` | mandatory-pass | Critical section loss, broken refs, syntax errors, line reduction |
78
+ | **Adversarial** | `steel-quench` | judged | Trigger phrase collisions, design attack surface, over-engineered steps |
79
+ | **Forward** | `phantom-quench` | judged | Phantom references, paths that don't exist, stale external links |
80
+ | **Record** | `edit-manifest RECORD` | mandatory-pass | Logs predicted impact — closes the predict-verify loop |
81
+
82
+ **Check classes**: every verify check is one of three classes — **mandatory-pass**
83
+ (deterministic; blocks on fail), **measured** (quantitative; tracked, not blocking alone —
84
+ e.g. `token-budget-gate`, goal-quench calibration), **judged** (LLM-judge emitting verdict +
85
+ cited evidence + a corrective action — a judge score without a fix path is unactionable, and
86
+ self-judges grade leniently). **Judged rule**: a judge verdict alone never passes — it must be
87
+ paired with adversarial re-verification (`steel-quench` / `verify-bidirectional`), and its
88
+ cited evidence is itself subject to `phantom-quench`. (Taxonomy adapted from external
89
+ supervisor-loop discourse, 2026-06; FH adds the judged-pairing rule and evidence
90
+ re-verification, which the source leaves open.)
91
+
92
+ **Completion-claim discipline** (judged-class sharpening): a "done" / "passed" claim is itself a judged
93
+ verdict and must carry three things, not just an assertion — **(a) an evidence artifact** (the output,
94
+ diff, or run that shows it), **(b) the enumerated failure-checks actually run** (which negative cases
95
+ were tested, not only that it "works"), and **(c) the explicit residual risk** (what could still be
96
+ wrong). A bare "completed" with none of these is an ungrounded judge verdict and does not pass. Each of
97
+ (a)–(c) must be **non-vacuous** — a named artifact, an enumerated case list, and a specific risk; "it
98
+ works" / "tested" / "none known" are vacuous fills and fail the discipline (same non-vacuity bar as the
99
+ CLAUDE.md §marker rule: a recorded verdict/count, not "it ran"). Bounded scope: (b) means the negative
100
+ cases you *actually ran*, not all conceivable ones; (c) means the one or two risks you can name now, not
101
+ an exhaustive proof of safety. Applies to every skill's Done When and to `goal-quench` /
102
+ `pipeline-conductor` completion gates. (Harvested as independent-convergence reinforcement from sister
103
+ assets — oh-my-claudecode "Ralph" Done-When + book/19689's verification-before-completion-claim theme;
104
+ cross-audit `tracks/_audit/session_2026_06_14_wikidocs-deep-sweep.md`.)
105
+
106
+ **Hard gate**: git pre-commit hook (`templates/.git-hooks/pre-commit`) blocks commit until marker + manifest entry exist.
107
+
108
+ **Lightweight exception** (Axis 1 + 4 only): sessions where zero SKILL.md/rules/templates files changed.
109
+
110
+ ---
111
+
112
+ ## Scope Hierarchy
113
+
114
+ ```
115
+ Hub common principles (CLAUDE.md)
116
+ └── Project CLAUDE.md
117
+ └── Domain session rules (.claude/rules/session.md)
118
+ ```
119
+
120
+ Lower levels cannot override higher. AI contribution → PR proposal only (no direct commit to shared repos without explicit user approval).
121
+
122
+ ---
123
+
124
+ ## Related
125
+
126
+ - `harness_design_decision_lens.md` — orthogonal companion: the 7 architectural-bet decisions (which design point at Axis 1 / Axis 4) + default-bias checklist + scaffolding-removal method
127
+ - `crucible_mode.md` — total-immersion absorption stance: chains Axis 5 (the melt) + Axis 6 (the rebirth) with an unmeltable identity core; used when a whole corpus on a core FH axis is absorbed
128
+ - `hub_compounding_loop.md` — Axis 6 automation (weekly/monthly/quarterly cycles)
129
+ - `ai_dialogue_playbook.md` — Axis 2 dialogue principles (how to ask, delegate, record)
130
+ - `claude_code_runtime_flow.md` — Axis 4 runtime behavior (chronological session flow)
131
+ - `.claude/rules/operations.md` — Sub-agent operations, weekly cycle detail
132
+
133
+ **External sibling (independent convergence)**
134
+
135
+ - arXiv:2603.25723 (*Natural-Language Agent Harnesses*, NLAH) — external academic sibling that independently converges on the same core thesis: a harness control layer can be an executable natural-language object, not code. NLAH measures the natural-language-harness form empirically; FH governs and compounds it.
136
+ - arXiv:2606.06324 (*HarnessFix / ETCLOVG*, 2026-06) — sibling on the **orthogonal** axis: where NLAH and FH describe the harness as a *process/control* object, HarnessFix supplies a *component taxonomy* of what a deployed harness contains (7 layers — Execution · Tooling · Context · Lifecycle · Observability · Verification · Governance). Its **V layer maps onto FH's Axis-5 gate on 3 of its 4 functions** (intermediate validation → steel/phantom-quench · final-output eval → completion-claim discipline · regression testing → regression_guard); its *readiness-check* function maps to FH pre-flight gates (install-doctor / asset-placement-gate) that sit outside Axis-5. Its named **Observability** layer is a structural axis FH lacks — FH's nearest coverage is *retrospective audit* (weekly_audit, subagent_invocations_log), not runtime observability (import candidate for `harness-doctor`). Cross-audit: `tracks/_audit/session_2026_06_19_harnessfix-etclovg-cross-audit.md`.
@@ -0,0 +1,108 @@
1
+ # Harness Design-Decision Lens
2
+
3
+ > A complement to `harness_6axis_framework.md`. The 6-axis framework is a **lifecycle** decomposition —
4
+ > it answers *when, in the flow of a piece of work*, each concern applies (structure → context → plan →
5
+ > execute → verify → improve). This lens is **orthogonal**: it answers *which architectural bet to place*
6
+ > at Axis 1 (Structure) and Axis 4 (Execute), where the 6-axis tree says "route it" but not "which design
7
+ > point." Use the two together — the 6-axis says *which stage*; this lens says *which trade-off setting*.
8
+ >
9
+ > **Open this doc when** you are about to add agents, tools, permissions, or harness thickness — or when
10
+ > the 6-axis tree says "route it" (Axis 1 / Axis 4) but not *which way*. For lifecycle questions (what
11
+ > stage am I in, what must I verify), stay in the 6-axis framework.
12
+
13
+ **Provenance (independent-convergence harvest — not clone-and-own):** the decision-table framing was
14
+ harvested from the sister asset `wikidocs.net/book/19689` 「하네스 엔지니어링 백과사전」 Ch12 (governor
15
+ source-closed 2026-06-14; cross-audit `tracks/_audit/session_2026_06_14_wikidocs-deep-sweep.md`). **The
16
+ single net-new increment from the harvest is the orthogonal-bets *framing* itself** — presenting harness
17
+ architecture as ~7 trade-off axes set against the 6-axis lifecycle. The governor source-close ruled the
18
+ individual decisions, the contrarian checklist, and the scaffolding-removal method **ALREADY-HAVE** (FH
19
+ embodies them — see column 3 and the `measured`/judged check classes). They are reproduced below only to
20
+ make the already-placed bets *explicit and operational in one place*, not as novel imports. Where this
21
+ doc restates an existing FH principle, it says so.
22
+
23
+ ---
24
+
25
+ ## The seven decisions (architectural bets)
26
+
27
+ Each is a spectrum, not a right answer. The third column names the FH asset that already embodies the
28
+ bet — so this is a *map of bets FH is already placing*, made explicit, plus the two FH was placing only
29
+ implicitly (agent-count, reasoning-strategy).
30
+
31
+ | Decision | Spectrum | Where FH already places the bet | "Which point, when" |
32
+ |---|---|---|---|
33
+ | **Agent count** | single ↔ multi-agent | `agent-composer` (single vs parallel dispatch) | Single by default; split only on genuinely independent sub-tasks (agent-composer's per-wave fan-out cap, ≤4). Isolation cost rises with agent count. |
34
+ | **Reasoning strategy** | ReAct (think each step) ↔ plan-then-execute | 6-axis Axis 3 (Plan) → Axis 4 (Execute); `goal-quench` decomposition | Plan-then-execute for parallelizable / known work; ReAct for genuinely exploratory steps. |
35
+ | **Context strategy** | strong compression ↔ rich context | `context-doctor`, compact-before-saturation reflex, layered memory (MEMORY.md index / `memory/*.md` keyword-load / `tracks/` archive) | Compress on long sessions; keep rich context where verification needs the evidence intact (phantom-quench tension). |
36
+ | **Verification** | computational ↔ judged | check-class taxonomy: mandatory-pass / measured / **judged** (`harness_6axis_framework.md` Axis 5) | Prefer computational anchors; a judged verdict never passes alone (judge-robustness rule). |
37
+ | **Permissions** | permissive ↔ restrictive | `mcp_tool_gating` allow / ask / deny; Destructive-Op + Pre-Publish gates | Restrictive on irreversible / external-facing actions; permissive on reversible local work. |
38
+ | **Tool scope** | all tools always ↔ staged minimal | ToolSearch (deferred-tool fetch), `mcp_tool_gating` | Stage tools in; broad always-on exposure degrades selection accuracy. (Vercel measured 17 specialized tools → 80% success vs 2 general-purpose tools → 100%, at lower token + latency: "We removed 80% of our agent's tools", vercel.com/blog/we-removed-80-percent-of-our-agents-tools, accessed 2026-06-14.) |
39
+ | **Harness thickness** | thin (trust model) ↔ thick (control by code/rules) | field principle "simpler over time" vs meta principle "complexity earns its scope" (`harness_6axis_framework.md` Core principle) | FH already holds a *more nuanced* field-vs-meta split than a single thin/thick dial. Thicker buys predictability but encodes "things the model can't do" — assumptions that age as the model improves (design intuition, not a benchmarked claim). |
40
+
41
+ The decisions are **not independent**: more agents raises the cost of context isolation + verification;
42
+ always-on tools raises the stakes of permission design; a thicker harness raises the carrying cost of
43
+ stale assumptions.
44
+
45
+ **Orthogonality is partial, not total.** Two of the seven bets — *reasoning strategy* and *verification* —
46
+ are placed *at* a 6-axis stage (Axis 3→4 for reasoning, Axis 5 for verification), so for those the lens
47
+ and the lifecycle touch rather than run perpendicular. The lens is still the right tool for "which setting"
48
+ (plan-vs-ReAct, computational-vs-judged); the 6-axis is the right tool for "at which stage." The orthogonal
49
+ claim holds strongly for the other five bets and loosely for these two.
50
+
51
+ ---
52
+
53
+ ## Default-bias checklist (the contrarian inversions)
54
+
55
+ > *Already-embodied (governor: ALREADY-HAVE) — restated here as a one-place design-time pass, not a novel
56
+ > import. FH already runs these instincts through `steel-quench` and the meta-harness red-flag scan.*
57
+
58
+ Four intuitions that feel right while building and fail in operation. Run this as a quick adversarial
59
+ pass on any harness design (it is the design-time analogue of `steel-quench`'s attack lenses):
60
+
61
+ 1. **"More tools = more capable."** Often false — broad tool exposure hurts selection accuracy. Prefer
62
+ staged, single-purpose tools over a wide general surface.
63
+ 2. **"Reason at every step (ReAct always)."** Often false — for parallelizable / known work,
64
+ plan-then-execute is faster and cheaper.
65
+ 3. **"Broader permissions = faster."** False under operations — the cost lands as irreversible mistakes,
66
+ not saved time. Gate the irreversible.
67
+ 4. **"Thicker harness = safer."** True short-term, debt long-term — a thick harness encodes "things the
68
+ model can't do," and those assumptions age. Safety that does not get revisited becomes a burden.
69
+
70
+ ---
71
+
72
+ ## Scaffolding-removal method (operationalizes "simpler over time")
73
+
74
+ > *The principle is already FH's (governor: ALREADY-HAVE — 6-axis core principle). What is operationalized
75
+ > here is the **method** the principle left unstated, consistent with FH's `measured` check class.*
76
+
77
+ FH's core principle states the *goal* — "a good harness gets simpler over time" — but not the *method*.
78
+ A testable one, consistent with FH's verification identity:
79
+
80
+ > **Remove scaffolding one piece at a time, and compare.** When simplifying, ablate a single support at a
81
+ > time and check what actually holds quality before removing the next. Removing several at once loses the
82
+ > signal of which support was load-bearing.
83
+
84
+ This is the disciplined form of the meta-harness red-flag scan (orphaned / redundant / decorative units):
85
+ do not bulk-delete suspected-decorative structure — ablate-one, measure, then proceed. It pairs with the
86
+ `measured` check class (the comparison is the measurement).
87
+
88
+ ---
89
+
90
+ ## How it plugs into the 6-axis flow
91
+
92
+ - **Axis 1 (Structure)** — when deciding where work lives and how it is shaped, consult the seven
93
+ decisions for the architectural bet, and the default-bias checklist before committing to "more"
94
+ (agents, tools, permissions, thickness).
95
+ - **Axis 4 (Execute)** — the agent-count and reasoning-strategy decisions set the dispatch shape
96
+ (direct / single agent / parallel) the 6-axis tree otherwise leaves to habit.
97
+ - **Axis 6 (Improve)** — apply the scaffolding-removal method when the simplification principle fires.
98
+
99
+ **Check class:** this doc is a *judged* design aid (it informs human/AI design choices, it does not gate
100
+ mechanically). Its adversarial pairing is the default-bias checklist above + `steel-quench` on any design
101
+ it informs — no judge-only path.
102
+
103
+ ---
104
+
105
+ ## Related
106
+ - `harness_6axis_framework.md` — the lifecycle framework this lens complements (Core principle: thickness; Axis 5: check-class taxonomy)
107
+ - `tracks/_audit/session_2026_06_14_wikidocs-deep-sweep.md` — the governor-closed cross-audit this harvest came from
108
+ - `.claude/rules/auto_project_mapping.md` — Full-Harness Mode, where thickness/permission bets are placed per project