[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74ZF6Q7FH81AWP054KNDES0":3,"skill-same:01M74ZF6Q7FH81AWP054KNDES0":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":52},"01M74ZF6Q7FH81AWP054KNDES0","agent-composer",null,"Reads the current work context and plans the optimal agent dispatch. Clarifies direction with 1-2 questions when unclear; infers and proceeds immediately when execution path is unclear. Runs an automatic recording gate after each Wave completes. Triggered by \"compose agents\", \"which agent should I use?\", \"run in parallel\", or \"agent-composer\".","chrono-meta\u002Fforge-harness","chrono-meta","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F151837060?v=4","01M74ZDXK87ES4B30NKYSEH3MS","01M74ZDXM0F1NMYK7BS7PYR54G",33,"MIT","https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fplugins\u002Ffh-meta\u002Fskills\u002Fagent-composer\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: agent-composer\ndescription: Reads the current work context and plans the optimal agent dispatch. Clarifies direction with 1-2 questions when unclear; infers and proceeds immediately when execution path is unclear. Runs an automatic recording gate after each Wave completes. Triggered by \"compose agents\", \"which agent should I use?\", \"run in parallel\", or \"agent-composer\".\nuser-invocable: true\nallowed-tools: [\"Read\", \"Bash\", \"Glob\", \"Grep\", \"Agent\", \"Skill\"]\nmodel-note: session-inherit — Sonnet base is first-class (sonnet_floor_doctrine.md); depth-critical judged steps route to dispatch (opus agent \u002F cross-family sidecar, consent-gated), never a substrate requirement\n---\n\n# agent-composer — Agent Composition Layer\n\nA coordinator skill that reads the work context and decides \"which agents to dispatch, when, and in what order.\"\nSelects the optimal combination from the FH skill pool and either outputs a fan-out plan or executes it directly.\n\n## Triggers\n\n- `\u002Fagent-composer`\n- \"Which agent should I use?\", \"Pick one automatically\", \"Compose the agents\"\n- \"Set up the agents\", \"Decide which agents to use\"\n- \"Split the work and run in parallel\", \"Process with multiple agents\"\n- \"Build the dispatch plan\", \"Run in parallel splits\"\n- When the task is complex or spans multiple projects\n\n## Core Principles\n\n- **Compose only**: Does not perform work directly. Outputs the dispatch plan and executes after user approval.\n- **Parallel first**: When 2+ tasks are independent, propose parallel fan-out instead of sequential.\n- **Minimal composition**: Only the agents needed. Over-provisioning agents creates inefficiency.\n- **Coordinator ≠ executor**: Only collects results (fan-in) and presents an integrated report.\n\n---\n\n## Step 0. Context Collection\n\nIdentify 4 items from the request: task type · scope · constraints · natural-language goal → skill mapping.\nCheck `LOCAL_SKILL_REGISTRY.md` for project-local skills; check `.mcp.json` or `CLAUDE.md` for external plugins.\n\n> **Detail**: See `SKILL_detail.md §Step-0` — NL pattern mapping table, cross-install detection, registry lookup format — read when auto-mapping an ambiguous request.\n\n---\n\n## Step 0.2 — Capability Fit Analysis\n\n> **Schema**: `knowledge\u002Fshared\u002Fharness-core\u002Ftpa_schema.md` — `artifact_type` enum determines `role_match` lookup domain for scoring.\n> Runs before dispatching agents. **Skip if user specifies exact agents by name.**\n\nFor each subtask in the composition plan:\n\n1. **Read agent registry**: `.claude\u002Fagents\u002F*.md` + installed plugin agents  \n   Extract: `role` · `allowed_tools` · `writes` · `declared_capabilities`\n2. **Score capability fit**: `[subtask_type]` × `[agent capabilities]` → `fit_score` (0.0–1.0)\n3. **GAP**: `fit_score \u003C 0.5` for a required-weight subtask  \n   → query `\u002Fplugin-recommender`: \"agent for [subtask_type] in [context]\"  \n   → includes Codex marketplace + Claude Code marketplace (not just FH native)  \n   → user: **install** \u002F **skip** \u002F **use general-purpose fallback**\n\n### Capability Fit Scoring Table\n\n| Subtask type | Strong fit signal | Weak fit signal |\n|---|---|---|\n| Adversarial review | `subagent_type=\"challenger\"`, artifact_type match | general-purpose only |\n| Phantom detection | `phantom-quench` | general-purpose only |\n| Persona simulation | `hub-persona-auditor`, deep-insight persona | general-purpose only |\n| Code generation | `writes: true` + code tools | `writes: false` or no code tools |\n| Audit-only | `writes: false` (safe) | `writes: true` (risky for audit) |\n\n### Author-Exposure Table — a review pass, not a second executor\n\nThe table above picks **who does the subtask**. This one adds a different question at a different\nstage: **what failure is the author structurally exposed to, now that the work is claimed done?**\nIt never replaces capability fit and never selects the agent that performs the work — it adds a\n**review pass** before the work is released. A doc-writing subtask scores no \"adversarial review\"\nfit, yet its author is blind to cold-entry failure, and capability fit never surfaces that.\n\n**Materiality gate — run this pass only when the work product is material.** At least one of:\npublic or otherwise irreversible surface · affects users other than the author · carries external\nclaims, numbers, or citations · introduces new behavior · touches security, data, deletion, or\npermissions. Internal notes, wording fixes, and one-line edits do **not** trigger it — an\nunbounded trigger just trains the pass into being skipped.\n\n| Failure the author cannot self-detect | Review mechanism | Type |\n|---|---|---|\n| Cold entry — first contact breaks (missing install step, undefined term, no success signal) | `beginner` | agent |\n| Everyday-use friction invisible to the designer | `main-player` | agent |\n| Currency vs the outside field (needs external citation, not assertion) | `expert` | agent |\n| Self-verification only fails in the optimistic direction | `challenger` + `auto-decorrelation` | agent + pipeline |\n| Rebuilding something that already exists | `fact-checker` · `asset-placement-gate` | agent · skill |\n| Numbers\u002Fcitations living in the artifact without grounding | `phantom-quench` | skill |\n| **Exposure unclear** (material, but no row above fits) | `challenger` | agent — default, not a skip |\n\nThe `Type` column matters for the capability-fit checks above: `writes`\u002Ftooling scoring applies to\n**agent** rows only; skill and pipeline rows are invoked, not scored.\n\n**Behavioral rule — no silent skip, and \"no row applies\" is not an exit.** Name the row before the\nagent. If you believe none applies, you must (a) state which rows you considered, (b) give a\none-line reason each is excluded, and (c) fall through to the **Exposure-unclear** row — the\ndefault is `challenger`, never nothing. (Origin: 2026-07-21 — four dispatches in one session were\nchosen by orchestrator judgment alone. They were right; that is luck, not a mechanism. In the same\nsession one `beginner` dispatch blocked a public-repo merge on 4 findings the author had not seen.)\n\n**Behavioral rule — the lens does not hold the verdict.** A review pass returns `evidence`,\n`risk`, and a `recommended decision` only. It may **not** emit a terminal `block`\u002F`approve`; the\norchestrator declares the outcome, on its own stated grounds, and approval on an irreversible\nsurface stays with the human regardless of what the lens returned.\n\n**Row-growth criterion (anti-case-crafting).** A new row is admissible only if the failure type has\nbeen **observed more than once**, is **not coverable by an existing row**, and names a *verifiable\nexposure axis* rather than a job title or a favorite tool. If rows keep accreting, that is the\nsignal to fold the table into a smaller set of principled axes — not to keep appending.\n\n**Behavioral rule**: A `writes: false` agent (e.g. fact-checker, hub-persona-auditor) must NOT be assigned a task requiring edits. Capability fit scoring catches this statically before dispatch.\n\n**Behavioral rule**: Degraded composition — when any required-weight role is filled with general-purpose fallback, output `⚠️ degraded: [role]` in the composition plan. Do not silently use general-purpose for a specialized role.\n\n> **Detail**: See `SKILL_detail.md §CapabilityFit` — scoring procedure, agent registry reading, plugin-recommender query format, worked examples — read when executing Step 0.2.\n\n---\n\n## Step 0-a. Clarification Protocol\n\n> Execution condition: Only when direction or goal is unclear (skip → go directly to Step 0-b if clear)\n\n**Core principle**: Only ask when what the person must provide (direction · insight · decision) is unclear.\nExecution method · agent selection · recording location → infer and proceed — do not ask.\n\n### Direction vs. Execution Decision Table\n\n| Request type | Classification | Action |\n|---|---|---|\n| \"Do X\" — target and completion criteria are clear | Clear | Immediately enter Step 0-b |\n| \"Improve X\" — improvement dimension unclear | Direction unclear | Ask for clarification |\n| \"Something feels off\" — diagnosis target unclear | Execution unclear → infer | Auto-dispatch harness-doctor |\n| \"Wrap up \u002F harvest this session\" — trigger is clear | Clear | Run harvest-loop based on recent work (\"run the pipeline\" itself is ceded to pipeline-conductor — route end-to-end sweeps there, not here) |\n| No request — session context exists | Execution unclear → infer | Auto-compose based on CATALOG\u002FMEMORY, then confirm |\n\n> **Detail**: See `SKILL_detail.md §Clarification` — 2-question format, 4-question structured confirmation, meta-prompting intervention — read when direction ambiguity requires a clarification block.\n\n---\n\n## Step 0-b. Wave 0 — Reconnaissance Dispatch (Mandatory Before New Tasks)\n\n> Execution condition: For cross-project tasks or when scope is unclear. Skip for single-project tasks with clear scope.\n\nThis orchestrator does not read files or understand structure directly — **even reconnaissance work is dispatched as agents.** All tasks including new assets → fact-checker (A) mandatory in Wave 0.\n\n> **Detail**: See `SKILL_detail.md §Wave-0` — self-contained brief requirements, deferred ToolSearch pre-requisite pattern — read when writing a recon agent brief.\n\n---\n\n## Step 1. Agent Mapping\n\nDefault composition table by task type.\n\n> **Note**: This table lists known installed agents. Capability fit scoring in Step 0.2 overrides static mapping when `.claude\u002Fregistry\u002Fagent_cards.json` (repo-relative — there is no bare `agent_cards.json` at the repo root) has more current data.\n\n> **Call method distinction**: `(S)` = Skill tool call \u002F `(A)` = Background dispatch via Agent tool\n\n| Task type | Default composition | Parallel |\n|---|---|:---:|\n| **[Wave 0] Recon (all tasks)** | Recon agent (A) — file\u002Fstructure understanding. Direct orchestrator execution forbidden | — |\n| **[Wave 0] All tasks including new assets** | fact-checker (A) — proactive duplicate\u002Fstale validation | — |\n| Meta-simulation quality validation | sim-conductor (S) — challenger + beginner + main-player | ✅ Parallel |\n| Field pattern harvest | field-harvest (S) | — |\n| Harness structural diagnosis | harness-doctor (S) | — |\n| New asset placement decision | asset-placement-gate (S) | — |\n| External user entry point audit | hub-persona-auditor (A) | — |\n| Naming\u002Finnovation scan | persona-innovator (A) | — |\n| Cross-project simultaneous work | N field agents (A) | ✅ Parallel |\n| Three-Doctor Loop | harness-doctor (S) + context-doctor (S) + sim-conductor (S) | ✅ Parallel |\n| Pre-PR code review | sim-conductor D-code 3 personas (S) | ✅ Parallel |\n| Learning cross-validation | verify-bidirectional (S) | — |\n| Ecosystem synergy exploration | cross-ecosystem-synergy-detection (S) | — |\n| Plugin recommendation | plugin-recommender (S) | — |\n| Install conflict diagnosis | install-doctor (S) | — |\n| Onboarding install | install-wizard (S) — ⚠️ interactive; `--dry-run` for bg parallel | — |\n| Hub PR review | harness-pr-reviewer (S) — requires PR number first | — |\n| **Decision-maker approval review** | apex-review (S) — CTO\u002Ftech lead\u002FQA lead personas + HTML deck | — |\n| **Project local skills** | LOCAL_SKILL_REGISTRY lookup → relevant project skill (A\u002FS) | Per project |\n\n---\n\n## Step 2. Composition Plan Output\n\n```\nagent-composer — Composition Plan\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n  Task: {task summary}\n  Composition: {N} agents  |  Parallel: {Y\u002FN}  |  Estimated time: ~{N} min\n\n  Wave 0 (Recon):\n    [R] Recon agent — {file\u002Fstructure understanding goal}\n\n  Wave 1 (Parallel):\n    [A] {agent name} — {role in 1 line}\n    [B] {agent name} — {role in 1 line}\n\n  Wave 2 (after Wave 1 completes):\n    [D] {agent name} — {executed after result integration}\n\n  fan-in: integrate results after Wave completes → output report\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nExecute? (Y: run all \u002F E: edit then run \u002F N: cancel)\n```\n\nOptionally name the composition's shape in the plan header (`Composition pattern: {name}`) so the\noperator recognizes the structure at a glance — a recognition aid, not a routing input.\n\n> **Detail**: See `SKILL_detail.md §Composition-Pattern-Labels` — the six revfactory-vocabulary labels\n> (Pipeline \u002F Fan-out-in \u002F Expert Pool \u002F Producer-Reviewer \u002F Supervisor \u002F Hierarchical) mapped to the\n> existing FH constructs they name — read when labeling a plan header.\n\n---\n\n## Step 2.5 — Model Routing Decision (complexity_routing)\n\n### Routing Rules\n\n1. No `complexity_routing` in skill frontmatter → use `model:` field as-is\n2. `complexity_routing` present + any `escalate_when` condition matches → use `high` model\n3. No conditions match → use `base` model\n\nInclude 1-line routing audit in composition plan output: `[Model routing] harness-doctor: cold_start → opus`\n\n### Default Architecture\n\n| Mode | Orchestrator | Executor | When |\n|---|---|---|---|\n| **Base** | sonnet | sonnet | Default — all tasks |\n| **Amplified** | opus | sonnet | `EXECUTION_TIER: full\u002Fmax` · plan mode · `cross_project` + `high_stakes` both detected |\n\n**Simplification guard**: Single-Wave, single-project tasks → Sonnet sufficient. Do not escalate.\n\n> **Detail**: See `SKILL_detail.md §Model-Routing` — escalation condition evaluation table, amplified audit log format.\n\n---\n\n## Step 2.7 — Destructive Action Gate\n\nAfter scanning the composition plan, if any of the following types are found, mark with 🚨 and output a separate warning before Step 3.\n\n| Type | Examples |\n|---|---|\n| External send | git push\u002Fforce, PR create\u002Fmerge, Slack\u002Fwiki upload |\n| File\u002Fdata destruction | rm -rf, DB DROP\u002FDELETE, file overwrite, branch delete |\n| Production impact | Service deploy, migration, permission\u002Fconfig changes |\n\nIf 🚨 items exist, insert before the standard Y\u002FE\u002FN in Step 3:\n\n```\n⚠️  Irreversible operations are included:\n    - [type] [specific operation]\n    Do you want to proceed? (yes \u002F no)\n```\n\n`no` → remove that operation or cancel entirely. Safe remaining operations can continue.\n\n**Named residual — the plan is gated per step, never as a chain.** A composition whose steps each pass can\nstill be harmful as a whole (skills that each soften one signal until it disappears). No check here reads\nthe chain as one unit. The 🚨 table above flags a step only by its own type, so a harmless-looking step\nthat shapes what a later irreversible step acts on is not flagged. Detail: `knowledge\u002Fshared\u002Fharness-core\u002Fcapability_composition_contract.md §3`.\n\n---\n\n## Step 3. Approval → Execution\n\n- **Y**: Execute immediately. Generate Context Cards (Step 3-a), then dispatch parallel agents in a single message.\n- **E**: User modifies plan then re-confirms.\n- **N**: Cancel.\n\n> **Detail**: See `SKILL_detail.md §Worktree-Isolation` — Step 3.1 parallel proposal mode with git worktree isolation — read when 2+ agents write to overlapping files.\n\n### Step 3-runtime. Dispatch Runtime Selection\n\nUse the runtime available in the current session:\n\n| Runtime | Dispatch mechanism |\n|---|---|\n| Claude Code | `Agent(...)` for agents, slash\u002Fskill invocation for skills |\n| Codex-primary | `FH_BACKEND=codex npx --package @chrono-meta\u002Ffh-gate fh-run --agent {agent}` or `--skill {skill}` |\n| Generic shell | `FH_BACKEND=auto npx --package @chrono-meta\u002Ffh-gate fh-run ...` |\n\nWhen using `fh-run`, pass each agent's Context Card through `--prompt` and pass target files with repeated `--file` arguments. The fan-in obligation is unchanged: collect each adapter output, then synthesize one integrated report before proceeding to the next wave.\n\n### Step 3-a. Context Card Injection (required for 2+ parallel agents)\n\nSub-agents are spawned in isolation — they cannot see the live conversation. Inject a Context Card into each agent prompt before dispatch to prevent context blindness (duplicate work, stale direction, missing constraints).\n\n**N≤2 (standard)**:\n```\n[Session Context Card]\nPurpose: {session goal}\nCompleted: {done items + file paths — agent must know to avoid duplication}\nThis agent's task: {specific task for this agent}\nNote: {constraints \u002F history the agent must know}\n```\n\n**N≥3 (Registry mode — DACS-inspired, arXiv:2604.07911)**:\n```\n[Session Context Card]\nPurpose: {session goal}\nCompleted: {done items + file paths}\nThis agent's task: {specific task}\nNote: {constraints}\n\n[Agent Registry]\nAgent-1 ({role}): {≤1 sentence — what it's doing, key files}\nAgent-2 ({role}): {≤1 sentence}\n... (all agents except this one)\n```\nTotal Registry ≤200 tokens. Each agent receives its own full card + compressed view of all other agents.\n\n**Coordination-overhead budget** (apply before each Wave):\n\n| Rule | Constraint |\n|---|---|\n| **Per-wave fan-out cap** | ≤4 agents per dispatch wave. Above 4: decompose hierarchically (supervisor → sub-waves), not flat fan-out |\n| **Capability-aware routing** | Match each subtask to agent's `role` + `allowed_tools` + `writes`. Never dispatch a `writes: false` audit agent (e.g., fact-checker, hub-persona-auditor) for a task requiring edits |\n\nRationale: orchestrator-worker coordination adds ~+285% token overhead at N≥5 flat fan-out (DACS, arXiv:2604.07911). Sub-waves amortize this.\n\n**Focus Mode** (N≥3, on-demand only): When an agent signals `\"Need full context from Agent-X to proceed\"` → re-dispatch that agent with Agent-X's full Context Card + Registry-compressed view of others. Use only when genuinely needed — adds one round-trip.\n\n**Omit card**: Simple read-only lookup agents with no context dependency may skip injection.\n\n---\n\n## Step 3.5 — Inter-Wave Adaptation Check (Runtime Adaptation)\n\nAfter Wave N completes, before Wave N+1, evaluate:\n\n**① Premise Reversal** — Does Wave N result reverse a Wave N+1 premise? → revise plan, confirm with user\n**② Repeated Failure** — Same agent failed 2+ times? → exclude + suggest replacement\n**③ Early-Harvest Trigger** — 3+ new patterns discovered? → propose mini-harvest before Wave N+1\n\n**Simplification guard**: Skip for simple tasks with only one Wave (Wave 0 + Wave 1).\n\n> **Detail**: See `SKILL_detail.md §Wave-Adaptation` — adaptation check output format.\n\n---\n\n## Step 4. fan-in — Result Integration\n\n> **M\u002FS\u002FR tier criteria**: M = blocks external user entry \u002F structural conflict \u002F immediate action required · S = feature degradation \u002F address within next session · R = improvement value \u002F backlog\n\nEach agent finding must satisfy the **loom fan-in contract** (3 fields minimum): `tier | location | fix suggestion`. Results not meeting this format → mark \"format non-compliant\" and re-request or skip.\n\nIntegrate results into M\u002FS\u002FR tiers → output completion report:\n\n```\nagent-composer — Complete\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n  Executed: {N}  |  Time: ~{N} min  |  Parallel gain: {N}x vs sequential\n  M: {N} items → [action suggestion]\n  S: {N} items → backlog\n  R: {N} items → backlog\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n```\n\n> **Detail**: See `SKILL_detail.md §fan-in-Contract` — per-row format spec, format non-compliant handling.\n\n---\n\n## Step 4-b. State Transition Gate\n\nAfter fan-in report, evaluate conditions and auto-suggest the next Wave:\n\n| Condition | Wave suggestion |\n|---|---|\n| ① M-tier > 0 | **Wave next-M**: fact-checker (A) → harness-pr-reviewer (S) |\n| ② persona-innovator naming candidates > 0 | **Wave next-I**: delegate to user + asset-placement-gate (S) |\n| ③ External absorption signal High > 0 | **Wave next-E**: persona-innovator Mode E (A) + meta-prompt-builder (S) |\n| ⑤ Design conflict \u002F 2+ conflicting suggestions | **Wave next-D**: deliberation (S) — verdict folds back into Step 4-b |\n| ④ All 0 | **End**: \"backlog only, defer to next session\" |\n\nNaming\u002Fdirection\u002Fdeliberation decisions: auto-execution forbidden — user confirmation required.\n\n---\n\n## Step 4-c. Auto-Recording Gate\n\n| Condition | Auto action |\n|---|---|\n| 2+ new files created or 3+ existing files changed, **or M-tier resolved** | harvest-loop lightweight mode (field-harvest → contention → verify-bidirectional) |\n| Architecture\u002Fdirection decision made | \"Record this decision? [1-line summary]\" — save after confirmation |\n| None of the above | Fall back to field-harvest proposal |\n\nAuto-recording allowed scope: file change lists + execution results. Decision content and naming require confirmation.\n\n> **Detail**: See `SKILL_detail.md §Auto-Recording` — Wave execution recording format, harvest-loop lightweight mode pipeline, human decision gate.\n\n---\n\n## Step 5. Wave 4 — Final Judgment Gate\n\nExecute after all Waves 0~3 complete. Auto-skip for simple exploration or planning tasks.\n\n### Judgment Logic\n\n```\nIF M-tier == 0 AND S-tier \u003C 3:\n    → PASS  (merge approved)\nELIF M-tier >= 1:\n    → BLOCK (immediate fix required)\nELSE:  # M-tier == 0 AND S-tier >= 3\n    → PASS  (S-tier allows backlog — not a merge block reason)\n```\n\n| Judgment | Auto-proposal |\n|---|---|\n| **PASS** | field-harvest proposal: \"Are there patterns to harvest from this Wave?\" |\n| **BLOCK** | Fix M-tier items → suggest re-entry into Wave 1 |\n\n> **Detail**: See `SKILL_detail.md §Wave4` — entry conditions, judgment output format, auto-proposal format.\n\n---\n\n## Phase Guard Pattern (Stage Entry Gate)\n\n| Dependency | Rule |\n|---|---|\n| Wave 0 (recon) not complete | Cannot enter Wave 1 |\n| Wave 2 (fan-in) not complete | Cannot enter Wave 4 |\n| State transition (Step 4-b) not complete | Cannot enter Wave next-M\u002FI\u002FE\u002FD |\n\nMaximize parallel fan-out among independent agents; dependent stages wait for prior Wave completion.\n\n---\n\n## Step 6. Round Wrap + Proactive Next Step\n\nExecute after Wave 4 PASS + Step 4-c recording complete.\n3-line completion summary → up to 3 next-round suggestions → fh_signal persistence confirmation.\n\n**Proactive suggestion priority** (suggest only 1):\n\n| Situation detected | Suggestion |\n|---|---|\n| 2+ FH files modified | `harness-doctor` auto-run (after user confirmation) |\n| New skill\u002Fplugin added | `cross-ecosystem-synergy-detection` |\n| Important artifact completed | `steel-quench` |\n| No frontier-digest today + large session | `frontier-digest` |\n| None | \"ready for next session\" |\n\n**Anti-redundancy guard**: if this composition was invoked **by** goal-quench (detect `.claude\u002Fgoal-quench.active` present with `mode: pro|max`), suppress any suggestion that points back to `\u002Fgoal-quench` — goal-quench is already the caller, so re-suggesting it is a redundant, confusing loop. Return control to goal-quench instead. See Cross-reference below.\n\n> **Detail**: See `SKILL_detail.md §Round-Wrap` — 6-1 completion summary format, 6-2 next round suggestions format, 6-3 fh_signal persistence format.\n\n---\n\n## Execution Tier\n\n| Tier | Tokens | Scope |\n|:---:|:---:|---|\n| **light** | ~5K | Wave 0 + Wave 1 single → output → end |\n| **standard** | ~15K | Wave 0 + Wave 1 multi → fan-in → one proactive suggestion |\n| **full** | ~30K | + Wave N state transition → conditional lightweight harvest |\n| **max** | ~60K+ | + Three-Doctor Loop → full harvest-loop → next Wave follow-up |\n\nConfigure via `EXECUTION_TIER: standard` in CLAUDE.md. Temporary override: \"use light mode\" \u002F \"run at max\".\n\n---\n\n## Simplification Guard\n\n- Single-agent tasks → guide user to call that skill directly (skip agent-composer)\n- Risk of two agents editing the same file in the same Wave → recommend Wave separation\n\n### Fan-out Scale Tiers\n\n| Tier | Count | Behavior |\n|---|---|---|\n| **Small** | 2–4 | Dispatch immediately (within per-wave cap) |\n| **Medium** | 5–16 | Decompose into sub-waves of ≤4; confirm scale before dispatch |\n| **Large** | 17+ | Worktree isolation mandatory + explicit user approval required |\n\n---\n\n## Done When\n\n```\nAll stages Step 0~6 complete\n+ Wave composition plan finalized + execution complete\n+ fan-in loom complete: M-tier 0 AND S-tier \u003C 3 → PASS\n  or user has confirmed Wave end\n+ When deliberation was invoked: wait for verdict before closing Wave N+1;\n  verdict folds back into Step 4-b fan-in result set\n+ Auto-recording gate (Step 4-c) complete — confirmed by the RECORD ARTIFACT (harvest output\n  file exists on disk + harvest-loop typed `Verdict:` line read), never by a completion notice\n  alone (completed-notice ≠ completion — return-path audit 2026-08-10)\n```\n\n> **Sprint Contract**: Done When must be in an externally verifiable contract format — \"criteria a third party can confirm,\" not \"when it feels done.\" (Anthropic official validation 2025)\n\n---\n\n## Identity\n\nagent-composer is the FH **coordinator** above specialist agents — decides \"which agent combination is optimal.\" Also acts as **Curator**: detects stale\u002Fduplicate agents and proposes merge candidates.\n\n| Human domain | System domain |\n|---|---|\n| What to build, why (direction + insight) | Which agents and how (composition + ordering) |\n| Final adoption decision | Pipeline execution + result aggregation |\n| Naming\u002Fframing | Recording + quality gates |\n\nIf unclear item is in human domain → ask. System domain → infer and proceed.\n(Brain\u002FHands decoupling: agent-composer is Brain-only. Brain = goal parsing → Wave construction → gate decisions.)\n\n---\n\n## Cross-reference — goal-quench (upstream caller)\n\n`goal-quench`'s **pro \u002F max** modes invoke agent-composer for goal decomposition (goal-quench Phase 1.5 Step B). The relationship is one-directional and the entry points differ by intent:\n\n| User intent | Entry point | agent-composer's role |\n|---|---|---|\n| \"Compose\u002Fdispatch agents for this work\" | `\u002Fagent-composer` directly | Primary — composes and runs the Wave plan |\n| \"Run a large\u002Fbudget-gated `\u002Fgoal` safely\" | `\u002Fgoal-quench --pro` \u002F `--max` | Sub-step — receives the task in compose-only mode, returns a sub-goal Wave plan, hands control back to goal-quench |\n\n**Routing note**: when a user frames a large or token-sensitive `\u002Fgoal` run, prefer `\u002Fgoal-quench` as the entry point — it wraps this skill with budget + quality gates that a bare agent-composer run does not provide. agent-composer does **not** re-invoke goal-quench (that is the caller); the Step 6 anti-redundancy guard enforces this.\n","# agent-composer — Agent Composition Layer\n\nA coordinator skill that reads the work context and decides \"which agents to dispatch, when, and in what order.\"\nSelects the optimal combination from the FH skill pool and either outputs a fan-out plan or executes it directly.\n\n## Triggers\n\n- `\u002Fagent-composer`\n- \"Which agent should I use?\", \"Pick one automatically\", \"Compose the agents\"\n- \"Set up the agents\", \"Decide which agents to use\"\n- \"Split the work and run in parallel\", \"Process with multiple agents\"\n- \"Build the dispatch plan\", \"Run in parallel splits\"\n- When the task is complex or spans multiple projects\n\n## Core Principles\n\n- **Compose only**: Does not perform work directly. Outputs the dispatch plan and executes after user approval.\n- **Parallel first**: When 2+ tasks are independent, propose parallel fan-out instead of sequential.\n- **Minimal composition**: Only the agents needed. Over-provisioning agents creates inefficiency.\n- **Coordinator ≠ executor**: Only collects results (fan-in) and presents an integrated report.\n\n---\n\n## Step 0. Context Collection\n\nIdentify 4 items from the request: task type · scope · constraints · natural-language goal → skill mapping.\nCheck `LOCAL_SKILL_REGISTRY.md` for project-local skills; check `.mcp.json` or `CLAUDE.md` for external plugins.\n\n> **Detail**: See `SKILL_detail.md §Step-0` — NL pattern mapping table, cross-install detection, registry lookup format — read when auto-mapping an ambiguous request.\n\n---\n\n## Step 0.2 — Capability Fit Analysis\n\n> **Schema**: `knowledge\u002Fshared\u002Fharness-core\u002Ftpa_schema.md` — `artifact_type` enum determines `role_match` lookup domain for scoring.\n> Runs before dispatching agents. **Skip if user specifies exact agents by name.**\n\nFor each subtask in the composition plan:\n\n1. **Read agent registry**: `.claude\u002Fagents\u002F*.md` + installed plugin agents  \n   Extract: `role` · `allowed_tools` · `writes` · `declared_capabilities`\n2. **Score capability fit**: `[subtask_type]` × `[agent capabilities]` → `fit_score` (0.0–1.0)\n3. **GAP**: `fit_score \u003C 0.5` for a required-weight subtask  \n   → query `\u002Fplugin-recommender`: \"agent for [subtask_type] in [context]\"  \n   → includes Codex marketplace + Claude Code marketplace (not just FH native)  \n   → user: **install** \u002F **skip** \u002F **use general-purpose fallback**\n\n### Capability Fit Scoring Table\n\n| Subtask type | Strong fit signal | Weak fit signal |\n|---|---|---|\n| Adversarial review | `subagent_type=\"challenger\"`, artifact_type match | general-purpose only |\n| Phantom detection | `phantom-quench` | general-purpose only |\n| Persona simulation | `hub-persona-auditor`, deep-insight persona | general-purpose only |\n| Code generation | `writes: true` + code tools | `writes: false` or no code tools |\n| Audit-only | `writes: false` (safe) | `writes: true` (risky for audit) |\n\n### Author-Exposure Table — a review pass, not a second executor\n\nThe table above picks **who does the subtask**. This one adds a different question at a different\nstage: **what failure is the author structurally exposed to, now that the work is claimed done?**\nIt never replaces capability fit and never selects the agent that performs the work — it adds a\n**review pass** before the work is released. A doc-writing subtask scores no \"adversarial review\"\nfit, yet its author is blind to cold-entry failure, and capability fit never surfaces that.\n\n**Materiality gate — run this pass only when the work product is material.** At least one of:\npublic or otherwise irreversible surface · affects users other than the author · carries external\nclaims, numbers, or citations · introduces new behavior · touches security, data, deletion, or\npermissions. Internal notes, wording fixes, and one-line edits do **not** trigger it — an\nunbounded trigger just trains the pass into being skipped.\n\n| Failure the author cannot self-detect | Review mechanism | Type |\n|---|---|---|\n| Cold entry — first contact breaks (missing install step, undefined term, no success signal) | `beginner` | agent |\n| Everyday-use friction invisible to the designer | `main-player` | agent |\n| Currency vs the outside field (needs external citation, not assertion) | `expert` | agent |\n| Self-verification only fails in the optimistic direction | `challenger` + `auto-decorrelation` | agent + pipeline |\n| Rebuilding something that already exists | `fact-checker` · `asset-placement-gate` | agent · skill |\n| Numbers\u002Fcitations living in the artifact without grounding | `phantom-quench` | skill |\n| **Exposure unclear** (material, but no row above fits) | `challenger` | agent — default, not a skip |\n\nThe `Type` column matters for the capability-fit checks above: `writes`\u002Ftooling scoring applies to\n**agent** rows only; skill and pipeline rows are invoked, not scored.\n\n**Behavioral rule — no silent skip, and \"no row applies\" is not an exit.** Name the row before the\nagent. If you believe none applies, you must (a) state which rows you considered, (b) give a\none-line reason each is excluded, and (c) fall through to the **Exposure-unclear** row — the\ndefault is `challenger`, never nothing. (Origin: 2026-07-21 — four dispatches in one session were\nchosen by orchestrator judgment alone. They were right; that is luck, not a mechanism. In the same\nsession one `beginner` dispatch blocked a public-repo merge on 4 findings the author had not seen.)\n\n**Behavioral rule — the lens does not hold the verdict.** A review pass returns `evidence`,\n`risk`, and a `recommended decision` only. It may **not** emit a terminal `block`\u002F`approve`; the\norchestrator declares the outcome, on its own stated grounds, and approval on an irreversible\nsurface stays with the human regardless of what the lens returned.\n\n**Row-growth criterion (anti-case-crafting).** A new row is admissible only if the failure type has\nbeen **observed more than once**, is **not coverable by an existing row**, and names a *verifiable\nexposure axis* rather than a job title or a favorite tool. If rows keep accreting, that is the\nsignal to fold the table into a smaller set of principled axes — not to keep appending.\n\n**Behavioral rule**: A `writes: false` agent (e.g. fact-checker, hub-persona-auditor) must NOT be assigned a task requiring edits. Capability fit scoring catches this statically before dispatch.\n\n**Behavioral rule**: Degraded composition — when any required-weight role is filled with general-purpose fallback, output `⚠️ degraded: [role]` in the composition plan. Do not silently use general-purpose for a specialized role.\n\n> **Detail**: See `SKILL_detail.md §CapabilityFit` — scoring procedure, agent registry reading, plugin-recommender query format, worked examples — read when executing Step 0.2.\n\n---\n\n## Step 0-a. Clarification Protocol\n\n> Execution condition: Only when direction or goal is unclear (skip → go directly to Step 0-b if clear)\n\n**Core principle**: Only ask when what the person must provide (direction · insight · decision) is unclear.\nExecution method · agent selection · recording location → infer and proceed — do not ask.\n\n### Direction vs. Execution Decision Table\n\n| Request type | Classification | Action |\n|---|---|---|\n| \"Do X\" — target and completion criteria are clear | Clear | Immediately enter Step 0-b |\n| \"Improve X\" — improvement dimension unclear | Direction unclear | Ask for clarification |\n| \"Something feels off\" — diagnosis target unclear | Execution unclear → infer | Auto-dispatch harness-doctor |\n| \"Wrap up \u002F harvest this session\" — trigger is clear | Clear | Run harvest-loop based on recent work (\"run the pipeline\" itself is ceded to pipeline-conductor — route end-to-end sweeps there, not here) |\n| No request — session context exists | Execution unclear → infer | Auto-compose based on CATALOG\u002FMEMORY, then confirm |\n\n> **Detail**: See `SKILL_detail.md §Clarification` — 2-question format, 4-question structured confirmation, meta-prompting intervention — read when direction ambiguity requires a clarification block.\n\n---\n\n## Step 0-b. Wave 0 — Reconnaissance Dispatch (Mandatory Before New Tasks)\n\n> Execution condition: For cross-project tasks or when scope is unclear. Skip for single-project tasks with clear scope.\n\nThis orchestrator does not read files or understand structure directly — **even reconnaissance work is dispatched as agents.** All tasks including new assets → fact-checker (A) mandatory in Wave 0.\n\n> **Detail**: See `SKILL_detail.md §Wave-0` — self-contained brief requirements, deferred ToolSearch pre-requisite pattern — read when writing a recon agent brief.\n\n---\n\n## Step 1. Agent Mapping\n\nDefault composition table by task type.\n\n> **Note**: This table lists known installed agents. Capability fit scoring in Step 0.2 overrides static mapping when `.claude\u002Fregistry\u002Fagent_cards.json` (repo-relative — there is no bare `agent_cards.json` at the repo root) has more current data.\n\n> **Call method distinction**: `(S)` = Skill tool call \u002F `(A)` = Background dispatch via Agent tool\n\n| Task type | Default composition | Parallel |\n|---|---|:---:|\n| **[Wave 0] Recon (all tasks)** | Recon agent (A) — file\u002Fstructure understanding. Direct orchestrator execution forbidden | — |\n| **[Wave 0] All tasks including new assets** | fact-checker (A) — proactive duplicate\u002Fstale validation | — |\n| Meta-simulation quality validation | sim-conductor (S) — challenger + beginner + main-player | ✅ Parallel |\n| Field pattern harvest | field-harvest (S) | — |\n| Harness structural diagnosis | harness-doctor (S) | — |\n| New asset placement decision | asset-placement-gate (S) | — |\n| External user entry point audit | hub-persona-auditor (A) | — |\n| Naming\u002Finnovation scan | persona-innovator (A) | — |\n| Cross-project simultaneous work | N field agents (A) | ✅ Parallel |\n| Three-Doctor Loop | harness-doctor (S) + context-doctor (S) + sim-conductor (S) | ✅ Parallel |\n| Pre-PR code review | sim-conductor D-code 3 personas (S) | ✅ Parallel |\n| Learning cross-validation | verify-bidirectional (S) | — |\n| Ecosystem synergy exploration | cross-ecosystem-synergy-detection (S) | — |\n| Plugin recommendation | plugin-recommender (S) | — |\n| Install conflict diagnosis | install-doctor (S) | — |\n| Onboarding install | install-wizard (S) — ⚠️ interactive; `--dry-run` for bg parallel | — |\n| Hub PR review | harness-pr-reviewer (S) — requires PR number first | — |\n| **Decision-maker approval review** | apex-review (S) — CTO\u002Ftech lead\u002FQA lead personas + HTML deck | — |\n| **Project local skills** | LOCAL_SKILL_REGISTRY lookup → relevant project skill (A\u002FS) | Per project |\n\n---\n\n## Step 2. Composition Plan Output\n\n```\nagent-composer — Composition Plan\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n  Task: {task summary}\n  Composition: {N} agents  |  Parallel: {Y\u002FN}  |  Estimated time: ~{N} min\n\n  Wave 0 (Recon):\n    [R] Recon agent — {file\u002Fstructure understanding goal}\n\n  Wave 1 (Parallel):\n    [A] {agent name} — {role in 1 line}\n    [B] {agent name} — {role in 1 line}\n\n  Wave 2 (after Wave 1 completes):\n    [D] {agent name} — {executed after result integration}\n\n  fan-in: integrate results after Wave completes → output report\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nExecute? (Y: run all \u002F E: edit then run \u002F N: cancel)\n```\n\nOptionally name the composition's shape in the plan header (`Composition pattern: {name}`) so the\noperator recognizes the structure at a glance — a recognition aid, not a routing input.\n\n> **Detail**: See `SKILL_detail.md §Composition-Pattern-Labels` — the six revfactory-vocabulary labels\n> (Pipeline \u002F Fan-out-in \u002F Expert Pool \u002F Producer-Reviewer \u002F Supervisor \u002F Hierarchical) mapped to the\n> existing FH constructs they name — read when labeling a plan header.\n\n---\n\n## Step 2.5 — Model Routing Decision (complexity_routing)\n\n### Routing Rules\n\n1. No `complexity_routing` in skill frontmatter → use `model:` field as-is\n2. `complexity_routing` present + any `escalate_when` condition matches → use `high` model\n3. No conditions match → use `base` model\n\nInclude 1-line routing audit in composition plan output: `[Model routing] harness-doctor: cold_start → opus`\n\n### Default Architecture\n\n| Mode | Orchestrator | Executor | When |\n|---|---|---|---|\n| **Base** | sonnet | sonnet | Default — all tasks |\n| **Amplified** | opus | sonnet | `EXECUTION_TIER: full\u002Fmax` · plan mode · `cross_project` + `high_stakes` both detected |\n\n**Simplification guard**: Single-Wave, single-project tasks → Sonnet sufficient. Do not escalate.\n\n> **Detail**: See `SKILL_detail.md §Model-Routing` — escalation condition evaluation table, amplified audit log format.\n\n---\n\n## Step 2.7 — Destructive Action Gate\n\nAfter scanning the composition plan, if any of the following types are found, mark with 🚨 and output a separate warning before Step 3.\n\n| Type | Examples |\n|---|---|\n| External send | git push\u002Fforce, PR create\u002Fmerge, Slack\u002Fwiki upload |\n| File\u002Fdata destruction | rm -rf, DB DROP\u002FDELETE, file overwrite, branch delete |\n| Production impact | Service deploy, migration, permission\u002Fconfig changes |\n\nIf 🚨 items exist, insert before the standard Y\u002FE\u002FN in Step 3:\n\n```\n⚠️  Irreversible operations are included:\n    - [type] [specific operation]\n    Do you want to proceed? (yes \u002F no)\n```\n\n`no` → remove that operation or cancel entirely. Safe remaining operations can continue.\n\n**Named residual — the plan is gated per step, never as a chain.** A composition whose steps each pass can\nstill be harmful as a whole (skills that each soften one signal until it disappears). No check here reads\nthe chain as one unit. The 🚨 table above flags a step only by its own type, so a harmless-looking step\nthat shapes what a later irreversible step acts on is not flagged. Detail: `knowledge\u002Fshared\u002Fharness-core\u002Fcapability_composition_contract.md §3`.\n\n---\n\n## Step 3. Approval → Execution\n\n- **Y**: Execute immediately. Generate Context Cards (Step 3-a), then dispatch parallel agents in a single message.\n- **E**: User modifies plan then re-confirms.\n- **N**: Cancel.\n\n> **Detail**: See `SKILL_detail.md §Worktree-Isolation` — Step 3.1 parallel proposal mode with git worktree isolation — read when 2+ agents write to overlapping files.\n\n### Step 3-runtime. Dispatch Runtime Selection\n\nUse the runtime available in the current session:\n\n| Runtime | Dispatch mechanism |\n|---|---|\n| Claude Code | `Agent(...)` for agents, slash\u002Fskill invocation for skills |\n| Codex-primary | `FH_BACKEND=codex npx --package @chrono-meta\u002Ffh-gate fh-run --agent {agent}` or `--skill {skill}` |\n| Generic shell | `FH_BACKEND=auto npx --package @chrono-meta\u002Ffh-gate fh-run ...` |\n\nWhen using `fh-run`, pass each agent's Context Card through `--prompt` and pass target files with repeated `--file` arguments. The fan-in obligation is unchanged: collect each adapter output, then synthesize one integrated report before proceeding to the next wave.\n\n### Step 3-a. Context Card Injection (required for 2+ parallel agents)\n\nSub-agents are spawned in isolation — they cannot see the live conversation. Inject a Context Card into each agent prompt before dispatch to prevent context blindness (duplicate work, stale direction, missing constraints).\n\n**N≤2 (standard)**:\n```\n[Session Context Card]\nPurpose: {session goal}\nCompleted: {done items + file paths — agent must know to avoid duplication}\nThis agent's task: {specific task for this agent}\nNote: {constraints \u002F history the agent must know}\n```\n\n**N≥3 (Registry mode — DACS-inspired, arXiv:2604.07911)**:\n```\n[Session Context Card]\nPurpose: {session goal}\nCompleted: {done items + file paths}\nThis agent's task: {specific task}\nNote: {constraints}\n\n[Agent Registry]\nAgent-1 ({role}): {≤1 sentence — what it's doing, key files}\nAgent-2 ({role}): {≤1 sentence}\n... (all agents except this one)\n```\nTotal Registry ≤200 tokens. Each agent receives its own full card + compressed view of all other agents.\n\n**Coordination-overhead budget** (apply before each Wave):\n\n| Rule | Constraint |\n|---|---|\n| **Per-wave fan-out cap** | ≤4 agents per dispatch wave. Above 4: decompose hierarchically (supervisor → sub-waves), not flat fan-out |\n| **Capability-aware routing** | Match each subtask to agent's `role` + `allowed_tools` + `writes`. Never dispatch a `writes: false` audit agent (e.g., fact-checker, hub-persona-auditor) for a task requiring edits |\n\nRationale: orchestrator-worker coordination adds ~+285% token overhead at N≥5 flat fan-out (DACS, arXiv:2604.07911). Sub-waves amortize this.\n\n**Focus Mode** (N≥3, on-demand only): When an agent signals `\"Need full context from Agent-X to proceed\"` → re-dispatch that agent with Agent-X's full Context Card + Registry-compressed view of others. Use only when genuinely needed — adds one round-trip.\n\n**Omit card**: Simple read-only lookup agents with no context dependency may skip injection.\n\n---\n\n## Step 3.5 — Inter-Wave Adaptation Check (Runtime Adaptation)\n\nAfter Wave N completes, before Wave N+1, evaluate:\n\n**① Premise Reversal** — Does Wave N result reverse a Wave N+1 premise? → revise plan, confirm with user\n**② Repeated Failure** — Same agent failed 2+ times? → exclude + suggest replacement\n**③ Early-Harvest Trigger** — 3+ new patterns discovered? → propose mini-harvest before Wave N+1\n\n**Simplification guard**: Skip for simple tasks with only one Wave (Wave 0 + Wave 1).\n\n> **Detail**: See `SKILL_detail.md §Wave-Adaptation` — adaptation check output format.\n\n---\n\n## Step 4. fan-in — Result Integration\n\n> **M\u002FS\u002FR tier criteria**: M = blocks external user entry \u002F structural conflict \u002F immediate action required · S = feature degradation \u002F address within next session · R = improvement value \u002F backlog\n\nEach agent finding must satisfy the **loom fan-in contract** (3 fields minimum): `tier | location | fix suggestion`. Results not meeting this format → mark \"format non-compliant\" and re-request or skip.\n\nIntegrate results into M\u002FS\u002FR tiers → output completion report:\n\n```\nagent-composer — Complete\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n  Executed: {N}  |  Time: ~{N} min  |  Parallel gain: {N}x vs sequential\n  M: {N} items → [action suggestion]\n  S: {N} items → backlog\n  R: {N} items → backlog\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n```\n\n> **Detail**: See `SKILL_detail.md §fan-in-Contract` — per-row format spec, format non-compliant handling.\n\n---\n\n## Step 4-b. State Transition Gate\n\nAfter fan-in report, evaluate conditions and auto-suggest the next Wave:\n\n| Condition | Wave suggestion |\n|---|---|\n| ① M-tier > 0 | **Wave next-M**: fact-checker (A) → harness-pr-reviewer (S) |\n| ② persona-innovator naming candidates > 0 | **Wave next-I**: delegate to user + asset-placement-gate (S) |\n| ③ External absorption signal High > 0 | **Wave next-E**: persona-innovator Mode E (A) + meta-prompt-builder (S) |\n| ⑤ Design conflict \u002F 2+ conflicting suggestions | **Wave next-D**: deliberation (S) — verdict folds back into Step 4-b |\n| ④ All 0 | **End**: \"backlog only, defer to next session\" |\n\nNaming\u002Fdirection\u002Fdeliberation decisions: auto-execution forbidden — user confirmation required.\n\n---\n\n## Step 4-c. Auto-Recording Gate\n\n| Condition | Auto action |\n|---|---|\n| 2+ new files created or 3+ existing files changed, **or M-tier resolved** | harvest-loop lightweight mode (field-harvest → contention → verify-bidirectional) |\n| Architecture\u002Fdirection decision made | \"Record this decision? [1-line summary]\" — save after confirmation |\n| None of the above | Fall back to field-harvest proposal |\n\nAuto-recording allowed scope: file change lists + execution results. Decision content and naming require confirmation.\n\n> **Detail**: See `SKILL_detail.md §Auto-Recording` — Wave execution recording format, harvest-loop lightweight mode pipeline, human decision gate.\n\n---\n\n## Step 5. Wave 4 — Final Judgment Gate\n\nExecute after all Waves 0~3 complete. Auto-skip for simple exploration or planning tasks.\n\n### Judgment Logic\n\n```\nIF M-tier == 0 AND S-tier \u003C 3:\n    → PASS  (merge approved)\nELIF M-tier >= 1:\n    → BLOCK (immediate fix required)\nELSE:  # M-tier == 0 AND S-tier >= 3\n    → PASS  (S-tier allows backlog — not a merge block reason)\n```\n\n| Judgment | Auto-proposal |\n|---|---|\n| **PASS** | field-harvest proposal: \"Are there patterns to harvest from this Wave?\" |\n| **BLOCK** | Fix M-tier items → suggest re-entry into Wave 1 |\n\n> **Detail**: See `SKILL_detail.md §Wave4` — entry conditions, judgment output format, auto-proposal format.\n\n---\n\n## Phase Guard Pattern (Stage Entry Gate)\n\n| Dependency | Rule |\n|---|---|\n| Wave 0 (recon) not complete | Cannot enter Wave 1 |\n| Wave 2 (fan-in) not complete | Cannot enter Wave 4 |\n| State transition (Step 4-b) not complete | Cannot enter Wave next-M\u002FI\u002FE\u002FD |\n\nMaximize parallel fan-out among independent agents; dependent stages wait for prior Wave completion.\n\n---\n\n## Step 6. Round Wrap + Proactive Next Step\n\nExecute after Wave 4 PASS + Step 4-c recording complete.\n3-line completion summary → up to 3 next-round suggestions → fh_signal persistence confirmation.\n\n**Proactive suggestion priority** (suggest only 1):\n\n| Situation detected | Suggestion |\n|---|---|\n| 2+ FH files modified | `harness-doctor` auto-run (after user confirmation) |\n| New skill\u002Fplugin added | `cross-ecosystem-synergy-detection` |\n| Important artifact completed | `steel-quench` |\n| No frontier-digest today + large session | `frontier-digest` |\n| None | \"ready for next session\" |\n\n**Anti-redundancy guard**: if this composition was invoked **by** goal-quench (detect `.claude\u002Fgoal-quench.active` present with `mode: pro|max`), suppress any suggestion that points back to `\u002Fgoal-quench` — goal-quench is already the caller, so re-suggesting it is a redundant, confusing loop. Return control to goal-quench instead. See Cross-reference below.\n\n> **Detail**: See `SKILL_detail.md §Round-Wrap` — 6-1 completion summary format, 6-2 next round suggestions format, 6-3 fh_signal persistence format.\n\n---\n\n## Execution Tier\n\n| Tier | Tokens | Scope |\n|:---:|:---:|---|\n| **light** | ~5K | Wave 0 + Wave 1 single → output → end |\n| **standard** | ~15K | Wave 0 + Wave 1 multi → fan-in → one proactive suggestion |\n| **full** | ~30K | + Wave N state transition → conditional lightweight harvest |\n| **max** | ~60K+ | + Three-Doctor Loop → full harvest-loop → next Wave follow-up |\n\nConfigure via `EXECUTION_TIER: standard` in CLAUDE.md. Temporary override: \"use light mode\" \u002F \"run at max\".\n\n---\n\n## Simplification Guard\n\n- Single-agent tasks → guide user to call that skill directly (skip agent-composer)\n- Risk of two agents editing the same file in the same Wave → recommend Wave separation\n\n### Fan-out Scale Tiers\n\n| Tier | Count | Behavior |\n|---|---|---|\n| **Small** | 2–4 | Dispatch immediately (within per-wave cap) |\n| **Medium** | 5–16 | Decompose into sub-waves of ≤4; confirm scale before dispatch |\n| **Large** | 17+ | Worktree isolation mandatory + explicit user approval required |\n\n---\n\n## Done When\n\n```\nAll stages Step 0~6 complete\n+ Wave composition plan finalized + execution complete\n+ fan-in loom complete: M-tier 0 AND S-tier \u003C 3 → PASS\n  or user has confirmed Wave end\n+ When deliberation was invoked: wait for verdict before closing Wave N+1;\n  verdict folds back into Step 4-b fan-in result set\n+ Auto-recording gate (Step 4-c) complete — confirmed by the RECORD ARTIFACT (harvest output\n  file exists on disk + harvest-loop typed `Verdict:` line read), never by a completion notice\n  alone (completed-notice ≠ completion — return-path audit 2026-08-10)\n```\n\n> **Sprint Contract**: Done When must be in an externally verifiable contract format — \"criteria a third party can confirm,\" not \"when it feels done.\" (Anthropic official validation 2025)\n\n---\n\n## Identity\n\nagent-composer is the FH **coordinator** above specialist agents — decides \"which agent combination is optimal.\" Also acts as **Curator**: detects stale\u002Fduplicate agents and proposes merge candidates.\n\n| Human domain | System domain |\n|---|---|\n| What to build, why (direction + insight) | Which agents and how (composition + ordering) |\n| Final adoption decision | Pipeline execution + result aggregation |\n| Naming\u002Fframing | Recording + quality gates |\n\nIf unclear item is in human domain → ask. System domain → infer and proceed.\n(Brain\u002FHands decoupling: agent-composer is Brain-only. Brain = goal parsing → Wave construction → gate decisions.)\n\n---\n\n## Cross-reference — goal-quench (upstream caller)\n\n`goal-quench`'s **pro \u002F max** modes invoke agent-composer for goal decomposition (goal-quench Phase 1.5 Step B). The relationship is one-directional and the entry points differ by intent:\n\n| User intent | Entry point | agent-composer's role |\n|---|---|---|\n| \"Compose\u002Fdispatch agents for this work\" | `\u002Fagent-composer` directly | Primary — composes and runs the Wave plan |\n| \"Run a large\u002Fbudget-gated `\u002Fgoal` safely\" | `\u002Fgoal-quench --pro` \u002F `--max` | Sub-step — receives the task in compose-only mode, returns a sub-goal Wave plan, hands control back to goal-quench |\n\n**Routing note**: when a user frames a large or token-sensitive `\u002Fgoal` run, prefer `\u002Fgoal-quench` as the entry point — it wraps this skill with budget + quality gates that a bare agent-composer run does not provide. agent-composer does **not** re-invoke goal-quench (that is the caller); the Step 6 anti-redundancy guard enforces this.\n",{"name":5,"model-note":23,"description":7,"allowed-tools":24,"user-invocable":31},"session-inherit — Sonnet base is first-class (sonnet_floor_doctrine.md); depth-critical judged steps route to dispatch (opus agent \u002F cross-family sidecar, consent-gated), never a substrate requirement",[25,26,27,28,29,30],"Read","Bash","Glob","Grep","Agent","Skill",true,"main","899495d17a23f30ca149d4ac29a137a8fa7864e3","plugins\u002Ffh-meta\u002Fskills\u002Fagent-composer",1,"https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness","https:\u002F\u002Fchrono-meta.github.io\u002Fforge-harness\u002F","https:\u002F\u002Fgithub.com\u002Fchrono-meta","2026-11-15 02:42:21",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":31},[42,45,48],{"tool":43,"command":44},"npx","npx skills add chrono-meta\u002Fforge-harness --skill agent-composer",{"tool":46,"command":47},"bunx","bunx skills add chrono-meta\u002Fforge-harness --skill agent-composer",{"tool":49,"command":50},"pnpm","pnpm dlx skills add chrono-meta\u002Fforge-harness --skill agent-composer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fplugins\u002Ffh-meta\u002Fskills\u002Fagent-composer\u002FSKILL.md",[53],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"SKILL_detail.md","REFERENCE","参考文档",19141,"https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fplugins\u002Ffh-meta\u002Fskills\u002Fagent-composer\u002FSKILL_detail.md",[60,67,74,81,87,94],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M74ZPW36H1HVE0R61QZ5ZND0","todo-orchestrator","TODO CLI 프로젝트의 기능 추가·버그 수정·리팩터링·테스트 보강을 개발자와 QA 에이전트로 조율한다. todo 앱 관련 코드 작업 요청에 사용한다. 다시 실행, 재실행, 수정, 보완, 이전 결과 개선, QA만 다시 같은 후속 요청에도 사용한다. 단순 질문에는 사용하지 않는다.","https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fgenerated_harness\u002FP4_r2\u002F.claude\u002Fskills\u002Ftodo-orchestrator\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M74ZPS4EP2349B346R5JQEYE","todo-dev","TODO CLI(todo\u002Fcli.py)에 명령을 추가하거나 버그를 고치고 테스트를 작성하는 방법. todo 앱 코드 수정·기능 추가·테스트 작성·리팩터링 작업에 사용한다. 수정, 보완, 다시 구현 요청에도 사용한다.","https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fgenerated_harness\u002FP4_r2\u002F.claude\u002Fskills\u002Ftodo-dev\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M74ZPPX2743J6FPT8N2ZT0D5","todo-dev-team","TODO CLI(todo\u002Fcli.py) 개발 작업을 개발자·테스터·리뷰어 팀으로 진행하는 오케스트레이터. 명령 추가, 버그 수정, 테스트 작성, 리팩터링, 커밋·푸시 요청에 사용한다. 다시 실행, 재실행, 수정, 보완, 리뷰 반영, 테스트만 다시 같은 후속 요청에도 사용한다. 단순 질문에는 쓰지 않는다.","https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fgenerated_harness\u002FP3_r2\u002F.claude\u002Fskills\u002Ftodo-dev-team\u002FSKILL.md",[],[],{"skillNo":82,"name":69,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M74ZPKWST7DF24H0EN9RCEME","TODO CLI 개발 작업(명령·기능 추가, 버그 수정, 테스트 작성, 리뷰, 커밋·push)을 개발자·테스터·리뷰어 에이전트 팀으로 진행하는 오케스트레이터. todo CLI, todo.json, todo\u002Fcli.py 관련 구현·수정·테스트 요청에 사용한다. 재실행, 수정, 보완, 이전 결과 개선, 테스트만 다시, 리뷰만 다시 요청에도 사용한다. 단순 질문에는 쓰지 않는다.","https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fgenerated_harness\u002FP3_r1\u002F.claude\u002Fskills\u002Ftodo-dev\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M74ZPHBP62X3KKSV2RVKSBKT","weekly-summary-write","정리된 회의록으로 주간 회의 요약 문서를 작성하는 형식과 문체 규칙. 주간 요약 작성, 요약 문서 수정·보완, 검토 의견 반영 시 사용한다.","https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fgenerated_harness\u002FP2_r2\u002F.claude\u002Fskills\u002Fweekly-summary-write\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M74ZPECSXY4C0QNHAD96Z88H","weekly-meeting-summary","주간 회의록을 정리하고 요약 문서를 만드는 전체 작업을 조율하는 오케스트레이터. 회의록 요약, 주간 회의 정리, 주간 보고용 요약 요청 시 사용한다. 다시 실행, 재실행, 요약 수정·보완, 이전 결과를 바탕으로 한 개선, 정리만\u002F검토만 다시 같은 후속 요청에도 사용한다.","https:\u002F\u002Fgithub.com\u002Fchrono-meta\u002Fforge-harness\u002Fblob\u002Fmain\u002Fscripts\u002Ffixtures\u002Fgenerated_harness\u002FP2_r2\u002F.claude\u002Fskills\u002Fweekly-meeting-summary\u002FSKILL.md",[],[]]