@walwal-harness/cli 7.1.24 → 7.1.26

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/CHANGELOG.md CHANGED
@@ -31,6 +31,26 @@ docmeta:
31
31
 
32
32
  ## Unreleased
33
33
 
34
+ ## 7.1.26 — Lazy rule links + MCP steward (2026-05-27)
35
+
36
+ ### Added
37
+ - COO planning can hire `support-support-mcp-registry-steward` to inventory Claude/Codex MCP capabilities, registration risk, credentials, and maintenance notes.
38
+ - CXX convention/gotcha files now act as lazy-loading indexes that link to topic files such as `i18n-locale-hotfix.md`.
39
+
40
+ ### Changed
41
+ - `migrate` preserves topic-specific convention/gotcha files and adds related links to matching CXX index files instead of merging or deleting them.
42
+ - CXX and worker guidance now passes only relevant convention/gotcha links to workers, avoiding full-registry scans.
43
+
44
+ ## 7.1.25 — Absolute Claude hook paths + Codex adapter docs (2026-05-26)
45
+
46
+ ### Fixed
47
+ - Claude hooks and statusline now install with project-root absolute script paths, preventing `UserPromptSubmit hook error: scripts/harness-user-prompt-submit.sh: No such file or directory` when Claude runs hooks outside the project root.
48
+ - Existing relative-path harness hooks are migrated to absolute paths on re-init.
49
+
50
+ ### Changed
51
+ - Codex command and AGENTS templates now explain that `.codex/skills/**/SKILL.md` is the Codex runtime protocol and `.codex/agents/` is not required.
52
+ - `migrate` appends a Codex Runtime Adapter block to existing AGENTS.md files when missing.
53
+
34
54
  ## 7.1.24 — Hourly CEO wake loop + migrate script refresh (2026-05-22)
35
55
 
36
56
  ### Changed
@@ -9,6 +9,10 @@ disable-model-invocation: false
9
9
 
10
10
  Own design strategy for the mission.
11
11
 
12
+ ## Lazy Rule Loading
13
+
14
+ Before design work, read `.harness/conventions/shared.md`, `.harness/conventions/cdo.md`, `.harness/gotchas/shared.md`, and `.harness/gotchas/cdo.md`. Then follow only the related links in `cdo.md` files that match the mission topic. Worker briefs must pass the relevant links instead of asking workers to scan all rule files.
15
+
12
16
  ## Workflow
13
17
 
14
18
  1. Read CEO and COO mission context.
@@ -9,6 +9,15 @@ disable-model-invocation: false
9
9
 
10
10
  You are the only direct conversation channel with the Owner.
11
11
 
12
+ ## Lazy Rule Loading
13
+
14
+ Before routing or accepting CXX work, enforce lazy loading:
15
+
16
+ - CEO reads `.harness/conventions/shared.md`, `.harness/conventions/ceo.md`, `.harness/gotchas/shared.md`, and `.harness/gotchas/ceo.md`.
17
+ - Each CXX reads its own `.harness/conventions/{cxx}.md` and `.harness/gotchas/{cxx}.md`, then follows only the related links in those files that match the mission topic.
18
+ - Topic files such as `.harness/gotchas/i18n-locale-hotfix.md` remain separate. CXX index files carry links to them; they are not merged into one large file.
19
+ - Workers receive the relevant CXX link set in their brief instead of scanning every convention/gotcha file.
20
+
12
21
  ## Mission Protocol
13
22
 
14
23
  1. Read the Owner request and decide whether brainstorming is needed or execution can start.
@@ -9,11 +9,26 @@ disable-model-invocation: false
9
9
 
10
10
  Own mission planning, research, references, hypotheses, and goal fit.
11
11
 
12
+ ## Lazy Rule Loading
13
+
14
+ Before planning, read `.harness/conventions/shared.md`, `.harness/conventions/coo.md`, `.harness/gotchas/shared.md`, and `.harness/gotchas/coo.md`. Then follow only the related links in `coo.md` files that match the mission topic. Worker briefs must pass the relevant links instead of asking workers to scan all rule files.
15
+
16
+ ## MCP Capability Scan
17
+
18
+ During planning, COO must determine whether the active runtime exposes MCP servers, MCP tools, connector tools, or tool-discovery tools that can materially improve the mission. This is a planning input, not an implementation shortcut.
19
+
20
+ - Before finalizing a plan, create a worker task for an MCP capability scan. Prefer `support-support-mcp-registry-steward` when available; otherwise hire the smallest worker that can inventory Claude/Codex MCP availability without inventing unavailable tools.
21
+ - The worker must use only discovery mechanisms actually exposed in the current runtime, such as MCP resource/tool listing, connector search, or tool-discovery tools. Do not invent unavailable MCPs.
22
+ - The inventory must classify each applicable MCP by purpose, required credentials or setup, read/write risk, expected value, and where it fits in the mission flow.
23
+ - If no discovery mechanism is exposed, or no applicable MCP is available, record that explicitly in the worker report and proceed without MCP dependency.
24
+ - COO may recommend MCP usage only when the worker report shows that the tool is available, applicable, and safer or more efficient than the non-MCP path.
25
+ - COO must route execution of any MCP-dependent implementation, verification, or operational work to the responsible CXX and hired workers. COO does not call MCP tools to complete specialist deliverables.
26
+
12
27
  ## Workflow
13
28
 
14
29
  1. Read `.harness/documents/{mission_name}/ceo.md`.
15
30
  2. Record work in `.harness/documents/{mission_name}/coo.md`.
16
- 3. Break the COO scope into worker tasks: research, planning, hypothesis validation, backtest design, documentation, or product direction.
31
+ 3. Break the COO scope into worker tasks: research, planning, MCP capability scan, hypothesis validation, backtest design, documentation, or product direction.
17
32
  4. Use the `harness-resource-manager` skill to check available workers for every task.
18
33
  5. Use the `harness-hiring` skill before assigning any task that has no hired worker. Do not complete that task yourself.
19
34
  6. Delegate all COO deliverables to hired workers in fresh sessions.
@@ -36,8 +51,9 @@ Required output sections:
36
51
 
37
52
  1. Worker Task Briefs — task, capability needed, selected worker or hiring request, acceptance criteria.
38
53
  2. Worker Evidence Manifest — worker name, report path, status.
39
- 3. COO Decision — only decisions accepted from worker evidence.
40
- 4. Next Handoff — next CXX, inputs, blockers.
41
- 5. Implementation Notes — in English, with `Design Decisions`, `Deviations`, `Tradeoffs`, and `Open Questions`.
54
+ 3. MCP Capability Inventory — available/applicable MCPs, required setup, read/write risk, recommended use, or explicit `None`.
55
+ 4. COO Decision — only decisions accepted from worker evidence.
56
+ 5. Next Handoff — next CXX, inputs, blockers.
57
+ 6. Implementation Notes — in English, with `Design Decisions`, `Deviations`, `Tradeoffs`, and `Open Questions`.
42
58
 
