@llblab/pi-actors 0.46.1 → 0.48.0

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.
Files changed (54) hide show
  1. package/AGENTS.md +7 -5
  2. package/BACKLOG.md +0 -582
  3. package/CHANGELOG.md +16 -0
  4. package/README.md +8 -1
  5. package/banner.jpg +0 -0
  6. package/dist/lib/prompts.d.ts +6 -5
  7. package/dist/lib/prompts.js +22 -23
  8. package/dist/lib/recipes-discovery.d.ts +4 -0
  9. package/dist/lib/recipes-discovery.js +13 -1
  10. package/dist/lib/recipes-references.js +10 -6
  11. package/dist/lib/registry.d.ts +15 -11
  12. package/dist/lib/registry.js +195 -25
  13. package/dist/lib/runtime.js +37 -2
  14. package/dist/lib/tools-inspect.js +156 -12
  15. package/dist/lib/tools-register.js +2 -1
  16. package/dist/lib/tools-response.js +5 -1
  17. package/dist/scripts/conformance.mjs +1 -0
  18. package/dist/skills/actors/SKILL.md +87 -65
  19. package/dist/skills/actors/references/diagnostics.md +44 -0
  20. package/dist/skills/actors/references/persistent-tools.md +74 -0
  21. package/dist/skills/actors/references/recipes.md +51 -0
  22. package/dist/skills/actors/references/runs.md +39 -0
  23. package/dist/skills/artifacts/SKILL.md +24 -7
  24. package/dist/skills/media/SKILL.md +35 -7
  25. package/dist/skills/project-work/SKILL.md +28 -7
  26. package/dist/skills/recipe-memory/SKILL.md +27 -7
  27. package/dist/skills/swarm/SKILL.md +56 -437
  28. package/dist/skills/swarm/references/development-swarm.md +118 -525
  29. package/dist/skills/swarm/references/review-swarms.md +115 -0
  30. package/docs/README.md +5 -5
  31. package/docs/recipe-library.md +15 -10
  32. package/docs/tool-registry.md +10 -4
  33. package/lib/prompts.ts +24 -24
  34. package/lib/recipes-discovery.ts +22 -1
  35. package/lib/recipes-references.ts +14 -6
  36. package/lib/registry.ts +288 -51
  37. package/lib/runtime.ts +41 -2
  38. package/lib/tools-inspect.ts +202 -10
  39. package/lib/tools-register.ts +4 -3
  40. package/lib/tools-response.ts +5 -1
  41. package/package.json +1 -1
  42. package/scripts/conformance.mjs +1 -0
  43. package/skills/actors/SKILL.md +87 -65
  44. package/skills/actors/references/diagnostics.md +44 -0
  45. package/skills/actors/references/persistent-tools.md +74 -0
  46. package/skills/actors/references/recipes.md +51 -0
  47. package/skills/actors/references/runs.md +39 -0
  48. package/skills/artifacts/SKILL.md +24 -7
  49. package/skills/media/SKILL.md +35 -7
  50. package/skills/project-work/SKILL.md +28 -7
  51. package/skills/recipe-memory/SKILL.md +27 -7
  52. package/skills/swarm/SKILL.md +56 -437
  53. package/skills/swarm/references/development-swarm.md +118 -525
  54. package/skills/swarm/references/review-swarms.md +115 -0
