@chrono-meta/fh-gate 1.4.51 → 1.4.53

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 (36) hide show
  1. package/.claude/registry/README.md +26 -0
  2. package/.claude/registry/agent_cards.json +73 -0
  3. package/.claude-plugin/marketplace.json +25 -0
  4. package/AGENTS.md +2 -2
  5. package/CATALOG.md +6 -0
  6. package/CHEATSHEET.md +1 -0
  7. package/CLAUDE.md +21 -11
  8. package/README.md +12 -1
  9. package/bin/fh-codex-doctor.js +419 -0
  10. package/docs/codex-compat.md +18 -4
  11. package/knowledge/shared/harness-core/capability_escalation_consent.md +7 -0
  12. package/knowledge/shared/harness-core/claude_md_gate_details.md +15 -8
  13. package/knowledge/shared/harness-core/deep_research_capability_ladder.md +1 -1
  14. package/knowledge/shared/harness-core/fh_detail_protocols.md +4 -0
  15. package/knowledge/shared/harness-core/loop_engineering.md +80 -0
  16. package/knowledge/shared/harness-core/multi_model_sidecar_strategy.md +5 -1
  17. package/knowledge/shared/harness-core/self_evolution_routine.md +17 -12
  18. package/knowledge/shared/harness-core/sonnet_floor_doctrine.md +132 -0
  19. package/package.json +11 -3
  20. package/plugins/fh-commons/.claude-plugin/plugin.json +23 -0
  21. package/plugins/fh-commons/skills/deliberation/SKILL.md +1 -1
  22. package/plugins/fh-meta/.claude-plugin/plugin.json +36 -0
  23. package/plugins/fh-meta/skills/agent-composer/SKILL.md +1 -1
  24. package/plugins/fh-meta/skills/apex-review/SKILL.md +1 -1
  25. package/plugins/fh-meta/skills/auto-decorrelation/SKILL.md +1 -1
  26. package/plugins/fh-meta/skills/context-doctor/SKILL.md +1 -1
  27. package/plugins/fh-meta/skills/harvest-loop/SKILL.md +1 -1
  28. package/plugins/fh-meta/skills/install-wizard/SKILL.md +1 -1
  29. package/plugins/fh-meta/skills/meta-prompt-builder/SKILL.md +1 -1
  30. package/plugins/fh-meta/skills/sim-conductor/SKILL.md +1 -1
  31. package/plugins/fh-meta/skills/steel-quench/SKILL.md +1 -1
  32. package/plugins/fh-meta/skills/verify-bidirectional/SKILL.md +1 -1
  33. package/scripts/count_check.sh +95 -0
  34. package/scripts/selfcheck.sh +27 -20
  35. package/templates/CLAUDE.md +87 -0
  36. package/templates/local_fh_context.md +18 -0