43
59
  Every COO worker brief must require the worker to append the same English `## Implementation Notes` block to the bottom of `.harness/documents/{mission_name}/coo/workers/{worker-name}.md`, covering risks, self-corrections, chosen direction, and unresolved questions. Use `None` for empty subsections.
@@ -9,6 +9,10 @@ disable-model-invocation: false
9
9
 
10
10
  Own quality, recurrence prevention, and archive eligibility.
11
11
 
12
+ ## Lazy Rule Loading
13
+
14
+ Before quality work, read `.harness/conventions/shared.md`, `.harness/conventions/cqo.md`, `.harness/gotchas/shared.md`, and `.harness/gotchas/cqo.md`. Then follow only the related links in `cqo.md` files that match the mission topic, such as i18n, regression, accessibility, API, runtime, or incident links. Worker briefs must pass the relevant links instead of asking workers to scan all rule files.
15
+
12
16
  ## Workflow
13
17
 
14
18
  1. Read CEO and CTO mission context.
@@ -9,6 +9,10 @@ disable-model-invocation: false
9
9
 
10
10
  Own engineering execution for the mission.
11
11
 
12
+ ## Lazy Rule Loading
13
+
14
+ Before engineering work, read `.harness/conventions/shared.md`, `.harness/conventions/cto.md`, `.harness/gotchas/shared.md`, and `.harness/gotchas/cto.md`. Then follow only the related links in `cto.md` files that match the mission topic, such as i18n, auth, API, runtime, or platform links. Worker briefs must pass the relevant links instead of asking workers to scan all rule files.
15
+
12
16
  ## Workflow
13
17
 
14
18
  1. Read CEO, COO, and CDO mission documents.
@@ -26,7 +26,11 @@ Hire workers from `.harness/shared/HR-Resource/`.
26
26
  5. Update `.harness/shared/hr-roster.json` without deleting existing hired entries. Record `owner` as the owning CXX, `skillPath` as `.harness/shared/HR-Resource/{name}/SKILL.md`, and `skillPaths.claude` / `skillPaths.codex` as tool-specific hierarchical installed paths.
27
27
  6. The owning CXX must write worker reports under `.harness/documents/{mission}/{owning-cxx}/workers/{name}.md`. Do not write flat `.harness/documents/{mission}/workers/{name}.md` except when migrating legacy missions.
28
28
  7. Ask the `harness-resource-manager` skill to update trigger wording.
29
- 8. Return worker name, owner, source skill path, installed paths, mission report path, invocation wording, and the mandatory report appendix below.
29
+ 8. Return worker name, owner, source skill path, installed paths, mission report path, invocation wording, related convention/gotcha links supplied by the owning CXX, and the mandatory report appendix below.
30
+
31
+ ## Worker Rule Links
32
+
33
+ Every hired worker receives the owning CXX's relevant convention/gotcha links in the worker brief. Workers read those linked topic files only when they match the assigned task.
30
34
 
31
35
  ## Mandatory Worker Report Appendix
32
36
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "source": "/Users/ted/Downloads/agency-agents-main",
3
3
  "imported_at": "2026-05-11T08:05:46.803Z",
