@chrono-meta/fh-gate 1.4.41 → 1.4.43
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.
- package/AGENTS.md +5 -3
- package/CATALOG.md +6 -0
- package/CLAUDE.md +65 -130
- package/docs/CONTRIBUTING.md +2 -2
- package/knowledge/shared/dialogue/ai_dialogue_playbook.md +137 -0
- package/knowledge/shared/dialogue/claude_code_runtime_flow.md +170 -0
- package/knowledge/shared/dialogue/memory_intent_recall.md +209 -0
- package/knowledge/shared/harness-core/claude_md_gate_details.md +170 -0
- package/knowledge/shared/harness-core/companion_store_pluggable_cross_audit_2026-06-11.md +118 -0
- package/knowledge/shared/harness-core/crucible_mode.md +112 -0
- package/knowledge/shared/harness-core/deep_research_capability_ladder.md +122 -0
- package/knowledge/shared/harness-core/fh_detail_protocols.md +163 -0
- package/knowledge/shared/harness-core/fh_ecosystem_positioning.md +147 -0
- package/knowledge/shared/harness-core/fh_opencode_governance_wrapper.md +163 -0
- package/knowledge/shared/harness-core/fh_synergy_playbook.md +217 -0
- package/knowledge/shared/harness-core/gate_locality_principle.md +57 -0
- package/knowledge/shared/harness-core/goal_quench_anthropic_issue.md +104 -0
- package/knowledge/shared/harness-core/harness_6axis_framework.md +136 -0
- package/knowledge/shared/harness-core/harness_design_decision_lens.md +108 -0
- package/knowledge/shared/harness-core/harness_frontier_diagnosis_2026-06-02.md +102 -0
- package/knowledge/shared/harness-core/hub_compounding_loop.md +109 -0
- package/knowledge/shared/harness-core/hub_maturity_roadmap.md +201 -0
- package/knowledge/shared/harness-core/hybrid_orchestration_architecture_roadmap.md +196 -0
- package/knowledge/shared/harness-core/live_surface_automation_pattern.md +110 -0
- package/knowledge/shared/harness-core/measurement-integrity-checklist.md +59 -0
- package/knowledge/shared/harness-core/meta_harness_engineering_definition.md +116 -0
- package/knowledge/shared/harness-core/multi_model_sidecar_strategy.md +651 -0
- package/knowledge/shared/harness-core/persona_container_schema.md +172 -0
- package/knowledge/shared/harness-core/return_path_gate.md +120 -0
- package/knowledge/shared/harness-core/self_evolution_routine.md +268 -0
- package/knowledge/shared/harness-core/skill_quality_rubric.md +71 -0
- package/knowledge/shared/harness-core/tpa_schema.md +136 -0
- package/package.json +3 -2
package/AGENTS.md
CHANGED
|
@@ -53,7 +53,7 @@ forge-harness is structured as two distinct layers:
|
|
|
53
53
|
| Layer | Contents | AI compatibility |
|
|
54
54
|
|---|---|---|
|
|
55
55
|
| **Methodology layer** (model-agnostic) | `tracks/`, `knowledge/`, `SKILL.md` documents, session protocols | Any AI model |
|
|
56
|
-
| **Automation layer** (Claude-native) |
|
|
56
|
+
| **Automation layer** (Claude-native) | `plugins/*/agents/` (plugin channel — FH's own agents, auto-loaded when the plugin is enabled), hooks, slash commands, `CLAUDE.md` rules; `.claude/agents/` is the field-project local/override slot, unused by FH itself | Claude Code only |
|
|
57
57
|
|
|
58
58
|
Agents in this registry belong to the **Automation layer**. Skills (in `plugins/`) straddle both layers — their methodology is model-agnostic, but their invocation mechanism is Claude Code-native.
|
|
59
59
|
|
|
@@ -68,7 +68,9 @@ Agents in this registry belong to the **Automation layer**. Skills (in `plugins/
|
|
|
68
68
|
>
|
|
69
69
|
> When unsure, treat raw / observational / operator-specific material as **private-first** and promote only the polished result to public. (Concrete per-operator bindings — exact companion-store path, sync mechanism — live in the operator's local config, not here.)
|
|
70
70
|
|
|
71
|
-
> **Multi-model sidecar (validated)**: Any FH user can delegate to other models via sidecar — Gemini CLI, OpenAI/Codex CLI, or Copilot CLI's model catalog — invoked with `Bash` from within the Claude Code session. FH is the orchestrating harness; the sidecar is a routing/access layer (not a second harness — different layer entirely). Validated empirically: `echo "prompt" | gemini` works inside a CC session and produces usable output. Sidecar calls are Bash invocations, not agent dispatches — they bypass this registry and are coordinated inline by the skill. Capability routing matters too: Gemini/Antigravity is the natural multimodal sidecar, while a Codex
|
|
71
|
+
> **Multi-model sidecar (validated)**: Any FH user can delegate to other models via sidecar — Gemini CLI, OpenAI/Codex CLI, or Copilot CLI's model catalog — invoked with `Bash` from within the Claude Code session. FH is the orchestrating harness; the sidecar is a routing/access layer (not a second harness — different layer entirely). Validated empirically: `echo "prompt" | gemini` works inside a CC session and produces usable output. Sidecar calls are Bash invocations, not agent dispatches — they bypass this registry and are coordinated inline by the skill. Capability routing matters too: Gemini/Antigravity is the natural breadth/multimodal sidecar, while Codex's primary cast is the **repo-grounded audit** sidecar (file reads · grep/source-close · diff & patch · gate execution · phantom/backtrace) — **not** discovery/design-depth; a Codex session with Browser/Chrome connectors mounted can additionally take live web-flow automation as a capability-routed handoff. In a local FH workspace that pairs the public methodology mirror with a private companion store (the `*-be` pattern), route by workspace capability while preserving each repository's ownership boundary. See `knowledge/shared/harness-core/multi_model_sidecar_strategy.md §Runtime Authority` for the authority model and the full pattern.
|
|
72
|
+
|
|
73
|
+
> **Runtime authority — hard stop line (Codex / non-Claude runtimes):** your findings are **evidence candidates, not terminal verdicts**. They are not final until the governor source-closes them against a **mechanical anchor** (a local file hit · a literal source span · a passing check) — **never governor agreement alone**. You are a capability-routed **sidecar**, not a co-governor: there is one explicit governor per context. Full doctrine: `knowledge/shared/harness-core/multi_model_sidecar_strategy.md §Runtime Authority`.
|
|
72
74
|
|
|
73
75
|
---
|
|
74
76
|
|
|
@@ -100,7 +102,7 @@ For complex multi-step tasks, run `/agent-composer` first to plan which agents t
|
|
|
100
102
|
|
|
101
103
|
## Codex Compatibility (beta)
|
|
102
104
|
|
|
103
|
-
The methodology layer (`tracks/`, `knowledge/`, `SKILL.md` docs) is Codex-compatible beta. Any AI model can follow skill workflows by reading SKILL.md files directly; the automation layer (hooks,
|
|
105
|
+
The methodology layer (`tracks/`, `knowledge/`, `SKILL.md` docs) is Codex-compatible beta. Any AI model can follow skill workflows by reading SKILL.md files directly; the automation layer (hooks, plugin-channel agents under `plugins/*/agents/`, `/model`) is Claude Code-native and requires manual adaptation. FH's own agents are auto-loaded via the plugin channel when the plugin is enabled — `.claude/agents/` is the field-project override slot, not where FH ships its agents. Non-Claude runtimes use this `AGENTS.md`, `plugins/*/agents/*.md`, and `scripts/fh-run.sh` to apply the same methodology via adapter.
|
|
104
106
|
|
|
105
107
|
### Entry point for Codex users
|
|
106
108
|
|
package/CATALOG.md
CHANGED
|
@@ -8,6 +8,12 @@ AI reads this file first when searching past work. Open individual files for det
|
|
|
8
8
|
|
|
9
9
|
<!-- Add entries in reverse date order (newest at top) -->
|
|
10
10
|
|
|
11
|
+
### 2026-06-24 | forge-harness | #sister-asset, #cross-audit, #ponytail, #measurement-integrity, #mechanical-anchor, #agent-portability, #growth-lessons
|
|
12
|
+
**File:** tracks/_audit/session_2026_06_24_ponytail-lazy-senior-dev.md (+ cross-ref links: multi_model_sidecar_strategy.md, measurement-integrity-checklist.md)
|
|
13
|
+
Full sister-asset cross-audit of `ponytail` (DietrichGebert/ponytail@dedc97c, ~50k★ reviewer-claimed/unverified, "lazy senior dev" minimal-code field skill) vs FH, run with 3 sidecars (Codex repo-grounded gpt-5.5 + Gemini 3.1 Pro breadth, identity-probe verified + CC FH-doctrine extraction); governor source-closed every load-bearing claim to repo file:line (phantom-quench: 10 GROUNDED/0 PHANTOM). Convergence on 4 axes (strongest = axis C verify-instrument, where independence is clearest; A/D may be shared-ecosystem-standard): portable-AGENTS.md+thin-adapter distribution · safety-guard-never-cut + *measured* (20/20 adversarial tier vs bare prompt 95%) · verify-instrument-before-measuring (twice — #126 baseline artifact + hook-bleed) · residual-as-tracked-debt (un-named gap = the only failure signal). FH increment = the safety guard is prose at every host (hooks only inject ruleset; check-rule-copies.js guards text-drift not runtime), so FH's mechanical-anchor + adversarial-regression layer is the gap to fill.
|
|
14
|
+
- Decision: import 3 (platform-native table, --selftest dogfood example, behavior-grader sharpening for prompt-regression); propagate 3 to ponytail (mechanical-anchor option, adversarial regression on minimized diffs, reps≥3 on safety) via humble issue after persona audit; growth = a **field-skill spin-out that feeds the hub**, NOT re-pointing the meta-harness toward virality (reference-asset identity held; missing lever = a visible before/after).
|
|
15
|
+
- Open: external #3 delivery gated on 3+ persona × 4-axis audit + operator GO.
|
|
16
|
+
|
|
11
17
|
### 2026-06-14 | forge-harness | #crucible-mode, #total-immersion-absorption, #design-decision-lens, #completion-claim-discipline, #self-forge, #sister-asset
|
|
12
18
|
**File:** knowledge/shared/harness-core/crucible_mode.md + harness_design_decision_lens.md + harness_6axis_framework.md (Completion-claim discipline) + tracks/_audit/session_2026_06_14_wikidocs-deep-sweep.md
|
|
13
19
|
Content-level deep cross-audit of two wikidocs sister books (19689 백과사전 / 19736 Allen 멀티에이전트) via live-surface Playwright ingest + Gemini/Codex debate-loop + governor source-close, then **absorbed every candidate that passed the identity gate** (FH-identity-preserving + positively-expandable). Three assets: (1) `harness_design_decision_lens.md` — the 7 architectural-bet decisions as an orthogonal companion to the 6-axis lifecycle (only net-new = the framing; rest ALREADY-HAVE, honestly marked); (2) 6-axis **Completion-claim discipline** — a "done" claim must carry evidence + failure-checks-run + residual risk, non-vacuous; (3) **`crucible_mode.md`** — names the total-immersion absorption *stance* (throw the whole corpus in, melt under adversarial heat, keep only what bonds to an **unmeltable adamantium core**; rejections are boundary-defining). Each absorption was itself put through the crucible (quench-challenger + persona-auditor + Sonnet blind sim) — the crucible doc's own quench caught 3 of its defects (incl. a phantom worked-instance claim) before commit.
|
package/CLAUDE.md
CHANGED
|
@@ -160,19 +160,14 @@ All 6 items below must pass before committing a new SKILL.md. If any fails, fix
|
|
|
160
160
|
|
|
161
161
|
Skills without a Done When definition automatically qualify as harness-doctor L2 M-tier.
|
|
162
162
|
Check-class declaration applies to **new** skills; existing skills backfill opportunistically
|
|
163
|
-
(when next edited), not retroactively. **
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
cadence already enumerates skills), then opportunistic-on-edit thereafter — a single baseline pass,
|
|
172
|
-
not a recurring sweep. **"routing/gate skill" (mechanical test)**: a skill whose *primary output is a
|
|
173
|
-
dispatch decision or a pass/block verdict* — e.g. `agent-composer`, `goal-quench`, `asset-placement-gate`,
|
|
174
|
-
`return-path-gate`, `phantom-quench` — NOT a skill that merely calls others as sub-steps (e.g.
|
|
175
|
-
`harvest-loop`).
|
|
163
|
+
(when next edited), not retroactively. **Obligation (always-loaded):** a **routing/gate skill** (primary
|
|
164
|
+
output = a dispatch decision or pass/block verdict) owes a **one-time `Step 0.5` baseline trigger-probe**
|
|
165
|
+
at the next `harness-doctor` run **and a re-probe whenever its trigger phrases change** — not optional for
|
|
166
|
+
that skill class, and not a retroactive sweep of all routers.
|
|
167
|
+
|
|
168
|
+
> **Detail**: See `knowledge/shared/harness-core/claude_md_gate_details.md §New-Skill-Backfill` — the
|
|
169
|
+
> probe mechanics (fire-count procedure), the baseline-floor rationale, and the mechanical "routing/gate
|
|
170
|
+
> skill" test — read when editing a router/gate skill.
|
|
176
171
|
|
|
177
172
|
---
|
|
178
173
|
|
|
@@ -188,21 +183,14 @@ No user request is needed — this is a mandatory autonomous step, not a proposa
|
|
|
188
183
|
FH asset modified → Axis 1 (regression_guard.sh --pr {BRANCH})
|
|
189
184
|
→ Axis 2 (/steel-quench) → Axis 3 (/phantom-quench)
|
|
190
185
|
→ marker: tracks/_meta/.axes_23_passed_{branch}_{date}.marker
|
|
191
|
-
(
|
|
192
|
-
hook validates mechanically: below-floor blocks without below-floor-ack, and
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
genuine close needs a secret the runner does NOT hold — an **operator-present hard-close**: a
|
|
200
|
-
GPG-signed trailer **whose key requires a fresh interactive passphrase** (NOT an agent-cached
|
|
201
|
-
gpg-agent key, and NOT operator-git-identity alone — `user.email` is config the runner already
|
|
202
|
-
writes, forgeable, not a secret). The real guarantee is *uncached private-key access*, not commit
|
|
203
|
-
identity; optional, breaks full autonomy, use only when the operator is at the keyboard. Autonomous mode keeps the honest
|
|
204
|
-
residual + weekly-audit backstop — do NOT fake-close it. Gemini cross-analysis 2026-06-16 reached
|
|
205
|
-
this verdict independently, converging with the existing FH stance)
|
|
186
|
+
(required fields: axis2-engine / axis2-model / floor-status / axis2-evidence;
|
|
187
|
+
hook validates mechanically: below-floor blocks without below-floor-ack, and axis2-evidence
|
|
188
|
+
must be non-vacuous — a recorded verdict/count, not "it ran". Marker scope is form +
|
|
189
|
+
non-vacuity + auditability, NOT provenance — a fabricated marker is the weekly-audit + operator
|
|
190
|
+
residual by design, do NOT fake-close it.
|
|
191
|
+
→ **Detail**: See `knowledge/shared/harness-core/claude_md_gate_details.md §Marker-Irreducibility`
|
|
192
|
+
— why the below-floor-ack is structurally irreducible for an autonomous runner + the
|
|
193
|
+
operator-present GPG hard-close option — read when auditing or attempting to harden the marker.)
|
|
206
194
|
→ Axis 4 (/edit-manifest RECORD, today's entry in edit_manifest.yaml)
|
|
207
195
|
→ All 4 PASS → git commit allowed | Any FAIL → fix inline, re-run
|
|
208
196
|
```
|
|
@@ -236,15 +224,11 @@ path, exempt)? For salience-dependent changes, verify with a **blind simulation
|
|
|
236
224
|
only at opus-tier or above. A below-floor orchestrator does not silently skip: it runs the sim or asks
|
|
237
225
|
the operator (one line), mirroring §Floor governance.
|
|
238
226
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
concluding the gate is closed (identical opus-pinned dispatch failed pre-compaction, succeeded
|
|
245
|
-
post-compaction 2026-06-12). 2026-06-15+: headless `claude -p` draws from the hard-capped credit pool, not the
|
|
246
|
-
subscription — prefer in-session Agent dispatch when the plan gate allows; take the headless fallback
|
|
247
|
-
knowingly. Record sim results in the Axes 2–3 marker + sub-agent invocation log.
|
|
227
|
+
Record sim results in the Axes 2–3 marker + sub-agent invocation log.
|
|
228
|
+
|
|
229
|
+
> **Detail**: See `knowledge/shared/harness-core/claude_md_gate_details.md §Sim-Dispatch-Fallback` — the
|
|
230
|
+
> headless `claude -p --model` fallback when in-session model-pin is unavailable, the saturation-disguise
|
|
231
|
+
> retry (compact-then-retry once), and the credit-pool caveat — read when a model-pinned dispatch fails.
|
|
248
232
|
|
|
249
233
|
**Measurement-integrity pre-flight** (when the sim/dispatch is a *cross-model measurement* — pinned to
|
|
250
234
|
a specific tier, comparing model behaviors, or feeding a paper/published claim): consult
|
|
@@ -254,22 +238,15 @@ borderline/contested verdict (single draw = noise), and use a **discriminating**
|
|
|
254
238
|
generic "OK" proves nothing about which model answered). The instrument must be verified before the
|
|
255
239
|
measurement is trusted.
|
|
256
240
|
|
|
257
|
-
**Floor-tier canary (optional pre-screen — token-free, *below* the Sonnet sim)**: a local model
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
sub-Sonnet tier). **Canary, NOT gate**: a PASS adds cheap floor confidence and you still run the Sonnet
|
|
267
|
-
sim; a FAIL never blocks alone — the opus orchestrator triages it as a *real salience gap* (fix the
|
|
268
|
-
rule) vs a *floor-model quirk* (small-model loop/hallucination, per the public "Local AI is not Opus"
|
|
269
|
-
finding + the cheap-oracle ceiling — a small model adds nothing where one grep already settles the
|
|
270
|
-
check). The terminal verdict stays with the frontier (Sonnet sim + opus judge) — no judge-only path, no
|
|
271
|
-
weak-local-judge regression of the judge-robustness principle (mechanical anchor over judge-only verdict).
|
|
272
|
-
The cross-family-panel upgrade spec lives in the private companion store's `handoff/` design note.
|
|
241
|
+
**Floor-tier canary (optional pre-screen — token-free, *below* the Sonnet sim)**: a local model ≤ Sonnet
|
|
242
|
+
can blind-pre-screen a salience-dependent edit *before* the Sonnet dispatch is spent. **Canary, NOT gate**:
|
|
243
|
+
a PASS adds cheap floor confidence and you still run the Sonnet sim; a FAIL never blocks alone. The terminal
|
|
244
|
+
verdict stays with the frontier (Sonnet sim + opus judge) — **no judge-only path**, no weak-local-judge
|
|
245
|
+
regression of the judge-robustness principle (mechanical anchor over judge-only verdict).
|
|
246
|
+
|
|
247
|
+
> **Detail**: See `knowledge/shared/harness-core/claude_md_gate_details.md §Floor-Tier-Canary` — the local
|
|
248
|
+
> model/panel options, the blind-probe procedure, dogfood evidence, and the FAIL-triage (real salience gap
|
|
249
|
+
> vs floor-model quirk) — read when running a floor canary.
|
|
273
250
|
|
|
274
251
|
**Axis ownership** (each skill is already complete — orchestrator only coordinates):
|
|
275
252
|
|
|
@@ -325,32 +302,18 @@ not marketplace-gate alone:
|
|
|
325
302
|
`LICENSE`/`README` contains a **private harness name or internal codename** · **module paths encode
|
|
326
303
|
internal acronyms**.
|
|
327
304
|
|
|
328
|
-
**Hook coverage — two distinct actions (
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
(PR #109: a companion-store name + corp-context framing reached a public PR; the Sonnet session trusted a
|
|
341
|
-
PR comment over the file content). The scan fires at commit time and is **tier-independent — but only as
|
|
342
|
-
strong as the loaded patterns**: a COMMITTED `.public-surface-patterns.defaults` (universal patterns:
|
|
343
|
-
home paths) keeps it from ever being fully blind, while the company-specific literals require the
|
|
344
|
-
GITIGNORED override to be populated in each authoring env (esp. the company env, where company-origin
|
|
345
|
-
public PRs are written; absent override → only defaults run, with a loud warning). **Honest scope**:
|
|
346
|
-
plaintext only (encoded tokens out of scope); a line-split backstop catches a token wrapped across
|
|
347
|
-
lines; `PUBLIC_SURFACE_OK=1` overrides and is logged to a gitignored audit trail for the weekly audit.
|
|
348
|
-
Residuals (split-encoding, override-not-populated, override abuse) are documented, not silent.
|
|
349
|
-
|
|
350
|
-
> Origin: 2026-06-05 `phantom-gate` shipped public, then needed a private→de-company-scrub→re-public
|
|
351
|
-
> round-trip (`fh_signal_2026-06-05_fh-direct`). PSA existed but nothing forced it pre-publish. 2026-06-17
|
|
352
|
-
> (PR #109): the commit-time half (b) became a mechanical hook after a weaker-tier session leaked a
|
|
353
|
-
> companion-store name onto a public PR (`fh_signal_2026-06-17` Wave 4).
|
|
305
|
+
**Hook coverage — two distinct actions**: **(a) repo-go-public** (`gh repo create --public` / visibility
|
|
306
|
+
flip) is irreversible and usually in a **separate repo** — the pre-commit hook **cannot** catch it, so it
|
|
307
|
+
stays **AI-behavioral** (proactive trigger below) **+ a portable checklist** (`templates/PRE-PUBLISH-CHECKLIST.md`).
|
|
308
|
+
**(b) committing operator-private tokens into public-tracked content of THIS repo IS an effective publish** —
|
|
309
|
+
caught mechanically by the pre-commit **confidentiality scan** (staged added lines vs the gitignored
|
|
310
|
+
`.public-surface-patterns`; HIGH/MED block, `PUBLIC_SURFACE_OK=1` overrides + logs). Tier-independent but
|
|
311
|
+
**only as strong as the loaded patterns** (committed `.defaults` keep it non-blind; company literals need
|
|
312
|
+
the gitignored override populated per env).
|
|
313
|
+
|
|
314
|
+
> **Detail**: See `knowledge/shared/harness-core/claude_md_gate_details.md §Pre-Publish-Hook-Coverage` — the
|
|
315
|
+
> two-layer pattern (literals only in the gitignored source), honest scope + residuals, and the PR #109
|
|
316
|
+
> (`fh_signal_2026-06-17` Wave 4) / phantom-gate origin — read when configuring or auditing the scan.
|
|
354
317
|
|
|
355
318
|
---
|
|
356
319
|
|
|
@@ -463,6 +426,8 @@ Self-healing is not only FH-self-dev (Mode D 4-axis) and reactive (`verify-bidir
|
|
|
463
426
|
|
|
464
427
|
## Agent Dispatch Operation (FH cwd-Based)
|
|
465
428
|
|
|
429
|
+
> **Runtime authority (canonical):** one explicit governor per context + capability-routed sidecars; sidecar findings are evidence candidates, not terminal verdicts, until source-closed by the governor *via a mechanical anchor* — never governor agreement alone. CC=action/governor · Codex=repo-grounded audit sidecar · Gemini/agy=breadth/multimodal sidecar · other runtimes=portable `AGENTS.md` entrypoint only. Full doctrine + Maintenance-Cost Rule: `knowledge/shared/harness-core/multi_model_sidecar_strategy.md §Runtime Authority`.
|
|
430
|
+
|
|
466
431
|
Default operation is a **standard interactive session**. Agent dispatch (single or parallel) is used when the task warrants it — not as a default mode. Three execution paths:
|
|
467
432
|
|
|
468
433
|
| Path | Situation | Method |
|
|
@@ -548,63 +513,33 @@ harvest-loop Step 0-b uses this file as its source — relying on LLM memory aft
|
|
|
548
513
|
Closing phrase detected ("wrap up", "done", "good work", "end session", etc.)
|
|
549
514
|
→ ① Check git diff + unpushed commits (status snapshot)
|
|
550
515
|
→ ①-b Open-PR sweep — `gh pr list --author @me --state open` (+ `gh search prs --author @me
|
|
551
|
-
--state open`
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
the harness's "마감" ≠ the operator's "마감" — a self-authored PR (PR #111) sat open across
|
|
555
|
-
sessions with un-integrated skills + count drift because no close step surfaced it. Pairs with
|
|
556
|
-
the count-consistency check (which now runs at BOTH the local pre-commit hook AND the plugins/**
|
|
557
|
-
PR-CI merge boundary): the sweep surfaces the PR → merging it → the count-check catches any
|
|
558
|
-
drift at the merge (fh_signal_2026-06-21, gate-locality paired fix).
|
|
516
|
+
--state open` cross-repo). Classify, **surface-not-auto**: **self-mergeable** PR (own repo,
|
|
517
|
+
checks green) → *propose merge now* (never auto-merge — HITL); **awaiting-external** →
|
|
518
|
+
*surface for tracking only*. (Origin PR#111 + count-consistency pairing → §detail below.)
|
|
559
519
|
→ ② If FH assets changed: harvest-loop
|
|
560
520
|
→ ③ Sync local/gitignored session state to your durable companion store, if you keep one
|
|
561
521
|
→ ④ Memory hygiene — update stale entries + record new session findings
|
|
562
|
-
→ ④-b npm freshness — if any npm-shipped asset changed
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
time, so updating FH assets without republishing leaves the package stale. **Propose, don't
|
|
575
|
-
auto-publish.** Tag drift caveat: when a bump rides inside a functional commit (no explicit
|
|
576
|
-
"bump" commit), tag *that* commit — otherwise the version ships to npm untagged (e.g. 1.4.4/1.4.5
|
|
577
|
-
shipped untagged, backfilled 2026-06-08).
|
|
578
|
-
→ ④-c Handoff lifecycle (durable-artifact reconciliation — cross-machine continuity) — when a
|
|
579
|
-
durable **result artifact lands** this session, reconcile the *pointer* artifacts so a fresh
|
|
580
|
-
machine doesn't re-read pre-run state. **Trigger (mechanical hint, not pure judgment)**: a new
|
|
581
|
-
file matching a result/signal pattern (`*result*` · `*signal*` · `*_run_*`) written to your
|
|
582
|
-
companion store or `tracks/` this session — when unsure, diff `git status` + companion-store
|
|
583
|
-
mtime against session start. On a hit, do two things:
|
|
584
|
-
**(a) Stamp the run-handoff (④-c owns this write)** — any `"run this / start here"` run-handoff
|
|
585
|
-
whose result has now landed gets a header `STATUS: SUPERSEDED by <repo-relative-or-companion
|
|
586
|
-
path> (<date>)` (path resolvable from a fresh checkout; or retire the file). Not a
|
|
587
|
-
Destructive-Op — a one-line header edit, no deletion.
|
|
588
|
-
**(b) Flag the matching card carry item as resolved** — note it for ⑤ to act on. ⑤ **owns the
|
|
589
|
-
card write** (card-last guard): a finished run must not survive as a pending *carry/priority*
|
|
590
|
-
item — ⑤ removes it from the active carry list (recording it under "done this session" if the
|
|
591
|
-
card keeps a done log). ④-c does **not** edit the card itself (avoids a double-write / a
|
|
592
|
-
flip-vs-remove conflict with ⑤'s removal obligation) — it surfaces the resolution so ⑤ closes it.
|
|
593
|
-
**First-run no-op**: if no matching carry item or handoff exists, ④-c records nothing and
|
|
594
|
-
creates no artifact to supersede.
|
|
595
|
-
**Why its own step**: cross-machine continuity works only when *durable* artifacts are current —
|
|
596
|
-
the session that ran the work holds completion as **live context**, but a fresh machine inherits
|
|
597
|
-
only the durable card + handoff, never that live context (origin: 2026-06-21 — a Windows session
|
|
598
|
-
re-entered a finished A6 run as "to run" because the Mac session that ran it never retired the
|
|
599
|
-
NEXT_ACTION handoff / flagged the carry item; live context didn't transfer, the stale artifacts
|
|
600
|
-
did). The reader-side half — read *result* files at session start, not only handoffs — lives in
|
|
601
|
-
`modes_and_value.md` §Session-start freshness + each operator's local session-start binding.
|
|
602
|
-
**Salience-dependent** — prose, not hook-enforced; on a weaker tier may silently not fire.
|
|
603
|
-
Backstops: ⑤'s removal obligation + the reader-side result-file read. A hook-enforced writer-side
|
|
604
|
-
is a future hardening candidate, not built today (keep the surface thin).
|
|
522
|
+
→ ④-b npm freshness — if any npm-shipped asset changed (`package.json` `files[]`: skills · agents ·
|
|
523
|
+
README · AGENTS.md · CLAUDE.md · CHEATSHEET), **propose republish**: version bump **in lockstep**
|
|
524
|
+
across `package.json` + every `.claude-plugin/plugin.json` + `marketplace.json` (single-source =
|
|
525
|
+
`package.json`) → Pre-Publish gate → `npm publish` → `git tag vX.Y.Z` at publish. **Propose, don't
|
|
526
|
+
auto-publish.** (Why lockstep — Codex caches on plugin.json version — + tag-drift caveat → §detail below.)
|
|
527
|
+
→ ④-c Handoff lifecycle (cross-machine continuity) — when a durable **result artifact lands** this
|
|
528
|
+
session (mechanical hint: a new `*result*`/`*signal*`/`*_run_*` file in your companion store or
|
|
529
|
+
`tracks/`), do two things: **(a) ④-c stamps** any `"run this/start here"` run-handoff whose
|
|
530
|
+
result landed with `STATUS: SUPERSEDED by <path> (<date>)` (one-line edit, not a Destructive-Op);
|
|
531
|
+
**(b) flag the matching card carry item resolved for ⑤** — ⑤ owns the card write (card-last
|
|
532
|
+
guard), ④-c never edits the card. **First-run no-op** if no matching handoff/carry exists.
|
|
533
|
+
(Why-its-own-step origin + ownership split + salience/backstops → §detail below.)
|
|
605
534
|
→ ⑤ Card update ← ABSOLUTE LAST: must capture ①–④-c outcomes
|
|
606
535
|
→ ⑥ Commit card + push
|
|
607
536
|
```
|
|
537
|
+
|
|
538
|
+
> **Detail**: See `knowledge/shared/harness-core/claude_md_gate_details.md` — `§Session-Close-npm-Freshness`
|
|
539
|
+
> (④-b: Codex cache-path drift, the 3-way drift example, tag-drift caveat) · `§Session-Close-Handoff-Lifecycle`
|
|
540
|
+
> (④-c: why-its-own-step origin, ownership split, salience/backstops) · `§Open-PR-Sweep-Origin` (①-b) — read
|
|
541
|
+
> when executing that close step.
|
|
542
|
+
|
|
608
543
|
**Card-last guard**: ①–④-c (incl. ①-b open-PR sweep, ④-c handoff lifecycle) must ALL complete before
|
|
609
544
|
⑤ runs. Any new information produced during ①–④ (new commits from a merged self-PR, model changes,
|
|
610
545
|
new findings, a carry item flipped to DONE) feeds INTO ⑤ — card is never written mid-sequence and
|
package/docs/CONTRIBUTING.md
CHANGED
|
@@ -8,7 +8,7 @@ If you'd like to make forge-harness better, pull requests are welcome.
|
|
|
8
8
|
|---|---|
|
|
9
9
|
| **New skill** | You've discovered a repeating pattern and want to turn it into a skill |
|
|
10
10
|
| **Improve existing skill** | Bug fix, external environment adaptation, adding triggers |
|
|
11
|
-
| **Add agent** | New persona (`.claude/agents/`
|
|
11
|
+
| **Add agent** | New persona (canonical: `plugins/*/agents/`; `.claude/agents/` only for project-local override) |
|
|
12
12
|
| **Templates** | Common files to add under `templates/` |
|
|
13
13
|
| **Documentation** | README, skill description refinement, typo fixes |
|
|
14
14
|
| **Field pattern harvest** | Proposing a pattern discovered in real use as a skill (see `/field-harvest`) |
|
|
@@ -43,7 +43,7 @@ into shared knowledge/skills — your session becomes compound interest for ever
|
|
|
43
43
|
## PR Rules (Short Version)
|
|
44
44
|
|
|
45
45
|
1. **New skill** → Create `plugins/fh-meta/skills/{name}/SKILL.md` + add version line to `plugins/fh-meta/CHANGELOG.md`
|
|
46
|
-
2. **New agent** → Register
|
|
46
|
+
2. **New agent** → Register the canonical file under `plugins/fh-meta/agents/{name}.md` (or `plugins/fh-commons/agents/{name}.md` for commons), then update `AGENTS.md` + `.claude/registry/agent_cards.json`. Use `.claude/agents/{name}.md` only for project-local / non-plugin override agents.
|
|
47
47
|
3. **Description must be plain text** — no markdown bold, emphasis words, version mentions, or embedded names (removes self-marketing tone)
|
|
48
48
|
4. **Simplification guard** — verify that existing assets cannot cover the use case before creating something new
|
|
49
49
|
5. **External environment adaptation section** — recommend explicitly noting `Mode A/C` branches in skills and agents
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# AI Dialogue Playbook
|
|
2
|
+
|
|
3
|
+
> Dialogue principles for forge-harness sessions — the "should" layer. Governs how to ask, delegate, and record when working with Claude Code.
|
|
4
|
+
|
|
5
|
+
**Companion**: `claude_code_runtime_flow.md` is the "does" layer — what actually happens chronologically in a session.
|
|
6
|
+
|
|
7
|
+
**Voice**: the Control Tower's tone — soft charisma, delivery-layer-only — is defined once in `CLAUDE.md §Voice / Tone` (single source). Warm in word-choice, not length; tone never relaxes judgment rigor (orthogonality guard).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Session Start Protocol
|
|
12
|
+
|
|
13
|
+
1. **Greet or signal intent** → FH Active Onboarding triggers (see CLAUDE.md)
|
|
14
|
+
2. **AI reads automatically**: `reference_next_session_starter.md`, CATALOG.md, LOCAL_SKILL_REGISTRY
|
|
15
|
+
3. **Returning user**: AI proposes top 3 priorities from session card + cadence overdue notices
|
|
16
|
+
4. **New user**: 2-sentence FH intro → project connect offer
|
|
17
|
+
|
|
18
|
+
**Don't front-load**: avoid dumping context manually. FH auto-reads the right files. Start with intent, not background.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Token Efficiency Principles
|
|
23
|
+
|
|
24
|
+
| Principle | Implementation |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **CATALOG first** | Read CATALOG.md → identify candidate files → open only those files. Never scan session files sequentially. |
|
|
27
|
+
| **Execution tier** | Match tier to task scope (see CLAUDE.md Execution Tier table). FH default: standard (~15K tokens). |
|
|
28
|
+
| **`.claudeignore`** | Apply `templates/.claudeignore` to project to exclude build artifacts, test fixtures, binaries from context. |
|
|
29
|
+
| **`/context-doctor`** | Propose when: "context is getting long", "token limit", "/clear", "slow". Auto-generates `.claudeignore`. |
|
|
30
|
+
| **Agent dispatch** | Use sub-agents to protect main context from excessive tool output. |
|
|
31
|
+
| **Two-layer storage** | `tracks/` = local work history. Critical cross-session state → also write to `memory/` (durable). |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Rule Hierarchy (Scope Precedence)
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Hub CLAUDE.md (hub common principles) — highest
|
|
39
|
+
└── Project CLAUDE.md
|
|
40
|
+
└── Domain .claude/rules/session.md — lowest
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Lower levels cannot override higher. Conflicts → higher scope wins.
|
|
44
|
+
|
|
45
|
+
**AI contribution model**: AI proposes (drafts all changes, prepares commits, creates PR draft) — user approves final push/PR. Human-in-the-loop is non-negotiable for shared repos.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Amplifier / Coach Dual Mode
|
|
50
|
+
|
|
51
|
+
The AI operates in two modes simultaneously:
|
|
52
|
+
|
|
53
|
+
| Mode | When | Behavior |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| **Amplifier** | User has a clear intent and task | Execute with minimal friction. Don't block, don't ask for confirmation beyond once. |
|
|
56
|
+
| **Coach** | User is exploring, unsure, or new to FH | 2-sentence explanations, skill proposals, one-line options. Don't overwhelm. |
|
|
57
|
+
|
|
58
|
+
**Signal detection**:
|
|
59
|
+
- Explicit task ("debug this") → Amplifier
|
|
60
|
+
- Greeting, "what can you do", "how should I" → Coach intro, then Amplifier
|
|
61
|
+
- Friction in session → note as FH signal, continue as Amplifier
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Advanced Patterns (2026-06-17 추가)
|
|
66
|
+
|
|
67
|
+
### Multi-Model Ensemble (rotating-adjudicator)
|
|
68
|
+
단일 LLM 반복 → 같은 오류 반복 문제 해결. 서로 다른 모델 병렬 호출 + 투표 전략 (majority/plurality/unanimous/weighted). A 모델 오류 → B 모델 catch.
|
|
69
|
+
|
|
70
|
+
### REST API 우회 Push (restricted-network git block 대응)
|
|
71
|
+
네트워크-제한 환경(corp/restricted)에서 `git push`가 차단될 때 GitHub REST API Git Database 직접 조작 (5-step: Blob → Tree → Commit → Ref → PR). 네트워크 제약 우회 + 외부 공개 리포 기여 가능. (상세 5-step 절차는 비공개 companion store의 핸드오프 노트에 정리.)
|
|
72
|
+
|
|
73
|
+
### API 키 영속화 (gitignore + .env 패턴)
|
|
74
|
+
API 키 대화창 기록 방지 — Write 툴로 `.env` 직접 생성 (대화창 기록 없이). `.gitignore` 확인 + `git add -A` 전 `git reset HEAD .env` (accidentally staged 시). Credential leakage 방지 + 영속화.
|
|
75
|
+
|
|
76
|
+
### 네트워크-제한 환경 컨텍스트 복구 패턴
|
|
77
|
+
외부 환경 → 네트워크-제한(corp) 환경 전환 시 그 환경의 구조 기억 필요. 핸드오프 파일에 "환경 메모" 카드 포함 (그 환경의 Git 구조 · API 엔드포인트 · 도구 구조). 환경 전환 시 컨텍스트 손실 0, 외부에서 `git pull` 후 1개 파일 읽으면 즉시 복구.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Delegation Principles
|
|
82
|
+
|
|
83
|
+
**When to use Agent dispatch** (not direct tools):
|
|
84
|
+
- Task requires work in a different project's cwd
|
|
85
|
+
- Task is broad enough to pollute main context with tool output
|
|
86
|
+
- 2+ independent tasks → parallel dispatch without asking
|
|
87
|
+
|
|
88
|
+
**Forbidden response**: "I can't do that — I'm not in that project's cwd." Always check if Agent dispatch covers it first.
|
|
89
|
+
|
|
90
|
+
**Context Card** (required for non-trivial dispatch):
|
|
91
|
+
```
|
|
92
|
+
[Session Context Card]
|
|
93
|
+
Purpose: {why}
|
|
94
|
+
Completed: {what's already done}
|
|
95
|
+
This agent's task: {specific target}
|
|
96
|
+
Note: {constraints the agent must know}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Recording Principles
|
|
102
|
+
|
|
103
|
+
**What to record** (session end / knowledge push):
|
|
104
|
+
- New pattern or rule discovered ✅
|
|
105
|
+
- Architecture decision ✅
|
|
106
|
+
- Lessons from failures ✅
|
|
107
|
+
- Roadmap / strategy change ✅
|
|
108
|
+
|
|
109
|
+
**What NOT to record**:
|
|
110
|
+
- 1-line bug fix ❌
|
|
111
|
+
- Routine test run ❌
|
|
112
|
+
- Already-recorded content ❌
|
|
113
|
+
- Session with only exploration, no conclusion ❌
|
|
114
|
+
|
|
115
|
+
**Format**: `tracks/{project}/session_YYYY_MM_DD_{slug}.md` with YAML frontmatter. See `sync_push_protocols.md`.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Counter-Argument Protocol
|
|
120
|
+
|
|
121
|
+
When the user pushes back on an AI recommendation ("is that right?", "something seems off"):
|
|
122
|
+
|
|
123
|
+
1. Treat the counter-argument as a **data point**, not a challenge
|
|
124
|
+
2. Re-examine the reasoning independently
|
|
125
|
+
3. If the counter-argument is valid → update the baseline, record in `verify-bidirectional`
|
|
126
|
+
4. If the original recommendation holds → explain why with evidence, not assertion
|
|
127
|
+
|
|
128
|
+
Skill: `/verify-bidirectional`
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Related
|
|
133
|
+
|
|
134
|
+
- `claude_code_runtime_flow.md` — What actually happens (the "does" layer)
|
|
135
|
+
- `harness_6axis_framework.md` — The 6-axis framework (Axes 2 and 3 govern context/plan)
|
|
136
|
+
- `.claude/rules/sync_push_protocols.md` — Recording procedure
|
|
137
|
+
- `CHEATSHEET.md` — Command reference
|