@lanjak/council 0.0.0-stage → 0.5.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 (108) hide show
  1. package/README.md +512 -2
  2. package/dist/artifacts.d.ts +24 -0
  3. package/dist/artifacts.js +227 -0
  4. package/dist/artifacts.js.map +1 -0
  5. package/dist/blocks.d.ts +12 -0
  6. package/dist/blocks.js +197 -0
  7. package/dist/blocks.js.map +1 -0
  8. package/dist/chairman.d.ts +7 -0
  9. package/dist/chairman.js +51 -0
  10. package/dist/chairman.js.map +1 -0
  11. package/dist/cli.d.ts +2 -0
  12. package/dist/cli.js +109 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/commands/debate.d.ts +15 -0
  15. package/dist/commands/debate.js +172 -0
  16. package/dist/commands/debate.js.map +1 -0
  17. package/dist/commands/home.d.ts +1 -0
  18. package/dist/commands/home.js +27 -0
  19. package/dist/commands/home.js.map +1 -0
  20. package/dist/commands/hook.d.ts +3 -0
  21. package/dist/commands/hook.js +138 -0
  22. package/dist/commands/hook.js.map +1 -0
  23. package/dist/commands/plan.d.ts +6 -0
  24. package/dist/commands/plan.js +23 -0
  25. package/dist/commands/plan.js.map +1 -0
  26. package/dist/commands/review.d.ts +18 -0
  27. package/dist/commands/review.js +37 -0
  28. package/dist/commands/review.js.map +1 -0
  29. package/dist/commands/setup.d.ts +1 -0
  30. package/dist/commands/setup.js +23 -0
  31. package/dist/commands/setup.js.map +1 -0
  32. package/dist/config.d.ts +17 -0
  33. package/dist/config.js +101 -0
  34. package/dist/config.js.map +1 -0
  35. package/dist/council.d.ts +3 -0
  36. package/dist/council.js +61 -0
  37. package/dist/council.js.map +1 -0
  38. package/dist/debate/loop.d.ts +28 -0
  39. package/dist/debate/loop.js +188 -0
  40. package/dist/debate/loop.js.map +1 -0
  41. package/dist/debate/prompts.d.ts +10 -0
  42. package/dist/debate/prompts.js +47 -0
  43. package/dist/debate/prompts.js.map +1 -0
  44. package/dist/debate/render.d.ts +22 -0
  45. package/dist/debate/render.js +112 -0
  46. package/dist/debate/render.js.map +1 -0
  47. package/dist/debate/session.d.ts +7 -0
  48. package/dist/debate/session.js +85 -0
  49. package/dist/debate/session.js.map +1 -0
  50. package/dist/errors.d.ts +5 -0
  51. package/dist/errors.js +18 -0
  52. package/dist/errors.js.map +1 -0
  53. package/dist/exit.d.ts +7 -0
  54. package/dist/exit.js +13 -0
  55. package/dist/exit.js.map +1 -0
  56. package/dist/hooks/gate.d.ts +12 -0
  57. package/dist/hooks/gate.js +41 -0
  58. package/dist/hooks/gate.js.map +1 -0
  59. package/dist/hooks/payload.d.ts +8 -0
  60. package/dist/hooks/payload.js +63 -0
  61. package/dist/hooks/payload.js.map +1 -0
  62. package/dist/hooks/state.d.ts +6 -0
  63. package/dist/hooks/state.js +73 -0
  64. package/dist/hooks/state.js.map +1 -0
  65. package/dist/index.d.ts +16 -0
  66. package/dist/index.js +16 -0
  67. package/dist/index.js.map +1 -0
  68. package/dist/input.d.ts +14 -0
  69. package/dist/input.js +30 -0
  70. package/dist/input.js.map +1 -0
  71. package/dist/output.d.ts +3 -0
  72. package/dist/output.js +80 -0
  73. package/dist/output.js.map +1 -0
  74. package/dist/prompts.d.ts +3 -0
  75. package/dist/prompts.js +48 -0
  76. package/dist/prompts.js.map +1 -0
  77. package/dist/providers/anthropic.d.ts +12 -0
  78. package/dist/providers/anthropic.js +98 -0
  79. package/dist/providers/anthropic.js.map +1 -0
  80. package/dist/providers/base.d.ts +35 -0
  81. package/dist/providers/base.js +7 -0
  82. package/dist/providers/base.js.map +1 -0
  83. package/dist/providers/constants.d.ts +2 -0
  84. package/dist/providers/constants.js +11 -0
  85. package/dist/providers/constants.js.map +1 -0
  86. package/dist/providers/index.d.ts +6 -0
  87. package/dist/providers/index.js +20 -0
  88. package/dist/providers/index.js.map +1 -0
  89. package/dist/providers/openai-compatible.d.ts +12 -0
  90. package/dist/providers/openai-compatible.js +68 -0
  91. package/dist/providers/openai-compatible.js.map +1 -0
  92. package/dist/runners/plan.d.ts +14 -0
  93. package/dist/runners/plan.js +43 -0
  94. package/dist/runners/plan.js.map +1 -0
  95. package/dist/runners/review.d.ts +14 -0
  96. package/dist/runners/review.js +45 -0
  97. package/dist/runners/review.js.map +1 -0
  98. package/dist/stdin.d.ts +9 -0
  99. package/dist/stdin.js +51 -0
  100. package/dist/stdin.js.map +1 -0
  101. package/dist/types.d.ts +114 -0
  102. package/dist/types.js +2 -0
  103. package/dist/types.js.map +1 -0
  104. package/dist/verdict.d.ts +2 -0
  105. package/dist/verdict.js +12 -0
  106. package/dist/verdict.js.map +1 -0
  107. package/package.json +54 -4
  108. package/skills/council/SKILL.md +82 -0
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: council
3
+ description: Run a multi-LLM adversarial review council via the council CLI
4
+ metadata:
5
+ type: tool
6
+ user-invocable: false
7
+ ---
8
+
9
+ Use this skill when the user wants adversarial feedback on a plan, decision, design, or code change from multiple independent LLMs.
10
+
11
+ ## When to use
12
+
13
+ - The user asks for a "second opinion", "red team", "pressure test", or "council review".
14
+ - The user wants multiple models to review the same artifact.
15
+ - The current model should not be the only reviewer.
16
+
17
+ ## How to use
18
+
19
+ 1. Configure providers through environment variables:
20
+ - `COUNCIL_PROVIDERS=openai,groq`
21
+ - `OPENAI_API_KEY`, `OPENAI_BASE_URL`, `OPENAI_MODEL`
22
+ - `GROQ_API_KEY`, `GROQ_BASE_URL`, `GROQ_MODEL`
23
+ - Any OpenAI-compatible provider works the same way.
24
+ 2. Run the CLI:
25
+ ```bash
26
+ npx -y @lanjak/council review "<prompt or artifact summary>" --models openai,groq
27
+ ```
28
+ 3. Choose a positive integer for `--max-tokens <n>` per task. Use a small
29
+ budget for a finished plan and a large budget for a codebase scan.
30
+ It overrides `<PREFIX>_MAX_TOKENS`
31
+ for every judge, including resumed debate turns.
32
+ 4. Use `--effort low|medium|high|xhigh` to override the environment.
33
+ `<PREFIX>_EFFORT` overrides `COUNCIL_EFFORT`. With nothing configured, the
34
+ request omits effort. Set `COUNCIL_EFFORT=medium` to use medium effort by default.
35
+ The model and endpoint must support the selected effort level.
36
+ 5. Return stdout verbatim to the user.
37
+
38
+ ## Debate vs review/plan
39
+
40
+ `review` and `plan` ask judges independently and in parallel - cheap,
41
+ fast, good for breadth of opinion. `debate` makes judges argue with each
42
+ other in sequence, round by round, until they converge or hit a round cap -
43
+ slower and more expensive (serial calls, growing prompts), but better for
44
+ depth on a single contested question. Escalate from `review`/`plan` to
45
+ `debate` when the judges disagree or the stakes are high enough to justify
46
+ the extra cost.
47
+
48
+ ```bash
49
+ npx -y @lanjak/council debate "<prompt>" --models openai,groq
50
+ ```
51
+
52
+ Each judge's turn must end with `VERDICT: AGREE` or `VERDICT: DISAGREE`;
53
+ consensus requires every active judge to agree on their latest turn. You are
54
+ in the rotation yourself by default - the command pauses on your turn with a
55
+ session id and the exact `debate turn <session-id> --stdin` command to
56
+ continue with, and your verdict gates consensus like any judge's. Sessions
57
+ expire 24 hours after creation.
58
+
59
+ Pass `--no-participate` for unattended debates that never pause for your turn.
60
+ New sessions use `$XDG_STATE_HOME/council/debates` (default:
61
+ `~/.local/state/council/debates`). Sessions from the old `council-axi`
62
+ directory remain readable when no session with the same ID exists in `council`.
63
+
64
+ ## Output format
65
+
66
+ Review and plan output carries a machine-readable decision alongside the prose:
67
+
68
+ - `blocked: yes|no` - whether any judge that parsed cleanly reported a hard block
69
+ - `blocks[n]{provider,severity,title,location}` - the blocks themselves, attributed
70
+ - `diagnostic[n]{...}` - blocks salvaged from a judge whose footer did not parse;
71
+ these never set `blocked`
72
+ - `unknown[n]` - judges that answered but could not be parsed, with the reason
73
+
74
+ Read `blocked` rather than the synthesis prose when you need a decision. Treat a
75
+ non-empty `unknown` section as "we do not know", not as "clean".
76
+
77
+ ## Commands
78
+
79
+ - `npx -y @lanjak/council setup` - check authentication
80
+ - `npx -y @lanjak/council review "..."` - adversarial review
81
+ - `npx -y @lanjak/council plan "..."` - pressure-test a plan
82
+ - `npx -y @lanjak/council debate "..."` - sequential adversarial debate until consensus