@@ -0,0 +1,87 @@
1
+ # CLAUDE.md
2
+
3
+ ## Session Start
4
+
5
+ When a user starts a session with greetings like "hello", "let's start", "resume", "continuing from where we left off", or says "read root memory", **both layers must activate**:
6
+
7
+ ### Layer A — Auto read (4 steps required)
8
+
9
+ 1. **Read CATALOG.md** — `~/projects/forge-harness/CATALOG.md` (recent work context + latest meta cwd work cross-link)
10
+ 2. **Read latest session file** — `~/projects/forge-harness/tracks/{project}/` most recent mtime item (last work on domain + next round reverse-injection intent persistence location / use `ls -lat` or `find -mtime`)
11
+ 3. **Check MEMORY.md next-session trigger** — if project memory `MEMORY.md` auto-load is truncated, explicitly Read to supplement the next-session trigger section
12
+ 4. **Check todo/plan files if present** — `*todo*`/`*plan*` pattern (supplementary materials)
13
+ 5. **Search for duplicate installs in same root** — `ls ../ | grep -iE '(harness|forge)'` to catch sibling assets in parent directory. If found, report to user + delegate branching decision (use existing install / proceed with new / archive then proceed)
14
+
15
+ ### Layer B — Proactive initiative (active onboarding 5-skill cascade)
16
+
17
+ After Layer A completes, **when the user enters a task**, activate AI proactive initiative mode:
18
+
19
+ 1. **Auto-initiative (1-line question)** — *"What task/project would you like to start? (e.g., 'Spring Boot API development', 'React component refactoring', 'continue existing [X] track')"* (if active track exists: *"Would you like to continue active track [X], or enter a new task?"*)
20
+ 2. **5-skill cascade** — `plugin-recommender` (internal GHE → external → built-in candidates) → `cross-ecosystem-synergy-detection` (synergy grade table) → `.claudeignore` standard initiative (`cp templates/.claudeignore`) → model switching guidance (default `/model sonnet` — FH dispatches floored skills/agents at higher tiers itself; pin a stronger model for harness-editing sessions, or when the Field Depth-Escalation Notice below fires — see README §Model setup) → `verify-bidirectional`·`harvest-loop` natural emergence waiting
21
+ 3. **User consent → actual setup** — plugin install / skill pre-activation / `.claudeignore` application / model switch
22
+ 4. **Project cwd handover guidance** — *"Setup complete. Move to the project cwd and call `claude` to start working."*
23
+
24
+ **Simplification guard**: When an explicit task utterance is made (e.g., "debug X code"), enter task immediately (skip onboarding). Activates once per session.
25
+
26
+ ### Field Depth-Escalation Notice (advisory — once per session)
27
+
28
+ The Sonnet default covers routine field work because FH dispatches floored skills/agents at higher
29
+ tiers itself. But when **main-thread development visibly strains the session tier**, surface a
30
+ one-line escalation proposal — do not leave it to recall:
31
+
32
+ **Triggers** (any one): the same problem survives 2–3 correction loops · the work enters
33
+ architecture/design reasoning that cannot be decomposed into a dispatchable unit · the user
34
+ signals being stuck ("keeps failing", "why is this still wrong").
35
+
36
+ **Two-step ladder** (propose the cheaper rung first):
37
+ 1. **Opus dispatch (sidecar)** — if the heavy reasoning packages into a unit (a design review, a
38
+ root-cause hunt, an adversarial pass), propose dispatching it to an Opus agent: the session
39
+ stays on Sonnet, cost stays local to the unit.
40
+ 2. **Session pin** — if the work is inherently main-thread (iterative dialogue design, repeated
41
+ whole-context reasoning), propose: *"This work demands session-level design depth — pinning
42
+ `/model opus` is recommended. Proceeding as-is also works: dispatches still cover floored units."*
43
+ 3. **No higher tier available** — common in metered API routing (a Bedrock-style Sonnet-only
44
+ deployment) or alternative runtimes (Hermes / OpenCode-class) that don't offer higher Claude
45
+ tiers: skip the proposal, proceed at the available tier, and **flag depth-sensitive
46
+ deliverables with an explicit below-floor limitation note** (F2 semantics — tier-floor
47
+ resolution, `multi_model_sidecar_strategy.md §Tier-floor`). Silent proceeding is the failure
48
+ mode this rung exists to prevent; the note makes the deliverable a re-review candidate when a
49
+ floor tier becomes reachable.
50
+
51
+ **Guards** (mirrors the hub's Mode D Model Notice): once per session · advisory only — **never
52
+ switch the session model autonomously** (human override is inviolable) · sessions where nothing
53
+ strains never see it — the Sonnet default stays friction-free.
54
+
55
+ **Basis**: Meta-harness mission *"easy and convenient + no setup burden + token savings"* direct implementation mechanism. Natural hub/action-leader division (single trigger in meta-harness cwd → handover to action-leader cwd).
56
+
57
+ **3 usage modes — "don't block those who come, don't stop those who leave"** (meta-harness operating philosophy):
58
+ - **Mode A (standard)**: meta-harness cwd setup → handover to separate project cwd (4 steps above)
59
+ - **Mode B (resident)**: create **separate project directory** within the forge-harness install environment and work there. Keep the forge-harness directory itself as reference only — use `.gitignore` to block forge-harness assets from mixing into the project
60
+ - **Mode C (plugin/skill only)**: install only plugins/skills without going through forge-harness (available via marketplace without cloning). Skill output accumulates as history within the user's own project. No automatic signals from the forge-harness side expected — indirect contribution depends on user's active communication (issues · PR · channels)
61
+
62
+ If the user explicitly states a mode, immediately guide that mode. Do not force standard mode. Do not accumulate personal work artifacts in the forge-harness directory itself (protect reference asset identity).
63
+
64
+ ## Asset Synergy Branching Decision (meta vs. action-leader)
65
+
66
+ When persisting new assets (memory · feedback · patterns · rules) during a session, asset location determination is required:
67
+
68
+ | Location | Nature | Examples |
69
+ |---|---|---|
70
+ | **Meta-harness side seed** | Useful as-is when installed in other projects (cross-project synergy) | User baseline propositions, environment common conventions, common action rules for all personas, session operation patterns |
71
+ | **Action-leader project side persistence** | Meaningful only in this project's domain/session context | Domain knowledge, session records, domain-specific validation loop outputs, per-project identity |
72
+
73
+ When the judgment is ambiguous, the AI **states synergy potential first** then delegates the location decision to the user.
74
+
75
+ ## Knowledge Hub (forge-harness)
76
+
77
+ Persistent knowledge for this project is stored at `~/projects/forge-harness/`.
78
+
79
+ - **Past work search**: First read `~/projects/forge-harness/CATALOG.md`, identify related files by tags
80
+ - **Learnings/feedback originals**: `~/projects/forge-harness/tracks/{project_name}/`
81
+ - **At session end**: follow the Sync Protocol in `~/projects/forge-harness/CLAUDE.md` to sync
82
+ - **When new patterns are found**: follow the Push Protocol in `~/projects/forge-harness/CLAUDE.md` to feed back
83
+
84
+ <!-- [CUSTOMIZE] Replace {project_name} with the actual project name -->
85
+ <!-- [CUSTOMIZE] If there is a domain knowledge path, add:
86
+ - **Domain knowledge**: `~/projects/forge-harness/knowledge/domain/{domain}/`
87
+ -->
@@ -0,0 +1,18 @@
1
+ ---
2
+ scope: local-only
3
+ description: forge-harness path and skill list pointer — local only, do not commit to shared repo
4
+ ---
5
+
6
+ # forge-harness Cross-Context
7
+
8
+ > Install: `cp {FH_ROOT}/templates/local_fh_context.md .claude/rules/local_fh_context.md`
9
+ > Local only: `echo ".claude/rules/local_fh_context.md" >> .git/info/exclude`
10
+
11
+ **forge-harness path**: `~/path/to/forge-harness` (replace with your actual install path)
12
+ **Session records**: `{FH_ROOT}/tracks/_meta/`
13
+
14
+ **Available skills (fh-meta, 33)**: agent-composer · apex-review · asset-placement-gate · auto-decorrelation · context-doctor · contention-layer · corpus-grounding-expander · cross-ecosystem-synergy-detection · deep-clarify · edit-manifest · field-harvest · frontier-digest · goal-quench · harness-doctor · harvest-loop · hub-cc-pr-reviewer · install-doctor · install-wizard · marketplace-gate · memory-hygiene · meta-prompt-builder · persona-roster-expander · phantom-quench · pipeline-conductor · plugin-recommender · prompt-regression · public-surface-audit · return-path-gate · sim-conductor · salience-splitter · steel-quench · verify-bidirectional · video-ingest
15
+
16
+ **Available skills (fh-commons)**: convergence-loop · deliberation · mcp-circuit-breaker · token-budget-gate
17
+
18
+ Skill details available on demand at `{FH_ROOT}/plugins/{plugin}/skills/{skill-name}/SKILL.md`.