the-high-council 0.8.0 → 0.8.2

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 (145) hide show
  1. package/CONTRIBUTING.md +32 -5
  2. package/README.md +412 -83
  3. package/TROUBLESHOOTING.md +2 -2
  4. package/chains/advise-premium.json +144 -0
  5. package/chains/advise-single-astra.json +43 -0
  6. package/chains/advise-single-deepseek.json +43 -0
  7. package/chains/advise-single-gemini.json +43 -0
  8. package/chains/advise-single-glm-flash.json +40 -0
  9. package/chains/advise-single-opus.json +43 -0
  10. package/chains/advise-single-qwen.json +38 -0
  11. package/chains/advise-single.json +43 -0
  12. package/chains/advise-standard.json +85 -0
  13. package/chains/cheap-7-v2.json +69 -14
  14. package/chains/coder-gate-v1.json +23 -5
  15. package/chains/coder-gate-v2.json +20 -4
  16. package/chains/eu-only.json +22 -4
  17. package/chains/mock-advise-deep.json +51 -0
  18. package/chains/mock-advise-quick.json +36 -0
  19. package/chains/mock-advise-single.json +26 -0
  20. package/chains/mock-advise-standard.json +46 -0
  21. package/chains/plan-daily-7.json +278 -29
  22. package/chains/plan-debate-roles-c1.json +21 -12
  23. package/chains/plan-highest-7.json +312 -31
  24. package/chains/plan-lanes-4.json +95 -0
  25. package/chains/plan-open-7.json +44 -9
  26. package/chains/plan-premium-7.json +37 -2
  27. package/chains/single-vendor-anthropic.json +31 -5
  28. package/chains/single-vendor-openai.json +20 -5
  29. package/chains/us-only.json +26 -5
  30. package/chains/verify.json +27 -6
  31. package/package.json +4 -2
  32. package/schemas/contract-v1.json +71 -0
  33. package/schemas/gate-ledger-v1.json +56 -0
  34. package/schemas/gate-v1.json +46 -0
  35. package/schemas/report-v1.json +165 -15
  36. package/schemas/spend-reservations-v1.json +23 -0
  37. package/src/advice-brief.js +128 -0
  38. package/src/advice-guards.js +272 -0
  39. package/src/advice-mask.js +89 -0
  40. package/src/advice-retention.json +245 -0
  41. package/src/advice-run.js +187 -0
  42. package/src/advice-stop.js +37 -0
  43. package/src/advice-tier.js +140 -0
  44. package/src/advise-rate.js +53 -0
  45. package/src/advise.js +446 -0
  46. package/src/answer-back.js +90 -0
  47. package/src/api.js +5 -1
  48. package/src/audit.js +9 -2
  49. package/src/cache-integrity.js +4 -0
  50. package/src/canary.js +12 -2
  51. package/src/chain-lint.js +196 -6
  52. package/src/chain-name.js +19 -1
  53. package/src/chain.js +602 -271
  54. package/src/claims.js +2 -1
  55. package/src/cli.js +615 -117
  56. package/src/context-files.js +6 -0
  57. package/src/contract-cli.js +183 -0
  58. package/src/contract-draft.js +50 -0
  59. package/src/contract-lint.js +101 -0
  60. package/src/contract-record.js +509 -0
  61. package/src/cost.js +140 -34
  62. package/src/council-replay.js +2 -1
  63. package/src/criteria-kinds.js +11 -1
  64. package/src/criteria-ledger.js +64 -3
  65. package/src/criteria-lock.js +71 -9
  66. package/src/debate-order.js +48 -0
  67. package/src/denied-models.js +3 -1
  68. package/src/draft-disputes.js +95 -0
  69. package/src/dry-run.js +39 -10
  70. package/src/env-file.js +31 -0
  71. package/src/errors.js +7 -1
  72. package/src/gate-cli.js +204 -0
  73. package/src/gate-ledger.js +192 -0
  74. package/src/gate.js +407 -0
  75. package/src/handoff-contract-text.js +42 -0
  76. package/src/handoff-from-run.js +71 -11
  77. package/src/handoff-prompt.js +14 -0
  78. package/src/held-roles.js +20 -0
  79. package/src/key-env.js +39 -0
  80. package/src/lanes.js +21 -0
  81. package/src/mcp/advice.js +325 -0
  82. package/src/mcp/contract.js +72 -0
  83. package/src/mcp/server.js +249 -92
  84. package/src/mcp/untrusted.js +94 -0
  85. package/src/metrics.js +9 -2
  86. package/src/milestones.js +127 -0
  87. package/src/objection-ids.js +32 -0
  88. package/src/outbound-scan.js +3 -2
  89. package/src/outcome.js +5 -0
  90. package/src/pii-gate.js +6 -1
  91. package/src/policy.js +14 -5
  92. package/src/post-quotes.js +56 -0
  93. package/src/pricing.json +41 -18
  94. package/src/providers.js +228 -21
  95. package/src/reasoning-table.json +648 -0
  96. package/src/reasoning.js +260 -0
  97. package/src/report-shape.js +70 -8
  98. package/src/resume-brief.js +16 -4
  99. package/src/return-path.js +115 -0
  100. package/src/roles.js +427 -4
  101. package/src/run-budget.js +34 -0
  102. package/src/run-files.js +110 -0
  103. package/src/run-lock.js +23 -9
  104. package/src/run-status.js +74 -5
  105. package/src/scope-freeze.js +9 -3
  106. package/src/secret-patterns.js +7 -5
  107. package/src/security-review.js +8 -5
  108. package/src/seeded-shuffle.js +26 -0
  109. package/src/send-path-refusals.js +154 -0
  110. package/src/send-path.js +372 -0
  111. package/src/send-profiles.js +103 -0
  112. package/src/spend-reservations.js +79 -0
  113. package/src/spend.js +36 -8
  114. package/src/stage-contract.js +29 -7
  115. package/src/stage-submission.js +8 -4
  116. package/src/stop-files.js +79 -0
  117. package/src/superseded.js +17 -0
  118. package/src/text-fence.js +9 -0
  119. package/src/text-labels.js +81 -0
  120. package/src/thin-contract-check.js +88 -0
  121. package/src/thin-contract.js +60 -0
  122. package/src/tools.js +15 -1
  123. package/src/unpriced.js +18 -0
  124. package/src/verdict-stats.js +5 -1
  125. package/chains/cheap-7.json +0 -93
  126. package/chains/cheap.json +0 -35
  127. package/chains/gp-judge-v1.json +0 -104
  128. package/chains/idea-open-c2.json +0 -95
  129. package/chains/plan-auto-mistral.json +0 -101
  130. package/chains/plan-auto.json +0 -131
  131. package/chains/plan-cheap.json +0 -82
  132. package/chains/plan-debate-c2.json +0 -86
  133. package/chains/plan-debate-open-c2.json +0 -87
  134. package/chains/plan-debate.json +0 -116
  135. package/chains/plan-fast.json +0 -66
  136. package/chains/plan-proposals-best-of-5.json +0 -98
  137. package/chains/plan-proposals.json +0 -96
  138. package/chains/plan-relay.json +0 -83
  139. package/chains/plan-thorough.json +0 -82
  140. package/chains/plan-two-strong.json +0 -74
  141. package/chains/plan-unanimous.json +0 -82
  142. package/chains/seven-cheap.json +0 -67
  143. package/chains/seven.json +0 -55
  144. package/chains/smo-v2-cheap.json +0 -67
  145. package/chains/smo.json +0 -50
