nobrainer-tech-flow 0.0.0-stage → 2.4.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/.agents/plugins/marketplace.json +20 -0
- package/.claude-plugin/marketplace.json +18 -0
- package/.claude-plugin/plugin.json +21 -0
- package/.codex-plugin/plugin.json +47 -0
- package/.opencode/INSTALL.md +37 -0
- package/.opencode/plugins/nobrainer-tech-skills.js +66 -0
- package/.pi/extensions/nobrainer-tech-skills.js +64 -0
- package/AGENTS.md +204 -0
- package/CLAUDE.md +204 -0
- package/CONTRIBUTING.md +70 -0
- package/GEMINI.md +1 -0
- package/LICENSE +21 -0
- package/README.md +658 -2
- package/SECURITY.md +33 -0
- package/adapters/bootstrap.md +27 -0
- package/assets/nobrainer-tech-logo.svg +1 -0
- package/assets/nobrainer-workflow.svg +155 -0
- package/assets/plugin-logo.png +0 -0
- package/bin/nobrainer-tech-flow.mjs +48 -0
- package/docs/BOUNDED_RUNNER.md +60 -0
- package/docs/CHAT_PLUGINS.md +29 -0
- package/docs/COMPATIBILITY.md +371 -0
- package/docs/INSTALL.md +626 -0
- package/docs/MIGRATION_TO_FLOW.md +117 -0
- package/docs/NAMING.md +39 -0
- package/docs/PRIVACY.md +9 -0
- package/docs/SESSION_RESTART.md +70 -0
- package/docs/SKILL_CURATION.md +124 -0
- package/docs/TESTING.md +232 -0
- package/docs/TRY_IT.md +109 -0
- package/docs/releases/v1.0.0.md +81 -0
- package/docs/releases/v1.1.0.md +85 -0
- package/docs/releases/v1.10.0.md +34 -0
- package/docs/releases/v1.11.0-publication-readback.md +25 -0
- package/docs/releases/v1.11.0.md +42 -0
- package/docs/releases/v1.12.0.md +30 -0
- package/docs/releases/v1.13.0.md +46 -0
- package/docs/releases/v1.14.0.md +43 -0
- package/docs/releases/v1.14.1.md +21 -0
- package/docs/releases/v1.2.0.md +87 -0
- package/docs/releases/v1.2.1.md +92 -0
- package/docs/releases/v1.3.0-publication-readback.md +69 -0
- package/docs/releases/v1.3.0.md +66 -0
- package/docs/releases/v1.3.1-publication-readback.md +76 -0
- package/docs/releases/v1.3.1.md +59 -0
- package/docs/releases/v1.4.0-publication-readback.md +81 -0
- package/docs/releases/v1.4.0.md +43 -0
- package/docs/releases/v1.5.0-publication-readback.md +76 -0
- package/docs/releases/v1.5.0.md +54 -0
- package/docs/releases/v1.6.0.md +64 -0
- package/docs/releases/v1.6.1-publication-readback.md +53 -0
- package/docs/releases/v1.6.1.md +82 -0
- package/docs/releases/v1.7.0.md +42 -0
- package/docs/releases/v1.7.1-publication-readback.md +64 -0
- package/docs/releases/v1.7.1.md +49 -0
- package/docs/releases/v1.8.0.md +63 -0
- package/docs/releases/v1.8.1.md +32 -0
- package/docs/releases/v1.9.0.md +33 -0
- package/docs/releases/v2.0.0-candidate.md +28 -0
- package/docs/releases/v2.0.0.md +53 -0
- package/docs/releases/v2.0.1.md +135 -0
- package/docs/releases/v2.0.2.md +189 -0
- package/docs/releases/v2.1.0.md +64 -0
- package/docs/releases/v2.1.1.md +43 -0
- package/docs/releases/v2.2.0.md +64 -0
- package/docs/releases/v2.2.1.md +11 -0
- package/docs/releases/v2.3.0.md +97 -0
- package/docs/releases/v2.3.1.md +71 -0
- package/docs/releases/v2.3.2.md +242 -0
- package/docs/releases/v2.4.0.md +126 -0
- package/gemini-extension.json +6 -0
- package/hooks/claude-hooks.json +17 -0
- package/hooks/hooks-cursor.json +10 -0
- package/hooks/run-hook.cmd +36 -0
- package/hooks/session-start +38 -0
- package/package.json +69 -4
- package/plugin.json +51 -0
- package/scripts/build_plugin.py +50 -0
- package/scripts/check_flow_update.py +18 -0
- package/scripts/check_public_commit.py +86 -0
- package/scripts/fetch_public_refs.py +69 -0
- package/scripts/install.py +600 -0
- package/scripts/install.sh +1392 -0
- package/scripts/install_guards.py +279 -0
- package/scripts/install_personalization.py +527 -0
- package/scripts/install_skills.py +951 -0
- package/scripts/npm_install.py +85 -0
- package/scripts/recommend_flow_setup.py +1522 -0
- package/scripts/validate_skills.py +465 -0
- package/skills/nobrainer-auto-fine-tune/SKILL.md +79 -0
- package/skills/nobrainer-auto-fine-tune/references/capacity-audit.md +49 -0
- package/skills/nobrainer-autoimprove/SKILL.md +212 -0
- package/skills/nobrainer-autoimprove/scripts/count_words.py +22 -0
- package/skills/nobrainer-browser/SKILL.md +234 -0
- package/skills/nobrainer-browser/references/cdp-profile-restart.md +93 -0
- package/skills/nobrainer-build/SKILL.md +173 -0
- package/skills/nobrainer-codex-context/SKILL.md +111 -0
- package/skills/nobrainer-codex-context/scripts/codex_context.py +175 -0
- package/skills/nobrainer-decide/SKILL.md +198 -0
- package/skills/nobrainer-dispatcher/SKILL.md +256 -0
- package/skills/nobrainer-dispatcher/agents/openai.yaml +4 -0
- package/skills/nobrainer-rca/SKILL.md +163 -0
- package/skills/nobrainer-research/SKILL.md +131 -0
- package/skills/nobrainer-review/SKILL.md +195 -0
- package/skills/nobrainer-security/SKILL.md +166 -0
- package/skills/nobrainer-sessions/SKILL.md +223 -0
- package/skills/nobrainer-sessions/references/evidence-receipt.md +55 -0
- package/skills/nobrainer-sessions/references/protocol.md +337 -0
- package/skills/nobrainer-sessions/references/session-restart.md +255 -0
- package/skills/nobrainer-sessions/scripts/evidence_receipt.py +373 -0
- package/skills/nobrainer-sessions/scripts/restart_gate.py +140 -0
- package/skills/nobrainer-sessions/scripts/run_bounded.py +390 -0
- package/skills/nobrainer-sessions/scripts/session_title.py +43 -0
- package/skills/nobrainer-skill-doctor/SKILL.md +149 -0
- package/skills/nobrainer-skill-doctor/references/astra.md +19 -0
- package/skills/nobrainer-skill-doctor/scripts/audit.py +100 -0
- package/skills/nobrainer-skill-doctor/scripts/context_candidates.py +133 -0
- package/skills/nobrainer-spec-driven-development/SKILL.md +132 -0
- package/skills/nobrainer-spec-driven-development/references/spec-template.md +114 -0
- package/skills/nobrainer-team/SKILL.md +165 -0
- package/skills/nobrainer-team/references/team-plan.md +64 -0
- package/skills/nobrainer-tech-flow/SKILL.md +239 -0
- package/skills/nobrainer-tech-flow/VERSION +1 -0
- package/skills/nobrainer-tech-flow/references/autopilot.md +72 -0
- package/skills/nobrainer-tech-flow/references/codex-routing.md +21 -0
- package/skills/nobrainer-tech-flow/references/communication.md +108 -0
- package/skills/nobrainer-tech-flow/references/correction-hooks.md +110 -0
- package/skills/nobrainer-tech-flow/references/daily-update.md +28 -0
- package/skills/nobrainer-tech-flow/references/delivery.md +243 -0
- package/skills/nobrainer-tech-flow/references/idea-to-delivery.md +82 -0
- package/skills/nobrainer-tech-flow/references/long-run-state.md +209 -0
- package/skills/nobrainer-tech-flow/references/model-routing.md +83 -0
- package/skills/nobrainer-tech-flow/references/optional-decisions.md +83 -0
- package/skills/nobrainer-tech-flow/references/project-start.md +22 -0
- package/skills/nobrainer-tech-flow/references/routing.md +125 -0
- package/skills/nobrainer-tech-flow/references/setup.md +180 -0
- package/skills/nobrainer-tech-flow/references/worktrees.md +138 -0
- package/skills/nobrainer-tech-flow/scripts/check_flow_update.py +298 -0
- package/skills/nobrainer-tech-flow/scripts/cleanup_worktree.py +327 -0
- package/skills/nobrainer-tech-flow/scripts/decision_config.py +107 -0
- package/skills/nobrainer-tech-flow/scripts/flow_guard.py +252 -0
- package/skills/nobrainer-tech-flow/scripts/typed_decisions.py +210 -0
- package/skills/nobrainer-wiki/SKILL.md +164 -0
- package/skills/nobrainer-wiki/references/setup.md +88 -0
- package/skills/nobrainer-writing/SKILL.md +272 -0
- package/skills/nobrainer-writing/agents/openai.yaml +4 -0
- package/skills/nobrainer-writing/references/brief-artifacts.md +357 -0
- package/skills/nobrainer-writing/references/plain-technical-english.md +76 -0
- package/skills/nobrainer-writing/references/research.md +86 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nobrainer-review
|
|
3
|
+
description: "Use when the owner says nb-review, deep-audit, deep-code-review, or deep-autoreview; explicitly requests an evidence-gated CLOSEOUT, adversarial BUG_HUNT or RELEASE_GATE; or needs final findings filtered to verified actionable defects. Use nobrainer-build for ordinary implementation and correction work."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# NoBrainer Review
|
|
7
|
+
|
|
8
|
+
Review the exact requested change, prove real defects against current code, and
|
|
9
|
+
filter out speculative AI noise. This skill owns the final NoBrainer evidence
|
|
10
|
+
gate. Ordinary implementation and correction work belongs to
|
|
11
|
+
`nobrainer-build` and the project's maintained engineering capabilities. This
|
|
12
|
+
skill does not silently implement fixes or expand the product scope.
|
|
13
|
+
Use `nobrainer-skill-doctor` for a portfolio-wide audit of instruction and skill
|
|
14
|
+
systems; this skill remains the owner of the exact change's final evidence gate.
|
|
15
|
+
|
|
16
|
+
## Choose one mode
|
|
17
|
+
|
|
18
|
+
- `CLOSEOUT`: default for an implementation diff before handoff or merge.
|
|
19
|
+
- `BUG_HUNT`: adversarial search for reachable defects in an exact module, diff
|
|
20
|
+
or commit.
|
|
21
|
+
- `RELEASE_GATE`: acceptance, migration, security, build/runtime and rollback
|
|
22
|
+
evidence for a consequential release.
|
|
23
|
+
|
|
24
|
+
Do not turn a small diff into a release ceremony. Escalate the mode only when
|
|
25
|
+
the changed boundary, risk or owner request justifies it.
|
|
26
|
+
|
|
27
|
+
## Start gate
|
|
28
|
+
|
|
29
|
+
Before reviewing:
|
|
30
|
+
|
|
31
|
+
1. Resolve repository root, current checkout/commit, dirty state and nearest
|
|
32
|
+
instructions.
|
|
33
|
+
2. Freeze the scope as exact files, diff, commit, branch/PR base or component.
|
|
34
|
+
Do not review unrelated existing changes.
|
|
35
|
+
3. Read the goal/spec/acceptance and relevant tests. If none exists, derive only
|
|
36
|
+
the observable behavior implied by the request and code.
|
|
37
|
+
4. Identify high-risk boundaries: authentication, authorization, money, data
|
|
38
|
+
loss, migrations, concurrency, external contracts, user-visible state,
|
|
39
|
+
secrets and irreversible operations.
|
|
40
|
+
5. Default to read-only. A review request does not authorize fixes, commits,
|
|
41
|
+
pushes, merges or deployments.
|
|
42
|
+
|
|
43
|
+
If the base, scope or required runtime is inaccessible, state the exact gap. A
|
|
44
|
+
partial review cannot return `CLEAN` for the unavailable surface.
|
|
45
|
+
|
|
46
|
+
## Pre-read predictions and name/path audit
|
|
47
|
+
|
|
48
|
+
Before reading implementation details, record two or three falsifiable defect
|
|
49
|
+
hypotheses from the acceptance, changed boundary and risk. Include the trigger
|
|
50
|
+
and expected impact, but do not report a hypothesis as a finding. At the end,
|
|
51
|
+
mark each `HIT`, `MISS` or `UNTESTED` with its evidence. This counters
|
|
52
|
+
confirmation bias without inventing bugs.
|
|
53
|
+
|
|
54
|
+
Before the verdict, run an explicit `NAME_PATH_AUDIT` for every new or renamed
|
|
55
|
+
symbol, import, export, configuration key and migration reference. Use a literal
|
|
56
|
+
`rg` or project-native checker and retain the command/result or evidence path.
|
|
57
|
+
If the scope has none, record `NOT_APPLICABLE`; a green test does not replace
|
|
58
|
+
this identity check.
|
|
59
|
+
|
|
60
|
+
## Pass 1: acceptance and backward trace
|
|
61
|
+
|
|
62
|
+
Read current files from disk, not remembered implementation context. For each
|
|
63
|
+
changed behavior:
|
|
64
|
+
|
|
65
|
+
- trace from the promised outcome backward through output, state transition,
|
|
66
|
+
caller, input validation and source data;
|
|
67
|
+
- inspect the full changed function plus its callers/consumers, not only added
|
|
68
|
+
lines;
|
|
69
|
+
- verify renamed/moved symbols, imports, exports, configuration and migrations
|
|
70
|
+
against actual references with the recorded `NAME_PATH_AUDIT`;
|
|
71
|
+
- compare public types/contracts and all affected call sites;
|
|
72
|
+
- run concrete values through risky conditions, boundaries and error paths;
|
|
73
|
+
- compare implemented behavior with acceptance, including negative cases and
|
|
74
|
+
exclusions.
|
|
75
|
+
|
|
76
|
+
An exit code, generated file, mocked test or worker report is evidence at its
|
|
77
|
+
own layer. It does not prove runtime, production or user usefulness unless that
|
|
78
|
+
layer was exercised. A missing or `NOT_PROVEN` `TEST_SENSITIVITY` keeps a "no
|
|
79
|
+
behavior change" claim open. `STALE` or `CHANGED_DURING_RUN` evidence does not
|
|
80
|
+
prove the current artifact.
|
|
81
|
+
|
|
82
|
+
## Pass 2: adversarial defect search
|
|
83
|
+
|
|
84
|
+
Assume at least one defect hypothesis is worth testing, while requiring proof
|
|
85
|
+
before reporting it. Check the classes relevant to the scope:
|
|
86
|
+
|
|
87
|
+
- inverted/missing conditions, empty/null/zero/large inputs and off-by-one;
|
|
88
|
+
- stale caller, broken import/export, incompatible schema or API contract;
|
|
89
|
+
- lost update, race, retry/idempotence and partial-failure behavior;
|
|
90
|
+
- authorization bypass, unsafe input/output, secret leakage and trust-boundary
|
|
91
|
+
confusion;
|
|
92
|
+
- rollback gaps, destructive migration, hidden state or duplicate writers;
|
|
93
|
+
- error suppression, false success, timeout treated as completion;
|
|
94
|
+
- tests that assert a fixture or mock but miss the real integration path.
|
|
95
|
+
|
|
96
|
+
For `BUG_HUNT`, repeat with a different defect class or data-flow direction
|
|
97
|
+
after the first pass. Stop when the bounded scope has been covered and a second
|
|
98
|
+
independent pass produces no new verified candidate; never loop merely to invent
|
|
99
|
+
findings.
|
|
100
|
+
|
|
101
|
+
## Independent reviewer
|
|
102
|
+
|
|
103
|
+
Use a native subagent for delegated review. A separate visible conversation
|
|
104
|
+
requires an explicit owner request; `create_thread` is not a subagent fallback.
|
|
105
|
+
If native delegation is unavailable, perform the review in MAIN and report
|
|
106
|
+
the missing independence. A failed review does not authorize another sidebar
|
|
107
|
+
conversation, and a reviewer cannot recursively delegate without express
|
|
108
|
+
authority in its assignment.
|
|
109
|
+
|
|
110
|
+
Use a second model or native review command when change size, unfamiliar code,
|
|
111
|
+
security, money/data risk or independence justifies the latency. Keep it
|
|
112
|
+
read-only and give it the same frozen scope and acceptance. Prefer the current
|
|
113
|
+
client's maintained review capability; do not ship a custom multi-model harness
|
|
114
|
+
or spawn an automatic reviewer swarm.
|
|
115
|
+
|
|
116
|
+
Treat every external finding as an unverified candidate. Re-open the cited code,
|
|
117
|
+
trace reachability and reject anything that fails the gate below. Reviewer
|
|
118
|
+
agreement does not replace evidence; disagreement is a prompt to inspect, not a
|
|
119
|
+
vote.
|
|
120
|
+
|
|
121
|
+
Choose review perspectives from the actual changed boundary and risk: for example
|
|
122
|
+
testing, compatibility, context size or security. Do not automatically run every
|
|
123
|
+
available perspective or require maximum reasoning effort for each one. Record
|
|
124
|
+
which perspectives were selected and why; unchecked relevant risk remains visible.
|
|
125
|
+
|
|
126
|
+
## Optional pull-request monitoring
|
|
127
|
+
|
|
128
|
+
When the owner asks to monitor an open pull request, bind every snapshot and action
|
|
129
|
+
to the exact PR head SHA. Check CI, mergeability and published review feedback;
|
|
130
|
+
pending draft reviews are not published feedback and must not be marked handled.
|
|
131
|
+
After a new head appears, discard conclusions for the old SHA and inspect again.
|
|
132
|
+
Retry only a diagnosed transient failure, with a finite recorded budget and a new
|
|
133
|
+
fact that justifies each retry. Persistent, branch-caused or ambiguous failures
|
|
134
|
+
need diagnosis or a stop, not repeated reruns. A green snapshot is progress, not
|
|
135
|
+
merge authorization. Monitoring never grants permission to merge, publish, reply
|
|
136
|
+
to reviewers or perform another externally visible action.
|
|
137
|
+
|
|
138
|
+
## Finding gate
|
|
139
|
+
|
|
140
|
+
Report a finding only when all are present:
|
|
141
|
+
|
|
142
|
+
- severity and exact `file:line`;
|
|
143
|
+
- reachable input/state/sequence that triggers it;
|
|
144
|
+
- observable impact;
|
|
145
|
+
- why current guards/tests do not prevent it;
|
|
146
|
+
- smallest required fix at the correct ownership boundary;
|
|
147
|
+
- regression proof that would fail before and pass after.
|
|
148
|
+
|
|
149
|
+
Reject style preferences, speculative future risks, unreachable edge cases,
|
|
150
|
+
generic “consider refactoring”, dependency guesses without current primary
|
|
151
|
+
documentation, and broad rewrites unrelated to a proven defect. Do not pad the
|
|
152
|
+
report with low-value observations to look thorough.
|
|
153
|
+
|
|
154
|
+
## Fix-and-recheck loop
|
|
155
|
+
|
|
156
|
+
If the owner requested review only, stop after findings. If fixes are also in
|
|
157
|
+
scope:
|
|
158
|
+
|
|
159
|
+
1. route the smallest accepted fix through `nobrainer-build`;
|
|
160
|
+
2. run the focused regression plus affected baseline tests;
|
|
161
|
+
3. reread the final diff and recheck the original failure path;
|
|
162
|
+
4. rerun the relevant review pass once.
|
|
163
|
+
|
|
164
|
+
A changed fix invalidates earlier test/review evidence for that path. Do not
|
|
165
|
+
silently self-approve a consequential release; preserve the owner gate.
|
|
166
|
+
|
|
167
|
+
## Final output
|
|
168
|
+
|
|
169
|
+
Lead with actionable findings ordered by severity. For each, use the finding
|
|
170
|
+
gate fields and keep the location tight. Then report:
|
|
171
|
+
|
|
172
|
+
```text
|
|
173
|
+
MODE: CLOSEOUT | BUG_HUNT | RELEASE_GATE
|
|
174
|
+
SCOPE:
|
|
175
|
+
ACCEPTANCE_CHECKED:
|
|
176
|
+
PREDICTIONS: <HIT | MISS | UNTESTED with evidence>
|
|
177
|
+
NAME_PATH_AUDIT: PASS | NOT_APPLICABLE | PARTIAL | BLOCKED; <command/evidence>
|
|
178
|
+
TESTS_AND_RUNTIME:
|
|
179
|
+
INDEPENDENT_REVIEW: USED | NOT_JUSTIFIED | UNAVAILABLE
|
|
180
|
+
REJECTED_CANDIDATES:
|
|
181
|
+
UNCHECKED_SURFACE:
|
|
182
|
+
ROLLBACK_OR_FIX_PATH:
|
|
183
|
+
RESULT: FINDINGS | CLEAN | PARTIAL | BLOCKED
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Return `CLEAN` only when the complete frozen scope was inspected, required
|
|
187
|
+
evidence passed and no candidate survived verification. Otherwise say `PARTIAL`
|
|
188
|
+
or `BLOCKED` and name the missing proof.
|
|
189
|
+
|
|
190
|
+
## Review convergence
|
|
191
|
+
|
|
192
|
+
Follow the [delivery contract](../nobrainer-tech-flow/references/delivery.md#keep-review-proportional-to-progress)
|
|
193
|
+
for slice-sized review and correction. Repeated amendments do not reset the
|
|
194
|
+
review budget. Keep concrete safety and acceptance blockers open; proceed with
|
|
195
|
+
authorized independent work instead of restarting a whole-plan perfection loop.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nobrainer-security
|
|
3
|
+
description: "Use when the owner says nb-security or security-review, requests a threat model or security review, or when a change crosses authentication, authorization, secrets, untrusted input, sensitive data, dependency, installer, or production trust boundaries."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# NoBrainer Security
|
|
7
|
+
|
|
8
|
+
Find exploitable security defects and missing controls in one frozen scope, then
|
|
9
|
+
separate proven risk from checklist noise. Default to `READ_ONLY`. This skill
|
|
10
|
+
does not authorize attacking a live target, retrieving secrets, weakening a
|
|
11
|
+
control, changing credentials or implementing a fix.
|
|
12
|
+
|
|
13
|
+
## Choose one mode
|
|
14
|
+
|
|
15
|
+
- `THREAT_MODEL`: map assets, actors, entry points, trust boundaries, abuse
|
|
16
|
+
paths and required controls before a consequential design is frozen.
|
|
17
|
+
- `SECURITY_REVIEW`: trace an exact diff, component, endpoint or data flow and
|
|
18
|
+
report only reachable, actionable defects.
|
|
19
|
+
- `SUPPLY_CHAIN`: inspect an exact dependency, installer, plugin, script,
|
|
20
|
+
workflow or external skill for provenance, pinning, permissions and execution
|
|
21
|
+
risk.
|
|
22
|
+
- `RELEASE_GATE`: verify required security controls, tests, migration safety and
|
|
23
|
+
rollback evidence before a high-risk release.
|
|
24
|
+
|
|
25
|
+
If the owner does not name a mode, infer from scope:
|
|
26
|
+
|
|
27
|
+
- an exact diff, component, endpoint or data flow -> `SECURITY_REVIEW`;
|
|
28
|
+
- a pre-freeze design -> `THREAT_MODEL`;
|
|
29
|
+
- a dependency, installer, plugin or workflow -> `SUPPLY_CHAIN`;
|
|
30
|
+
- pre-release acceptance -> `RELEASE_GATE`.
|
|
31
|
+
|
|
32
|
+
When modes overlap, choose the primary mode from the requested outcome and state
|
|
33
|
+
that choice; include relevant checks from adjacent modes without expanding scope.
|
|
34
|
+
Ask one focused clarification only if unresolved ambiguity materially changes
|
|
35
|
+
the outcome or authority. Continue independent read-only inspection meanwhile.
|
|
36
|
+
|
|
37
|
+
Use `nobrainer-review` for a general closeout with no material security boundary.
|
|
38
|
+
Use `nobrainer-rca` when the question is what caused an observed incident.
|
|
39
|
+
|
|
40
|
+
## Freeze scope and authority
|
|
41
|
+
|
|
42
|
+
Record:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
MODE:
|
|
46
|
+
SCOPE: <exact diff/files/component/endpoint/artifact>
|
|
47
|
+
ASSETS_AND_DATA:
|
|
48
|
+
TRUST_BOUNDARIES:
|
|
49
|
+
ATTACKER_CAPABILITIES:
|
|
50
|
+
ENVIRONMENT_AND_VERSION:
|
|
51
|
+
WRITE_AUTHORITY: READ_ONLY unless explicitly expanded
|
|
52
|
+
LIVE_TEST_AUTHORITY: NONE unless exact target and actions are approved
|
|
53
|
+
OWNER_GATES:
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Resolve actual checkout, dirty state, deployed/runtime distinction, data
|
|
57
|
+
classification and existing controls. Never place credentials, full tokens,
|
|
58
|
+
private payloads or exploit-ready production details in prompts or reports.
|
|
59
|
+
|
|
60
|
+
Do not test a live target, scan infrastructure, create an account, send a
|
|
61
|
+
payload, access another user's data or install/run untrusted code without exact
|
|
62
|
+
authorization. Prefer local fixtures, static traces and isolated reproductions.
|
|
63
|
+
|
|
64
|
+
## Trace the trust boundary
|
|
65
|
+
|
|
66
|
+
Follow each relevant flow from attacker-controlled or externally supplied input
|
|
67
|
+
through validation, canonicalization, authorization, state changes and output.
|
|
68
|
+
For every boundary, establish:
|
|
69
|
+
|
|
70
|
+
- who controls the input and what identity/account/tenant it represents;
|
|
71
|
+
- parsing, normalization and validation order;
|
|
72
|
+
- authorization decision and its ownership point;
|
|
73
|
+
- storage, logging, cache, queue and retry behavior;
|
|
74
|
+
- sensitive output, side effect and failure mode;
|
|
75
|
+
- current guard and evidence that it runs on the real path.
|
|
76
|
+
|
|
77
|
+
A plaintext `.env` or credential file in a workspace an agent can read counts
|
|
78
|
+
as secret exposure. Prefer fetching secrets from a secret manager at launch,
|
|
79
|
+
scoped to the process that needs them. Never print a secret value.
|
|
80
|
+
|
|
81
|
+
Prioritize classes that fit the actual boundary: broken access control, confused
|
|
82
|
+
deputy, injection, SSRF, unsafe path handling, secret exposure, insecure
|
|
83
|
+
deserialization, XSS/CSRF, request smuggling, race/idempotence, unsafe defaults,
|
|
84
|
+
dependency or workflow substitution, and rollback bypass. Do not paste a generic
|
|
85
|
+
vulnerability list into findings.
|
|
86
|
+
|
|
87
|
+
When a material claim depends on current standards, advisories, dependency
|
|
88
|
+
behavior or vendor guidance, invoke `nobrainer-research` and prefer primary
|
|
89
|
+
sources for the exact version. If required current evidence is inaccessible,
|
|
90
|
+
return `RESEARCH_BLOCKED`; memory is not a security proof.
|
|
91
|
+
|
|
92
|
+
## Mode-specific evidence
|
|
93
|
+
|
|
94
|
+
### `THREAT_MODEL`
|
|
95
|
+
|
|
96
|
+
Produce a compact data-flow/trust-boundary map. For each plausible abuse path,
|
|
97
|
+
state precondition, attacker action, affected asset, existing control, residual
|
|
98
|
+
risk and one testable requirement. Rank by expected loss and reachability, not
|
|
99
|
+
by dramatic wording.
|
|
100
|
+
|
|
101
|
+
### `SECURITY_REVIEW`
|
|
102
|
+
|
|
103
|
+
Inspect the full changed function plus callers and consumers. Trace negative
|
|
104
|
+
paths and concrete boundary values. Run the smallest safe test or reproduction
|
|
105
|
+
that would distinguish a defect from a false alarm. A scanner result, model
|
|
106
|
+
finding or dependency label is only a candidate.
|
|
107
|
+
|
|
108
|
+
### `SUPPLY_CHAIN`
|
|
109
|
+
|
|
110
|
+
Resolve exact source, version/ref, integrity/pinning, release provenance,
|
|
111
|
+
license, install scripts, hooks, network calls, requested permissions,
|
|
112
|
+
credential access, write targets, update channel and rollback. Review the actual
|
|
113
|
+
artifact before executing it. Prefer temporary isolated use over global or
|
|
114
|
+
persistent installation.
|
|
115
|
+
|
|
116
|
+
### `RELEASE_GATE`
|
|
117
|
+
|
|
118
|
+
Map each security acceptance item to current code/config, a focused test,
|
|
119
|
+
runtime or migration evidence, and rollback. Static validation does not prove a
|
|
120
|
+
deployed control. Unknown production state remains unknown.
|
|
121
|
+
|
|
122
|
+
## Finding and false-positive gate
|
|
123
|
+
|
|
124
|
+
Report a defect only when all are present:
|
|
125
|
+
|
|
126
|
+
- severity with impact and realistic preconditions;
|
|
127
|
+
- exact location or trust boundary;
|
|
128
|
+
- attacker-controlled input/state/sequence;
|
|
129
|
+
- reachable code or runtime path;
|
|
130
|
+
- observable confidentiality, integrity or availability impact;
|
|
131
|
+
- why current controls fail;
|
|
132
|
+
- smallest ownership-correct fix contract;
|
|
133
|
+
- regression or verification proof.
|
|
134
|
+
|
|
135
|
+
Run a false-positive pass against every candidate: seek the guard, caller
|
|
136
|
+
constraint, deployment setting, parser behavior or version fact that would make
|
|
137
|
+
the path unreachable. Reject generic hardening, style preferences, stale
|
|
138
|
+
advisories for another version and speculative chains missing a necessary step.
|
|
139
|
+
|
|
140
|
+
## Handoff and remediation
|
|
141
|
+
|
|
142
|
+
Security review ends with evidence and a fix contract. If remediation is in
|
|
143
|
+
scope, route each accepted finding to `nobrainer-build` as a bounded stage with
|
|
144
|
+
a failing regression, allowed write scope and rollback. Then repeat the relevant
|
|
145
|
+
security trace with fresh evidence. Consequential fixes still require an
|
|
146
|
+
independent `nobrainer-review` or release gate; self-authored code is not
|
|
147
|
+
self-approved.
|
|
148
|
+
|
|
149
|
+
## Final report
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
MODE: THREAT_MODEL | SECURITY_REVIEW | SUPPLY_CHAIN | RELEASE_GATE
|
|
153
|
+
SCOPE_AND_AUTHORITY:
|
|
154
|
+
ASSETS_AND_TRUST_BOUNDARIES:
|
|
155
|
+
FINDINGS: <severity, location, path, impact, fix contract, proof>
|
|
156
|
+
REJECTED_CANDIDATES:
|
|
157
|
+
TESTS_AND_SOURCES:
|
|
158
|
+
UNTESTED_OR_INACCESSIBLE_SURFACE:
|
|
159
|
+
OWNER_GATES:
|
|
160
|
+
ROLLBACK_OR_CONTAINMENT:
|
|
161
|
+
RESULT: FINDINGS | CLEAN | PARTIAL | BLOCKED | RESEARCH_BLOCKED
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Return `CLEAN` only for the complete frozen scope with required evidence. A
|
|
165
|
+
partial review, inaccessible runtime or unverified external claim cannot be
|
|
166
|
+
green.
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nobrainer-sessions
|
|
3
|
+
description: "Use when the owner says nb-sessions, nb-multi, session-handoff, session-restart, or nb-session-restart, or asks for visible named reusable multi-session work with exact identity, isolated write scopes, audited handoffs, recovery, or controlled parallelism; do not use for a coherent one-session task."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# NoBrainer Sessions
|
|
7
|
+
|
|
8
|
+
Operate visible sessions as a small control plane. Human-readable titles make
|
|
9
|
+
the workflow understandable; exact identity and readback make it trustworthy.
|
|
10
|
+
This skill does not invent the project plan, select the ready batch or replace
|
|
11
|
+
implementation skills. `nobrainer-dispatcher` owns scheduling when a queue has
|
|
12
|
+
multiple delegated units.
|
|
13
|
+
|
|
14
|
+
Describe the outcome, success criteria and verification, let one project-level
|
|
15
|
+
session prepare bounded task prompts, and bring child results back for review.
|
|
16
|
+
Exact identity, write ownership, stop gates and independent receive-audit are
|
|
17
|
+
required; a convenient parent-child topology is not itself a safety contract.
|
|
18
|
+
|
|
19
|
+
For ordinary native subagents, use the compact packet, returned IDs, observable
|
|
20
|
+
completion and artifact review in nobrainer-tech-flow
|
|
21
|
+
[team execution](../nobrainer-tech-flow/references/delivery.md#coordinated-team-execution).
|
|
22
|
+
No durable registry or new visible task is required. Use this full protocol for
|
|
23
|
+
durable or explicitly visible sessions.
|
|
24
|
+
|
|
25
|
+
Read [references/protocol.md](references/protocol.md) before setup, dispatch, or
|
|
26
|
+
RECEIVE_AUDIT.
|
|
27
|
+
|
|
28
|
+
For project work, use the default isolated-worktree lifecycle in
|
|
29
|
+
[references/worktrees.md](../nobrainer-tech-flow/references/worktrees.md):
|
|
30
|
+
discover and fetch the remote default branch before creating a task worktree,
|
|
31
|
+
preserve the original checkout, and retain the worktree for owner review until
|
|
32
|
+
the exact PR merge is verified. After that gate, remove only the clean,
|
|
33
|
+
task-owned worktree without force and verify its removal. Follow an explicit
|
|
34
|
+
owner instruction to use another checkout or lifecycle.
|
|
35
|
+
|
|
36
|
+
## Choose the smallest topology
|
|
37
|
+
|
|
38
|
+
Default to one visible session named `<repo> | MAIN`.
|
|
39
|
+
One visible coordinator can own many bounded native workers; this topology does
|
|
40
|
+
not limit useful native concurrency under nobrainer-tech-flow's team execution contract.
|
|
41
|
+
Delegated work uses native subagents inside the current task. Creating a visible
|
|
42
|
+
conversation (for example with `create_thread`) requires an explicit owner
|
|
43
|
+
request for that conversation or an explicitly authorized MAIN restart.
|
|
44
|
+
Delegation, independent review, retries, context pressure and a continuing goal
|
|
45
|
+
do not grant that permission. If native subagents or the requested model are
|
|
46
|
+
unavailable, continue in MAIN and report the limitation; never substitute a
|
|
47
|
+
visible task. Workers cannot delegate further or create successors unless their
|
|
48
|
+
assignment expressly authorizes it.
|
|
49
|
+
Reuse an authorized worker for follow-up corrections; do not create a visible
|
|
50
|
+
conversation per review round.
|
|
51
|
+
|
|
52
|
+
Use stable role titles such as `<repo> | QA` or `<repo> | RESEARCH` when the
|
|
53
|
+
responsibility persists. Use `<repo> | <TASK_ID>` for a bounded disposable work
|
|
54
|
+
unit. Never treat a title as identity and never create a worker merely to make
|
|
55
|
+
the topology look multi-agent.
|
|
56
|
+
|
|
57
|
+
## Capability and identity gate
|
|
58
|
+
|
|
59
|
+
Discover the current harness capabilities for listing, creating, renaming,
|
|
60
|
+
sending, reading, and waiting on visible sessions. Verify each mutation by
|
|
61
|
+
readback. If exact session transport is unavailable, remain in MAIN and report
|
|
62
|
+
the degraded mode; hidden workers are not equivalent to requested visible
|
|
63
|
+
sessions.
|
|
64
|
+
|
|
65
|
+
Before reuse or dispatch, bind the target in the session registry:
|
|
66
|
+
|
|
67
|
+
- `THREAD_ID`, `HOST_ID`, harness and current status;
|
|
68
|
+
- repository, `CHECKOUT` or worktree, branch/base/HEAD;
|
|
69
|
+
- role, task, write scope and isolation;
|
|
70
|
+
- active-turn state and last successful readback.
|
|
71
|
+
|
|
72
|
+
Unknown, ambiguous, stale, or title-only identity is a stop condition. A
|
|
73
|
+
submission is not delivery; record `SENT` only with transport readback.
|
|
74
|
+
|
|
75
|
+
## Bounded turns and runtime release
|
|
76
|
+
|
|
77
|
+
A goal may span turns, but each turn/session is bounded. Run
|
|
78
|
+
`SESSION_HEALTH_GATE` at `START`, `AFTER_COMPACTION`, `MATERIAL_TRANSITION` and
|
|
79
|
+
`BEFORE_CLOSEOUT` using host/configured signals such as turn age, history size,
|
|
80
|
+
compactions, cost/tokens and owned workers. `UNKNOWN` or `UNSUPPORTED` lowers
|
|
81
|
+
runtime proof; optional telemetry does not block safe work. An unmeasurable
|
|
82
|
+
explicitly required hard budget blocks work relying on that guarantee.
|
|
83
|
+
`WARNING` checkpoints the goal/TODO, stops optional workers and
|
|
84
|
+
large new units, and permits only the safe current unit to continue. A hard
|
|
85
|
+
limit persists the canonical Markdown goal, writes a compact handoff, verifies
|
|
86
|
+
no write is in flight, then selects verified host clear or `END_TURN`, or the
|
|
87
|
+
authorized [session-restart protocol](references/session-restart.md). Standing
|
|
88
|
+
restart consent covers later rotations in its recorded scope; installation alone
|
|
89
|
+
is not consent. Resume by reading that file and
|
|
90
|
+
reconciling identity and checkout; stale transcript or native-goal text cannot
|
|
91
|
+
override it.
|
|
92
|
+
`task_complete` is not `RUNTIME_RELEASE`; require owned-worker readback where
|
|
93
|
+
the host supports it.
|
|
94
|
+
|
|
95
|
+
## Startup care
|
|
96
|
+
|
|
97
|
+
Flow invokes [automatic start and observation](references/session-restart.md#automatic-start-and-observation)
|
|
98
|
+
on explicit Flow entry for resumable, long or delegated work; the quick path skips it.
|
|
99
|
+
Name the session immediately from verified creation metadata; assess current
|
|
100
|
+
context and full necessary startup inputs. A health restart does not require an
|
|
101
|
+
economic saving, but still requires separately recorded owner consent, progress
|
|
102
|
+
and safe takeover.
|
|
103
|
+
|
|
104
|
+
## Modes
|
|
105
|
+
|
|
106
|
+
- `session-restart` / `nb-session-restart`: evaluate long-run restart benefit,
|
|
107
|
+
persist a compact checkpoint, create a fresh MAIN through supported native
|
|
108
|
+
transport, verify takeover, then archive the exact retired source if authorized.
|
|
109
|
+
Read [references/session-restart.md](references/session-restart.md); no fixed
|
|
110
|
+
timer, forked full history or per-rotation approval inside standing consent.
|
|
111
|
+
|
|
112
|
+
- `setup`: reconcile an existing registry, name MAIN, and create only the next
|
|
113
|
+
justified session. Do not pre-create a swarm.
|
|
114
|
+
- `delegate`: send one already-selected, self-contained work unit to one exact
|
|
115
|
+
session.
|
|
116
|
+
- `RECEIVE_AUDIT`: independently verify one report before any state advance.
|
|
117
|
+
- `recover`: resume from canonical state and evidence without repeating the
|
|
118
|
+
same failed attempt.
|
|
119
|
+
- `handoff`: create a compact owner-requested continuation snapshot for a fresh
|
|
120
|
+
MAIN session, including live state, exact unfinished work, evidence and the
|
|
121
|
+
first safe action; do not pretend that writing the snapshot created or
|
|
122
|
+
delivered a session.
|
|
123
|
+
|
|
124
|
+
## Writer and lease contract
|
|
125
|
+
|
|
126
|
+
MAIN normally owns sequential workflow state. A worker owns only its bounded
|
|
127
|
+
implementation scope and report. Never let two writers mutate the same state or
|
|
128
|
+
checkout concurrently.
|
|
129
|
+
|
|
130
|
+
Use the project's authoritative lease mechanism when one exists. A Markdown
|
|
131
|
+
`LEASE` is advisory coordination, not atomic locking. `FENCING_EPOCH` is valid
|
|
132
|
+
only when an authoritative control plane allocates a monotonically increasing
|
|
133
|
+
token and every write boundary rejects stale tokens. Otherwise record
|
|
134
|
+
`FENCING_SUPPORTED: NO` and `FENCING_EPOCH: NONE`; do not fabricate safety.
|
|
135
|
+
|
|
136
|
+
Malformed, active, or uncertain lease state is `LEASE_CONFLICT`. Stop routing.
|
|
137
|
+
For parallel writers require isolated checkouts, disjoint write scopes, and a
|
|
138
|
+
coordinator-owned integration step.
|
|
139
|
+
|
|
140
|
+
## Delegate gate
|
|
141
|
+
|
|
142
|
+
Dispatch only when all are true:
|
|
143
|
+
|
|
144
|
+
1. one approved work unit has an observable outcome, exclusions, dependencies,
|
|
145
|
+
acceptance, verifier, evidence path, rollback, owner gates and a frozen
|
|
146
|
+
`MODEL_POLICY`;
|
|
147
|
+
2. canonical state identifies the same active task and allowed transition;
|
|
148
|
+
3. session identity, checkout, clean/dirty scope, lease, and active-turn state
|
|
149
|
+
pass fresh readback;
|
|
150
|
+
4. frozen inputs and the cheapest relevant preflight check pass;
|
|
151
|
+
5. the report receiver is an exact session, not a title.
|
|
152
|
+
|
|
153
|
+
Context propagation is not assumed. Send the minimum context: repository
|
|
154
|
+
instructions, the owning method and its source hash, frozen task inputs and
|
|
155
|
+
acceptance. Never copy the whole parent transcript or unrelated skills. Require
|
|
156
|
+
the worker's context readback before work; stale context or evidence, mismatch or transport failure blocks dispatch.
|
|
157
|
+
|
|
158
|
+
Bind the frozen `MODEL_POLICY` and `MODEL_REQUESTED`, effort, budget and
|
|
159
|
+
escalation gate. If the host does not expose one field, record
|
|
160
|
+
`UNKNOWN` or `UNSUPPORTED` and keep runtime proof lower;
|
|
161
|
+
never silently substitute another model.
|
|
162
|
+
|
|
163
|
+
Use Flow [communication](../nobrainer-tech-flow/references/communication.md)
|
|
164
|
+
for delegation, reports and handoffs; preserve caller formats and language
|
|
165
|
+
overrides. Build the prompt from the template in the protocol. The worker performs exactly
|
|
166
|
+
one work unit, does not select a successor, releases its lease on finish or hard
|
|
167
|
+
stop, sends exactly one final report, and ends its turn. Bind retryable transport
|
|
168
|
+
to message and payload identity, an idempotency key, delivery receipt and ACK;
|
|
169
|
+
record unsupported fields honestly and never blindly retry an uncertain send.
|
|
170
|
+
For every delegation record, including a blocked or stale one, copy the caller's
|
|
171
|
+
schema before filling values; do not rename fields or change nesting. Preserve
|
|
172
|
+
exact observed values as raw evidence in the requested location and derive the
|
|
173
|
+
canonical verdict separately from the protocol enum and readback. When either
|
|
174
|
+
is insufficient, use its honest failure state and block retry or advancement.
|
|
175
|
+
|
|
176
|
+
## RECEIVE_AUDIT
|
|
177
|
+
|
|
178
|
+
Treat `FINISHED` and `NEXT_ACTION` as untrusted report fields. Independently bind
|
|
179
|
+
the report to the expected session, task, `CHECKOUT`, commit, diff, frozen
|
|
180
|
+
inputs, manifest, tests, verifier, build/runtime, quality review and side
|
|
181
|
+
effects. The lease gate passes only when readback proves `RELEASED`, or proves
|
|
182
|
+
`NOT_HELD`/`UNSUPPORTED` for a workflow that explicitly uses one of those
|
|
183
|
+
states; `NOT_RELEASED`, unknown ownership or a conflict blocks advancement.
|
|
184
|
+
|
|
185
|
+
Return exactly one audited result to `nobrainer-dispatcher`, or to
|
|
186
|
+
`nobrainer-tech-flow` when no dispatcher is justified:
|
|
187
|
+
|
|
188
|
+
- all gates pass: report the verified transition as eligible; do not select or
|
|
189
|
+
dispatch the next task;
|
|
190
|
+
- isolated correctable defect: return `CORRECTION_REQUIRED` with the exact defect
|
|
191
|
+
and evidence; do not choose, dispatch or execute the correction. Dispatcher,
|
|
192
|
+
or Flow when Dispatcher is not justified, selects the task's assigned repair
|
|
193
|
+
method (`nobrainer-build` for implementation). After the repair and any
|
|
194
|
+
required repeated review, run a fresh `RECEIVE_AUDIT` that binds the repaired
|
|
195
|
+
diff, tests and current review result;
|
|
196
|
+
- missing or conflicting evidence, failed check, active turn, or lease conflict:
|
|
197
|
+
preserve state and stop;
|
|
198
|
+
- owner decision or irreversible action: ask for one explicit decision;
|
|
199
|
+
- no remaining task: report closure eligibility; do not manufacture a successor.
|
|
200
|
+
An empty `READY` set may mean wait for `RUNNING`, audit `REPORTED`, or finish
|
|
201
|
+
accepted work. If all unfinished work is blocked, checkpoint and name its
|
|
202
|
+
unblock action; use `OWNER_DECISION_REQUIRED` only for an actual owner decision.
|
|
203
|
+
|
|
204
|
+
Retries require new evidence or a changed condition. Preserve a stable blocker
|
|
205
|
+
fingerprint, attempt number, recovery owner, retry budget, checkpoint, rollback,
|
|
206
|
+
and one concrete remediation action.
|
|
207
|
+
|
|
208
|
+
## Final response
|
|
209
|
+
|
|
210
|
+
Report topology, exact identities created or reused, canonical state change,
|
|
211
|
+
transport readback, audit result, evidence, uncertainty, recovery/rollback, and
|
|
212
|
+
one next action. Never claim session creation, rename, dispatch, receipt, or
|
|
213
|
+
completion without readback from the responsible system.
|
|
214
|
+
|
|
215
|
+
## Optional bounded command
|
|
216
|
+
|
|
217
|
+
For a non-interactive command that needs enforced wall-time/output limits, use
|
|
218
|
+
the inspected [bundled runner](scripts/run_bounded.py) when Python 3.11+ and POSIX
|
|
219
|
+
are available. Pass explicit argv, finite `--wall-seconds`, `--max-output-bytes`
|
|
220
|
+
and a fresh `--receipt`; no shell or automatic retries. It controls only its
|
|
221
|
+
child process group, not model context, cost, escaped sessions or other tools.
|
|
222
|
+
A receipt is process evidence, never task acceptance; missing proof is not success.
|
|
223
|
+
To bind a check to the files it ran against, see the [evidence receipt](references/evidence-receipt.md).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Evidence receipt
|
|
2
|
+
|
|
3
|
+
Optional local tool. Sessions owns the command capture; Review owns acceptance.
|
|
4
|
+
[`evidence_receipt.py`](../scripts/evidence_receipt.py) runs one command through
|
|
5
|
+
the bounded runner and records a declared input scope before and after it.
|
|
6
|
+
`check` is read-only and never re-executes a command from the receipt.
|
|
7
|
+
|
|
8
|
+
## Use
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
python3 skills/nobrainer-sessions/scripts/evidence_receipt.py capture \
|
|
12
|
+
--root ./project --input src --input tests \
|
|
13
|
+
--receipt ./check-evidence.json --label 'unit tests' \
|
|
14
|
+
--wall-seconds 30 --max-output-bytes 65536 -- \
|
|
15
|
+
python3 -B -m unittest discover -s tests -v
|
|
16
|
+
|
|
17
|
+
python3 skills/nobrainer-sessions/scripts/evidence_receipt.py check \
|
|
18
|
+
--root ./project --receipt ./check-evidence.json --format markdown
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The caller supplies the root on every check. Inputs are relative files or
|
|
22
|
+
directories without links or special files. The receipt must be new and outside
|
|
23
|
+
every input. Keep caches and outputs outside the scope (`-B` avoids bytecode).
|
|
24
|
+
An error after the command started can mean it already ran: reconcile effects
|
|
25
|
+
before retrying.
|
|
26
|
+
|
|
27
|
+
## Statuses
|
|
28
|
+
|
|
29
|
+
- `CURRENT`: the before, after and current snapshots agree.
|
|
30
|
+
- `STALE`: the selected scope differs now.
|
|
31
|
+
- `CHANGED_DURING_RUN`: before and after differ, so no single source version
|
|
32
|
+
was established, even if the command returned zero.
|
|
33
|
+
- `UNAVAILABLE`: the scope or the after snapshot could not be read safely.
|
|
34
|
+
|
|
35
|
+
## Exit codes
|
|
36
|
+
|
|
37
|
+
Capture keeps the command's nonzero result; a zero exit with non-current
|
|
38
|
+
inputs or an incomplete run (for example output cut short) returns 1. Check
|
|
39
|
+
returns 0 only for current inputs and a completed command, 1 for stale,
|
|
40
|
+
unavailable, failed or incomplete evidence, and 2 for invalid input or an
|
|
41
|
+
unsupported operation.
|
|
42
|
+
|
|
43
|
+
## Limits
|
|
44
|
+
|
|
45
|
+
- Python 3.11+ and POSIX only. Windows capture and check are unsupported.
|
|
46
|
+
- Unsigned: anyone who can rewrite the receipt and the files can forge a
|
|
47
|
+
consistent record. Hashes do not prove a trustworthy observer or a sufficient test.
|
|
48
|
+
- Output is stored as base64 with hashes, which is not redaction. Do not capture
|
|
49
|
+
commands that can emit secrets; inspect a copy before sharing.
|
|
50
|
+
- Caps: 64 selectors, 1,000 entries, 64 MiB input, 256 KiB output, 4 MiB receipt.
|
|
51
|
+
- A change and revert between snapshots can go undetected; the bounded runner is not a sandbox.
|
|
52
|
+
|
|
53
|
+
A receipt is evidence, not acceptance. Test counts stay `UNKNOWN`, task acceptance
|
|
54
|
+
`NOT_EVALUATED`, human approval `NOT_RECORDED`, authenticity `NOT_VERIFIED`.
|
|
55
|
+
STALE or CHANGED_DURING_RUN evidence does not prove the current artifact.
|