@vpxa/aikit 0.1.152 → 0.1.154

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.
@@ -1,26 +1,26 @@
1
- const e={"code-agent-base":`# Code Agent — Shared Base Instructions
2
-
3
- > This file contains shared protocols for all code-modifying agents (Implementer, Frontend, Refactor, Debugger). Each agent's definition file contains only its unique identity, constraints, and workflow. **Do not duplicate this content in agent files.**
4
-
5
-
6
- ## AI Kit MCP Tool Naming Convention
1
+ function e(e){return`
2
+ ## Flow Context Bootstrap
7
3
 
8
- All tool references in these instructions use **short names** (e.g. \`status\`, \`compact\`, \`search\`).
9
- At runtime, these are MCP tools exposed by the AI Kit server. Depending on your IDE/client, the actual tool name will be prefixed:
4
+ When dispatched as a subagent within an active flow:
10
5
 
11
- | Client | Tool naming pattern | Example |
12
- |--------|-------------------|---------|
13
- | VS Code Copilot | \`mcp_<serverName>_<tool>\` | \`mcp_aikit_status\` |
14
- | Claude Code | \`mcp__<serverName>__<tool>\` | \`mcp__aikit__status\` |
15
- | Other MCP clients | \`<serverName>_<tool>\` or bare \`<tool>\` | \`aikit_status\` or \`status\` |
6
+ 1. **Withdraw context first** before any search or file reads:
7
+ \`\`\`
8
+ knowledge({ action: 'withdraw', scope: 'flow', profile: '${e}', budget: 6000 })
9
+ \`\`\`
10
+ This returns pre-analyzed context from prior agents.
16
11
 
17
- The server name is \`aikit\` check your MCP configuration if tools aren't found.
12
+ 2. **Use returned context**do NOT re-search or re-read files already covered
13
+ 3. **\`read_file\` ONLY** for exact lines needed for editing
14
+ 4. **Deposit new discoveries:**
15
+ \`\`\`
16
+ knowledge({ action: 'remember', scope: 'flow', title: '<discovery>', content: '<details>', category: 'context' })
17
+ \`\`\`
18
18
 
19
- **When these instructions say** \`status({})\` **→ call the MCP tool whose name ends with** \`_status\` **and pass** \`{}\` **as arguments.**
19
+ ${e===`<PROFILE>`?`**Profile:** Check your role implementer | documenter | reviewer | researcher | debugger`:`**Profile:** \`${e}\``}
20
20
 
21
- If tools are deferred/lazy-loaded, load them first (e.g. in VS Code Copilot: \`tool_search_tool_regex({ pattern: "aikit" })\`).
21
+ ---`}function t(){return"\n## Evidence Citation Protocol (tier-aware)\n\n**Standalone mode:** If no FORGE task_id was provided in your dispatch prompt, skip `evidence_map` calls entirely — provide free-form findings with `file:line` citations only.\n\nThe Orchestrator runs `forge_classify` before dispatching you, and runs the final `evidence_map({ action: 'gate', task_id })` after you respond. **Do not create your own task_id or run the gate** — feed into the Orchestrator's existing evidence map.\n\n| Tier | Your responsibility |\n|------|---------------------|\n| Floor | Free-form findings with `file.ts#Lxx` citations. No `evidence_map` calls required. |\n| Standard | For every CRITICAL or HIGH finding: `evidence_map({action:'add', task_id, claim, status:'V', receipt:'file.ts#Lxx'})`. Max 2-4 adds to keep signal high. |\n| Critical | Structured claims for all CRITICAL/HIGH findings (2-4 Verified + receipts) AND tag contract/security claims with `safety_gate:'commitment'` or `safety_gate:'provenance'`. |\n\n**Every response MUST include:**\n- `**FORGE Task ID:** <task_id>` (passed in by Orchestrator, or state \"not provided\")\n- `**Tier applied:** Floor | Standard | Critical`\n- `**Findings:** <list>` with `file:line` receipts\n- Verdict: `APPROVED` | `CHANGES_REQUESTED` | `BLOCKED`\n\nDo NOT:\n- Create a new `evidence_map` (the Orchestrator already did)\n- Run `evidence_map({action:'gate'})` yourself — the Orchestrator owns the gate\n- Duplicate findings into the map that weren't CRITICAL/HIGH"}const n={"code-agent-base":`# Code Agent — Shared Base Instructions
22
22
 
23
- ---
23
+ > This file contains shared protocols for all code-modifying agents (Implementer, Frontend, Refactor, Debugger). Each agent's definition file contains only its unique identity, constraints, and workflow. **Do not duplicate this content in agent files.**
24
24
 
25
25
  ## Invocation Mode Detection
26
26
 
@@ -97,6 +97,10 @@ Always follow this order when you need to understand something. **Never skip to
97
97
 
98
98
  Past decisions, conventions, and patterns are stored in curated knowledge. Auto-knowledge captures facts automatically from tool outputs (conventions, errors, test results, research). Use \`search()\` with specific keywords to surface these — they are indexed alongside manually curated entries. You MUST search before implementing:
99
99
 
100
+ - If running as a sub-agent, start with \`knowledge({ action: "withdraw", scope: "flow", profile: "<your-role>", budget: 6000 })\` to pull prior compressed context.
101
+ - Before re-running \`file_summary\`, \`compact\`, \`stratum_card\`, \`search\`, or \`blast_radius\`, check existing flow context first and reuse it when it is sufficient.
102
+ - Reuse existing stash/checkpoint/workset context when present before creating new compressed artifacts.
103
+
100
104
  \`\`\`
101
105
  search("keywords about the feature/area you're changing") // check for past decisions
102
106
  knowledge({ action: "list", category: "decisions" }) // scan recent decisions that might apply
@@ -110,6 +114,7 @@ knowledge({ action: "withdraw", scope: "flow", profile: "<your-role>", budget: 6
110
114
  **Rules:**
111
115
  - If results exist → **READ them and FOLLOW** established patterns. Do not silently override.
112
116
  - If results conflict with the current task → **surface the conflict** to the user/orchestrator.
117
+ - If flow-context search results already contain enough detail → **use them directly** instead of re-running the original tool.
113
118
  - If no results → proceed, but **persist your decisions with \`knowledge({ action: "remember", ... })\`** afterward for future recall.
114
119
  - Never assume "there's nothing stored" — always search first.
115
120
 
@@ -141,7 +146,7 @@ If unsure which AI Kit tool to use → run \`guide({ topic: "what you need" })\`
141
146
 
142
147
  ---
143
148
 
144
- ## Loop Detection & Breaking
149
+ ## Loop Detection & Tooling Failure Modes
145
150
 
146
151
  Track repeated failures. If the same approach fails, **stop and change strategy**.
147
152
 
@@ -159,6 +164,27 @@ Track repeated failures. If the same approach fails, **stop and change strategy*
159
164
 
160
165
  **Never brute-force.** If you catch yourself making the same type of edit repeatedly, you are in a loop.
161
166
 
167
+ ### Tooling failure exits
168
+ | Signal | Stop condition | Exit action |
169
+ |--------|---------------|-------------|
170
+ | \`evidence_map\` returns HOLD | Insufficient evidence for FORGE gate | Surface concrete gaps to user — do not retry |
171
+ | Sub-agent returns BLOCKED | Subagent cannot proceed | Read its message, escalate to user with options |
172
+ | \`onboard\` reports stale index (>7 days) | Index is stale | Run \`reindex({})\` ONCE; if still stale, surface to user |
173
+ | \`check\` or \`test_run\` fails 3x identical | Same failure mode repeating | STOP — surface to user with full output, do not retry |
174
+ | \`compact\` returns < 50% reduction | Compression ineffective | Use \`file_summary\` or \`stratum_card\` instead |
175
+
176
+ ## Sub-agent Context Budget
177
+
178
+ When dispatching subagents, choose tier based on task complexity:
179
+
180
+ | Tier | Budget | Tools | Use For |
181
+ |------|--------|-------|---------|
182
+ | **Floor** | T1 stratum_card only | Read-only | Quick lookups, single-file Q&A |
183
+ | **Standard** | compact() + T2 stratum_card | Read-only + search | Multi-file analysis, research |
184
+ | **Critical** | digest() + stratum_card + flow context | Full | Implementation, decisions, multi-step |
185
+
186
+ Always tell the subagent: profile, tier, and what they should NOT do.
187
+
162
188
  ---
163
189
 
164
190
  ## Hallucination Self-Check
@@ -183,12 +209,14 @@ Track repeated failures. If the same approach fails, **stop and change strategy*
183
209
 
184
210
  ---
185
211
 
186
- ## Read-Before-Edit (MANDATORY)
212
+ ## Ambiguity Resolution Protocol
187
213
 
188
- Before modifying ANY file, you MUST read it first using \`file_summary\` or \`compact\` to understand its structure. Then use \`read_file\` for the exact lines you need to edit.
214
+ When a task admits ≥2 valid interpretations:
215
+ 1. **Name** each interpretation in one sentence.
216
+ 2. **Identify** which assumption causes the most harm if wrong (irreversibility, blast radius, user surprise).
217
+ 3. **Ask** ONE question — the one that disambiguates the highest-harm assumption.
189
218
 
190
- **Forbidden pattern:** Editing a file based on assumptions or partial context from search results alone.
191
- **Required pattern:** \`file_summary\` → \`read_file\` (exact edit region) → \`replace_string_in_file\`
219
+ Do NOT silently pick. Do NOT ask multiple questions if one is sufficient.
192
220
 
193
221
  ## Scope Guard
194
222
 
@@ -234,30 +262,9 @@ For outdated AI Kit entries → \`knowledge({ action: "update", path, content, r
234
262
 
235
263
  ---
236
264
 
237
- ## Context Reuse Protocol (MANDATORY)
265
+ ## AI Kit Tool Discipline
238
266
 
239
- Auto-knowledge captures tool responses as shared context between agents. **Before running any read tool, check if another agent already ran it.**
240
-
241
- **Check-before-run pattern:**
242
- 1. Before \`file_summary\`, \`compact\`, \`stratum_card\`, \`search\`, \`blast_radius\`:
243
- - \`search({ query: "<tool-name>: <path-or-query>", tags: ["flow-context"], limit: 3 })\`
244
- - Example: \`search({ query: "file_summary: src/auth.ts", tags: ["flow-context"] })\`
245
- 2. If results found with enough detail → **use them directly** — do NOT re-run the tool
246
- 3. Only run the original tool if no cached results exist or results are insufficient
247
-
248
- **At agent startup (FIRST action):**
249
- - Call \`knowledge({ action: "withdraw", profile: "<your-role>", budget: 6000 })\` to receive pre-analyzed context from prior agents in the same flow
250
- - This surfaces file summaries, search results, and analysis that other agents already performed
251
- - Parse the withdrawn context — it may contain the exact information you need
252
-
253
- **Why this matters:**
254
- - Each re-run wastes tokens and time
255
- - Auto-knowledge stores \`file_summary\`, \`compact\`, \`search\`, \`stratum_card\`, \`blast_radius\`, \`scope_map\` results
256
- - Results are tagged with \`flow-context\` and searchable via \`search()\`
257
-
258
- ---
259
-
260
- ## FORBIDDEN: Native Tools When AI Kit Alternative Exists
267
+ Use AI Kit retrieval and compression tools first. Prefer reusable compressed context over raw reads, and only drop to native tools when precision for an edit or tool fallback requires it.
261
268
 
262
269
  | NEVER use this | USE THIS instead | Why |
263
270
  |---|---|---|
@@ -268,9 +275,13 @@ Auto-knowledge captures tool responses as shared context between agents. **Befor
268
275
  | \`grep_search\` for a symbol name | \`symbol({ name })\` | Definition + references with scope and call context |
269
276
  | \`run_in_terminal\` for tsc/lint | \`check({})\` | Typecheck + lint combined, summary output |
270
277
  | \`run_in_terminal\` for test | \`test_run({})\` | Run tests with structured output |
278
+ | Editing without reading | \`file_summary\` then targeted \`read_file\` | Prevents wrong-position edits |
271
279
 
272
280
  **\`read_file\` is ONLY acceptable when you need exact line content FOR EDITING (before \`replace_string_in_file\`).**
273
281
 
282
+ For edits, first understand structure with \`file_summary\` or \`compact\`, then use targeted \`read_file\` only for the exact region.
283
+ Never patch from search snippets or assumptions alone.
284
+
274
285
  ## compact() Failure Recovery
275
286
 
276
287
  If \`compact()\` returns <200 bytes or empty content, the file is NOT indexed. Follow this fallback:
@@ -285,30 +296,7 @@ If \`compact()\` returns <200 bytes or empty content, the file is NOT indexed. F
285
296
  - Falling back to read_file in small chunks (10-50 lines) — each chunk costs ~3K prompt tokens in overhead
286
297
  - Re-reading the same file later because you forgot the content — use stash() to cache
287
298
 
288
- ---
289
-
290
- ## Context Efficiency (MANDATORY)
291
-
292
- **MANDATORY: Use AI Kit over \`read_file\` to understand code** (if tools are loaded). Use the AI Kit compression tools:
293
- - **\`file_summary({ path })\`** — Structure, exports, imports (~50 tokens vs ~1000+ for read_file)
294
- - **\`compact({ path, query })\`** — Extract relevant sections from a single file (5-20x token reduction)
295
- - **\`digest({ sources })\`** — Compress 3+ files into a single token-budgeted summary
296
- - **\`stratum_card({ files, query })\`** — Generate a reusable T1/T2 context card for files you'll reference repeatedly
297
-
298
- **Session phases** — structure your work to minimize context bloat:
299
-
300
- | Phase | What to do | Compress after? |
301
- |-------|-----------|----------------|
302
- | **Understand** | Search AI Kit, read summaries, trace symbols | Yes — \`digest\` findings before planning |
303
- | **Plan** | Design approach, identify files to change | Yes — \`stash\` the plan, compact analysis |
304
- | **Execute** | Make changes, one sub-task at a time | Yes — compact between independent sub-tasks |
305
- | **Verify** | \`check\` + \`test_run\` + \`blast_radius\` | — |
306
-
307
- **Rules:**
308
- - **Never compact mid-operation** — finish the current sub-task first
309
- - **Recycle context to files** — save analysis results via \`stash\` or \`knowledge({ action: "remember", ... })\`, not just in conversation
310
- - **Decompose monolithic work** — break into independent chunks, pass results via artifact files between sub-tasks
311
- - **One-shot sub-tasks** — for self-contained changes, provide all context upfront to avoid back-and-forth
299
+ *Why:* these tools reduce token cost, shrink duplicate reads, and lower the odds of wrong-file or wrong-position edits while preserving reusable context.
312
300
 
313
301
  ---
314
302
 
@@ -415,26 +403,7 @@ When you need user input or need to explain something before asking:
415
403
  - **Prefer the simplest method** that adequately conveys the information
416
404
  - **CLI mode override:** When running in terminal (not VS Code chat), always use \`format: "browser"\` for any rich content
417
405
 
418
- ## Flow Context Bootstrap
419
-
420
- When dispatched as a subagent within an active flow:
421
-
422
- 1. **Withdraw context first** — before any search or file reads:
423
- \`\`\`
424
- knowledge({ action: 'withdraw', profile: '<PROFILE>', budget: 6000 })
425
- \`\`\`
426
- This returns pre-analyzed context from prior agents.
427
-
428
- 2. **Use returned context** — do NOT re-search or re-read files already covered
429
- 3. **\`read_file\` ONLY** for exact lines needed for editing
430
- 4. **Deposit new discoveries:**
431
- \`\`\`
432
- knowledge({ action: 'remember', scope: 'flow', title: '<discovery>', content: '<details>', category: 'context' })
433
- \`\`\`
434
-
435
- **Profile:** Check your role → implementer | documenter | reviewer | researcher | debugger
436
-
437
- ---
406
+ ${e(`<PROFILE>`)}
438
407
 
439
408
  ## Handoff Format
440
409
 
@@ -453,6 +422,23 @@ Always return this structure when invoked as a sub-agent:
453
422
  <blockers>{any blocking issues}</blockers>
454
423
  </handoff>
455
424
  \`\`\`
425
+
426
+ ## AI Kit MCP Tool Naming Convention
427
+
428
+ All tool references in these instructions use **short names** (e.g. \`status\`, \`compact\`, \`search\`).
429
+ At runtime, these are MCP tools exposed by the AI Kit server. Depending on your IDE/client, the actual tool name will be prefixed:
430
+
431
+ | Client | Tool naming pattern | Example |
432
+ |--------|-------------------|---------|
433
+ | VS Code Copilot | \`mcp_<serverName>_<tool>\` | \`mcp_aikit_status\` |
434
+ | Claude Code | \`mcp__<serverName>__<tool>\` | \`mcp__aikit__status\` |
435
+ | Other MCP clients | \`<serverName>_<tool>\` or bare \`<tool>\` | \`aikit_status\` or \`status\` |
436
+
437
+ The server name is \`aikit\` — check your MCP configuration if tools aren't found.
438
+
439
+ **When these instructions say** \`status({})\` **→ call the MCP tool whose name ends with** \`_status\` **and pass** \`{}\` **as arguments.**
440
+
441
+ If tools are deferred/lazy-loaded, load them first (e.g. in VS Code Copilot: \`tool_search_tool_regex({ pattern: "aikit" })\`).
456
442
  `,"researcher-base":`# Researcher — Shared Base Instructions
457
443
 
458
444
  > Shared methodology for all Researcher variants. Each variant's definition contains only its unique identity and model assignment. **Do not duplicate.**
@@ -467,26 +453,7 @@ Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code
467
453
 
468
454
  **Start with pre-analyzed artifacts.** They cover 80%+ of common research needs.
469
455
 
470
- ## Flow Context Bootstrap
471
-
472
- When dispatched as a subagent within an active flow:
473
-
474
- 1. **Withdraw context first** — before any search or file reads:
475
- \`\`\`
476
- knowledge({ action: 'withdraw', scope: 'flow', profile: 'researcher', budget: 6000 })
477
- \`\`\`
478
- This returns pre-analyzed context from prior agents.
479
-
480
- 2. **Use returned context** — do NOT re-search or re-read files already covered
481
- 3. **\`read_file\` ONLY** for exact lines needed for editing
482
- 4. **Deposit new discoveries:**
483
- \`\`\`
484
- knowledge({ action: 'remember', scope: 'flow', title: '<discovery>', content: '<details>', category: 'context' })
485
- \`\`\`
486
-
487
- **Profile:** \`researcher\`
488
-
489
- ---
456
+ ${e(`researcher`)}
490
457
 
491
458
  ## Research Methodology
492
459
 
@@ -564,19 +531,13 @@ When invoked for a decision analysis, you receive a specific question. You MUST:
564
531
 
565
532
  ## Invocation Mode Detection
566
533
 
567
- - **Direct** (has AI Kit tools) Follow the **Information Lookup Order** from code-agent-base
568
- - **Sub-agent** (prompt has "## Prior AI Kit Context") → Skip AI Kit Recall, use provided context
534
+ > **Mode:** Researchers always run as subagents no Direct mode.
569
535
 
570
536
  ---
571
537
 
572
538
  ## Context Efficiency
573
539
 
574
- - **NEVER use \`read_file\` to understand code** use AI Kit compression tools instead
575
- - **\`file_summary\`** for structure (exports, imports, call edges — 10x fewer tokens)
576
- - **\`compact\`** for specific sections (5-20x token reduction vs read_file)
577
- - **\`digest\`** when synthesizing from 3+ sources
578
- - **\`stratum_card\`** for files you'll reference repeatedly
579
- - **\`read_file\` is ONLY acceptable** when you need exact lines for a pending edit operation
540
+ > **Reminder:** Apply Context Efficiency rulesprefer compact/digest/file_summary over raw read_file. See \`code-agent-base\` for full table.
580
541
 
581
542
  ## Parallel Exploration via \`lane\`
582
543
 
@@ -599,26 +560,7 @@ Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code
599
560
  2. If onboard shows ❌ → Run \`onboard({ path: '.' })\` and wait for completion
600
561
  3. If onboard shows ✅ → Read relevant onboard artifacts using \`compact({ path: '<Onboard Directory>/<file>' })\` — especially \`patterns.md\` and \`api-surface.md\` for review context
601
562
 
602
- ## Flow Context Bootstrap
603
-
604
- When dispatched as a subagent within an active flow:
605
-
606
- 1. **Withdraw context first** — before any search or file reads:
607
- \`\`\`
608
- knowledge({ action: 'withdraw', scope: 'flow', profile: 'reviewer', budget: 6000 })
609
- \`\`\`
610
- This returns pre-analyzed context from prior agents.
611
-
612
- 2. **Use returned context** — do NOT re-search or re-read files already covered
613
- 3. **\`read_file\` ONLY** for exact lines needed for editing
614
- 4. **Deposit new discoveries:**
615
- \`\`\`
616
- knowledge({ action: 'remember', scope: 'flow', title: '<discovery>', content: '<details>', category: 'context' })
617
- \`\`\`
618
-
619
- **Profile:** \`reviewer\`
620
-
621
- ---
563
+ ${e(`reviewer`)}
622
564
 
623
565
  ## Review Workflow
624
566
 
@@ -670,28 +612,7 @@ When dispatched as a subagent within an active flow:
670
612
  - **FAILED** for any CRITICAL finding
671
613
  - Always check for **test coverage** on new/changed code
672
614
 
673
- ## Evidence Citation Protocol (tier-aware)
674
-
675
- **Standalone mode:** If no FORGE task_id was provided in your dispatch prompt, skip \`evidence_map\` calls entirely — provide free-form findings with \`file:line\` citations only.
676
-
677
- The Orchestrator runs \`forge_classify\` before dispatching you, and runs the final \`evidence_map({ action: 'gate', task_id })\` after you respond. **Do not create your own task_id or run the gate** — feed into the Orchestrator's existing evidence map.
678
-
679
- | Tier | Your responsibility |
680
- |------|---------------------|
681
- | Floor | Free-form findings with \`file.ts#Lxx\` citations. No \`evidence_map\` calls required. |
682
- | Standard | For every CRITICAL or HIGH finding: \`evidence_map({action:'add', task_id, claim, status:'V', receipt:'file.ts#Lxx'})\`. Max 2-4 adds to keep signal high. |
683
- | Critical | Structured claims for all CRITICAL/HIGH findings (2-4 Verified + receipts) AND tag contract/security claims with \`safety_gate:'commitment'\` or \`safety_gate:'provenance'\`. |
684
-
685
- **Every response MUST include:**
686
- - \`**FORGE Task ID:** <task_id>\` (passed in by Orchestrator, or state "not provided")
687
- - \`**Tier applied:** Floor | Standard | Critical\`
688
- - \`**Findings:** <list>\` with \`file:line\` receipts
689
- - Verdict: \`APPROVED\` | \`CHANGES_REQUESTED\` | \`BLOCKED\`
690
-
691
- Do NOT:
692
- - Create a new \`evidence_map\` (the Orchestrator already did)
693
- - Run \`evidence_map({action:'gate'})\` yourself — the Orchestrator owns the gate
694
- - Duplicate findings into the map that weren't CRITICAL/HIGH
615
+ ${t()}
695
616
  `,"architect-reviewer-base":`# Architect-Reviewer — Shared Base Instructions
696
617
 
697
618
  > Shared methodology for all Architect-Reviewer variants. Each variant's definition contains only identity and model. **Do not duplicate.**
@@ -704,26 +625,7 @@ Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code
704
625
  2. If onboard shows ❌ → Run \`onboard({ path: '.' })\` and wait for completion
705
626
  3. If onboard shows ✅ → Read relevant onboard artifacts using \`compact({ path: '<Onboard Directory>/<file>' })\` — especially \`structure.md\`, \`dependencies.md\`, and \`diagram.md\` for architecture context
706
627
 
707
- ## Flow Context Bootstrap
708
-
709
- When dispatched as a subagent within an active flow:
710
-
711
- 1. **Withdraw context first** — before any search or file reads:
712
- \`\`\`
713
- knowledge({ action: 'withdraw', scope: 'flow', profile: 'reviewer', budget: 6000 })
714
- \`\`\`
715
- This returns pre-analyzed context from prior agents.
716
-
717
- 2. **Use returned context** — do NOT re-search or re-read files already covered
718
- 3. **\`read_file\` ONLY** for exact lines needed for editing
719
- 4. **Deposit new discoveries:**
720
- \`\`\`
721
- knowledge({ action: 'remember', scope: 'flow', title: '<discovery>', content: '<details>', category: 'context' })
722
- \`\`\`
723
-
724
- **Profile:** \`reviewer\`
725
-
726
- ---
628
+ ${e(`reviewer`)}
727
629
 
728
630
  ## Review Workflow
729
631
 
@@ -771,28 +673,7 @@ When dispatched as a subagent within an active flow:
771
673
  - **BLOCKED** — Fundamental design flaw requiring rethink
772
674
  - Always validate **dependency direction** — inner layers must not depend on outer
773
675
 
774
- ## Evidence Citation Protocol (tier-aware)
775
-
776
- **Standalone mode:** If no FORGE task_id was provided in your dispatch prompt, skip \`evidence_map\` calls entirely — provide free-form findings with \`file:line\` citations only.
777
-
778
- The Orchestrator runs \`forge_classify\` before dispatching you, and runs the final \`evidence_map({ action: 'gate', task_id })\` after you respond. **Do not create your own task_id or run the gate** — feed into the Orchestrator's existing evidence map.
779
-
780
- | Tier | Your responsibility |
781
- |------|---------------------|
782
- | Floor | Free-form findings with \`file.ts#Lxx\` citations. No \`evidence_map\` calls required. |
783
- | Standard | For every CRITICAL or HIGH finding: \`evidence_map({action:'add', task_id, claim, status:'V', receipt:'file.ts#Lxx'})\`. Max 2-4 adds to keep signal high. |
784
- | Critical | Structured claims for all CRITICAL/HIGH findings (2-4 Verified + receipts) AND tag contract/security claims with \`safety_gate:'commitment'\` or \`safety_gate:'provenance'\`. |
785
-
786
- **Every response MUST include:**
787
- - \`**FORGE Task ID:** <task_id>\` (passed in by Orchestrator, or state "not provided")
788
- - \`**Tier applied:** Floor | Standard | Critical\`
789
- - \`**Findings:** <list>\` with \`file:line\` receipts
790
- - Verdict: \`APPROVED\` | \`CHANGES_REQUESTED\` | \`BLOCKED\`
791
-
792
- Do NOT:
793
- - Create a new \`evidence_map\` (the Orchestrator already did)
794
- - Run \`evidence_map({action:'gate'})\` yourself — the Orchestrator owns the gate
795
- - Duplicate findings into the map that weren't CRITICAL/HIGH
676
+ ${t()}
796
677
 
797
678
  ## Graph-Assisted Layer Verification
798
679
 
@@ -1015,7 +896,7 @@ evidence_map({ action: "gate", task_id: "add-user-api" }) → YIELD ✅
1015
896
  3. **Standard**: \`evidence_map create\` → add 3-8 claims during work → \`evidence_map gate\`
1016
897
  4. **Critical**: Full 4-phase flow with comprehensive evidence
1017
898
  5. **After gate**: YIELD = done, HOLD = fix + re-gate, HARD_BLOCK = escalate
1018
- `},t={"execution-state":`# Execution State: {Task Title}
899
+ `},r={"execution-state":`# Execution State: {Task Title}
1019
900
 
1020
901
  **Status:** PLANNING | IN_PROGRESS | REVIEW | COMPLETED | BLOCKED
1021
902
  **Started:** {timestamp}
@@ -1067,4 +948,4 @@ evidence_map({ action: "gate", task_id: "add-user-api" }) → YIELD ✅
1067
948
 
1068
949
  ## Alternatives Considered
1069
950
  {Other approaches evaluated and why they were rejected — keeps the "why not" alongside the "why"}
1070
- `};export{e as PROTOCOLS,t as TEMPLATES};
951
+ `};export{n as PROTOCOLS,r as TEMPLATES};