package/CONTRIBUTING.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Contributing
2
2
 
3
3
  This project has one maintainer. The bottleneck is reviewing pull requests, not writing code -
4
- an unscoped PR costs more of that time than it saves. The three shapes below are pre-scoped and
4
+ an unscoped PR costs more of that time than it saves. The four shapes below are pre-scoped and
5
5
  easy to land; a PR outside them is welcome but will take longer to review, since it needs a scope
6
6
  discussion first.
7
7
 
8
- ## The three smallest landable contributions
8
+ ## The four smallest landable contributions
9
9
 
10
10
  1. **A new provider adapter** (`src/providers.js`). Every provider except `mock`/`external` speaks
11
11
  either the Anthropic Messages API or the OpenAI chat-completions shape via `OPENAI_COMPAT`.
@@ -16,7 +16,7 @@ discussion first.
16
16
  2. **A new chain config** (`chains/*.json`). A chain is data, not code - it names which seats run
17
17
  which stages. `council doctor --chain chains/<yours>.json` lints it (the same rules every run
18
18
  applies, including the denied-model and `key-host` rules), and `council doctor` prices it
19
- worst-case, both with zero network calls; run both against your new file before opening a PR. Look at `chains/plan-debate.json` or `chains/verify.json` as a starting
19
+ worst-case, both with zero network calls; run both against your new file before opening a PR. Look at `chains/cheap-7-v2.json` or `chains/verify.json` as a starting
20
20
  shape depending on whether you want a debate-and-panel chain or a single-critic chain.
