@vpxa/aikit 0.1.97 → 0.1.99
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/package.json +1 -1
- package/packages/cli/dist/constants-BHJ95m41.js +1 -0
- package/packages/cli/dist/index.js +3 -3
- package/packages/cli/dist/{init-DjZFwBjs.js → init-CVtbu7zj.js} +1 -1
- package/packages/cli/dist/{templates-DrkDLz-X.js → templates-DVcEiTlc.js} +27 -65
- package/packages/cli/dist/{user-CY8UN2JU.js → user-Dj8KE0_0.js} +1 -1
- package/scaffold/dist/definitions/bodies.mjs +145 -2
- package/scaffold/dist/definitions/protocols.mjs +403 -118
- package/scaffold/dist/definitions/skills.mjs +40 -0
- package/packages/cli/dist/constants-BSGpNyrr.js +0 -1
|
@@ -91,22 +91,32 @@ Always follow this order when you need to understand something. **Never skip to
|
|
|
91
91
|
| C4 architecture diagram | \`diagram.md\` |
|
|
92
92
|
| Module graph with key symbols | \`code-map.md\` |
|
|
93
93
|
|
|
94
|
-
### Step 2:
|
|
94
|
+
### Step 2: Knowledge Recall (MANDATORY before implementation)
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
**STOP. Before writing any code, check what has already been decided.**
|
|
97
|
+
|
|
98
|
+
Past decisions, conventions, and patterns are stored in curated knowledge. Auto-knowledge also captures facts automatically from tool outputs (conventions, errors, test results, research). You MUST search before implementing:
|
|
98
99
|
|
|
99
100
|
\`\`\`
|
|
100
|
-
search("
|
|
101
|
-
|
|
102
|
-
list({ category: "conventions" })
|
|
103
|
-
scope_map("what you need")
|
|
104
|
-
list() // see all stored knowledge entries
|
|
101
|
+
search("keywords about the feature/area you're changing") // check for past decisions
|
|
102
|
+
list({ category: "decisions" }) // scan recent decisions that might apply
|
|
103
|
+
list({ category: "conventions" }) // see project conventions (includes auto-captured)
|
|
104
|
+
scope_map("what you need") // generates a reading plan
|
|
105
105
|
\`\`\`
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
**Rules:**
|
|
108
|
+
- If results exist → **READ them and FOLLOW** established patterns. Do not silently override.
|
|
109
|
+
- If results conflict with the current task → **surface the conflict** to the user/orchestrator.
|
|
110
|
+
- If no results → proceed, but **\`remember()\` your decisions** afterward for future recall.
|
|
111
|
+
- Never assume "there's nothing stored" — always search first.
|
|
112
|
+
|
|
113
|
+
### Step 3: Real-time Exploration (only
|
|
114
|
+
if steps 1-2
|
|
115
|
+
don;
|
|
116
|
+
't cover it)
|
|
117
|
+
|
|
118
|
+
| Tool | Use
|
|
119
|
+
for |
|
|
110
120
|
|---|---|
|
|
111
121
|
| \`graph({ action: 'neighbors', node_id })\` | Traverse module import graph — cross-package dependencies, who-imports-whom |
|
|
112
122
|
| \`find({ pattern })\` | Locate files by name/glob |
|
|
@@ -242,18 +252,71 @@ For outdated AI Kit entries → \`update(path, content, reason)\`
|
|
|
242
252
|
|
|
243
253
|
---
|
|
244
254
|
|
|
245
|
-
##
|
|
255
|
+
## Guidelines
|
|
256
|
+
|
|
257
|
+
Behavioral guidelines to reduce common LLM coding mistakes. Apply when writing, reviewing, or refactoring code.
|
|
258
|
+
|
|
259
|
+
**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
|
|
260
|
+
|
|
261
|
+
### 1. Think Before Coding
|
|
262
|
+
|
|
263
|
+
**Don't assume. Don't hide confusion. Surface tradeoffs.**
|
|
264
|
+
|
|
265
|
+
- State assumptions explicitly. If uncertain, ask.
|
|
266
|
+
- If multiple interpretations exist, present them — don't pick silently.
|
|
267
|
+
- If a simpler approach exists, say so. Push back when warranted.
|
|
268
|
+
- If something is unclear, stop. Name what's confusing. Ask.
|
|
269
|
+
- Read existing code patterns in the area you're changing before designing your approach.
|
|
270
|
+
|
|
271
|
+
### 2. Simplicity First
|
|
272
|
+
|
|
273
|
+
**Minimum code that solves the problem. Nothing speculative.**
|
|
274
|
+
|
|
275
|
+
- No features beyond what was asked.
|
|
276
|
+
- No abstractions for single-use code.
|
|
277
|
+
- No "flexibility" or "configurability" that wasn't requested.
|
|
278
|
+
- No error handling for impossible scenarios.
|
|
279
|
+
- If you write 200 lines and it could be 50, rewrite it.
|
|
280
|
+
|
|
281
|
+
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
|
|
282
|
+
|
|
283
|
+
### 3. Surgical Changes
|
|
284
|
+
|
|
285
|
+
**Touch only what you must. Clean up only your own mess.**
|
|
286
|
+
|
|
287
|
+
When editing existing code:
|
|
288
|
+
- Don't "improve" adjacent code, comments, or formatting.
|
|
289
|
+
- Don't refactor things that aren't broken.
|
|
290
|
+
- Match existing style, even if you'd do it differently.
|
|
291
|
+
- If you notice unrelated dead code, mention it — don't delete it.
|
|
292
|
+
|
|
293
|
+
When your changes create orphans:
|
|
294
|
+
- Remove imports/variables/functions that YOUR changes made unused.
|
|
295
|
+
- Don't remove pre-existing dead code unless asked.
|
|
296
|
+
|
|
297
|
+
The test: Every changed line should trace directly to the user's request.
|
|
298
|
+
|
|
299
|
+
### 4. Goal-Driven Execution
|
|
300
|
+
|
|
301
|
+
**Define success criteria. Loop until verified.**
|
|
302
|
+
|
|
303
|
+
Transform tasks into verifiable goals:
|
|
304
|
+
- "Add validation" → "Write tests for invalid inputs, then make them pass"
|
|
305
|
+
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
|
|
306
|
+
- "Refactor X" → "Ensure tests pass before and after"
|
|
246
307
|
|
|
247
|
-
For
|
|
308
|
+
For multi-step tasks, state a brief plan:
|
|
309
|
+
\`\`\`
|
|
310
|
+
1. [Step] → verify: [check]
|
|
311
|
+
2. [Step] → verify: [check]
|
|
312
|
+
3. [Step] → verify: [check]
|
|
313
|
+
\`\`\`
|
|
314
|
+
|
|
315
|
+
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
|
|
248
316
|
|
|
249
|
-
|
|
250
|
-
1. Read existing code patterns in the area you're changing
|
|
251
|
-
2. Design your approach (outline, pseudo-code, or mental model) before writing code
|
|
252
|
-
3. Check: does your design match existing conventions? Use \`search\` for patterns
|
|
253
|
-
4. Implement
|
|
254
|
-
5. Verify: \`check\` + \`test_run\`
|
|
317
|
+
### 5. Quality Dimensions
|
|
255
318
|
|
|
256
|
-
|
|
319
|
+
Verify each before returning handoff:
|
|
257
320
|
|
|
258
321
|
| Dimension | Check |
|
|
259
322
|
|-----------|-------|
|
|
@@ -263,10 +326,14 @@ For non-trivial tasks, **think before you implement**.
|
|
|
263
326
|
| **Robustness** | Handles edge cases? No obvious failure modes? |
|
|
264
327
|
| **Maintainability** | Clear naming? Minimal complexity? Would another developer understand it? |
|
|
265
328
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
329
|
+
### 6. Test-Driven Development
|
|
330
|
+
|
|
331
|
+
**Vertical slices, NOT horizontal layers.**
|
|
332
|
+
|
|
333
|
+
- Write ONE test → make it pass → repeat. Never write a batch of tests then implement all at once.
|
|
334
|
+
- **Tracer bullet first** — get one thin slice working end-to-end before broadening. Proves architecture before investing in breadth.
|
|
335
|
+
- Tests verify **behavior through public interfaces**, not implementation details. If refactoring internals breaks tests, those tests are wrong.
|
|
336
|
+
- When adding a feature: write the test for the simplest case FIRST, get green, then add the next case.
|
|
270
337
|
|
|
271
338
|
---
|
|
272
339
|
|
|
@@ -309,30 +376,63 @@ Always return this structure when invoked as a sub-agent:
|
|
|
309
376
|
\`\`\`
|
|
310
377
|
`,"researcher-base":`# Researcher — Shared Base Instructions
|
|
311
378
|
|
|
312
|
-
> Shared methodology
|
|
379
|
+
> Shared methodology
|
|
380
|
+
for all Researcher variants. Each variant
|
|
381
|
+
's definition contains only its unique identity and model assignment. **Do not duplicate.**
|
|
313
382
|
|
|
314
383
|
|
|
315
384
|
## MANDATORY FIRST ACTION
|
|
316
385
|
|
|
317
386
|
Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code-agent-base:
|
|
318
|
-
1. Run \`status(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
387
|
+
1. Run \`status(
|
|
388
|
+
{
|
|
389
|
+
}
|
|
390
|
+
)\` — check Onboard Status and note the **Onboard Directory** path
|
|
391
|
+
2. If onboard shows ❌ → Run \`onboard(
|
|
392
|
+
{
|
|
393
|
+
path: '.';
|
|
394
|
+
}
|
|
395
|
+
)\` and wait
|
|
396
|
+
for completion
|
|
397
|
+
3. If onboard
|
|
398
|
+
shows;
|
|
399
|
+
✅ → Read relevant onboard artifacts
|
|
400
|
+
using;
|
|
401
|
+
\`compact(
|
|
402
|
+
{
|
|
403
|
+
path: '<Onboard Directory>/<file>';
|
|
404
|
+
}
|
|
405
|
+
)\` before exploring
|
|
406
|
+
|
|
407
|
+
**Start
|
|
408
|
+
with pre-analyzed artifacts.** They
|
|
409
|
+
cover;
|
|
410
|
+
80 % +of;
|
|
411
|
+
common;
|
|
412
|
+
research;
|
|
413
|
+
needs.
|
|
323
414
|
|
|
324
415
|
---
|
|
325
416
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
417
|
+
#
|
|
418
|
+
#
|
|
419
|
+
Research;
|
|
420
|
+
Methodology;
|
|
421
|
+
|
|
422
|
+
#
|
|
423
|
+
#
|
|
424
|
+
#
|
|
425
|
+
Phase;
|
|
426
|
+
1;
|
|
427
|
+
: AI Kit Recall (BLOCKING)
|
|
329
428
|
\`\`\`
|
|
330
429
|
search("task keywords")
|
|
331
430
|
scope_map("what you need to investigate")
|
|
332
431
|
\`\`\`
|
|
333
432
|
|
|
334
433
|
### Phase 2: Exploration
|
|
335
|
-
- Use \`graph\`, \`symbol\`, \`trace\`, \`find\`
|
|
434
|
+
- Use \`graph\`, \`symbol\`, \`trace\`, \`find\`
|
|
435
|
+
for code exploration (graph FIRST for module relationships)
|
|
336
436
|
- Use \`graph({ action: 'neighbors' })\` to understand cross-module dependencies before diving into symbol details
|
|
337
437
|
- Use \`file_summary\`, \`compact\` for efficient file reading
|
|
338
438
|
- Use \`analyze_structure\`, \`analyze_dependencies\` for package-level understanding
|
|
@@ -422,52 +522,127 @@ For questions that require trying approach A vs approach B in isolation:
|
|
|
422
522
|
6. Include the diff summary in your output; do NOT merge lanes back (read-only role)
|
|
423
523
|
`,"code-reviewer-base":`# Code-Reviewer — Shared Base Instructions
|
|
424
524
|
|
|
425
|
-
> Shared methodology
|
|
525
|
+
> Shared methodology
|
|
526
|
+
for all Code-Reviewer variants. Each variant
|
|
527
|
+
's definition contains only identity and model. **Do not duplicate.**
|
|
426
528
|
|
|
427
529
|
|
|
428
530
|
## MANDATORY FIRST ACTION
|
|
429
531
|
|
|
430
532
|
Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code-agent-base:
|
|
431
|
-
1. Run \`status(
|
|
432
|
-
|
|
433
|
-
|
|
533
|
+
1. Run \`status(
|
|
534
|
+
{
|
|
535
|
+
}
|
|
536
|
+
)\` — check Onboard Status and note the **Onboard Directory** path
|
|
537
|
+
2. If onboard shows ❌ → Run \`onboard(
|
|
538
|
+
{
|
|
539
|
+
path: '.';
|
|
540
|
+
}
|
|
541
|
+
)\` and wait
|
|
542
|
+
for completion
|
|
543
|
+
3. If onboard
|
|
544
|
+
shows;
|
|
545
|
+
✅ → Read relevant onboard artifacts
|
|
546
|
+
using;
|
|
547
|
+
\`compact(
|
|
548
|
+
{
|
|
549
|
+
path: '<Onboard Directory>/<file>';
|
|
550
|
+
}
|
|
551
|
+
)\` — especially \`patterns.md\` and \`api-surface.md\`
|
|
552
|
+
for review context
|
|
434
553
|
|
|
435
554
|
---
|
|
436
555
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
556
|
+
#
|
|
557
|
+
#
|
|
558
|
+
Review;
|
|
559
|
+
Workflow;
|
|
560
|
+
|
|
561
|
+
1 ** AI;
|
|
562
|
+
Kit;
|
|
563
|
+
Recall** —
|
|
564
|
+
\`search("conventions relevant-area")\` + \`list()\`
|
|
565
|
+
for past review findings, patterns
|
|
566
|
+
2. **Blast
|
|
567
|
+
Radius** —
|
|
568
|
+
\`blast_radius\` on changed files to understand impact
|
|
441
569
|
3. **FORGE Classify** — \`forge_classify\` to determine review depth
|
|
442
570
|
4. **Review** — Evaluate against all dimensions below
|
|
443
571
|
5. **Validate** — Run \`check\` (typecheck + lint) and \`test_run\`
|
|
444
|
-
6. **Report** — Structured findings
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
572
|
+
6. **Report** — Structured findings
|
|
573
|
+
with verdict
|
|
574
|
+
7. **Persist** —
|
|
575
|
+
\`remember(
|
|
576
|
+
{
|
|
577
|
+
title: 'Review: <finding>', content;
|
|
578
|
+
: "<details>", category: "patterns"
|
|
579
|
+
}
|
|
580
|
+
)\`
|
|
581
|
+
for any new patterns, anti-patterns, or recurring issues
|
|
582
|
+
found;
|
|
583
|
+
|
|
584
|
+
#
|
|
585
|
+
#
|
|
586
|
+
Review;
|
|
587
|
+
Dimensions | Dimension | What;
|
|
588
|
+
to;
|
|
589
|
+
Check |
|
|
450
590
|
|-----------|---------------|
|
|
451
|
-
| **Correctness** | Logic
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
| **
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
591
|
+
| **Correctness** | Logic
|
|
592
|
+
errors, off - by - one, null;
|
|
593
|
+
handling, async/await |
|
|
594
|
+
| **Security** | OWASP
|
|
595
|
+
Top;
|
|
596
|
+
10, input;
|
|
597
|
+
validation, secrets;
|
|
598
|
+
exposure |
|
|
599
|
+
| **Performance** | N+1
|
|
600
|
+
queries, unnecessary;
|
|
601
|
+
allocations, missing;
|
|
602
|
+
caching |
|
|
603
|
+
| **Maintainability** | Naming, complexity, DRY, single
|
|
604
|
+
responsibility |
|
|
605
|
+
| **Testing** | Coverage
|
|
606
|
+
for new/changed logic, edge cases |
|
|
607
|
+
| **Patterns** | Consistency with existing codebase
|
|
608
|
+
conventions |
|
|
609
|
+
| **Types** | Proper
|
|
610
|
+
typing, no;
|
|
611
|
+
\`any\`, generics where useful |
|
|
458
612
|
|
|
459
613
|
## Output Format
|
|
460
614
|
|
|
461
615
|
\`\`\`markdown
|
|
462
|
-
## Code Review:
|
|
616
|
+
## Code Review:
|
|
617
|
+
{
|
|
618
|
+
scope;
|
|
619
|
+
}
|
|
463
620
|
**Verdict: APPROVED | NEEDS_REVISION | FAILED**
|
|
464
|
-
**Severity:
|
|
621
|
+
**Severity:
|
|
622
|
+
{
|
|
623
|
+
count;
|
|
624
|
+
by;
|
|
625
|
+
level;
|
|
626
|
+
}
|
|
627
|
+
**
|
|
465
628
|
|
|
466
629
|
### Findings
|
|
467
|
-
1. **[SEVERITY]**
|
|
630
|
+
1. **[SEVERITY]**
|
|
631
|
+
{
|
|
632
|
+
file;
|
|
633
|
+
}
|
|
634
|
+
:
|
|
635
|
+
{
|
|
636
|
+
line;
|
|
637
|
+
}
|
|
638
|
+
— Description and fix
|
|
468
639
|
|
|
469
640
|
### Summary
|
|
470
|
-
{
|
|
641
|
+
{
|
|
642
|
+
Overall;
|
|
643
|
+
assessment, key;
|
|
644
|
+
concerns;
|
|
645
|
+
}
|
|
471
646
|
\`\`\`
|
|
472
647
|
|
|
473
648
|
## Severity Levels
|
|
@@ -480,19 +655,33 @@ Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code
|
|
|
480
655
|
## Rules
|
|
481
656
|
|
|
482
657
|
- **APPROVED** requires zero CRITICAL/HIGH findings
|
|
483
|
-
- **NEEDS_REVISION**
|
|
658
|
+
- **NEEDS_REVISION**
|
|
659
|
+
for any HIGH finding
|
|
484
660
|
- **FAILED** for any CRITICAL finding
|
|
485
|
-
- Always check
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
661
|
+
- Always check
|
|
662
|
+
for **test coverage** on new/changed code
|
|
663
|
+
|
|
664
|
+
#
|
|
665
|
+
#
|
|
666
|
+
Evidence;
|
|
667
|
+
Citation;
|
|
668
|
+
Protocol(tier - aware);
|
|
669
|
+
|
|
670
|
+
The;
|
|
671
|
+
Orchestrator;
|
|
672
|
+
runs;
|
|
673
|
+
\`forge_classify\` before dispatching you, and runs the final
|
|
674
|
+
\`evidence_map(
|
|
675
|
+
{
|
|
676
|
+
action: 'gate', task_id;
|
|
677
|
+
}
|
|
678
|
+
)\` after you respond. **Do not create your own
|
|
491
679
|
task_id or run the gate** — feed into the Orchestrator's existing evidence map.
|
|
492
680
|
|
|
493
681
|
| Tier | Your responsibility |
|
|
494
682
|
|------|---------------------|
|
|
495
|
-
| Floor | Free-form findings
|
|
683
|
+
| Floor | Free-form findings
|
|
684
|
+
with \`file.ts#Lxx\` citations. No \`evidence_map\` calls required. |
|
|
496
685
|
| 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. |
|
|
497
686
|
| 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'\`. |
|
|
498
687
|
|
|
@@ -508,55 +697,134 @@ Do NOT:
|
|
|
508
697
|
- Duplicate findings into the map that weren't CRITICAL/HIGH
|
|
509
698
|
`,"architect-reviewer-base":`# Architect-Reviewer — Shared Base Instructions
|
|
510
699
|
|
|
511
|
-
> Shared methodology
|
|
700
|
+
> Shared methodology
|
|
701
|
+
for all Architect-Reviewer variants. Each variant
|
|
702
|
+
's definition contains only identity and model. **Do not duplicate.**
|
|
512
703
|
|
|
513
704
|
|
|
514
705
|
## MANDATORY FIRST ACTION
|
|
515
706
|
|
|
516
707
|
Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code-agent-base:
|
|
517
|
-
1. Run \`status(
|
|
518
|
-
|
|
519
|
-
|
|
708
|
+
1. Run \`status(
|
|
709
|
+
{
|
|
710
|
+
}
|
|
711
|
+
)\` — check Onboard Status and note the **Onboard Directory** path
|
|
712
|
+
2. If onboard shows ❌ → Run \`onboard(
|
|
713
|
+
{
|
|
714
|
+
path: '.';
|
|
715
|
+
}
|
|
716
|
+
)\` and wait
|
|
717
|
+
for completion
|
|
718
|
+
3. If onboard
|
|
719
|
+
shows;
|
|
720
|
+
✅ → Read relevant onboard artifacts
|
|
721
|
+
using;
|
|
722
|
+
\`compact(
|
|
723
|
+
{
|
|
724
|
+
path: '<Onboard Directory>/<file>';
|
|
725
|
+
}
|
|
726
|
+
)\` — especially \`structure.md\`, \`dependencies.md\`, and \`diagram.md\`
|
|
727
|
+
for architecture context
|
|
520
728
|
|
|
521
729
|
---
|
|
522
730
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
731
|
+
#
|
|
732
|
+
#
|
|
733
|
+
Review;
|
|
734
|
+
Workflow;
|
|
735
|
+
|
|
736
|
+
1 ** AI;
|
|
737
|
+
Kit;
|
|
738
|
+
Recall** —
|
|
739
|
+
\`search("architecture decisions boundaries")\` + \`list()\`
|
|
740
|
+
for past ADRs, patterns
|
|
741
|
+
2. **Analyze** —
|
|
742
|
+
\`analyze_structure\`, \`analyze_dependencies\`, \`blast_radius\`
|
|
527
743
|
3. **Evaluate** — Check all dimensions below
|
|
528
|
-
4. **Report** — Structured findings
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
744
|
+
4. **Report** — Structured findings
|
|
745
|
+
with verdict
|
|
746
|
+
5. **Persist** —
|
|
747
|
+
\`remember(
|
|
748
|
+
{
|
|
749
|
+
title: 'Architecture: <finding>', content;
|
|
750
|
+
: "<details>", category: "decisions"
|
|
751
|
+
}
|
|
752
|
+
)\`
|
|
753
|
+
for any structural findings, boundary violations, or
|
|
754
|
+
design;
|
|
755
|
+
insights;
|
|
756
|
+
|
|
757
|
+
#
|
|
758
|
+
#
|
|
759
|
+
Review;
|
|
760
|
+
Dimensions | Dimension | What;
|
|
761
|
+
to;
|
|
762
|
+
Check |
|
|
534
763
|
|-----------|---------------|
|
|
535
|
-
| **Dependency
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
| **
|
|
764
|
+
| **Dependency
|
|
765
|
+
Direction** | Dependencies
|
|
766
|
+
flow;
|
|
767
|
+
inward (domain ← services ← infra) |
|
|
768
|
+
| **Boundary
|
|
769
|
+
Respect** | No
|
|
770
|
+
cross - cutting;
|
|
771
|
+
between;
|
|
772
|
+
unrelated;
|
|
773
|
+
packages |
|
|
774
|
+
| **SOLID
|
|
775
|
+
Compliance** | Single
|
|
776
|
+
responsibility, dependency;
|
|
777
|
+
inversion |
|
|
778
|
+
| **Pattern
|
|
779
|
+
Adherence** | Consistent
|
|
780
|
+
with established patterns in codebase |
|
|
781
|
+
| **Interface
|
|
782
|
+
Stability** | Public
|
|
783
|
+
APIs;
|
|
784
|
+
don;
|
|
785
|
+
't break existing consumers |
|
|
540
786
|
| **Scalability** | Design handles growth (more data, more users, more features) |
|
|
541
787
|
| **Testability** | Dependencies injectable, side effects isolated |
|
|
542
788
|
|
|
543
789
|
## Output Format
|
|
544
790
|
|
|
545
791
|
\`\`\`markdown
|
|
546
|
-
## Architecture Review:
|
|
792
|
+
## Architecture Review:
|
|
793
|
+
{
|
|
794
|
+
scope;
|
|
795
|
+
}
|
|
547
796
|
**Verdict: APPROVED | NEEDS_CHANGES | BLOCKED**
|
|
548
797
|
|
|
549
798
|
### Boundary Analysis
|
|
550
|
-
{
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
799
|
+
{
|
|
800
|
+
dependency;
|
|
801
|
+
direction, package;
|
|
802
|
+
boundaries;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
#
|
|
806
|
+
#
|
|
807
|
+
#
|
|
808
|
+
Pattern;
|
|
809
|
+
Compliance;
|
|
810
|
+
{
|
|
811
|
+
consistency;
|
|
812
|
+
with existing patterns
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
#
|
|
816
|
+
#
|
|
817
|
+
#
|
|
818
|
+
Findings;
|
|
819
|
+
1 ** ([SEVERITY] ** { description });
|
|
820
|
+
— Impact and recommendation
|
|
557
821
|
|
|
558
822
|
### Summary
|
|
559
|
-
{
|
|
823
|
+
{
|
|
824
|
+
Overall;
|
|
825
|
+
structural;
|
|
826
|
+
assessment;
|
|
827
|
+
}
|
|
560
828
|
\`\`\`
|
|
561
829
|
|
|
562
830
|
## Rules
|
|
@@ -569,12 +837,17 @@ Follow the **MANDATORY FIRST ACTION** and **Information Lookup Order** from code
|
|
|
569
837
|
## Evidence Citation Protocol (tier-aware)
|
|
570
838
|
|
|
571
839
|
The Orchestrator runs \`forge_classify\` before dispatching you, and runs the final
|
|
572
|
-
\`evidence_map(
|
|
840
|
+
\`evidence_map(
|
|
841
|
+
{
|
|
842
|
+
action: 'gate', task_id;
|
|
843
|
+
}
|
|
844
|
+
)\` after you respond. **Do not create your own
|
|
573
845
|
task_id or run the gate** — feed into the Orchestrator's existing evidence map.
|
|
574
846
|
|
|
575
847
|
| Tier | Your responsibility |
|
|
576
848
|
|------|---------------------|
|
|
577
|
-
| Floor | Free-form findings
|
|
849
|
+
| Floor | Free-form findings
|
|
850
|
+
with \`file.ts#Lxx\` citations. No \`evidence_map\` calls required. |
|
|
578
851
|
| 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. |
|
|
579
852
|
| 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'\`. |
|
|
580
853
|
|
|
@@ -617,7 +890,16 @@ The Orchestrator uses **multi-model decision analysis** to resolve non-trivial t
|
|
|
617
890
|
|
|
618
891
|
### Phase 1 — Independent Research (parallel)
|
|
619
892
|
|
|
620
|
-
Launch ALL available Researcher variants **in parallel**
|
|
893
|
+
Launch ALL available Researcher variants **in parallel**
|
|
894
|
+
with the same
|
|
895
|
+
question.Each;
|
|
896
|
+
returns;
|
|
897
|
+
an;
|
|
898
|
+
independent;
|
|
899
|
+
recommendation;
|
|
900
|
+
grounded in their;
|
|
901
|
+
thinking;
|
|
902
|
+
style:
|
|
621
903
|
|
|
622
904
|
| Variant | Thinking Style | Lens |
|
|
623
905
|
|---------|---------------|------|
|
|
@@ -628,7 +910,18 @@ Launch ALL available Researcher variants **in parallel** with the same question.
|
|
|
628
910
|
|
|
629
911
|
### Phase 2 — Peer Review (parallel)
|
|
630
912
|
|
|
631
|
-
After all researchers
|
|
913
|
+
After all researchers
|
|
914
|
+
return, **anonymize** their
|
|
915
|
+
responses as Perspective
|
|
916
|
+
A / B / C / D (strip agent names). Then
|
|
917
|
+
launch;
|
|
918
|
+
a ** second;
|
|
919
|
+
parallel;
|
|
920
|
+
batch ** of;
|
|
921
|
+
4;
|
|
922
|
+
review;
|
|
923
|
+
sub - agents;
|
|
924
|
+
:
|
|
632
925
|
|
|
633
926
|
**Peer Review Prompt Template:**
|
|
634
927
|
\`\`\`
|
|
@@ -638,14 +931,11 @@ Each perspective was produced independently — they have NOT seen each other's
|
|
|
638
931
|
[Perspective A]
|
|
639
932
|
{Alpha's full response}
|
|
640
933
|
|
|
641
|
-
[Perspective B]
|
|
642
|
-
{Beta's full response}
|
|
934
|
+
[Perspective B]Beta's full response}
|
|
643
935
|
|
|
644
|
-
[Perspective C]
|
|
645
|
-
{Gamma's full response}
|
|
936
|
+
[Perspective C]Gamma's full response}
|
|
646
937
|
|
|
647
|
-
[Perspective D]
|
|
648
|
-
{Delta's full response}
|
|
938
|
+
[Perspective D]Delta's full response}
|
|
649
939
|
|
|
650
940
|
Evaluate ALL perspectives. Your review MUST include:
|
|
651
941
|
1. **Strongest argument** — which perspective and why (cite specific evidence)
|
|
@@ -663,28 +953,23 @@ The Orchestrator synthesizes BOTH layers (original research + peer reviews) into
|
|
|
663
953
|
**Verdict Format (MANDATORY):**
|
|
664
954
|
|
|
665
955
|
\`\`\`markdown
|
|
666
|
-
## Decision Verdict:
|
|
956
|
+
## Decision Verdict: title
|
|
667
957
|
|
|
668
|
-
### Where They
|
|
669
|
-
{Points of consensus across researchers — high confidence items}
|
|
958
|
+
### Where They AgreePoints of consensus across researchers — high confidence items
|
|
670
959
|
|
|
671
|
-
### Where They
|
|
672
|
-
{Key disagreements with the strongest argument for each side}
|
|
960
|
+
### Where They ClashKey disagreements with the strongest argument for each side
|
|
673
961
|
|
|
674
|
-
### Blind Spots Caught (by peer review)
|
|
675
|
-
{Issues found in Phase 2 that no researcher identified in Phase 1}
|
|
962
|
+
### Blind Spots Caught (by peer review)Issues found in Phase 2 that no researcher identified in Phase 1
|
|
676
963
|
|
|
677
|
-
###
|
|
678
|
-
{The chosen approach — may combine elements from multiple perspectives}
|
|
964
|
+
### RecommendationThe chosen approach — may combine elements from multiple perspectives
|
|
679
965
|
**Confidence:** HIGH / MEDIUM / LOW
|
|
680
|
-
**Rationale:**
|
|
966
|
+
**Rationale:** one paragraph
|
|
681
967
|
|
|
682
|
-
### First
|
|
683
|
-
{The single most concrete next action to begin implementation}
|
|
968
|
+
### First StepThe single most concrete next action to begin implementation
|
|
684
969
|
\`\`\`
|
|
685
970
|
|
|
686
971
|
Then:
|
|
687
|
-
1. **Present** the verdict using \`present(
|
|
972
|
+
1. **Present** the verdict using \`present(format: "html" )\` with comparison blocks
|
|
688
973
|
2. **Produce an ADR** via the \`adr-skill\`
|
|
689
974
|
3. **\`remember\`** the decision for future recall
|
|
690
975
|
|