cyc-stack 0.7.1 → 0.9.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +25 -254
- package/bin/cyc.mjs +61 -23
- package/docs/assets/cyc-method-library.svg +1 -39
- package/docs/assets/cyc-overview.svg +1 -44
- package/docs/assets/cyc-workflow-diagram.svg +1 -415
- package/docs/context.md +13 -23
- package/docs/cyc-workflow.md +31 -84
- package/docs/installation.md +66 -124
- package/docs/onboarding-recovery.md +31 -37
- package/docs/project-tools.md +16 -10
- package/docs/response-standard.md +16 -32
- package/docs/runtime.md +22 -224
- package/docs/skill-contract.md +13 -56
- package/docs/task-context.md +56 -0
- package/docs/validation.md +2 -0
- package/docs/work-assessments.md +25 -92
- package/methods/cyc-build/SKILL.md +8 -53
- package/methods/cyc-challenge/SKILL.md +4 -0
- package/methods/cyc-context/SKILL.md +20 -53
- package/methods/cyc-context/references/evidence.md +1 -1
- package/methods/cyc-context/references/templates.md +4 -11
- package/methods/cyc-deliver/SKILL.md +6 -42
- package/methods/cyc-remember/SKILL.md +1 -1
- package/methods/cyc-scout/SKILL.md +17 -51
- package/methods/cyc-setup/SKILL.md +7 -19
- package/methods/cyc-verify/SKILL.md +15 -66
- package/methods/cyc-verify/references/recipe.md +2 -0
- package/package.json +9 -1
- package/plugin.json +1 -1
- package/rules/cyc-delivery.mdc +33 -33
- package/scripts/browser-audit.mjs +53 -0
- package/scripts/catalog.mjs +9 -2
- package/scripts/codex-host.mjs +178 -0
- package/scripts/context-review.mjs +212 -29
- package/scripts/delegation.mjs +156 -0
- package/scripts/execution.mjs +51 -0
- package/scripts/onboarding.mjs +14 -1
- package/scripts/packet.mjs +21 -6
- package/scripts/project-tools.mjs +43 -20
- package/scripts/recovery.mjs +20 -1
- package/scripts/response-mode.mjs +8 -0
- package/scripts/run-worker.mjs +4 -0
- package/scripts/runtime.mjs +648 -68
- package/scripts/swarm.mjs +154 -0
- package/scripts/task-context.mjs +164 -0
- package/scripts/work-review.mjs +32 -10
- package/skills/cyc/SKILL.md +29 -70
package/skills/cyc/SKILL.md
CHANGED
|
@@ -11,99 +11,54 @@ You own the outcome. Keep normal work short without dropping context reuse, revi
|
|
|
11
11
|
|
|
12
12
|
## Frontend work
|
|
13
13
|
|
|
14
|
-
For new websites
|
|
14
|
+
For new websites/composed redesigns use the [frontend design method](../../methods/cyc-design/frontend-design/SKILL.md) and its three gates: before markup, design/decisions.md names archetype, typeface pair, seven subject-derived colors, signature and rejection condition (plus multi-site divergence); Build renders/scores the signature before expansion (three generic tells fails); Verify checks desktop/phone and experience. Keep it within the original criteria even on fast routes. Combine host/platform guidance into that sheet. Narrow repairs preserve identity; review-only stays review-only.
|
|
15
15
|
|
|
16
16
|
## The flow
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Select the playbook by the requested outcome and permissions using the table below; the keyword route is advisory. Review/explanation does not authorize product edits. Read the chosen playbook. The controller's next action owns stage order; supporting methods are internal paths, not additional public commands.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
scout → build → verify ⟲ repair within budget → deliver → reply
|
|
22
|
-
```
|
|
20
|
+
scout → build → finish/proof judgment → verify → deliver
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
2. **Start the run with its plan.** Save a JSON object under `.cyc/runtime/` with these fields:
|
|
26
|
-
- `goal`, `playbook`, `criteria` (`[{"id":"c1","description":"..."}]`, with optional unique `clauses: [{"id":"...","description":"..."}]`), `allowedPaths`, and `session`;
|
|
27
|
-
- `evidenceVersion: 1` and `requirements`: the original authorized outcome text, kept separately from the short plan. Preserve every original outcome ID and material clause. Use `reviewPolicy: "fresh-required"` for high-risk work when a fresh reviewer is available; otherwise select `"self-allowed"` and disclose the actual fallback. Unversioned inputs remain the compatibility interface for older clients, not the updated workflow;
|
|
28
|
-
- `plan`: one or two sentences;
|
|
29
|
-
- `scout`: `{"context":{"status":"used|none","evidence":"...","freshness":"...","sources":[]},"approach":{"kind":"reuse|extend|repair|create","evidence":"..."},"alignment":{"status":"clear|confirmed","evidence":"..."},"consumers":[{"id":"direct","description":"...","check":"..."}]}`. `context.sources` are matched history (context docs, decisions, ledger entries); with `status: "none"`, list the code you read as `context.read` instead. Omit `context` only when the project has no `docs/context/INDEX.md` and no ledger: the controller then records that there was no history to consult.
|
|
22
|
+
Read the project's context index first, `docs/context/INDEX.md`, and then only the component docs whose Covers match affected paths. Plan canonical feature context before Build and retain it before final verification. Completed-run catch-up needs a new scoped update; see [Context](../../methods/cyc-context/SKILL.md).
|
|
30
23
|
|
|
31
|
-
|
|
24
|
+
1. **Scout.** Read docs/context/INDEX.md, matched component history and the relevant error ledger before code. Use investigate with affected paths to discover context/recipes; confirm freshness against actual files and the dirty diff. Reuse, extend, repair or create with a short reason. Trace authoritative state and affected consumers; for a new protected consumer execute the existing writer/status and new protected reads/writes together. Retain every original outcome and material clause. Ask only about consequential unknowns; do not manufacture approval.
|
|
25
|
+
2. **Start once.** Save START.json under .cyc/runtime with goal, playbook, explicit criteria/clauses, literal allowedPaths, evidenceVersion:1, original requirements text, reviewPolicy, plan and scout. Scout contains context, approach, alignment and named consumers; the [assessment contract](../../docs/work-assessments.md) defines fields. Include contextRetention: {version:1, disposition:"required", features:[{id,doc,paths}]} for each new/changed feature and affected shared owner. Use the target project’s focused canonical docs and index, creating them when missing; the controller includes these paths before scope freezes. Inspect the inferred plan if omitted. Generic handoffs, recipes and runtime logs do not satisfy feature retention. Explicit documentation restrictions remain pending without unauthorized writes. Pass it to run start --file START.json before edits. Scout supplied at start is already recorded; do not record it twice. Use the returned exact runId and generated template paths, never another conversation's sole run. Allowed paths are literal files/directory prefixes; translate brief globs without broadening authorization. Advisory wording-only work can use packet --advisory with the actual reason no run applies.
|
|
26
|
+
3. **Bind actual capability.** Set executionMode to native-codex, native-claude, cursor or explicitly authorized standalone. conversationId is the actual host conversation; session is a separate workflow label. Native modes need actual hook context; standalone neither creates hook state nor certifies activation and cannot downgrade a live native request. Unknown capability returns one setup action. Do not invent Cursor identity, tokens or host observations. Legacy callers retain their documented limits. The CLI is .cyc/engine/bin/cyc.mjs for copied installs or bin/cyc.mjs in this checkout.
|
|
27
|
+
4. **Build and record failures.** Follow the relevant [Build method](../../methods/cyc-build/SKILL.md). Write meaningful boundary tests, then the smallest coherent implementation. Feature/bug proof must fail on originals; refactor characterization must pass there. Preserve imported fields, references and access metadata when recreating records. Keep consumer policies coherent and server authorization separate from client response checks. Record failed fixes promptly in the selected ledger; run-local history is valid when shared history is outside scope. Finalize authorized source/context/ledger edits before final checks. Never clear proof ownership, overwrite unexpected edits or manually swap source to obtain proof.
|
|
28
|
+
5. **Review once, then affected changes.** Follow Rigor below. Capture before dispatch, fill recordTemplate with actual evidence and identity:null or observed text, then record it. Open findings block. Finish reuses current records; do not transcribe provenance. For bounded scopes inspect dependencies and declare contextPaths/contextEvidence; static imports/configuration bind coverage, unknown impact falls back to whole source. FollowupPath lists changes/contracts/findings; affected paths need new review. Matching provenance is not correctness.
|
|
29
|
+
6. **Finish with generated input.** Fill finishTemplate with summary, semantic judgments and one scenarioEvidence per original criterion/clause: named scenario, configured check, receipt:current-verification, result:passed, origin:agent-reported, actual evidence and consumers mapped to Scout IDs. Exact legacy views are derived; unavailable journeys stay unverified. Existing criterion/consumer evidence remains compatible.
|
|
30
|
+
Run finish --run ID --file FINISH.json --wait-ms 30000. It prepares required canonical context before proof/final checks, completes stages and generates delivery evidence. Fill learning.context {id,currentView} or author planned docs; needs-context supplies remaining input until authored knowledge/index/current History/source binding pass. Learning:none cannot waive a feature; restrictions remain pending. Later context edits need fresh checks, never only a new packet.
|
|
31
|
+
Needs-proof-review supplies failure IDs, diagnostics and an exact bound continuation. Judge actual category/reason then invoke its command; module-load/setup is not a behavioral defect, unknown boundaries stay unknown. Bug fixes need decisive existing behavior; features may establish a missing interface. Do not inspect low-level files just to discover IDs or build a second packet. Truthful non-testable exemptions retain their limits. See [assessments](../../docs/work-assessments.md).
|
|
32
|
+
7. **Bound check work, preserve coverage.** Optional proofCommands at start freezes focused red/green execution. --tests chooses swapped files, not command scope. Final candidate checks remain broad. Pre-existing broad failures need compatible measured original broad evidence; finish measures it when an acceptance decision requires it, retaining focused results when valid. The existing baseline cache and candidate receipts reuse only compatible, explicitly local-deterministic checks; unknown inputs, external/freshness checks rerun. Never change config/tests to pass. A running operation returns phase/check/elapsed/latest available output, logs and an exact operation handle. Use run wait with that handle for 30–60 seconds when permitted; do not inspect lock files for ordinary progress. Silence, failure and interruption are distinct; honor user stop controls.
|
|
33
|
+
8. **Deliver.** Use the generated review and canonical run evidence; name decisive checks and disclose failures, unavailable services and unverified host activation. Native Codex/Claude finish writes its request-bound packet; standalone writes run-local delivery.json without a native claim. Cursor still needs its exact-response packet with explicit mode. Recheck the concise reply with check-reply; standalone uses --mode standalone instead of nonexistent hook-state reads. Follow the [response standard](../../docs/response-standard.md), including its visual and length rules. A stage, fingerprint or model-authored score never certifies product readiness. Retain pending proposals as pending; do not invent human acceptance.
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Start before editing. Later commands find the active run themselves; pass `--run <ID>` only when several runs are active. The CLI is `.cyc/engine/bin/cyc.mjs`, or [bin/cyc.mjs](../../bin/cyc.mjs) for plugin installs. No `.cyc/config.json` yet? Run [Setup](../../methods/cyc-setup/SKILL.md) first.
|
|
36
|
-
3. **Build.** Follow [Build](../../methods/cyc-build/SKILL.md). Work in small slices: features and bug fixes use red then green; refactors keep characterization tests green on original and candidate code. Keep named consumers consistent. Record failed fixes in the selected ledger immediately, with evidence and the next hypothesis; if `run next`'s `ledgerPath` does not exist yet, create it in the [entry format](../../methods/cyc-error-ledger/references/entry-format.md). Reread the diff and fix shortfalls. `run finish` records Build and lists the files you changed; `run record` remains for step-by-step work. Finalize authorized context/index and ledger edits before final verification. Verified facts keep their evidence and limits; unverified hypotheses and undecided proposals stay labeled in run-local notes.
|
|
37
|
-
4. **Prove, verify, and deliver in one call.** Use [Verify](../../methods/cyc-verify/SKILL.md)'s applicable checks: task criteria, affected consumers, rejected cases, and the real journey/recipe.
|
|
38
|
-
- **Test proof.** New regression tests must detect the original defect. `run finish` runs `prove-red` itself when the proof is missing or outdated: tests for bug fixes and features must fail on the run-start code, and refactor tests must pass on it. A change with no testable behavior records `testProof: {"status":"exempt","reason":"..."}`, in FINISH.json or its assessment. With TAP (`node --test`, `tap`), mocha, or jest output, the proof names the new tests that fail on the original code, including output longer than the 32,000 characters kept. It does so even when an older test in the same suite already failed there, because it compares failing test names. Other output gives a per-check result: at least one new test fails on the original. In `criterionEvidence` and the reply, say a specific case failed before the fix only if the proof named it or you ran it on the original code yourself. Otherwise quote `proofClaim` from the finish result.
|
|
39
|
-
- **Versioned evidence.** For `evidenceVersion: 1`, fill `criterionChecks` from the template: one named scenario/observation per original criterion or clause, its configured `check`, `receipt: "current-verification"`, `result: "passed"`, `origin: "agent-reported"`, and actual evidence. The controller binds the command receipt after verification; it does not claim to have observed a named passing assertion. Run `prove-red` before finalizing a non-exempt proof and add `proofReview` using the returned failure IDs, categories, reasons and existing boundary for behavioral claims. See [versioned evidence](../../docs/work-assessments.md#versioned-evidence-records).
|
|
40
|
-
- **Review.** Review the current diff against the senior bar below for intent, consumers, and conventions, and resolve or justify dismissing every finding. Tests alone cannot replace review. Each finding is `{"id":"f1","status":"resolved|dismissed|open","evidence":"<how it was resolved, or why it is dismissed>"}`; an open finding blocks verification.
|
|
41
|
-
- **Finish.** Copy `finishTemplate` to `FINISH.json` and replace every `<...>` with what you found: `summary`, `assessment`, `criterionEvidence` (each criterion ID mapped to its evidence), and `acceptFailures` (see below). The template asks only for what you must judge: `errorHistory` appears for bug fixes, and `learning` is yours to add when you recorded something reusable. Left out, the controller records none and says so. If the template lists an `acceptFailures` entry, that check already failed in the project's run-start baseline: replace its reason with why it is unrelated, or delete the entry and fix the check. Placeholders left in are refused. Add `artifacts` only to override the changed-file list. Run `run finish --file FINISH.json`; the [input examples](../../docs/runtime.md#structured-input-without-shell-quoting) show the envelope. It records Build if needed, proves the new tests, runs the configured checks, records both stages, and completes the run. It refuses an incomplete assessment before running anything.
|
|
42
|
-
- **If the proof or a check fails**, finish stops and says which. Read the receipt, then run `run retry --stage build --reason "<what the failure showed>"` before editing, so the repair is recorded as a build artifact. Do not rerun checks on unchanged files to reproduce a failure, because repeated identical failures exhaust the run.
|
|
43
|
-
|
|
44
|
-
Changes after a passing review require returning to Verify. `run prove-red`, `run verify`, `run record`, and `run complete` remain available for step-by-step use.
|
|
45
|
-
5. **Deliver the reply.** Follow [Deliver](../../methods/cyc-deliver/SKILL.md). Learning is proportionate: for a small change with nothing reusable, leave `learning` out rather than writing context docs to fill the field. Bug fixes and runs with failures still record error history. With a run-local ledger, `errorHistory.reason` becomes that entry when you have not written it. `run finish` records on the Deliver handoff which component docs under `docs/context/` the change touched (`contextDocs`, also in `review.md`). If the change touched a component that has a doc and you did not update that doc, run `node <cli> context review --run <ID> --write` after finish: it appends the entry from the run's own record (what changed, what was learned, the decisive check, the files with hashes) and refreshes the index; then write the packet with `cyc packet`, since files changed after finish. Otherwise leave the doc to the batched `cyc context review`, which proposes entries for every completed run no doc records yet. See [Context](../../methods/cyc-context/SKILL.md).
|
|
46
|
-
|
|
47
|
-
Reply with the result first, then the criteria evidence and what was not checked. For code work, name the decisive regression test and link the generated `.cyc/runs/ID/review.md`; reuse it for an authorized PR. Under CYC presentation, follow the [response standard](../../docs/response-standard.md): include one useful visual even within the 1,000-character default. Every value in that visual must be observed this run; a "before" value comes from running the original code, never from reading it.
|
|
48
|
-
|
|
49
|
-
Before sending, reread your reply: it answers the request, is understandable, its visual adds information, and it states the limits. In Claude Code and Codex, a completed `run finish` has already written the review packet from the run's record (`packet.written` in its result), and the Stop gate checks the reply's length, visual, and blocked prefix itself; do not run `cyc packet` after it. Run `node <cli> packet --session <ID> --passed "<criterion> :: <evidence>" --artifact <files> --reviewed` yourself when no run completed (a blocked run, or an advisory change with `--advisory`), when you changed files after finish, and always in Cursor, with `--response <file>` holding the exact reply. Draft the reply in `.cyc/runtime/reply.md`, run `node <cli> check-reply .cyc/runtime/reply.md --session <ID>` to see its character count and visual before sending, and send that text unchanged; a rejected reply costs a whole turn, and the check costs one command. `cyc packet --response .cyc/runtime/reply.md` checks the same when you write the packet yourself. If this session's run ended blocked, halted, paused, or stopped, the packet marks itself blocked from the run's record: start the reply with "Blocked:" or "Not ready:" and say what stops completion. After a rejected reply, revise it; rerun the packet only if you wrote it yourself. Codex/Claude packet preflight also checks this hook request's run statuses. For a readiness diagnosis, or in Cursor, use `readiness --session <ID>`; without mapped hook state it needs the actual request start as `--since ISO_TIMESTAMP`, and it remains an explicit diagnostic. A completed replacement does not hide a stopped original. Respect project delivery settings; `delivery.presentation: "project"` delegates formatting to project rules.
|
|
50
|
-
|
|
51
|
-
**Other stages.** Playbooks such as plan, explore, teach, handoff, resume, reflect, and evaluate use stages beyond these four. The playbook page links each stage's method, and `run next` returns the current one as `skillFile` (an absolute path; `skill` is the same file relative to the CYC engine, not the project). Load that method for the current stage only, then record the stage with `run record --run <ID>`.
|
|
52
|
-
|
|
53
|
-
Store assessment JSON beneath the actual run directory. At finish, `finishTemplate` holds the required fields; for other stages, `run next` returns them as a fill-in `assessmentTemplate`. The contract docs are needed only for unusual cases. Advisory and legacy runs retain ordinary handoffs; do not add implementation paperwork to an explanation. The shared review is generated from evidence, not a second manually maintained report. Context and ledger edits after final verification invalidate source evidence like other edits.
|
|
54
|
-
|
|
55
|
-
Before an executable run, check that the project has real `verification.commands`. If the list is empty, `run start` uses the project's declared test command and reports it as `verificationSource`; disclose that in the reply. An npm `pretest` or `posttest` hook runs as its own check around the test script, so a red posttest (lint, a template check) cannot hide the tests. The declared sources are package.json `scripts.test`, a Makefile `test` target, pytest configuration, go.mod, and Cargo.toml. If the project declares none, run [Setup](../../methods/cyc-setup/SKILL.md) steps 3-7 **before** `run start`, which refuses code playbooks without checks. On an unattended run, configure the commands the project itself defines and disclose them. Never edit `.cyc/config.json` after a run starts: that halts the run. Reuse established setup for ordinary tasks rather than rerunning onboarding checks before each change.
|
|
56
|
-
|
|
57
|
-
In Codex/Claude, missing injected CYC gate context is a setup gap: use [Setup](../../methods/cyc-setup/SKILL.md)'s host check and supported trust/reload flow. Never invent a Cursor tag or use an old state token as a substitute. A current prompt observation with `canStartTask: true` permits the first task while Stop is pending; final activation is observed after the turn ends. Existing authorization permits local repairs while activation is pending, but does not turn them into hook-verified delivery.
|
|
35
|
+
Detailed/interrupted flows retain record/retry/recover. Failed checks require recovery/Build before edits; preserve evidence and shared budgets. Configure real checks before start; missing checks use [Setup](../../methods/cyc-setup/SKILL.md). Protected configuration and native gates cannot be weakened mid-run.
|
|
58
36
|
|
|
59
37
|
## Explain progress
|
|
60
38
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Engineering understanding is part of every stage. During Scout, explain the affected flow and why the approach fits; during Build, explain consequential changes to state, boundaries, or consumers; during recovery, explain what the failure rules out and the next hypothesis; during Verify, connect results to behavior and limits; during Deliver, leave a usable before/after explanation and pointers for maintenance. Adapt depth to the engineer and task. Combine these for small work; do not turn them into a lecture, quiz, or additional approval gate. Follow the [engineering understanding standard](../../docs/response-standard.md#engineering-understanding-throughout-the-work). Supplying an explanation is not proof the engineer understands it.
|
|
39
|
+
For setup or a requested first-task walkthrough, explain the benefit once: the request says what changes; project rules and earlier decisions say what must keep working. Before work name the outcome and preserved behavior; during work connect an actual rule/discovery to a decision and check; after work link actual evidence, limits and saved target context. Introduce capabilities when useful, not as a catalog. Reuse onboard.experience, investigate match/freshness and route/workflowAdvice as leads. They do not certify semantics, authorize new work or waive checks. Unknown first-use history stays unknown; create no personal tracking store.
|
|
64
40
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Explain consequential choices and what they protect without narrating every tool call or writing a design review. During longer work, give a useful update about every minute, naming what remains unresolved. Communicate as work proceeds; do not add a reporting stage or delay useful edits. When delegating, pass this guidance along and consolidate findings into coherent user updates. See the [progress standard and example](../../docs/response-standard.md#progress-updates) when needed; it applies to supporting methods too.
|
|
41
|
+
Use the [shared progress/engineering-understanding standard](../../docs/response-standard.md#progress-updates): readable behavior → mechanism → decision/check, usually one or two paragraphs at meaningful developments and about each minute of long work. Disclose uncertainty; command counts and explanation supplied do not prove understanding. Pass this to an authorized reviewer and consolidate findings.
|
|
68
42
|
|
|
69
43
|
## The senior bar
|
|
70
44
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
1. Make the smallest change that solves the problem. No speculative options, layers, or guards.
|
|
74
|
-
2. Fix the cause where it starts. A guard is a fix only if the state it handles is legitimate.
|
|
75
|
-
3. A test that cannot fail proves nothing. `run prove-red` checks it against the run-start code.
|
|
76
|
-
4. Test behavior callers can observe, not internals.
|
|
77
|
-
5. Match the codebase. Reuse its helpers and patterns; never fork one.
|
|
78
|
-
6. Put the domain in data (a state machine or table), not in growing branches.
|
|
79
|
-
7. Validate at boundaries and trust internal types.
|
|
80
|
-
8. Migrate every caller, then delete the old path.
|
|
81
|
-
9. After two failures on one assumption, test the assumption before a third fix.
|
|
82
|
-
10. Claim only what you observed this run.
|
|
83
|
-
11. Leave the code easier to read than you found it.
|
|
45
|
+
Apply the [engineering principles](../../docs/principles.md): smallest coherent change, root cause, observable tests that can fail, existing patterns/helpers, explicit domain state, boundary validation, migrated callers, tested assumptions after repeated failure, observed claims and readable code. Read the relevant trigger/skip signal when judging a consequential boundary.
|
|
84
46
|
|
|
85
47
|
## Rigor
|
|
86
48
|
|
|
87
|
-
The
|
|
49
|
+
The high-risk reviewer brief starts with the named authoritative state transition and conflicting legacy/canonical representations: execute the existing state-changing entrypoint followed by existing status and the new protected read/write consumer. Then test asynchronous actor/resource identity on reads and sends while cached identity remains unchanged. Preserve history continuity and focus findings; prioritize demonstrated privacy/identity failures before cosmetic issues. Reuse one authoritative resolver or require explicit reconciliation. Development examples are known data, not evidence of effectiveness on unseen tasks.
|
|
88
50
|
|
|
89
|
-
|
|
90
|
-
|
|
51
|
+
Scale process by risk, keeping the quality bar. Normal work uses the flow above. High risk (auth, permissions, payments, migrations, deletes, public APIs) adds one focused [Challenge](../../methods/cyc-challenge/SKILL.md) before Build and a fresh-context review before finish when subagents are available. Give that reviewer diff, original criteria, [principles](../../docs/principles.md), data contracts and producer/consumer paths; omit implementation rationale and require demonstrated findings. Resolve/dismiss with evidence. If unavailable record self and disclose it; extra agents require a specific independent question.
|
|
52
|
+
|
|
53
|
+
Capture before dispatch with run review-capture --run ID --file CAPTURE.json ({reviewer:"fresh-context",scope:["affected/path"]}; omit scope for whole source). Use returned template/command for review-record with reviewId,evidence,findings and actual identity/null; semanticReview.receipts references it. Self/peer scopes use the same record. These are agent-reported provenance, not identity attestation. Later edits need affected-delta review or explicit self/unverified coverage; mixed review is not a fresh review of every final byte. Source fingerprints establish bytes, not correctness.
|
|
91
54
|
|
|
92
55
|
## When things go wrong
|
|
93
56
|
|
|
94
|
-
|
|
57
|
+
Use run recover --run ID after a failure/interruption. It diagnoses existing records without resuming, resetting budgets or authorizing new scope. Preserve source, locks and proof backups; follow [recovery guidance](../../docs/onboarding-recovery.md). Tool-not-found and timeout errors are setup observations, not application diagnoses. After two failed fixes, check their shared assumption before another attempt.
|
|
95
58
|
|
|
96
|
-
-
|
|
97
|
-
- A check was already failing before you started and is unrelated, for example lint or a template check on files you did not touch: list it in FINISH.json as `"acceptFailures": [{"check": "<id>", "reason": "<why it is unrelated>"}]` (or run `run accept-failure` after `prove-red`). For bug fixes and features, the proof's control run is the baseline; other runs need `verification.baseline`. The run can still complete only if that check fails exactly as it did on the run-start code: the same exit code, the same output lines apart from timings, and no file you changed named in it. For a TAP, mocha, or jest suite, that means all of these:
|
|
98
|
-
- no test fails that did not fail then;
|
|
99
|
-
- every old failure keeps its error, and its stack does not run through source you changed;
|
|
100
|
-
- no new non-test line appears. When verification fails, `failedAtRunStart` lists the failing checks that also failed before the run, so decide for each: accept it if it is unrelated, or fix it if your change caused it. Do not retry unchanged. Name it in the reply as a pre-existing failure. A check that passed before and fails now is a regression and is refused.
|
|
101
|
-
- A consumer the plan missed breaks: add it to the plan, fix it, and verify again.
|
|
102
|
-
- Two fixes fail the same way: stop and question the shared assumption before a third.
|
|
103
|
-
- The user says "not it": follow [Correct](../../methods/cyc-correct/SKILL.md) and ask what's missing before revising.
|
|
104
|
-
- Blocked by something outside your control: record `--status blocked` with the controller, then `cyc packet` marks the review blocked from that run; tell the user the one thing you need. With no run, pass `--blocker "<what stops completion>"` to `cyc packet` and include that text in the reply.
|
|
59
|
+
Accept an unrelated pre-existing check only with a real reason and compatible measured original broad evidence. Candidate verification must retain the same failure: exit/error, named failing tests/errors and non-test lines, with no new failure or changed-source stack. Timings may differ. New regressions stay blocking; report accepted failures in the reply. Never repeatedly run unchanged failing checks, weaken tests/configuration, reset a budget or hide a stopped run behind a replacement. Focused proof is not a broad baseline.
|
|
105
60
|
|
|
106
|
-
|
|
61
|
+
If a missed consumer changes the plan, map it and repair within authorization. If the user says the result is wrong, use [Correct](../../methods/cyc-correct/SKILL.md). An external blocker gets an honest blocked handoff with the smallest needed action. Existing permission persists; do not ask again for an already authorized repair. Learning is proportionate: preserve verified facts and failed approaches, keep unverified hypotheses/proposals labeled, and follow the [context lifecycle](../../docs/work-assessments.md#learning-lifecycle-and-final-file-order).
|
|
107
62
|
|
|
108
63
|
## Playbooks
|
|
109
64
|
|
|
@@ -130,3 +85,7 @@ Use the [project tools](../../docs/project-tools.md) automatically when relevant
|
|
|
130
85
|
## Autonomy
|
|
131
86
|
|
|
132
87
|
Just do: read, search, run tests, edit files in scope, build prototypes. Always ask first: commits and pushes (unless asked), publishing, deleting user data, global installs, sending messages. The delivery gate won't let you finish while your run is still open; a run that ends blocked is reported as blocked, never as done.
|
|
88
|
+
|
|
89
|
+
## Unified task context and bounded delegation
|
|
90
|
+
|
|
91
|
+
For available Codex dispatch, freeze delegation {version:1,mode:"auto"} at Start unless the user/project chooses off/recommend or a different host. Follow swarmAction: delegate swarm plans from task/source inventory, decides, runs independent workers concurrently and reviews/merges one task document. Default concurrency is two; preserve explicit limits. Unknown economics favors solo; time routing claims no savings. Inspect conflicts and terminal recovery before dependent work. Manual execute/reconcile remains available. Required review, proof, retention and checks remain mandatory. Usage is reporting only; never stop/refuse work for token counts. See [task context](../../docs/task-context.md); model judgments prove no activation/savings.
|