21
21
 
22
22
  3. **A new mock fixture** (`src/providers.js`'s `callMock`, exercised from `test/*.test.js`). If
@@ -26,6 +26,30 @@ discussion first.
26
26
  `mock-provider-error` - for the shape: a model name that triggers one deterministic scripted
27
27
  reply, documented with which real-world failure it stands in for.
28
28
 
29
+ 4. **A change to a skill** (`skills/<name>/SKILL.md`). The bar is in [`skills/README.md`](skills/README.md):
30
+ a good proposal names the failure it prevents, where that failure was seen, and what the rule
31
+ should say. Skills are generic and public, so a change also passes the same leftover-content
32
+ check every skill shipped through: no project names, internal paths, private model or session
33
+ names, or third-party text copied in.
34
+
35
+ ## Before you open a PR
36
+
37
+ These checks run in `npm test`, so they will fail a PR rather than surprise it in review:
38
+
39
+ - **No xAI/Grok seat in any chain.** Chain lint's `denied-model` rule refuses it, with no override.
40
+ - **A shipped chain's seats reason at high.** Chain lint's `reasoning-not-high` rule refuses a
41
+ setting that lowers a seat's reasoning effort.
42
+ - **Prompt wording lives in `src/roles.js` only.** Changing it fails `test/prompt-pin.test.js` on
43
+ purpose; say in the PR what the prompt now tells the model and why, and the maintainer re-records
44
+ the pin.
45
+ - **Documents that list what the repo holds are checked against it.** `skills/README.md`,
46
+ `docs/skills.html` and the landing page (`docs/index.html`) are compared with the repo by tests;
47
+ a failing one names the document to update.
48
+ - **Run output is never committed.** `runs/` is gitignored; keep it that way.
49
+
50
+ Two stances, where a PR is closed rather than scoped: bring-your-own-key only (no default key,
51
+ proxy or hosted path), and no claim about output quality until something has been measured.
52
+
29
53
  ## Everything else
30
54
 
31
55
  Bug fixes, docs fixes, and typo fixes are always welcome with no scoping step. Anything larger -
@@ -35,7 +59,10 @@ from a diff.
35
59
 
36
60
  ## Running the tests
37
61
 
38
- npm test
62
+ npm test # the whole suite
63
+ node --test test/chain.test.js # one file
64
+ node --test --test-name-pattern 'parseJson: raw newline' # one test
39
65
 
40
- Offline, no API key, no network call, no cost. `node --test` matches the project's own test
66
+ Offline, no API key, no network call, no cost. The whole suite is over 2,000 tests and takes
67
+ several minutes; run the files you touched first. `node --test` matches the project's own test
41
68
  runner - no additional test framework to install.