4
- "count": 179,
4
+ "count": 180,
5
5
  "resources": [
6
6
  {
7
7
  "sourceRel": "academic/academic-anthropologist.md",
@@ -679,6 +679,10 @@
679
679
  "sourceRel": "support/support-infrastructure-maintainer.md",
680
680
  "skillName": "support-support-infrastructure-maintainer"
681
681
  },
682
+ {
683
+ "sourceRel": "support/support-mcp-registry-steward.md",
684
+ "skillName": "support-support-mcp-registry-steward"
685
+ },
682
686
  {
683
687
  "sourceRel": "support/support-legal-compliance-checker.md",
684
688
  "skillName": "support-support-legal-compliance-checker"
@@ -9,6 +9,10 @@ disable-model-invocation: false
9
9
 
10
10
  Monitor the environments that make the mission runnable.
11
11
 
12
+ ## Lazy Rule Loading
13
+
14
+ Before monitoring work, read `.harness/conventions/shared.md`, `.harness/conventions/ops.md`, `.harness/gotchas/shared.md`, and `.harness/gotchas/ops.md`. Then follow only the related links in `ops.md` files that match the mission topic, such as runtime, port, log, production, or incident links. Worker briefs must pass the relevant links instead of asking workers to scan all rule files.
15
+
12
16
  OPS owns three environment classes:
13
17
 
14
18
  - Build environment: command-based local execution such as `flutter run`, `npm run dev`, test watchers, local build scripts, and other foreground/background commands used by CXX workers.
@@ -16,15 +16,18 @@ Manage worker availability and invocation wording.
16
16
  - Candidate pool: `.harness/shared/HR-Resource/*/SKILL.md`
17
17
  - Installed hired workers: `.claude/skills/{owning-cxx}/{worker}/SKILL.md` and `.codex/skills/{owning-cxx}/{worker}/SKILL.md`
18
18
  - Mission worker reports: `.harness/documents/{mission}/{owning-cxx}/workers/{worker}.md`
19
+ - Related convention/gotcha links: selected from `.harness/conventions/{owning-cxx}.md` and `.harness/gotchas/{owning-cxx}.md`
19
20
 
20
21
  ## Workflow
21
22
 
22
23
  1. Check whether the requester is a CXX. CEO cannot request specialist worker assignment directly.
23
24
  2. Check whether a suitable worker is already hired for that owning CXX.
24
- 3. If hired, return the exact skill name, owning CXX, hierarchical installed paths, mission report path, and the mandatory `## Implementation Notes` report appendix requirement.
25
+ 3. If hired, return the exact skill name, owning CXX, hierarchical installed paths, relevant convention/gotcha links, mission report path, and the mandatory `## Implementation Notes` report appendix requirement.
25
26
  4. If not hired, suggest `.harness/shared/HR-Resource/` candidates and recommend the `harness-hiring` skill with `owning CXX` filled in.
26
27
  5. Keep aliases narrow enough to avoid accidental generic invocation.
27
28
 
28
29
  ## Mandatory Worker Report Appendix
29
30
 
31
+ Every worker assignment must include only the convention/gotcha links relevant to the assigned task. The owning CXX selects those links from its CXX index files.
32
+
30
33
  Every worker assignment must require the worker to append an English `## Implementation Notes` section with these subsections: `Design Decisions`, `Deviations`, `Tradeoffs`, and `Open Questions`. The appendix must cover risks, self-corrections, chosen direction, and unresolved questions. Use `None` for empty subsections.
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: support-support-mcp-registry-steward
3
+ description: "MCP registry steward for Claude and Codex. Inventories available MCP servers/tools, recommends safe registration, and maintains project MCP usage records without inventing unavailable capabilities."
4
+ model: sonnet
5
+ disable-model-invocation: false
6
+ ---
7
+
8
+ # MCP Registry Steward
9
+
10
+ You manage Model Context Protocol capability discovery, registration guidance, and maintenance for Claude and Codex runtimes.
11
+
12
+ ## Mission
13
+
14
+ Help COO and the responsible CXX decide whether MCP tools should be used for a mission, and keep the decision auditable.
15
+
16
+ ## Scope
17
+
18
+ - Inventory MCP servers, MCP tools, connector tools, and tool-discovery mechanisms actually exposed in the current runtime.
19
+ - Compare Claude and Codex availability separately. A tool available in one runtime is not automatically available in the other.
20
+ - Recommend registration only when the MCP is useful, credentials/setup are clear, and read/write risk is acceptable.
21
+ - Maintain a project MCP capability record for future missions.
22
+ - Produce handoff notes for the CXX or worker that will actually use the MCP.
23
+
24
+ ## Discovery Rules
25
+
26
+ 1. Use only discovery mechanisms exposed in the active runtime.
27
+ 2. Do not invent MCP servers, tools, connector names, credentials, or config paths.
28
+ 3. If no discovery mechanism is available, record `None` with the exact reason.
29
+ 4. Treat write-capable MCPs as higher risk than read-only MCPs.
30
+ 5. Never edit global Claude, Codex, or user-level MCP configuration without explicit Owner approval.
31
+ 6. Prefer project-local documentation and registration instructions over hidden global state.
32
+
33
+ ## Claude Checks
34
+
35
+ - Inspect project and user-visible Claude MCP configuration only when accessible.
36
+ - Record server name, command, args, required environment variables, and whether tools are read-only or write-capable.
37
+ - If Claude exposes MCP tool namespaces in the active session, list the tool names used for discovery.
38
+ - If Playwright MCP is needed, verify whether project guidance already references it and whether setup instructions are present.
39
+
40
+ ## Codex Checks
41
+
42
+ - Inspect Codex-visible tool discovery, MCP resources, connector tools, and local project instructions.
43
+ - Record whether MCP discovery is exposed directly, only through connector/tool search, or not exposed.
44
+ - If a Claude MCP is not available to Codex, mark it as Claude-only until Codex registration is confirmed.
45
+ - Do not assume `.claude` MCP configuration applies to Codex.
46
+
47
+ ## Registration Review
48
+
49
+ For every proposed MCP registration, document:
50
+
51
+ - Purpose and mission fit.
52
+ - Runtime target: Claude, Codex, or both.
53
+ - Required credentials, environment variables, binaries, and network access.
54
+ - Read/write risk and blast radius.
55
+ - Suggested project-local docs or setup command.
56
+ - Validation command or manual smoke test.
57
+ - Rollback or disable procedure.
58
+
59
+ ## Maintenance Record
60
+
61
+ Write or update a worker report under:
62
+
63
+ `.harness/documents/{mission}/coo/workers/support-support-mcp-registry-steward.md`
64
+
65
+ Required sections:
66
+
67
+ 1. `## MCP Capability Inventory`
68
+ 2. `## Claude Runtime`
69
+ 3. `## Codex Runtime`
70
+ 4. `## Registration Candidates`
71
+ 5. `## Risk Review`
72
+ 6. `## Maintenance Plan`
73
+ 7. `## Recommended Mission Use`
74
+ 8. `## Implementation Notes`
75
+
76
+ Use `None` for empty sections. Include exact evidence paths or tool names for every claim.
77
+
package/README.md CHANGED
@@ -215,6 +215,9 @@ Hourly autonomous wake:
215
215
  - `HARNESS_WAKE_MODEL=<model>` optionally pins the Claude model for wake ticks.
216
216
  - Each wake tick prompts CEO to convene CXX + OPS, collect progress and decisions, dispatch the next action without asking Owner, and require CQO/OPS verification until the active goal works.
217
217
  - `npx @walwal-harness/cli migrate` refreshes package-owned runtime scripts, so existing projects receive wake prompt updates without a full re-init.
218
+ - In Codex, `.codex/skills/**/SKILL.md` files are the runtime protocol. `.codex/agents/` is not required; Codex should manually read the relevant skill if it is not auto-listed.
219
+ - Convention/gotcha topic files lazy-load through CXX index links: `migrate` preserves files such as `.harness/gotchas/i18n-locale-hotfix.md` and links them from relevant CXX files like `cto.md` and `cqo.md`.
220
+ - COO can use `support-support-mcp-registry-steward` to inventory Claude/Codex MCP capabilities, registration risk, credentials, and maintenance notes before recommending MCP use.
218
221
 
219
222
  ---
220
223
 
@@ -226,8 +229,8 @@ Hourly autonomous wake:
226
229
  | `.harness/documents/goal-{index}-{name}/submission-{index}-{name}/` | Additional requirement under the active goal |
227
230
  | `.harness/documents/goal-{index}-{name}/hotfix-{index}-{name}/` | Emergency fix under the active goal |
228
231
  | `.harness/documents/{goal-or-child-mission}/{cxx}/workers/` | Worker reports owned by that CXX |
229
- | `.harness/conventions/` | Durable rules (CQO writes, survives missions) |
230
- | `.harness/gotchas/` | Recurrence-prevention records (CQO registers per hot-fix) |
232
+ | `.harness/conventions/` | Durable rules and CXX lazy-loading indexes |
233
+ | `.harness/gotchas/` | Recurrence-prevention records and CXX lazy-loading indexes |
231
234
  | `.harness/shared/HR-Resource/` | Hireable worker skill pool |
232
235
  | `.harness/archive/` | CQO-approved completed missions (immutable) |
233
236
  | `.harness/logs/YYYY-MM-DD/` | OPS exception logs |
@@ -19,6 +19,18 @@ Internal routing uses agent/skill wiring only.
19
19
 
20
20
  ---
21
21
 
22
+ ## 1.1 Codex Runtime Adapter
23
+
24
+ Codex does not need `.codex/agents/` to run this harness. The installed Codex contract is:
25
+
26
+ - Owner entrypoints are `.codex/commands/goal.md`, `.codex/commands/submission.md`, and `.codex/commands/hot-fix.md`.
27
+ - Harness role protocols live in `.codex/skills/harness-{ceo,coo,cdo,cto,cqo,ops,hiring,resource-manager,brick-office}/SKILL.md`.
28
+ - If Codex does not auto-list these as available skills, manually read the relevant `SKILL.md` file and follow it. Do not report that the harness is unavailable just because `.codex/agents/` is absent.
29
+ - When a command asks for a "fresh session context", Codex must create a role-scoped context by reading only the role skill, the active mission files, and required conventions/gotchas before writing that role's `{cxx}.md`. If Codex sub-agent tooling is explicitly available and requested, it may be used; otherwise execute the role protocol sequentially with clear role boundaries.
30
+ - Codex must not treat `.codex/skills` as passive documentation. These files are the installed runtime protocol for Codex.
31
+
32
+ ---
33
+
22
34
  ## 2. Think Before Acting
23
35
 
24
36
  Don't assume. Don't hide confusion.
@@ -132,6 +144,7 @@ Note: A docmeta skip decision on harness documents (ceo.md, cto.md, cqo.md, work
132
144
  8. **No CXX self-execution** — CXX agents coordinate and manage only. A CXX that produces deliverables without matching worker records has violated its scope. CEO must reject such reports.
133
145
  9. **No verdict without worker evidence** — CQO cannot issue ACCEPTED/REJECTED without a Worker Evidence Manifest referencing at least one evaluator worker. Self-inspection by CQO is not valid evidence.
134
146
  10. **Hierarchical worker ownership** — Hired workers are installed under `.claude/skills/{owning-cxx}/{worker}/` and `.codex/skills/{owning-cxx}/{worker}/`; mission worker reports live under `.harness/documents/{goal-or-child-mission}/{owning-cxx}/workers/`. Flat `{mission}/workers/` reports are legacy and signal an ownership violation unless explicitly migrated.
147
+ 11. **Lazy convention/gotcha loading** — CXX roles read `.harness/conventions/shared.md`, `.harness/conventions/{cxx}.md`, `.harness/gotchas/shared.md`, and `.harness/gotchas/{cxx}.md`, then follow only the related topic links listed in those CXX files. Workers read only the related links supplied by their owning CXX.
135
148
  11. **Implementation Notes required** — `ceo.md`, every `{cxx}.md`, and every worker report must end with one English `## Implementation Notes` section containing `Design Decisions`, `Deviations`, `Tradeoffs`, and `Open Questions`. Use `None` for empty subsections. Do not create a separate sidecar notes file; the notes belong at the bottom of the same role or worker report that produced the decision/evidence.
136
149
  12. **Owner is final acceptance only** — Owner is not a tester or QA substitute. CEO/CXX must not report "done, please check" until worker-backed verification proves the goal can be completed. Use unit tests, E2E, Playwright, test accounts, seeded data, build/run checks, logs, and CQO evidence before requesting Owner acceptance.
137
150
  13. **OPS watches CQO verification** — For runnable products, CQO PASS is invalid unless OPS has monitored the verification runtime or documented why OPS watch is not applicable. Open OPS incidents, missing runtime mapping, required log gaps, service down, health mismatch, or an unmonitored tested service block Owner acceptance.
@@ -262,7 +262,7 @@
262
262
  "actions": ".harness/actions",
263
263
  "archive": ".harness/archive",
264
264
  "gotchas": ".harness/gotchas",
265
- "conventions": "CONVENTIONS.md",
265
+ "conventions": ".harness/conventions",
266
266
  "progress_state": ".harness/progress.json",
267
267
  "progress_log": ".harness/progress.log"
268
268
  },
@@ -284,16 +284,18 @@
284
284
  "statuses": ["start", "complete", "fail", "pass", "skip", "warn"]
285
285
  },
286
286
  "conventions": {
287
- "comment": "House-style registry. 루트 CONVENTIONS.md(사용자 자유 기술) + .harness/conventions/<scope>.md(Dispatcher 자동 누적). 모든 에이전트가 세션 시작 시 읽고 적용한다. Gotcha 의 긍정 대칭판.",
287
+ "comment": "House-style registry. CXX files act as lazy-loading indexes that link to topic-specific convention/gotcha documents.",
288
288
  "root_file": "CONVENTIONS.md",
289
289
  "scoped_dir": ".harness/conventions/",
290
- "scopes": ["shared", "planner", "generator-backend", "generator-frontend", "evaluator-code-quality", "evaluator-functional", "evaluator-visual"],
290
+ "gotcha_scoped_dir": ".harness/gotchas/",
291
+ "cxx_scopes": ["ceo", "coo", "cdo", "cto", "cqo", "ops", "hiring", "resource-manager", "brick-office"],
291
292
  "entry_id_prefix": "C",
292
- "read_by": "all_agents",
293
- "read_order": ["CONVENTIONS.md", ".harness/conventions/shared.md", ".harness/conventions/<self>.md", ".harness/gotchas/<self>.md", ".harness/memory.md"],
294
- "conflict_priority": "self > shared > root",
295
- "write_by": "dispatcher (auto-append C-NNN) or user_only (manual edit)",
296
- "read_timing": "session_start",
293
+ "read_by": "CEO, CXX, and hired workers",
294
+ "cxx_read_order": [".harness/conventions/shared.md", ".harness/conventions/<cxx>.md", "follow relevant links in <cxx>.md", ".harness/gotchas/shared.md", ".harness/gotchas/<cxx>.md", "follow relevant links in <cxx>.md", ".harness/memory.md"],
295
+ "worker_read_order": ["links explicitly provided by owning CXX in the worker brief"],
296
+ "conflict_priority": "linked topic > owning-cxx > shared > memory > root",
297
+ "write_by": "CQO/gotcha-register, CXX, or Owner-approved manual edit",
298
+ "read_timing": "before each role or worker starts mission work",
297
299
  "preserve_on_postinstall": true
298
300
  },
299
301
  "recommended_skills": {
package/bin/init.js CHANGED
@@ -168,6 +168,33 @@ function mergeClaudePermissionAllow(settings, entries) {
168
168
  return changed;
169
169
  }
170
170
 
171
+ function shellQuote(value) {
172
+ return `'${String(value).replace(/'/g, `'\\''`)}'`;
173
+ }
174
+
175
+ function harnessScriptCommand(scriptName) {
176
+ return `bash ${shellQuote(path.join(PROJECT_ROOT, 'scripts', scriptName))}`;
177
+ }
178
+
179
+ function replaceHarnessHookCommand(entries, marker, command) {
180
+ let changed = false;
181
+ for (const entry of entries) {
182
+ if (!entry || typeof entry !== 'object') continue;
183
+ if (Array.isArray(entry.hooks)) {
184
+ for (const hook of entry.hooks) {
185
+ if (hook && hook.command && hook.command.includes(marker) && hook.command !== command) {
186
+ hook.command = command;
187
+ changed = true;
188
+ }
189
+ }
190
+ } else if (entry.type === 'command' && entry.command && entry.command.includes(marker) && entry.command !== command) {
191
+ entry.command = command;
192
+ changed = true;
193
+ }
194
+ }
195
+ return changed;
196
+ }
197
+
171
198
  const V7_REMOVED_CONVENTION_FILES = [
172
199
  'conductor.md',
173
200
  'coo-developer.md',
@@ -500,7 +527,6 @@ function scaffoldHarness() {
500
527
  copyFile(srcPath, destPath);
501
528
  }
502
529
  }
503
-
504
530
  // Copy conventions — mirror gotchas preservation: never overwrite files with
505
531
  // accumulated `### [C-NNN]` entries.
506
532
  const conventionsSrc = path.join(PKG_ROOT, 'conventions');
@@ -523,7 +549,6 @@ function scaffoldHarness() {
523
549
  copyFile(srcPath, destPath);
524
550
  }
525
551
  }
526
-
527
552
  // First-install migration: extract Convention/Gotcha-shaped sections from
528
553
  // existing CLAUDE.md / AGENTS.md and copy into the hierarchical stores.
529
554
  if (isFirstInstall) {
@@ -820,7 +845,7 @@ function installSessionHook() {
820
845
 
821
846
  // Migrate any legacy flat entries (created by older walwal-harness versions)
822
847
  // into the correct matcher + hooks-array shape that Claude Code expects.
823
- const hookCmd = 'bash scripts/harness-session-start.sh';
848
+ const hookCmd = harnessScriptCommand('harness-session-start.sh');
824
849
  let migrated = false;
825
850
  settings.hooks.SessionStart = settings.hooks.SessionStart
826
851
  .map((entry) => {
@@ -845,6 +870,8 @@ function installSessionHook() {
845
870
  )
846
871
  );
847
872
 
873
+ const hookUpdated = replaceHarnessHookCommand(settings.hooks.SessionStart, 'harness-session-start', hookCmd);
874
+
848
875
  if (!alreadyInstalled) {
849
876
  settings.hooks.SessionStart.push({
850
877
  matcher: '',
@@ -852,9 +879,9 @@ function installSessionHook() {
852
879
  });
853
880
  writeClaudeSettings(settings);
854
881
  log('SessionStart hook installed in .claude/settings.json');
855
- } else if (migrated) {
882
+ } else if (migrated || hookUpdated) {
856
883
  writeClaudeSettings(settings);
857
- log('SessionStart hook migrated to matcher + hooks-array format');
884
+ log('SessionStart hook migrated in .claude/settings.json');
858
885
  } else {
859
886
  log('SessionStart hook already installed');
860
887
  }
@@ -872,16 +899,9 @@ function installStatusline() {
872
899
 
873
900
  let settings = readClaudeSettings();
874
901
 
875
- // Check if statusLine is already configured
876
- if (settings.statusLine && settings.statusLine.command &&
877
- settings.statusLine.command.includes('harness-statusline')) {
878
- log('Statusline already installed');
879
- return;
880
- }
881
-
882
902
  settings.statusLine = {
883
903
  type: 'command',
884
- command: 'bash scripts/harness-statusline.sh',
904
+ command: harnessScriptCommand('harness-statusline.sh'),
885
905
  refreshInterval: 3
886
906
  };
887
907
 
@@ -904,7 +924,7 @@ function installUserPromptSubmitHook() {
904
924
  if (!settings.hooks) settings.hooks = {};
905
925
  if (!settings.hooks.UserPromptSubmit) settings.hooks.UserPromptSubmit = [];
906
926
 
907
- const hookCmd = 'bash scripts/harness-user-prompt-submit.sh';
927
+ const hookCmd = harnessScriptCommand('harness-user-prompt-submit.sh');
908
928
 
909
929
  // Detect existing harness UserPromptSubmit hook (any shape)
910
930
  const alreadyInstalled = settings.hooks.UserPromptSubmit.some((entry) => {
@@ -920,6 +940,8 @@ function installUserPromptSubmitHook() {
920
940
  return false;
921
941
  });
922
942
 
943
+ const hookUpdated = replaceHarnessHookCommand(settings.hooks.UserPromptSubmit, 'harness-user-prompt-submit', hookCmd);
944
+
923
945
  if (!alreadyInstalled) {
924
946
  settings.hooks.UserPromptSubmit.push({
925
947
  matcher: '',
@@ -930,6 +952,9 @@ function installUserPromptSubmitHook() {
930
952
  log(' → /goal, /submission, and /hot-fix are guided through harness-ceo and CXX workflow');
931
953
  log(' → Opt-out per message: say "harness skip" or "without harness"');
932
954
  log(' → Disable globally: set .harness/config.json behavior.auto_route_ceo = false');
955
+ } else if (hookUpdated) {
956
+ writeClaudeSettings(settings);
957
+ log('UserPromptSubmit hook migrated in .claude/settings.json');
933
958
  } else {
934
959
  log('UserPromptSubmit hook already installed');
935
960
  }
@@ -950,7 +975,7 @@ function installStopHook() {
950
975
  if (!settings.hooks) settings.hooks = {};
951
976
  if (!settings.hooks.Stop) settings.hooks.Stop = [];
952
977
 
953
- const hookCmd = 'bash scripts/harness-stop.sh';
978
+ const hookCmd = harnessScriptCommand('harness-stop.sh');
954
979
 
955
980
  const alreadyInstalled = settings.hooks.Stop.some((entry) => {
956
981
  if (!entry || typeof entry !== 'object') return false;
@@ -965,6 +990,8 @@ function installStopHook() {
965
990
  return false;
966
991
  });
967
992
 
993
+ const hookUpdated = replaceHarnessHookCommand(settings.hooks.Stop, 'harness-stop', hookCmd);
994
+
968
995
  if (!alreadyInstalled) {
969
996
  settings.hooks.Stop.push({
970
997
  matcher: '',
@@ -975,6 +1002,9 @@ function installStopHook() {
975
1002
  log(' → Conductor 가 running 인 동안 turn 종료 시 자동으로 다음 tick 으로 연쇄');
976
1003
  log(' → 비활성: .harness/config.json behavior.auto_chain_on_stop = false');
977
1004
  log(' → 상한: behavior.auto_chain_max_per_sprint (기본 200)');
1005
+ } else if (hookUpdated) {
1006
+ writeClaudeSettings(settings);
1007
+ log('Stop hook migrated in .claude/settings.json');
978
1008
  } else {
979
1009
  log('Stop hook already installed');
980
1010
  }
@@ -1227,11 +1257,13 @@ function detectMigrationNeeded() {
1227
1257
  hrResourcePoolStale: false,
1228
1258
  harnessMdStale: false,
1229
1259
  agentsMissingOpsVerificationRules: false,
1260
+ agentsMissingCodexAdapterRules: false,
1230
1261
  rosterCodexPathsMissing: false,
1231
1262
  resourceIndexCodexWordingMissing: false,
1232
1263
  memoryMissingSystemEntries: [],
1233
1264
  gotchaMissingEntries: {}, // { "<filename>": [G-IDs...] }
1234
1265
  conventionMissingEntries: {}, // { "<filename>": [C-IDs...] }
1266
+ ruleRegistryLinks: [],
1235
1267
  bundleVersionStale: null, // { current, installed }
1236
1268
  };
1237
1269
 
@@ -1347,6 +1379,12 @@ function detectMigrationNeeded() {
1347
1379
  ) {
1348
1380
  flags.agentsMissingOpsVerificationRules = true;
1349
1381
  }
1382
+ if (
1383
+ !agentsBody.includes('Codex Runtime Adapter') &&
1384
+ !agentsBody.includes('.codex/skills/harness-ceo/SKILL.md')
1385
+ ) {
1386
+ flags.agentsMissingCodexAdapterRules = true;
1387
+ }
1350
1388
  } catch {}
1351
1389
  }
1352
1390
  if (fs.existsSync(rosterPath)) {
@@ -1379,6 +1417,7 @@ function detectMigrationNeeded() {
1379
1417
  flags.memoryMissingSystemEntries = tplEntryIds.filter((id) => !userEntryIds.has(id));
1380
1418
  } catch {}
1381
1419
  }
1420
+ flags.ruleRegistryLinks = detectRuleRegistryLinks();
1382
1421
  return flags;
1383
1422
  }
1384
1423
 
@@ -1440,6 +1479,136 @@ function extractConventionEntryBlock(md, id) {
1440
1479
  return m ? m[1].trimEnd() : null;
1441
1480
  }
1442
1481
 
1482
+ const CANONICAL_RULE_SCOPES = new Set([
1483
+ 'README.md',
1484
+ 'shared.md',
1485
+ 'ceo.md',
1486
+ 'coo.md',
1487
+ 'cdo.md',
1488
+ 'cto.md',
1489
+ 'cqo.md',
1490
+ 'ops.md',
1491
+ 'hiring.md',
1492
+ 'resource-manager.md',
1493
+ 'brick-office.md',
1494
+ ]);
1495
+
1496
+ const CXX_RULE_LINK_MARKER = '<!-- walwal-harness:related-rule-links -->';
1497
+
1498
+ function collectKnownWorkerNames() {
1499
+ const names = new Set();
1500
+ const hrRoot = path.join(HARNESS_DIR, 'shared', 'HR-Resource');
1501
+ if (fs.existsSync(hrRoot)) {
1502
+ for (const entry of fs.readdirSync(hrRoot, { withFileTypes: true })) {
1503
+ if (entry.isDirectory()) names.add(entry.name);
1504
+ }
1505
+ }
1506
+ const rosterPath = path.join(HARNESS_DIR, 'shared', 'hr-roster.json');
1507
+ if (fs.existsSync(rosterPath)) {
1508
+ try {
1509
+ const roster = JSON.parse(fs.readFileSync(rosterPath, 'utf8'));
1510
+ for (const entry of Array.isArray(roster.hired) ? roster.hired : []) {
1511
+ if (entry?.worker) names.add(entry.worker);
1512
+ }
1513
+ } catch {}
1514
+ }
1515
+ return names;
1516
+ }
1517
+
1518
+ function classifyRuleRegistryFile(file, kind, knownWorkers, body = '') {
1519
+ const base = path.basename(file, '.md');
1520
+ const ext = path.extname(file);
1521
+ if (ext !== '.md') return null;
1522
+ if (LEGACY_V7_FILE_OWNER[file]) {
1523
+ return { targets: [path.basename(LEGACY_V7_FILE_OWNER[file], '.md')], reason: 'legacy-role' };
1524
+ }
1525
+ const haystack = `${base}\n${body}`.toLowerCase();
1526
+ const targets = new Set();
1527
+
1528
+ if (/\b(i18n|intl|locale|localization|translation|translate|multilingual|language|aria|rtl|l10n)\b/.test(haystack)) {
1529
+ targets.add('cto');
1530
+ targets.add('cqo');
1531
+ }
1532
+ if (/\b(ui|ux|design|brand|visual|layout|accessibility|a11y|responsive|color|typography)\b/.test(haystack)) {
1533
+ targets.add('cdo');
1534
+ targets.add('cqo');
1535
+ }
1536
+ if (/\b(api|backend|frontend|database|schema|auth|flutter|react|next|build|deploy|port|integration|migration)\b/.test(haystack)) {
1537
+ targets.add('cto');
1538
+ }
1539
+ if (/\b(test|qa|quality|regression|e2e|playwright|bug|hotfix|incident|failure|risk)\b/.test(haystack)) {
1540
+ targets.add('cqo');
1541
+ }
1542
+ if (/\b(ops|runtime|server|log|monitor|health|production|docker|port)\b/.test(haystack)) {
1543
+ targets.add('ops');
1544
+ }
1545
+ if (/\b(plan|research|market|hypothesis|requirement|product|scope)\b/.test(haystack)) {
1546
+ targets.add('coo');
1547
+ }
1548
+ if (knownWorkers.has(base)) {
1549
+ return { targets: ['coo', 'cto', 'cqo', 'ops'].filter(Boolean), reason: 'worker-topic' };
1550
+ }
1551
+ if (!targets.size) targets.add('shared');
1552
+ return { targets: [...targets], reason: targets.has('shared') ? 'unclassified-topic' : 'topic-keywords' };
1553
+ }
1554
+
1555
+ function detectRuleRegistryLinks() {
1556
+ const links = [];
1557
+ const knownWorkers = collectKnownWorkerNames();
1558
+ for (const kind of ['conventions', 'gotchas']) {
1559
+ const root = path.join(HARNESS_DIR, kind);
1560
+ if (!fs.existsSync(root)) continue;
1561
+ for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
1562
+ if (entry.isDirectory()) continue;
1563
+ if (!entry.isFile() || !entry.name.endsWith('.md')) continue;
1564
+ if (CANONICAL_RULE_SCOPES.has(entry.name)) continue;
1565
+ const sourcePath = path.join(root, entry.name);
1566
+ const body = fs.existsSync(sourcePath) ? fs.readFileSync(sourcePath, 'utf8') : '';
1567
+ const classification = classifyRuleRegistryFile(entry.name, kind, knownWorkers, body);
1568
+ if (!classification) continue;
1569
+ links.push({
1570
+ kind,
1571
+ sourceRel: entry.name,
1572
+ targets: classification.targets,
1573
+ reason: classification.reason,
1574
+ });
1575
+ }
1576
+ }
1577
+ return links.filter((item) => item.targets.some((target) => !ruleRegistryLinkExists(item.kind, target, item.sourceRel)));
1578
+ }
1579
+
1580
+ function ruleRegistryLinkExists(kind, target, sourceRel) {
1581
+ const targetPath = path.join(HARNESS_DIR, kind, `${target}.md`);
1582
+ if (!fs.existsSync(targetPath)) return false;
1583
+ return fs.readFileSync(targetPath, 'utf8').includes(`](${sourceRel})`);
1584
+ }
1585
+
1586
+ function updateRuleRegistryLinks(links, { dryRun, backupDir }) {
1587
+ if (!links.length) return;
1588
+ for (const item of links) {
1589
+ const root = path.join(HARNESS_DIR, item.kind);
1590
+ const sourcePath = path.join(root, item.sourceRel);
1591
+ if (!fs.existsSync(sourcePath)) continue;
1592
+ for (const target of item.targets) {
1593
+ const targetPath = path.join(root, `${target}.md`);
1594
+ if (path.resolve(sourcePath) === path.resolve(targetPath) || ruleRegistryLinkExists(item.kind, target, item.sourceRel)) continue;
1595
+ log(` ${item.kind}/${target}.md: link ${item.sourceRel} (${item.reason})`);
1596
+ if (dryRun) continue;
1597
+ ensureDir(path.dirname(targetPath));
1598
+ const existing = fs.existsSync(targetPath) ? fs.readFileSync(targetPath, 'utf8').trimEnd() : `# ${target.toUpperCase()} ${item.kind === 'gotchas' ? 'Gotchas' : 'Conventions'}`;
1599
+ if (fs.existsSync(targetPath)) {
1600
+ const backupTarget = path.join(backupDir, `${item.kind}-${target}.md`);
1601
+ fs.copyFileSync(targetPath, backupTarget);
1602
+ }
1603
+ const header = existing.includes(CXX_RULE_LINK_MARKER)
1604
+ ? ''
1605
+ : `\n\n## Related ${item.kind === 'gotchas' ? 'Gotcha' : 'Convention'} Links\n${CXX_RULE_LINK_MARKER}\n`;
1606
+ const line = `- [${item.sourceRel}](${item.sourceRel}) — ${item.reason}`;
1607
+ fs.writeFileSync(targetPath, `${existing}${header}${header ? '' : '\n'}${line}\n`);
1608
+ }
1609
+ }
1610
+ }
1611
+
1443
1612
  function showMigrationProposal(flags) {
1444
1613
  console.log('');
1445
1614
  console.log('╔══════════════════════════════════════════════════════════╗');
@@ -1505,6 +1674,12 @@ function showMigrationProposal(flags) {
1505
1674
  console.log(` ${file}: [${ids.join(', ')}]`);
1506
1675
  }
1507
1676
  }
1677
+ if (flags.ruleRegistryLinks && flags.ruleRegistryLinks.length) {
1678
+ console.log(' • conventions/gotchas: topic 파일을 CXX index 에 link 하여 lazy-load 가능하게 보강');
1679
+ for (const item of flags.ruleRegistryLinks) {
1680
+ console.log(` ${item.kind}/${item.sourceRel} → ${item.targets.map((t) => `${item.kind}/${t}.md`).join(', ')} (${item.reason})`);
1681
+ }
1682
+ }
1508
1683
  if (flags.bundleVersionStale) {
1509
1684
  const { current, installed } = flags.bundleVersionStale;
1510
1685
  console.log(` • bundle: ${installed ?? '(없음)'} → ${current} 스탬프 갱신 필요`);
@@ -1533,6 +1708,7 @@ function runMigrate(opts = {}) {
1533
1708
  const runtimeScriptsAlwaysRefresh = true;
1534
1709
  const gotchaMissingTotal = Object.values(flags.gotchaMissingEntries || {}).reduce((n, a) => n + a.length, 0);
1535
1710
  const conventionMissingTotal = Object.values(flags.conventionMissingEntries || {}).reduce((n, a) => n + a.length, 0);
1711
+ const ruleRegistryLinkTotal = (flags.ruleRegistryLinks || []).length;
1536
1712
  if (
1537
1713
  !flags.progressV3toV4 &&
1538
1714
  !flags.progressLegacyRouting &&
@@ -1549,6 +1725,7 @@ function runMigrate(opts = {}) {
1549
1725
  (!flags.memoryMissingSystemEntries || flags.memoryMissingSystemEntries.length === 0) &&
1550
1726
  gotchaMissingTotal === 0 &&
1551
1727
  conventionMissingTotal === 0 &&
1728
+ ruleRegistryLinkTotal === 0 &&
1552
1729
  !flags.bundleVersionStale &&
1553
1730
  !runtimeScriptsAlwaysRefresh
1554
1731
  ) {
@@ -1569,6 +1746,7 @@ function runMigrate(opts = {}) {
1569
1746
  // Runtime scripts are package-owned. Migrate must refresh them so existing
1570
1747
  // projects receive wake/meeting/OPS fixes without requiring a full init.
1571
1748
  refreshScriptsForMigrate({ dryRun, backupDir });
1749
+ updateRuleRegistryLinks(flags.ruleRegistryLinks || [], { dryRun, backupDir });
1572
1750
 
1573
1751
  // 1. progress.json
1574
1752
  const progressPath = path.join(HARNESS_DIR, 'progress.json');
@@ -1852,6 +2030,32 @@ function runMigrate(opts = {}) {
1852
2030
  }
1853
2031
  }
1854
2032
 
2033
+
2034
+ if (flags.agentsMissingCodexAdapterRules) {
2035
+ const agentsPath = path.join(PROJECT_ROOT, 'AGENTS.md');
2036
+ if (fs.existsSync(agentsPath)) {
2037
+ const original = fs.readFileSync(agentsPath, 'utf8');
2038
+ const block = [
2039
+ '',
2040
+ '---',
2041
+ '',
2042
+ '## walwal-harness Codex Runtime Adapter',
2043
+ '',
2044
+ '- Codex does not require .codex/agents/; repo-local .codex/skills/**/SKILL.md files are the Codex runtime protocol.',
2045
+ '- For /goal, /submission, and /hot-fix, read .codex/commands/{goal,submission,hot-fix}.md and .codex/skills/harness-ceo/SKILL.md if Codex does not auto-load them.',
2046
+ '- Do not report walwal-harness as unavailable just because skills are not listed in the global Available Skills panel.',
2047
+ '- Emulate fresh CXX context by reading the role skill, active mission files, and required conventions/gotchas before writing that role\'s {cxx}.md.',
2048
+ ''
2049
+ ].join('\n');
2050
+ log(' AGENTS.md: Codex runtime adapter rules append');
2051
+ if (!dryRun) {
2052
+ fs.writeFileSync(path.join(backupDir, 'AGENTS.codex-adapter.md'), original);
2053
+ const sep = original.endsWith('\n') ? '' : '\n';
2054
+ fs.writeFileSync(agentsPath, original + sep + block);
2055
+ }
2056
+ }
2057
+ }
2058
+
1855
2059
  // 7. Bundle version stamp — record which package version was last applied.
1856
2060
  if (flags.bundleVersionStale) {
1857
2061
  const { current, installed } = flags.bundleVersionStale;
package/commands/goal.md CHANGED
@@ -7,6 +7,11 @@ argument-hint: "<goal request>"
7
7
 
8
8
  Route the Owner request to the installed `harness-ceo` agent/skill.
9
9
 
10
+ Codex adapter:
11
+ - If Codex does not auto-load `harness-ceo`, manually read `.codex/skills/harness-ceo/SKILL.md` and follow it.
12
+ - Absence of `.codex/agents/` is not a failure. `.codex/skills/**/SKILL.md` is the Codex runtime protocol.
13
+ - For CXX "fresh session context", use role-scoped context: read the CXX skill, active mission files, and required conventions/gotchas before writing that role's `{cxx}.md`.
14
+
10
15
  Required flow:
11
16
  1. Create or update a goal under `.harness/documents/goal-{goal_index}-{goal_name}/`.
12
17
  2. Record CEO decisions in `.harness/documents/goal-{goal_index}-{goal_name}/ceo.md`.
@@ -7,6 +7,11 @@ argument-hint: "<incident or fix request>"
7
7
 
8
8
  Route the Owner request to the installed `harness-ceo` agent/skill as an emergency mission under the active goal.
9
9
 
10
+ Codex adapter:
11
+ - If Codex does not auto-load `harness-ceo`, manually read `.codex/skills/harness-ceo/SKILL.md` and follow it.
12
+ - Absence of `.codex/agents/` is not a failure. `.codex/skills/**/SKILL.md` is the Codex runtime protocol.
13
+ - For CXX "fresh session context", use role-scoped context: read the CXX skill, active mission files, and required conventions/gotchas before writing that role's `{cxx}.md`.
14
+
10
15
  Required flow:
11
16
  1. Locate the active goal document root under `.harness/documents/{goal_name}/`. If no active goal exists, CEO must create/select one before proceeding.
12
17
  2. Create `.harness/documents/{goal_name}/hotfix-{hotfix_index}-{hotfix_name}/ceo.md`.
@@ -7,6 +7,11 @@ argument-hint: "<additional requirement>"
7
7
 
8
8
  Route the Owner request to the installed `harness-ceo` agent/skill as an additional requirement under the active goal.
9
9
 
10
+ Codex adapter:
11
+ - If Codex does not auto-load `harness-ceo`, manually read `.codex/skills/harness-ceo/SKILL.md` and follow it.
12
+ - Absence of `.codex/agents/` is not a failure. `.codex/skills/**/SKILL.md` is the Codex runtime protocol.
13
+ - For CXX "fresh session context", use role-scoped context: read the CXX skill, active mission files, and required conventions/gotchas before writing that role's `{cxx}.md`.
14
+
10
15
  Required flow:
11
16
  1. Locate the active goal document root under `.harness/documents/{goal_name}/`. If no active goal exists, CEO must ask the Owner to create or select one with `/goal` before proceeding.
12
17
  2. Create a submission record under `.harness/documents/{goal_name}/submission-{submission_index}-{submission_name}/`.
@@ -15,4 +15,6 @@ Only company-level roles are provided by default:
15
15
  - `resource-manager.md`
16
16
  - `brick-office.md`
17
17
 
18
- Specialist worker conventions are not bundled here. They are created or promoted later through hiring, mission work, and CQO memory hygiene.
18
+ Topic-specific convention files may use descriptive names such as `i18n-locale.md`.
19
+
20
+ CXX files such as `cto.md` and `cqo.md` act as lazy-loading indexes. Add links there when a topic file applies to that CXX.
@@ -2,5 +2,6 @@
2
2
 
3
3
  - COO owns planning, research, service direction, reference models, and hypothesis validation.
4
4
  - COO records decisions in `.harness/documents/{mission_name}/coo.md`.
5
- - COO hires researchers, product planners, junior experiment developers, and documentation workers before delegating specialist work.
5
+ - COO hires researchers, product planners, MCP registry stewards/capability scanners, junior experiment developers, and documentation workers before delegating specialist work.
6
+ - COO planning must include an MCP Capability Inventory: available/applicable MCPs, required setup, read/write risk, recommended mission use, or explicit `None` when discovery is unavailable or no MCP applies.
6
7
  - COO reports mission fit, evidence, rejected options, and recommended next CXX to CEO.
package/gotchas/README.md CHANGED
@@ -15,4 +15,6 @@ Only company-level roles are provided by default:
15
15
  - `resource-manager.md`
16
16
  - `brick-office.md`
17
17
 
18
- Specialist worker gotchas are not bundled. CQO promotes recurring verified failures into this store as the company learns.
18
+ Topic-specific gotcha files may use descriptive names such as `i18n-locale-hotfix.md`.
19
+
20
+ CXX files such as `cto.md` and `cqo.md` act as lazy-loading indexes. Add links there when a topic file applies to that CXX.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walwal-harness/cli",
3
- "version": "7.1.24",
3
+ "version": "7.1.26",
4
4
  "description": "Company-style AI agent harness for Claude and Codex. Installs commands, CXX agents, skills, HR-Resource hiring pool, and project-local .harness runtime state.",
5
5
  "bin": {
6
6
  "walwal-harness": "bin/init.js"
@@ -70,6 +70,7 @@ TODAY="$(date +%Y-%m-%d)"
70
70
  register_one() {
71
71
  local target="$1" rule_id="$2" title="$3" wrong="$4" right="$5" why="$6" scope="$7" source="$8"
72
72
  local file="$GOTCHAS_DIR/${target}.md"
73
+ mkdir -p "$(dirname "$file")"
73
74
 
74
75
  # Ensure file exists with header
75
76
  if [ ! -f "$file" ]; then
@@ -184,6 +185,7 @@ register_convention_one() {
184
185
  local scope="$1" rule_id="$2" title="$3" rule="$4" why="$5" source="$6"
185
186
  mkdir -p "$CONVENTIONS_DIR"
186
187
  local file="$CONVENTIONS_DIR/${scope}.md"
188
+ mkdir -p "$(dirname "$file")"
187
189
 
188
190
  if [ ! -f "$file" ]; then
189
191
  cat > "$file" <<EOF