@@ -0,0 +1,115 @@
1
+ # Review Swarms
2
+
3
+ Use this reference for independent review, delegated audit, research synthesis, quorum judgement, and post-merge review. Generic actor execution remains owned by `actors`.
4
+
5
+ ## Select breadth or confidence
6
+
7
+ ```text
8
+ Different lenses on one target → breadth → lens swarm
9
+ Same exact claim, independent judges → confidence → quorum
10
+ Important lenses each need repeated judges → breadth + confidence → lens swarms of quorums
11
+ ```
12
+
13
+ Use the smallest shape that covers the decision risk. A lens swarm of quorums is reserved for high-impact security, financial, governance, migration, or release decisions.
14
+
15
+ Primary Recipes:
16
+
17
+ - `swarm/lens-review` for parallel risk lenses plus verification, merge, judge, and normalized result;
18
+ - `swarm/quorum-review` for one prompt judged independently by explicitly selected models;
19
+ - `swarm/research-synthesis` for plan, evidence map, contradictions, verification, and risk-first synthesis;
20
+ - `swarm/architect` for competing directions and one validated smallest next slice;
21
+ - `swarm/review-readiness` for a multi-lens ship/readiness verdict.
22
+
23
+ ## Lens selection
24
+
25
+ Choose lenses from plausible failure modes, not from a fixed catalog. Common software lenses include correctness, architecture, security, tests, concurrency, data integrity, performance, operator UX, accessibility, maintainability, documentation, and release risk.
26
+
27
+ A good lens assignment states:
28
+
29
+ ```markdown
30
+ Target:
31
+ Question or claim:
32
+ Lens:
33
+ Evidence required:
34
+ Out of scope:
35
+ Severity rule:
36
+ Output shape:
37
+ Stop condition:
38
+ ```
39
+
40
+ Do not ask every reviewer to cover everything. Keep reviewers independent until synthesis so one early narrative does not contaminate all findings.
41
+
42
+ ## Quorum design
43
+
44
+ A quorum keeps the target, claim, evidence standard, and output shape constant while varying independent judges. Before fanout:
45
+
46
+ 1. define the exact decision claim;
47
+ 2. define what counts as supporting and contradicting evidence;
48
+ 3. select the minimum successful threshold;
49
+ 4. choose concurrency and timeout bounds;
50
+ 5. preflight model and tool availability;
51
+ 6. define how partial results affect status.
52
+
53
+ Provider or model failure reduces available evidence; it is not a vote. When evidence falls below threshold, mark the result degraded or insufficient data.
54
+
55
+ ## Research evidence
56
+
57
+ Research participants separate source discovery, verification, contradiction mapping, and synthesis when stakes justify it.
58
+
59
+ - Every material claim traces to a source note, inspected artifact, or explicit uncertainty.
60
+ - Source quality and confidence remain visible.
61
+ - Contradictory evidence is first-class output.
62
+ - Missing source classes block overconfident synthesis.
63
+ - Unsafe or unverifiable evidence is excluded with a reason.
64
+
65
+ Do not turn a research swarm into an automatic publication pipeline. Stop at the caller's evidence and decision boundary.
66
+
67
+ ## Merge protocol
68
+
69
+ A merger is a synthesis participant, not a formatter. It may deduplicate, rank, connect evidence, and add a grounded `merger finding`, but it may not fabricate support.
70
+
71
+ For serious quorum work, use a clean-context merger. The merger receives all retained participant outputs and must produce:
72
+
73
+ - status: complete, degraded, or insufficient data;
74
+ - consensus findings and vote shape where applicable;
75
+ - minority high-impact findings;
76
+ - contradictions and unresolved evidence gaps;
77
+ - merger findings, clearly labeled;
78
+ - confidence and limitations;
79
+ - ordered next actions.
80
+
81
+ Keep raw participant outputs until the merged result is accepted. Preserve attribution for major findings. Never promote repeated low-value observations merely because they are numerous, and never discard a severe evidence-backed minority finding merely because it is unique.
82
+
83
+ ## Conflict and disagreement
84
+
85
+ Disagreement can mean different assumptions, different evidence, ambiguous criteria, or real uncertainty. The merger records:
86
+
87
+ ```markdown
88
+ Finding:
89
+ Supporting participants and evidence:
90
+ Contradicting participants and evidence:
91
+ Assumption difference:
92
+ Impact if minority view is correct:
93
+ Resolution status:
94
+ Next evidence needed:
95
+ ```
96
+
97
+ Resolve only when evidence supports resolution. Otherwise preserve the disagreement and lower confidence.
98
+
99
+ ## Post-merge review
100
+
101
+ Use a fresh reviewer when the merged result will drive consequential implementation or decisions. The post-merge reviewer checks the report, not the original target by default:
102
+
103
+ - evidence traceability;
104
+ - honest severity;
105
+ - correct quorum accounting;
106
+ - preserved minority findings;
107
+ - unsupported merger narrative;
108
+ - actionable next steps;
109
+ - retained uncertainty and contradictions.
110
+
111
+ Possible decisions are accept, accept with notes, revise merge, rerun bounded quorum, or escalate. Rerun only when the raw evidence or scope is genuinely insufficient, not because the verdict is inconvenient.
112
+
113
+ ## Completion and stop rules
114
+
115
+ A review swarm is complete only when requested evidence is retained, threshold status is explicit, synthesis preserves dissent, and the coordinator can state the safe decision or next evidence slice. Stop when the claim is ambiguous, target changes during review, preflight fails, evidence is not inspectable, threshold cannot be met, or merger independence required by the stakes is unavailable.