immune-brain 4.4.1 → 4.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 (25) hide show
  1. package/package.json +1 -1
  2. package/plugins/immune-brain/.claude-plugin/plugin.json +1 -1
  3. package/plugins/immune-brain/dist/BASELINE.md +18 -1
  4. package/plugins/immune-brain/dist/claude/mcp-server.mjs +675 -292
  5. package/plugins/immune-brain/dist/docs/reference/subagent-dispatch-protocol.md +30 -0
  6. package/plugins/immune-brain/dist/imm-brainstorm.md +21 -0
  7. package/plugins/immune-brain/dist/imm-loop.md +41 -2
  8. package/plugins/immune-brain/dist/imm-planner.md +65 -1
  9. package/plugins/immune-brain/dist/role-prompts/code-review.md +19 -0
  10. package/plugins/immune-brain/dist/role-prompts/qa.md +13 -1
  11. package/plugins/immune-brain/runtime/github_issue_tracker.ts +321 -60
  12. package/plugins/immune-brain/runtime/kernel/storage.ts +8 -3
  13. package/plugins/immune-brain/runtime/plugin_version.ts +1 -1
  14. package/plugins/immune-brain/runtime/prompts/code-review.md +19 -0
  15. package/plugins/immune-brain/runtime/prompts/qa.md +13 -1
  16. package/plugins/immune-brain/runtime/unattended/batch_preflight.ts +35 -18
  17. package/plugins/immune-brain/runtime/unattended/batch_reconfirmation.ts +194 -0
  18. package/plugins/immune-brain/runtime/unattended/batch_runner.ts +42 -5
  19. package/plugins/immune-brain/runtime/unattended/batch_state.ts +23 -4
  20. package/plugins/immune-brain/runtime/v4_runtime.ts +54 -0
  21. package/plugins/immune-brain/runtime/workspace_scope.ts +31 -4
  22. package/plugins/immune-brain/skills/BASELINE.md +18 -1
  23. package/plugins/immune-brain/skills/imm-brainstorm/SKILL.md +5 -0
  24. package/plugins/immune-brain/skills/imm-loop/SKILL.md +4 -2
  25. package/plugins/immune-brain/skills/imm-planner/SKILL.md +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "immune-brain",
3
- "version": "4.4.1",
3
+ "version": "4.5.0",
4
4
  "description": "Immune-Brain agent skill system",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "immune-brain",
3
- "version": "4.4.1",
3
+ "version": "4.5.0",
4
4
  "description": "Immune-Brain Claude Code Host: native Enrollment, QA, Review, and Kernel settlement.",
5
5
  "author": {
6
6
  "name": "Immune-Brain Team"
@@ -9,6 +9,20 @@
9
9
  - Stage only explicit task-owned paths. This staging authority does not grant
10
10
  commit, push, broad staging, or authority over pre-existing user changes.
11
11
  Never use `git add .` or `git add -A` in a dirty worktree.
12
+ - Grant effects separately: staging, commit, push, publication, and outbound
13
+ model/data calls are distinct operations. Recovering a stage-only instruction
14
+ restores staging and nothing more; commit, push, and publication each keep
15
+ their own existing grant. An explicit approval already covering the same
16
+ operation, target, and impact — including a valid batch capability — stays
17
+ usable without another gate.
18
+ - Before a new outbound effect, check the project's existing research channel and
19
+ data scope. A public article, a mock, a documentation example, or a local
20
+ read-only database gives no authority to call an arbitrary provider or send new
21
+ data; authorize only a genuinely new channel/data/effect delta. Distinguish
22
+ documentation, mock, real-channel, and model-quality evidence when reporting.
23
+ - These text rules are instruction contracts, not a hard bash sandbox. They
24
+ guide behavior and are checked as contracts; they do not technically prevent an
25
+ arbitrary shell command, so authority gates and review remain the real boundary.
12
26
  - Do not create, switch, or delete Git worktrees; operate only in the Host launch directory.
13
27
  - Record reproducible evidence before reporting closure.
14
28
  - Required verification must pass before reporting completion; disclosing a gap is not a substitute. Autonomously diagnose, repair, and rerun failing conventional local checks within the authorized scope; never delete, skip, or weaken a valid check to manufacture a pass. If a required check remains failing or cannot run, report the work as incomplete with the concrete blocker.
@@ -81,7 +95,6 @@ non-Kernel operations, an explicit user approval already covering the same
81
95
  operation, target, and impact is sufficient; ask again only for a material delta.
82
96
  A generic continuation or configured preference is not blanket authorization.
83
97
  Mandatory native gates and hash-bound manifest approvals still apply.
84
-
85
98
  Privileged effects include:
86
99
 
87
100
  - publish, release, deployment, or remote-system mutation;
@@ -91,6 +104,10 @@ Privileged effects include:
91
104
  override; and
92
105
  - external writes whose target or impact cannot be safely reversed locally.
93
106
 
107
+ An existing grant for one of these never inherits another: a stage-only
108
+ instruction stays stage-only, a commit is not push or publication authority,
109
+ and a valid batch capability commits only its own scope-bounded child.
110
+
94
111
  Routine Managed enrollment uses one current-Host native confirmation bound to the TaskIntent content hash after Planner validation. Explicit Plan-only requests stop with candidate artifacts and do not invoke Enrollment; execution-bearing requests open the native gate directly without chat pre-confirmation. Enrollment validates intent, Git ownership, scope, workspace claim, and final authority preconditions without executing acceptance descriptors; deterministic QA executes them after implementation. The routine task proceeds from that single confirmation through enrollment, execution, and QA without a second human stop. Do not request confirmation for local in-scope edits, local verification, ordinary Direct rework, scoped diff review, or completion reporting. Managed evidence, QA, Review, and completion authority remain governed by their Managed contracts; R2 does not weaken them. Managed native-authority failures fail closed with one stable reason and exactly one same-Host recovery action; never offer a Pi, Direct Path, cross-Host/worktree, unmanaged, or automatic-retry fallback.
95
112
 
96
113
  For an unborn symbolic Git HEAD, the same Enrollment confirmation discloses an empty root commit. After approval, the Host creates that commit without staging project content or changing the index/worktree, then revalidates ownership and rehearses Enrollment against the new base. Git identity uses existing environment/config values with an explicit automation fallback, never config writes. Decline or pre-initialization cancellation leaves HEAD unborn; if later Enrollment fails or is cancelled, report the remaining commit. Invalid Git refs are errors, not initialization candidates.