@chrono-meta/fh-gate 1.4.16 → 1.4.17
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/CATALOG.md +1 -1
- package/CLAUDE.md +15 -2
- package/package.json +1 -1
- package/plugins/fh-meta/skills/context-doctor/SKILL.md +10 -96
- package/plugins/fh-meta/skills/context-doctor/SKILL_detail.md +114 -0
- package/plugins/fh-meta/skills/field-harvest/SKILL.md +23 -163
- package/plugins/fh-meta/skills/field-harvest/SKILL_detail.md +189 -0
- package/plugins/fh-meta/skills/frontier-digest/SKILL.md +23 -167
- package/plugins/fh-meta/skills/frontier-digest/SKILL_detail.md +177 -0
- package/plugins/fh-meta/skills/goal-quench/SKILL.md +42 -263
- package/plugins/fh-meta/skills/goal-quench/SKILL_detail.md +249 -0
- package/plugins/fh-meta/skills/hub-cc-pr-reviewer/SKILL.md +1 -1
- package/plugins/fh-meta/skills/install-wizard/SKILL.md +35 -420
- package/plugins/fh-meta/skills/install-wizard/SKILL_detail.md +432 -0
- package/plugins/fh-meta/skills/pipeline-conductor/SKILL.md +19 -179
- package/plugins/fh-meta/skills/pipeline-conductor/SKILL_detail.md +149 -0
|
@@ -81,194 +81,43 @@ If this is your first time with FH, confirm 3 things before install. All should
|
|
|
81
81
|
| **Are you using Claude Code as your primary tool?** | ✅ Using CC daily | FH only works on top of CC. Need to adopt CC first |
|
|
82
82
|
| **Are you running 2+ projects in parallel or have a meta-hub?** | ✅ Multiple projects or team shared environment | FH may not be needed for a single small project |
|
|
83
83
|
| **Do you want to structurally improve AI collaboration quality?** | ✅ Repeatedly performing verification/simulation/diagnosis | If you only want simple coding automation, deeper skills after install-wizard are optional |
|
|
84
|
-
| **Are you developing or researching FH itself?** | ✅ Extending skills, writing papers, running experiments on FH | → **Mode D** — companion-store setup needed
|
|
84
|
+
| **Are you developing or researching FH itself?** | ✅ Extending skills, writing papers, running experiments on FH | → **Mode D** — companion-store setup needed |
|
|
85
85
|
|
|
86
|
-
Fewer than 2 of 3 (first three) → Proceed with install but recommend using only core skills (`context-doctor`, `harness-doctor`) first.
|
|
86
|
+
Fewer than 2 of 3 (first three) → Proceed with install but recommend using only core skills (`context-doctor`, `harness-doctor`) first.
|
|
87
87
|
All 3 → Proceed in order: Step 0-B (token injection) → Step 0 (environment card) → Step 0-C (existing harness).
|
|
88
88
|
|
|
89
89
|
**Mode D detected (FH developer/researcher)**: Guide companion-store setup before Step 1.
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
You're developing FH itself — you need a private companion store
|
|
93
|
-
alongside the public mirror.
|
|
94
|
-
|
|
95
|
-
Recommended layout:
|
|
96
|
-
public: {org}/{hub} (methodology, skills, rules)
|
|
97
|
-
private: {org}/{hub}-be (paper drafts, experiment logs,
|
|
98
|
-
raw signals, handoff files)
|
|
99
|
-
|
|
100
|
-
Quick setup (remote-backed):
|
|
101
|
-
gh repo create {org}/{hub}-be --private
|
|
102
|
-
git clone https://github.com/{org}/{hub}-be ~/path/to/{hub}-be
|
|
103
|
-
mkdir -p {hub}-be/{paper-drafts,paper-signals,digests,handoff}
|
|
104
|
-
|
|
105
|
-
Local-only variant (no GitHub — your data never leaves the machine):
|
|
106
|
-
git init ~/path/to/{hub}-be # no remote needed
|
|
107
|
-
mkdir -p ~/path/to/{hub}-be/{paper-drafts,paper-signals,digests,handoff}
|
|
108
|
-
→ the sync script detects the missing upstream and skips push
|
|
109
|
-
automatically; local git history carries durability. Any store
|
|
110
|
-
name works — set BE_DIR (and HUB_DIR) env vars to your paths.
|
|
111
|
-
|
|
112
|
-
Key rule: knowledge/shared/ drafts stay local via .gitignore glob.
|
|
113
|
-
Push snapshots to the companion store explicitly — never auto-push.
|
|
114
|
-
handoff/ files bridge cloud session → local without exposing content.
|
|
115
|
-
```
|
|
91
|
+
> **Detail**: See `SKILL_detail.md §Mode-D-Companion-Setup` — recommended public/private layout, remote-backed and local-only setup commands — read when Mode D is detected.
|
|
116
92
|
|
|
117
93
|
### Step 0-B. Git Token Pre-injection (when repo creation/fork/push included)
|
|
118
94
|
|
|
119
95
|
When the work involves Git authentication needs like GitHub repo creation, fork, push, etc.,
|
|
120
96
|
inject the token as an environment variable in the terminal **before starting the CC session**.
|
|
97
|
+
Pasting tokens directly in chat exposes them in conversation history; environment-variable injection keeps them out of the record while gh / git CLI automatically recognizes them.
|
|
121
98
|
|
|
122
|
-
>
|
|
123
|
-
> Injecting as environment variable keeps them out of the record while gh / git CLI automatically recognizes them.
|
|
124
|
-
|
|
125
|
-
**Method A — One-time injection per session (recommended):**
|
|
126
|
-
```bash
|
|
127
|
-
# In terminal before starting CC
|
|
128
|
-
export GH_TOKEN=ghp_xxxx # GitHub Personal Access Token
|
|
129
|
-
export GITHUB_TOKEN=$GH_TOKEN # Some CLIs read GITHUB_TOKEN
|
|
130
|
-
claude # gh / git commands will automatically use token afterward
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**Method B — Permanent local secret file:**
|
|
134
|
-
```bash
|
|
135
|
-
mkdir -p ~/.cc_secrets
|
|
136
|
-
echo 'export GH_TOKEN=ghp_xxxx' >> ~/.cc_secrets/tokens.env
|
|
137
|
-
chmod 600 ~/.cc_secrets/tokens.env
|
|
138
|
-
echo 'source ~/.cc_secrets/tokens.env' >> ~/.zshrc
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
> `~/.cc_secrets/` is a local-only path outside git management — not a commit target for team repos.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
**The following are environment detection procedures that CC executes automatically. No need for users to run manually.**
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
# Prompt injection pre-flight: scan config AND the project's AI-instruction surfaces — CLAUDE.md,
|
|
149
|
-
# AGENTS.md, .claude/rules/* — which are the higher-risk vectors in an unknown repo (not just shell/settings).
|
|
150
|
-
# Injection-SPECIFIC patterns only (override/exfil), since instruction files legitimately carry directives;
|
|
151
|
-
# advisory (recommend manual review), never an auto-block.
|
|
152
|
-
if grep -rIE "ignore (all )?previous|disregard (the )?above|exfiltrat|^# CLAUDE:|^# AI:|<instructions>" \
|
|
153
|
-
~/.zshrc .claude/settings.json CLAUDE.md AGENTS.md .claude/rules/ 2>/dev/null | grep -q .; then
|
|
154
|
-
echo "⚠️ AI-instruction / override pattern detected in config or instruction files — injection risk in an unknown repo. Review the listed files manually before proceeding."; fi
|
|
155
|
-
|
|
156
|
-
# FH location
|
|
157
|
-
echo "FH_DIR=${FH_DIR:-not set}"
|
|
158
|
-
echo "CC_HUB_DIR=${CC_HUB_DIR:-not set}"
|
|
159
|
-
|
|
160
|
-
# cwd project info
|
|
161
|
-
basename "$(pwd)"
|
|
162
|
-
ls .claude/ 2>/dev/null
|
|
163
|
-
|
|
164
|
-
# CC settings (handle both dict and list for plugins)
|
|
165
|
-
cat .claude/settings.json 2>/dev/null | python3 -c "
|
|
166
|
-
import json,sys
|
|
167
|
-
d=json.load(sys.stdin)
|
|
168
|
-
p=d.get('plugins',{})
|
|
169
|
-
print('plugins:', list(p.keys()) if isinstance(p,dict) else p)
|
|
170
|
-
" 2>/dev/null || echo "settings.json not found"
|
|
171
|
-
|
|
172
|
-
# MCP plugin connection status
|
|
173
|
-
python3 -c "import json,os; d=json.load(open(os.path.expanduser('~/.claude.json'))); print('MCP:', list(d.get('mcpServers',{}).keys()))" 2>/dev/null || echo "MCP config not found"
|
|
174
|
-
|
|
175
|
-
# zshrc hook status
|
|
176
|
-
grep -q "fh_audit_check.zsh" ~/.zshrc 2>/dev/null && echo "zshrc hook: present" || echo "zshrc hook: absent"
|
|
177
|
-
|
|
178
|
-
# Framework detection (optional) — only used to look for a matching OPTIONAL domain pattern pack.
|
|
179
|
-
# Generic: capture the framework name; the pattern-pack path is derived as {framework}_patterns.md.
|
|
180
|
-
# No pattern pack ships by default — this is a user-supplied extension point, absence is the normal state.
|
|
181
|
-
FRAMEWORK=""
|
|
182
|
-
for fw in streamlit django fastapi flask; do
|
|
183
|
-
if grep -qi "$fw" requirements.txt pyproject.toml 2>/dev/null; then FRAMEWORK="$fw"; echo "Framework: $fw detected"; break; fi
|
|
184
|
-
done
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**Bootstrap guidance when FH_DIR is not set (stop immediately in Step 0):**
|
|
188
|
-
```
|
|
189
|
-
⚠️ FH_DIR not set — install FH first then rerun.
|
|
190
|
-
|
|
191
|
-
1. Clone FH repo:
|
|
192
|
-
git clone https://github.com/chrono-meta/forge-harness ~/forge-harness
|
|
193
|
-
|
|
194
|
-
2. Set environment variables:
|
|
195
|
-
export FH_DIR=~/forge-harness
|
|
196
|
-
export CC_HUB_DIR=$FH_DIR # FH hub dir (holds tracks/_audit for the weekly-audit mtime check);
|
|
197
|
-
# equals FH_DIR unless you run a separate hub clone
|
|
198
|
-
|
|
199
|
-
3. Install FH plugin in CC:
|
|
200
|
-
Settings → Plugins → Add → {FH_DIR}/plugins/fh-meta
|
|
201
|
-
|
|
202
|
-
4. Rerun /install-wizard after completion
|
|
203
|
-
```
|
|
204
|
-
→ Do not proceed to subsequent Steps when FH_DIR is not set.
|
|
99
|
+
> **Detail**: See `SKILL_detail.md §Token-Injection` — Method A (per-session export) and Method B (permanent local secret file) — read when executing Step 0-B.
|
|
205
100
|
|
|
206
101
|
### Step 0. Auto Environment Detection — Environment Card Output
|
|
207
102
|
|
|
208
103
|
*(Run after Step 0-A·B pre-checks. Output results as environment card, then continue to Step 0-C.)*
|
|
209
104
|
|
|
210
|
-
|
|
211
|
-
optional domain pattern pack, reference it (none ship by default — absence is normal, never a gap):
|
|
212
|
-
```
|
|
213
|
-
📌 {FRAMEWORK} project detected → optional domain pattern pack check
|
|
214
|
-
{CC_HUB_DIR}/knowledge/shared/{FRAMEWORK}_patterns.md loaded (only if you supplied it; not shipped by default)
|
|
215
|
-
If absent: skip silently — no pack is the expected default state.
|
|
216
|
-
```
|
|
105
|
+
CC runs the detection bash automatically (injection pre-flight scan → FH_DIR/CC_HUB_DIR → cwd project info → plugins → MCP → zshrc hook → optional framework detection), then outputs the environment card.
|
|
217
106
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
Project: {cwd name}
|
|
222
|
-
FH_DIR: {path or not set}
|
|
223
|
-
CC Hub: {CC_HUB_DIR or not set}
|
|
224
|
-
Plugins: {installed plugin list}
|
|
225
|
-
zshrc hook: {present/absent}
|
|
226
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
227
|
-
```
|
|
107
|
+
**Stop rule (behavioral)**: if `FH_DIR` is not set, output the bootstrap guidance and **do not proceed to subsequent Steps** — install FH first, then rerun.
|
|
108
|
+
|
|
109
|
+
> **Detail**: See `SKILL_detail.md §Step0-Detection-Bash` (detection script + FH_DIR bootstrap guidance) · `§Env-Card-Format` (card template + optional pattern-pack note) — read when executing Step 0.
|
|
228
110
|
|
|
229
111
|
### Step 0-C. Existing Harness Detection + Integration Proposal
|
|
230
112
|
|
|
231
113
|
> **Safe**: This step is analysis/proposal output only. No file writes. Runs safely regardless of `--dry-run` flag.
|
|
232
114
|
|
|
233
|
-
> **Core message**: FH is not something placed on top of an existing harness.
|
|
115
|
+
> **Core message**: FH is not something placed on top of an existing harness.
|
|
234
116
|
> It analyzes existing rules to remove duplicates — making things lighter.
|
|
235
|
-
>
|
|
236
|
-
> **Illustrative single-run measurements** (n=1 per project, `--dry-run` verified — not benchmarks; your numbers will differ):
|
|
237
|
-
>
|
|
238
|
-
> | Project type | Example | Total volume | Reduction | Main cause |
|
|
239
|
-
> |---|---|---|---|---|
|
|
240
|
-
> | QA strategy platform (domain-specialized complete) | Project A | 324 lines | **14%** (46 lines) | Duplicate meta operation rules |
|
|
241
|
-
> | Mobile QA automation framework | Project B | 2,448 lines (constant) | **32%** (~790 lines) | 2 unremoved duplicate files post-install |
|
|
242
|
-
>
|
|
243
|
-
> Token savings: Project A ~0.5K/session, Project B ~15~20K/session
|
|
244
|
-
>
|
|
245
|
-
> * QA strategy platform level = CLAUDE.md 200~400 lines, 5~10 rules files. Mobile QA automation level = 7+ rule files, 2,000+ lines of constant context.
|
|
246
|
-
> * Check your own project numbers directly with `/install-wizard --dry-run`. (These numbers are from actual single measurements and may vary by environment.)
|
|
247
|
-
>
|
|
248
|
-
> **How to read**: FH does not touch domain-specific rules (code guides, domain knowledge).
|
|
249
|
-
> Reduction targets are only meta operation rules (PR procedures, commit guides, FH path duplicates, etc.).
|
|
250
|
-
|
|
251
|
-
**Detection condition**: Run integration analysis if any of the following apply.
|
|
252
|
-
|
|
253
|
-
```bash
|
|
254
|
-
# Detect existing harness scale
|
|
255
|
-
CLAUDE_MD_LINES=$(wc -l < CLAUDE.md 2>/dev/null || echo 0)
|
|
256
|
-
RULES_COUNT=$(ls .claude/rules/*.md 2>/dev/null | wc -l || echo 0)
|
|
257
117
|
|
|
258
|
-
|
|
259
|
-
echo ".claude/rules/: ${RULES_COUNT} files"
|
|
118
|
+
**Detection condition (behavioral)**: run integration analysis when `CLAUDE.md > 50 lines` OR `3+ .claude/rules/*.md files`. Otherwise → new install, move to Step 1.
|
|
260
119
|
|
|
261
|
-
|
|
262
|
-
if [ "$CLAUDE_MD_LINES" -gt 50 ] || [ "$RULES_COUNT" -ge 3 ]; then
|
|
263
|
-
echo "STATUS: Existing harness detected → proceeding with integration analysis"
|
|
264
|
-
else
|
|
265
|
-
echo "STATUS: New install → move to Step 1"
|
|
266
|
-
fi
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
**When existing harness detected — integration analysis:**
|
|
270
|
-
|
|
271
|
-
Analyze existing CLAUDE.md + rules along 3 axes.
|
|
120
|
+
**When existing harness detected — analyze existing CLAUDE.md + rules along 3 axes:**
|
|
272
121
|
|
|
273
122
|
| Analysis axis | What to check | FH response |
|
|
274
123
|
|---|---|---|
|
|
@@ -276,298 +125,64 @@ Analyze existing CLAUDE.md + rules along 3 axes.
|
|
|
276
125
|
| **Project-specific** | Rules valid only for this project/domain | Keep (FH does not touch these) |
|
|
277
126
|
| **FH-delegatable** | Manually written recurring patterns (commit format, review checklists, audit schedule, etc.) | Classify as delegatable to FH skills |
|
|
278
127
|
|
|
279
|
-
**
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
283
|
-
Existing Harness Integration Analysis
|
|
284
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
285
|
-
CLAUDE.md current: {X} lines
|
|
286
|
-
.claude/rules/: {N} files
|
|
287
|
-
|
|
288
|
-
Duplicates (FH-covered): {A} items → can be removed
|
|
289
|
-
FH-delegatable: {B} items → replaceable with skills
|
|
290
|
-
Project-specific: {C} items → keep
|
|
291
|
-
|
|
292
|
-
Expected after integration: CLAUDE.md {X} → {Y} lines ({Z}% reduction)
|
|
293
|
-
Token savings estimate: ~{W}K tokens/session saved
|
|
294
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
295
|
-
|
|
296
|
-
Show integration plan?
|
|
297
|
-
Y — Per-item removal/delegation detailed proposal (applied in subsequent Step 1)
|
|
298
|
-
N — Continue with add-only approach (keep existing rules)
|
|
299
|
-
S — Skip for now, move directly to Step 1. Can reanalyze later with /install-wizard --dry-run
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
**Respect user judgment**: FH mapping (duplicate removal, skill delegation) is not forced.
|
|
303
|
-
If FH is truly frontier, it will be chosen naturally. The choice is the user's.
|
|
304
|
-
Any of Y/N/S continues to Step 1.
|
|
128
|
+
**Respect user judgment**: FH mapping (duplicate removal, skill delegation) is not forced.
|
|
129
|
+
If FH is truly frontier, it will be chosen naturally. The choice is the user's.
|
|
130
|
+
Y (add integration plan items to Step 1) / N (add-only, keep existing rules) / S (skip, reanalyze later) — any choice continues to Step 1.
|
|
305
131
|
|
|
306
|
-
**
|
|
307
|
-
**If N/S selected**: Keep existing rules as-is and proceed with Step 1 in add-only mode for new FH items.
|
|
132
|
+
> **Detail**: See `SKILL_detail.md §Step0C-Integration` — illustrative single-run measurements, detection bash, integration analysis output format — read when executing Step 0-C.
|
|
308
133
|
|
|
309
134
|
### Step 1. Gap Diagnosis
|
|
310
135
|
|
|
311
|
-
**[Prerequisite] install-doctor
|
|
312
|
-
|
|
313
|
-
If `~/.cc_sentinels/{project-name}_wizard_done` doesn't exist (first install), call install-doctor first and map results to the checks below:
|
|
136
|
+
**[Prerequisite] install-doctor conflict diagnosis (only in environments without install history)**: if `~/.cc_sentinels/{project-name}_wizard_done` doesn't exist (first install), call `/install-doctor --plugin fh-meta` first. CONFLICT/WARNING items → add ❗ markers to Step 2 proposal list. Items the doctor already diagnosed (`FH plugin install` · `zshrc hook` · `.claudeignore`) → map results directly, skip re-diagnosis; all other items → check directly.
|
|
314
137
|
|
|
315
|
-
|
|
316
|
-
/install-doctor --plugin fh-meta
|
|
317
|
-
```
|
|
138
|
+
Auto-check each item as PASS / MISS / FAIL. Check items: `.claudeignore` · `local_fh_context.md` · `zshrc hook` · `weekly_audit` freshness · `sentinel` setup · FH plugin install · `.git/info/exclude` · MCP plugin · `deep-insight` plugin (optional) · `fh_env_context.jsonc` · `phantom-gate` (Python + AI-output projects only) · domain pattern pack (optional, none ship by default).
|
|
318
139
|
|
|
319
|
-
|
|
320
|
-
No install-doctor results or clean → proceed directly with Step 1 checks.
|
|
140
|
+
> **Detail**: See `SKILL_detail.md §Step1-Checks` — full check table with criteria and verification commands per item — read when executing Step 1.
|
|
321
141
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
> ※ install-doctor result mapping scope:
|
|
325
|
-
> - Items diagnosed by doctor (`FH plugin install` · `zshrc hook` · `.claudeignore`) → map doctor results directly, skip re-diagnosis.
|
|
326
|
-
> - Items not diagnosed by doctor (`weekly_audit` · `sentinel` · `local_fh_context.md` · `deep-insight plugin` etc.) → check directly using table below.
|
|
327
|
-
|
|
328
|
-
| Check item | Criteria | Verification method |
|
|
329
|
-
|---|---|---|
|
|
330
|
-
| `.claudeignore` | Existence | `ls .claudeignore` |
|
|
331
|
-
| `local_fh_context.md` | Existence in `.claude/rules/` | `ls .claude/rules/local_fh_context.md` |
|
|
332
|
-
| `zshrc hook` | Contains `fh_audit_check.zsh` source line | `grep fh_audit_check.zsh ~/.zshrc` |
|
|
333
|
-
| `weekly_audit` latest | Within 7 days | CC_HUB_DIR/tracks/_audit/ mtime |
|
|
334
|
-
| `sentinel` setup | `~/.cc_sentinels/` exists | `ls ~/.cc_sentinels/` |
|
|
335
|
-
| FH plugin install | `installed_plugins.json` has `fh-meta` entry | `python3 -c "import json,os; d=json.load(open(os.path.expanduser('~/.claude/plugins/installed_plugins.json'))); print([k for k in d.get('plugins',{}) if 'fh-meta' in k])"` |
|
|
336
|
-
| `.git/info/exclude` | Personal files excluded | grep local_fh_context .git/info/exclude |
|
|
337
|
-
| MCP plugin | ~/.claude.json mcpServers contains entry | `python3 -c "import json,os; d=json.load(open(os.path.expanduser('~/.claude.json'))); print(list(d.get('mcpServers',{}).keys()))"` |
|
|
338
|
-
| `deep-insight plugin` | settings.json plugins contains deep-insight | `grep -r "deep-insight" .claude/settings.json 2>/dev/null` |
|
|
339
|
-
| `fh_env_context.jsonc` | `.claude/rules/fh_env_context.jsonc` exists | `ls .claude/rules/fh_env_context.jsonc` |
|
|
340
|
-
| `phantom-gate` | **(Python + AI-output projects only)** `phantom-gate` present in `requirements.txt` / `pyproject.toml` | `grep "phantom.gate" requirements.txt pyproject.toml 2>/dev/null` |
|
|
341
|
-
| `Domain pattern pack applied` | (optional — only when a `{framework}_patterns.md` pack is present; none ship by default) framework-specific pattern checks | `knowledge/shared/{framework}_patterns.md` check (skip if file absent — the normal default) |
|
|
342
|
-
|
|
343
|
-
**Score calculation**: PASS = 1 / MISS = 0.5 / FAIL = 0. Formula: `score = round( Σ(points) ÷ (applicable item count) × 100 )`. Conditional items (domain pattern pack / phantom-gate / MCP / deep-insight) are excluded from the denominator when not relevant, so always print the denominator next to the score (e.g. `{score}/100 over {n} applicable items`) — the percentage is reproducible only when the item count is shown.
|
|
142
|
+
**Score calculation (behavioral)**: PASS = 1 / MISS = 0.5 / FAIL = 0. Formula: `score = round( Σ(points) ÷ (applicable item count) × 100 )`. Conditional items (domain pattern pack / phantom-gate / MCP / deep-insight) are excluded from the denominator when not relevant, so always print the denominator next to the score (e.g. `{score}/100 over {n} applicable items`) — the percentage is reproducible only when the item count is shown.
|
|
344
143
|
|
|
345
144
|
### Step 2. Diagnosis Report + Proposal List
|
|
346
145
|
|
|
347
|
-
Output diagnosis results and generate per-item proposals.
|
|
348
|
-
|
|
349
|
-
```
|
|
350
|
-
install-wizard — Diagnosis Results ({score}/100)
|
|
351
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
352
|
-
✅ PASS .claudeignore exists
|
|
353
|
-
⚠️ MISS local_fh_context.md absent
|
|
354
|
-
⚠️ MISS zshrc hook absent
|
|
355
|
-
❌ FAIL weekly_audit 12 days elapsed
|
|
356
|
-
✅ PASS FH plugin installed
|
|
357
|
-
⚠️ MISS MCP plugin absent
|
|
358
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
359
|
-
|
|
360
|
-
📋 Proposal list (per-item approval required before execution):
|
|
361
|
-
|
|
362
|
-
[1] Install local_fh_context.md — FH skill auto-recognition
|
|
363
|
-
[2] Add zshrc hook — periodic audit notification on terminal start
|
|
364
|
-
[3] Run weekly_audit immediately — call /harvest-loop (lightweight mode)
|
|
365
|
-
[4] Initialize ~/.cc_sentinels/ — project audit tracking
|
|
366
|
-
[5] Install fh-meta plugin — activate all FH skills (if FH plugin MISS)
|
|
367
|
-
AI executes automatically via Bash — no manual terminal input needed:
|
|
368
|
-
claude plugin marketplace add https://github.com/chrono-meta/forge-harness.git
|
|
369
|
-
claude plugin install -s user fh-meta@forge-harness
|
|
370
|
-
CC restart required after completion for skills to appear in /skills list
|
|
371
|
-
[6] Add MCP plugin — activate integrations (if MCP plugin MISS)
|
|
372
|
-
Run: claude mcp add <your-mcp-plugin> -- npx -y <your-mcp-plugin>
|
|
373
|
-
CC restart required after completion
|
|
374
|
-
[7] (Optional — field plugin, NOT required) Install deep-insight — adds the field's domain personas to sim-conductor
|
|
375
|
-
deep-insight is a private/field marketplace plugin. sim-conductor already ships the built-in
|
|
376
|
-
user-mastery spectrum (beginner · main-player · expert · challenger), so multi-persona simulation
|
|
377
|
-
works WITHOUT it. If you have access: Settings → Plugins → Add → <your deep-insight path>.
|
|
378
|
-
If not: skip — sim-conductor falls back to the built-in spectrum agents (no capability lost).
|
|
379
|
-
[8] Create fh_env_context.jsonc — org/network/Git environment context file (if fh_env_context.jsonc MISS)
|
|
380
|
-
Copy: {FH_DIR}/templates/fh_env_context.jsonc → .claude/rules/fh_env_context.jsonc
|
|
381
|
-
Then manually update with actual values for org name, Jira URL, environment status, etc.
|
|
382
|
-
Effect: Each skill references common environment context → eliminate individual setting duplication
|
|
383
|
-
[9] Install phantom-gate — AI output hallucination detection (Python + AI-output projects only, if MISS)
|
|
384
|
-
Run: pip install git+https://github.com/chrono-meta/phantom-gate.git
|
|
385
|
-
Usage: phantom-gate scan output.txt / phantom-gate scan . --project
|
|
386
|
-
Detectors: M1 (phantom claims) · M2 (self-reference loops) · M3 (unvalidated external-dep claims) · M4 (temporal) · M5 (cross-file version mismatch)
|
|
387
|
-
Skip condition: non-Python project OR no AI-generated output in pipeline
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
Each item: Y (approve) / N (skip) / L (later) / A (approve all)
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
#### cross-install Detection → agent-composer Auto-Update Proposal
|
|
394
|
-
|
|
395
|
-
When external plugins are cross-installed:
|
|
396
|
-
1. Collect trigger keyword list from installed skills
|
|
397
|
-
2. Check if those triggers exist in `agent-composer/SKILL.md` Step 1 mapping table
|
|
398
|
-
3. If missing triggers found → propose agent-composer update to user
|
|
146
|
+
Output diagnosis results and generate per-item proposals. Each item: **Y (approve) / N (skip) / L (later) / A (approve all)**.
|
|
399
147
|
|
|
400
|
-
|
|
401
|
-
```
|
|
402
|
-
🔍 cross-install detected: {skill name} ({trigger keywords})
|
|
403
|
-
→ agent-composer mapping gap confirmed
|
|
404
|
-
→ auto-update proposal included in Step 3
|
|
405
|
-
```
|
|
148
|
+
**cross-install detection → agent-composer auto-update proposal**: when external plugins are cross-installed, collect their trigger keywords, check against `agent-composer/SKILL.md` Step 1 mapping table, and propose an update for missing triggers (included in Step 3). No gaps → output "agent-composer mapping up to date".
|
|
406
149
|
|
|
407
|
-
|
|
150
|
+
**`--dry-run` branch point (behavioral)**: if the flag is set, output the dry-run summary and **exit here** (skip Steps 3~4).
|
|
408
151
|
|
|
409
|
-
>
|
|
410
|
-
> ```
|
|
411
|
-
> install-wizard [dry-run] — Analysis complete ({score}/100)
|
|
412
|
-
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
413
|
-
> MISS/FAIL items: {N} — rerun /install-wizard to execute
|
|
414
|
-
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
415
|
-
> ```
|
|
152
|
+
> **Detail**: See `SKILL_detail.md §Step2-Formats` — diagnosis report template, 9-item proposal list with per-item commands, cross-install output format, dry-run exit message — read when executing Step 2.
|
|
416
153
|
|
|
417
154
|
### Step 3. User Approval → Per-item Execution
|
|
418
155
|
|
|
419
|
-
After receiving approval input, execute in order. **Output actual action preview before each execution
|
|
420
|
-
|
|
421
|
-
Execution example (local_fh_context.md install):
|
|
422
|
-
```
|
|
423
|
-
▶ [1] Install local_fh_context.md
|
|
424
|
-
Copy: {FH_DIR}/templates/local_fh_context.md
|
|
425
|
-
→ .claude/rules/local_fh_context.md
|
|
426
|
-
Exclude: add pattern to .git/info/exclude
|
|
427
|
-
Execute? (Y/N):
|
|
428
|
-
```
|
|
156
|
+
After receiving approval input, execute in order. **Output actual action preview before each execution.**
|
|
429
157
|
|
|
430
|
-
Execution priority:
|
|
158
|
+
Execution priority (behavioral):
|
|
431
159
|
1. FAIL items (immediate effect)
|
|
432
160
|
2. MISS items (configuration supplementation)
|
|
433
161
|
3. Optimization items (optional)
|
|
434
162
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
When FH plugin is MISS, execute the following via Bash (no manual input required):
|
|
438
|
-
|
|
439
|
-
```bash
|
|
440
|
-
# Step A: register marketplace (idempotent — "already on disk" is OK)
|
|
441
|
-
claude plugin marketplace add https://github.com/chrono-meta/forge-harness.git 2>&1
|
|
442
|
-
|
|
443
|
-
# Step B: install plugin
|
|
444
|
-
claude plugin install -s user fh-meta@forge-harness 2>&1
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
**Error handling:**
|
|
163
|
+
> **Detail**: See `SKILL_detail.md §Step3-Execution` — action preview example, FH plugin auto-install bash + error handling table + success format, agent-composer mapping update format — read when executing Step 3.
|
|
448
164
|
|
|
449
|
-
|
|
450
|
-
|---|---|---|
|
|
451
|
-
| `✔ Marketplace ... already on disk` | Already registered | Continue to Step B |
|
|
452
|
-
| `✔ Successfully installed` | Done | Report success, remind CC restart |
|
|
453
|
-
| `Plugin "fh-meta" not found` | Marketplace cache stale | Run `claude plugin marketplace update forge-harness` then retry Step B |
|
|
454
|
-
| Any other error | Unknown failure | Report error verbatim, ask user to retry manually |
|
|
455
|
-
|
|
456
|
-
**Output format on success:**
|
|
457
|
-
```
|
|
458
|
-
▶ [5] Install fh-meta plugin
|
|
459
|
-
✅ Marketplace: forge-harness registered
|
|
460
|
-
✅ Plugin: fh-meta@forge-harness installed (scope: user)
|
|
461
|
-
⚠️ CC restart needed — skills will appear in /skills after restart
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
**agent-composer mapping update** (when skills were added via cross-install):
|
|
165
|
+
### Step 4. Acceleration Baseline Setup
|
|
465
166
|
|
|
466
|
-
|
|
467
|
-
propose adding rows to `agent-composer/SKILL.md` Step 1 mapping table in this format:
|
|
167
|
+
After executing approved items, install the automatic maintenance structure: zshrc hook (idempotent, preview-then-confirm) + sentinel initialization (per-project) + weekly-audit cadence (no cron — zshrc hook + session-start detection are the durable mechanisms).
|
|
468
168
|
|
|
469
|
-
|
|
470
|
-
| {skill name} related task | {skill name} (S) | — |
|
|
471
|
-
```
|
|
169
|
+
**4-axis pre-commit gate (behavioral — OPT-IN, double-confirm)**: Mode D / FH-self-development only. It gates commits **in the user's FH clone** and is **never installed into field projects** (FH-internal infra — see `auto_project_mapping.md §6`). Not auto-run: a separate explicit Y/N, never folded into the baseline-setup batch.
|
|
472
170
|
|
|
473
|
-
|
|
474
|
-
```
|
|
475
|
-
▶ agent-composer mapping update
|
|
476
|
-
Add to: agent-composer/SKILL.md Step 1 table
|
|
477
|
-
| {skill name} related task | {skill name} (S) | — |
|
|
478
|
-
Execute? (Y/N):
|
|
479
|
-
```
|
|
480
|
-
|
|
481
|
-
### Step 4. Acceleration Baseline Setup
|
|
482
|
-
|
|
483
|
-
After executing approved items, install automatic maintenance structure:
|
|
484
|
-
|
|
485
|
-
```bash
|
|
486
|
-
# zshrc hook (if not installed — preview then confirm, idempotent)
|
|
487
|
-
if ! grep -q "fh_audit_check.zsh" ~/.zshrc 2>/dev/null; then
|
|
488
|
-
cat >> ~/.zshrc << 'EOF'
|
|
489
|
-
export FH_DIR="{FH_DIR}"
|
|
490
|
-
export CC_HUB_DIR="{CC_HUB_DIR}"
|
|
491
|
-
export CC_SENTINELS_DIR="$HOME/.cc_sentinels"
|
|
492
|
-
source "$FH_DIR/templates/fh_audit_check.zsh"
|
|
493
|
-
EOF
|
|
494
|
-
fi
|
|
495
|
-
|
|
496
|
-
# 4-axis verification gate (Mode D / FH-self-development only — OPT-IN, double-confirm required)
|
|
497
|
-
# SCOPE (state this before asking): this gates commits IN YOUR FH CLONE ($FH_DIR) — git commit there is
|
|
498
|
-
# blocked until the 4-axis markers pass. It is FH-internal infra (hardcodes hub paths/markers) and is
|
|
499
|
-
# NEVER installed into field projects (see auto_project_mapping.md §6). Skip unless you develop FH itself.
|
|
500
|
-
# Per Core Principles (Per-item approval + Double-confirm irreversible changes): this is NOT auto-run —
|
|
501
|
-
# it is a separate explicit Y/N, not folded into the baseline-setup batch.
|
|
502
|
-
if [ -d "$FH_DIR/templates/.git-hooks" ]; then
|
|
503
|
-
echo "Enable the 4-axis pre-commit gate on your FH clone ($FH_DIR)? It will block commits there until"
|
|
504
|
-
echo "markers pass (Mode D / FH-development only). Skip if you are not developing FH itself. (Y/N)"
|
|
505
|
-
# → On explicit Y only:
|
|
506
|
-
git -C "$FH_DIR" config core.hooksPath templates/.git-hooks
|
|
507
|
-
chmod +x "$FH_DIR/templates/.git-hooks/pre-commit" 2>/dev/null
|
|
508
|
-
echo "4-axis pre-commit gate: installed (core.hooksPath -> templates/.git-hooks)"
|
|
509
|
-
fi
|
|
510
|
-
|
|
511
|
-
# sentinel initialization (per-project independent — prevent conflicts with other projects on same machine)
|
|
512
|
-
mkdir -p ~/.cc_sentinels
|
|
513
|
-
touch ~/.cc_sentinels/$(basename "$(pwd)")_wizard_done
|
|
514
|
-
|
|
515
|
-
# Weekly audit cadence — NO cron needed (a session-scoped scheduler cannot fire on a later day).
|
|
516
|
-
# Durable mechanism = the zshrc hook above (fh_audit_check.zsh warns on terminal start when 7+ days
|
|
517
|
-
# since last weekly_audit) + FH session-start detection (proposes /harvest-loop lightweight when overdue).
|
|
518
|
-
```
|
|
171
|
+
> **Detail**: See `SKILL_detail.md §Step4-Baseline-Bash` — zshrc hook block, 4-axis gate install commands with scope statement, sentinel init — read when executing Step 4.
|
|
519
172
|
|
|
520
173
|
### Step 5. Completion Report + Contribution Guidance
|
|
521
174
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
✅ Executed: {N} ⏭ Skipped: {N} ⏳ Later: {N}
|
|
526
|
-
|
|
527
|
-
From now on:
|
|
528
|
-
· Periodic audit auto-check on terminal start
|
|
529
|
-
· Yellow warning output when weekly_audit exceeds 7 days
|
|
530
|
-
· /harvest-loop (lightweight) proposed at session start when 7+ days since last weekly_audit
|
|
531
|
-
|
|
532
|
-
Next step skills:
|
|
533
|
-
· Not sure which plugin you need → /plugin-recommender
|
|
534
|
-
· Need complex task automation → /agent-composer
|
|
535
|
-
· Quality audit before publishing external assets → hub-persona-auditor auto-run
|
|
536
|
-
(select "external user entry point audit" task type when composing in agent-composer)
|
|
537
|
-
|
|
538
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
539
|
-
💡 If this setup helped, consider contributing to FH.
|
|
540
|
-
Pattern discovered → return with /field-harvest
|
|
541
|
-
New skill proposal → PR:
|
|
542
|
-
https://github.com/chrono-meta/forge-harness
|
|
543
|
-
|
|
544
|
-
🔬 Developing FH itself? Set up a private companion store:
|
|
545
|
-
gh repo create {org}/{hub}-be --private # paper drafts, experiment logs, handoffs
|
|
546
|
-
(or local-only: git init ~/path/{hub}-be — no remote; push is auto-skipped)
|
|
547
|
-
→ public mirror holds methodology · private store holds research artifacts
|
|
548
|
-
→ field projects (internal harness) can use the same dual-repo pattern
|
|
549
|
-
|
|
550
|
-
🔀 Don't want to lose your accumulated assets — fork as your own hub:
|
|
551
|
-
Personal skills/rules/notes added directly to FH may be lost on FH updates.
|
|
552
|
-
git clone <FH_URL> ~/my-forge # name is up to you (my-forge, team-forge, etc.)
|
|
553
|
-
→ Build freely in your fork and preserve permanently with git
|
|
554
|
-
→ When you discover valuable patterns, /field-harvest to reverse-contribute to FH anytime
|
|
555
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
556
|
-
```
|
|
175
|
+
Output the completion summary (executed/skipped/later counts + what runs automatically from now on) followed by next-step skill suggestions, FH contribution guidance, Mode D companion-store pointer, and the fork-your-own-hub option.
|
|
176
|
+
|
|
177
|
+
> **Detail**: See `SKILL_detail.md §Step5-Completion-Report` — full completion report template — read when executing Step 5.
|
|
557
178
|
|
|
558
179
|
## Re-run (Inspection Mode)
|
|
559
180
|
|
|
560
|
-
When run again in an environment that has already passed the wizard, operates in **inspection mode**:
|
|
181
|
+
When run again in an environment that has already passed the wizard (`~/.cc_sentinels/{project-name}_wizard_done` exists — per-project independent), operates in **inspection mode**:
|
|
561
182
|
- Only runs Step 1 gap diagnosis
|
|
562
183
|
- Proposes only newly found MISS/FAIL items
|
|
563
184
|
- No full reinstall
|
|
564
185
|
|
|
565
|
-
```bash
|
|
566
|
-
# Auto-switches to inspection mode when .cc_sentinels/{project-name}_wizard_done exists (per-project independent)
|
|
567
|
-
PROJECT_NAME=$(basename "$(pwd)")
|
|
568
|
-
ls ~/.cc_sentinels/${PROJECT_NAME}_wizard_done 2>/dev/null && echo "Inspection mode"
|
|
569
|
-
```
|
|
570
|
-
|
|
571
186
|
## External User Environment Adaptation
|
|
572
187
|
|
|
573
188
|
| Mode | Environment | Action |
|