immune-brain 4.4.0 → 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.
- package/package.json +1 -1
- package/plugins/immune-brain/.claude-plugin/plugin.json +1 -1
- package/plugins/immune-brain/.pi-extension/imm-canary-work.ts +19 -2
- package/plugins/immune-brain/.pi-extension/imm-unattended-batch.ts +10 -2
- package/plugins/immune-brain/.pi-extension/pi-canary-tool-failure.ts +6 -1
- package/plugins/immune-brain/.pi-extension/runtime-stub.ts +11 -6
- package/plugins/immune-brain/dist/BASELINE.md +18 -1
- package/plugins/immune-brain/dist/claude/mcp-server.mjs +1039 -465
- package/plugins/immune-brain/dist/docs/reference/subagent-dispatch-protocol.md +30 -0
- package/plugins/immune-brain/dist/imm-brainstorm.md +21 -0
- package/plugins/immune-brain/dist/imm-loop.md +76 -4
- package/plugins/immune-brain/dist/imm-planner.md +65 -1
- package/plugins/immune-brain/dist/role-prompts/code-review.md +19 -0
- package/plugins/immune-brain/dist/role-prompts/executor.md +6 -0
- package/plugins/immune-brain/dist/role-prompts/qa.md +13 -1
- package/plugins/immune-brain/runtime/assurance/coordinator.ts +160 -12
- package/plugins/immune-brain/runtime/assurance/qa.ts +57 -42
- package/plugins/immune-brain/runtime/claude/kernel_ports.ts +20 -8
- package/plugins/immune-brain/runtime/github_issue_tracker.ts +321 -60
- package/plugins/immune-brain/runtime/kernel/storage.ts +8 -3
- package/plugins/immune-brain/runtime/plugin_version.ts +1 -1
- package/plugins/immune-brain/runtime/prompts/code-review.md +19 -0
- package/plugins/immune-brain/runtime/prompts/executor.md +6 -0
- package/plugins/immune-brain/runtime/prompts/qa.md +13 -1
- package/plugins/immune-brain/runtime/unattended/batch_plan.ts +1 -1
- package/plugins/immune-brain/runtime/unattended/batch_preflight.ts +73 -26
- package/plugins/immune-brain/runtime/unattended/batch_reasons.ts +6 -0
- package/plugins/immune-brain/runtime/unattended/batch_reconfirmation.ts +194 -0
- package/plugins/immune-brain/runtime/unattended/batch_runner.ts +126 -151
- package/plugins/immune-brain/runtime/unattended/batch_state.ts +34 -4
- package/plugins/immune-brain/runtime/v4_runtime.ts +54 -0
- package/plugins/immune-brain/runtime/workspace_scope.ts +31 -4
- package/plugins/immune-brain/skills/BASELINE.md +18 -1
- package/plugins/immune-brain/skills/imm-brainstorm/SKILL.md +5 -0
- package/plugins/immune-brain/skills/imm-loop/SKILL.md +4 -2
- package/plugins/immune-brain/skills/imm-planner/SKILL.md +10 -1
|
@@ -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.
|
|
@@ -28,3 +28,8 @@ When framing discusses later execution, describe Enrollment only as the
|
|
|
28
28
|
current Host's native gate. A failed Managed authority interaction stays
|
|
29
29
|
fail-closed: report one same-Host recovery action, never another Host,
|
|
30
30
|
worktree, or unmanaged implementation.
|
|
31
|
+
|
|
32
|
+
Every sourced branch closes as resolved, explicitly excluded, explicitly
|
|
33
|
+
deferred, or dependent-blocked with its blocking node named, including for a
|
|
34
|
+
clear zero-question request; a confirmed outcome is never conserved as a
|
|
35
|
+
smaller deliverable.
|
|
@@ -11,7 +11,9 @@ ordinary host input never resumes a Managed owner implicitly.
|
|
|
11
11
|
|
|
12
12
|
Mandatory constraints before any action: verify the active backend claim,
|
|
13
13
|
TaskIntent, and TaskRecord via `imm_kernel_canary` `status` first; invalid or
|
|
14
|
-
contradictory projections fail closed.
|
|
14
|
+
contradictory projections fail closed. Resume only from those authority facts:
|
|
15
|
+
a compaction heading, HANDOFF summary, or Issue state is prose, never authority.
|
|
16
|
+
All Managed authority gates use the
|
|
15
17
|
current Host's native interaction. A failed gate stays fail-closed and
|
|
16
18
|
reports one same-Host recovery action; never suggest another Host, worktree,
|
|
17
19
|
or unmanaged implementation as a fallback.
|
|
@@ -24,5 +26,5 @@ or all references as an entry prerequisite.
|
|
|
24
26
|
- common: [Shared Guards](../../dist/BASELINE.md#shared-guards), [Workflow Activation](../../dist/BASELINE.md#workflow-activation), [Host Confirmation Boundary](../../dist/BASELINE.md#host-confirmation-boundary), [Kernel Canary Routing and Authority](../../dist/imm-loop.md#kernel-canary-routing-and-authority)
|
|
25
27
|
- unattended batch run, or any question about whether `imm-loop` starts one: [Unattended Batch Opt-In](../../dist/imm-loop.md#unattended-batch-opt-in)
|
|
26
28
|
- steady execution: [Verification and Local Recovery](../../dist/BASELINE.md#verification-and-local-recovery), [Execution Loop](../../dist/imm-loop.md#execution-loop), [Observable Output](../../dist/imm-loop.md#observable-output)
|
|
27
|
-
- rework, scope expansion, breaking revision, user decision, stop, interruption or unknown state before any action: [Decisions and Recovery](../../dist/imm-loop.md#decisions-and-recovery), [Failure Output](../../dist/imm-loop.md#failure-output); re-read `status`, then the pending obligation
|
|
29
|
+
- rework, scope expansion, breaking revision, user decision, stop, interruption or unknown state before any action: [Decisions and Recovery](../../dist/imm-loop.md#decisions-and-recovery), [Failure Output](../../dist/imm-loop.md#failure-output); re-read `status`, then the pending obligation. Rework submits the verdict before editing, and an uncertain interruption resumes from exact task/run authority facts rather than a summary.
|
|
28
30
|
- review or post-settlement learning: [Review and Learning](../../dist/imm-loop.md#review-and-learning)
|
|
@@ -11,7 +11,10 @@ host-native.
|
|
|
11
11
|
|
|
12
12
|
Mandatory constraints before any action: Planner writes a TaskIntent, and a Spec
|
|
13
13
|
only for complex work; it never implements, overwrites an enrolled TaskIntent, or
|
|
14
|
-
grants execution authority — only the native Enrollment gate can.
|
|
14
|
+
grants execution authority — only the native Enrollment gate can. Before
|
|
15
|
+
handoff it maps every upstream item and required phase exactly once and reports
|
|
16
|
+
each Slice result plus the remaining gap; a plan that conserves a smaller
|
|
17
|
+
deliverable than the confirmed outcome fails that check instead of passing.
|
|
15
18
|
|
|
16
19
|
Section routes - load a section's instructions only when its branch applies.
|
|
17
20
|
Read each linked heading body up to the next heading; nested sections and
|
|
@@ -40,3 +43,9 @@ that include execution invoke the current Host's native Enrollment gate
|
|
|
40
43
|
directly, without chat pre-confirmation. Native-gate failure stays fail-closed
|
|
41
44
|
in that Host: report its reason and one retry action only; never suggest
|
|
42
45
|
another Host, worktree, or unmanaged implementation as a fallback.
|
|
46
|
+
|
|
47
|
+
Before that handoff, confirm complete mapping of every upstream item and
|
|
48
|
+
required phase with each Slice's result and the remaining gap; reject a plan
|
|
49
|
+
that conserved only part of the confirmed outcome, and ask again only for a
|
|
50
|
+
newly evidenced material delta rather than reconfirming an unchanged clear
|
|
51
|
+
request or an already-confirmed decision.
|