@oevery/rsp 3.3.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +24 -17
  2. package/README.zh-CN.md +25 -18
  3. package/dist/chunk-JO6NDJM4.mjs +360 -0
  4. package/dist/chunk-LGDCIQYL.mjs +725 -0
  5. package/dist/{chunk-7HXQNBIG.mjs → chunk-P3KO3GZW.mjs} +420 -268
  6. package/dist/chunk-U56XMIOO.mjs +66 -0
  7. package/dist/{chunk-TSUDEX5Y.mjs → chunk-VDRXFKBP.mjs} +142 -867
  8. package/dist/cli.mjs +1111 -2347
  9. package/dist/client-EHRWH5Q7.mjs +108 -0
  10. package/dist/{entry-GIDNR7CJ.mjs → entry-NDASTAI5.mjs} +128 -38
  11. package/dist/viewer/NOTICE.txt +299 -0
  12. package/dist/viewer/app.css +2 -0
  13. package/dist/viewer/app.js +670 -0
  14. package/dist/viewer-build.json +1 -0
  15. package/dist/viewer-service.mjs +551 -0
  16. package/package.json +51 -25
  17. package/skills/rsp/SKILL.md +44 -38
  18. package/skills/rsp/references/architecture.md +39 -0
  19. package/skills/rsp/references/closeout.md +38 -0
  20. package/skills/rsp/references/context-migration.md +22 -0
  21. package/skills/rsp/references/control-outcome.md +3 -29
  22. package/skills/rsp/references/coordination-recovery.md +25 -0
  23. package/skills/rsp/references/coordination-review.md +15 -0
  24. package/skills/rsp/references/coordination.md +59 -0
  25. package/skills/rsp/references/durable-review.md +60 -12
  26. package/skills/rsp/references/focus-continuation.md +12 -4
  27. package/skills/rsp/references/groups-dependencies.md +6 -4
  28. package/skills/rsp/references/response-language.md +2 -0
  29. package/skills/rsp/references/setup-repair.md +42 -7
  30. package/skills/rsp/references/work-model.md +37 -0
  31. package/skills/rsp-commit/SKILL.md +76 -31
  32. package/skills/rsp-commit/references/message.md +34 -0
  33. package/skills/rsp-doc/SKILL.md +68 -0
  34. package/skills/rsp-doc/agents/openai.yaml +3 -0
  35. package/skills/rsp-doc/references/release-communication.md +39 -0
  36. package/skills/rsp-doc/references/skill-authoring.md +36 -0
  37. package/skills/rsp-implement/SKILL.md +60 -25
  38. package/skills/rsp-implement/references/diagnosis.md +10 -0
  39. package/skills/rsp-implement/references/finding-resolution.md +21 -0
  40. package/skills/rsp-implement/references/test-first.md +7 -0
  41. package/skills/rsp-review/SKILL.md +46 -45
  42. package/skills/rsp-review/references/code-review.md +30 -9
  43. package/skills/rsp-review/references/document-review.md +24 -9
  44. package/skills/rsp-review/references/release-communication.md +21 -0
  45. package/skills/rsp-shape/SKILL.md +26 -45
  46. package/skills/rsp-shape/references/complex-shaping.md +3 -1
  47. package/skills/rsp-shape/references/deep-clarification.md +4 -4
  48. package/skills/rsp-shape/references/domain-modeling.md +13 -0
  49. package/skills/rsp-shape/references/module-seams.md +13 -0
  50. package/skills/rsp-shape/references/planning.md +42 -0
  51. package/skills/{rsp-design → rsp-shape}/references/reversible-exploration.md +2 -2
  52. package/skills/rsp-verify/SKILL.md +39 -12
  53. package/dist/chunk-JOMFFQRG.mjs +0 -99
  54. package/dist/chunk-QM2UVPQK.mjs +0 -375
  55. package/dist/entry-YAW3PYFA.mjs +0 -174
  56. package/rules/rsp-rules.md +0 -48
  57. package/skills/rsp/references/implementation-evidence.md +0 -12
  58. package/skills/rsp/references/managed-routing.md +0 -45
  59. package/skills/rsp-design/SKILL.md +0 -53
  60. package/skills/rsp-design/references/domain-modeling.md +0 -11
  61. package/skills/rsp-design/references/module-seams.md +0 -11
  62. package/skills/rsp-diagnose/SKILL.md +0 -48
  63. package/skills/rsp-manage/SKILL.md +0 -101
  64. package/skills/rsp-manage/references/closeout.md +0 -13
  65. package/skills/rsp-manage/references/delegation.md +0 -47
  66. package/skills/rsp-manage/references/interruption-recovery.md +0 -19
  67. package/skills/rsp-manage/references/review-convergence.md +0 -9
  68. package/skills/rsp-release-docs/SKILL.md +0 -77
  69. package/skills/rsp-release-docs/references/convention-discovery.md +0 -65
  70. package/skills/rsp-release-docs/references/evidence-and-surfaces.md +0 -21
  71. package/skills/rsp-release-docs/references/output-contracts.md +0 -97
  72. package/skills/rsp-release-docs/references/publication-lifecycle.md +0 -28
  73. package/skills/rsp-resolve-findings/SKILL.md +0 -61
  74. package/skills/rsp-structural-audit/SKILL.md +0 -71
  75. package/skills/rsp-structural-audit/references/structural-lenses.md +0 -41
  76. package/skills/rsp-tdd/SKILL.md +0 -56
@@ -1,73 +1,79 @@
1
1
  ---
2
2
  name: rsp
3
- description: Use this skill when initializing RSP, operating an existing .rsp project, auditing or repairing .rsp state, or deciding whether a change needs durable updates before archive.
3
+ description: Coordinate authorized direct, Change or Group work; select capabilities and accept results while executors load their methods. Retain recovery and evidence and prepare delivery without treating completion as closure.
4
4
  license: MIT
5
5
  metadata:
6
6
  author: oevery
7
- version: "2026.08.21.3"
7
+ version: "2026.11.04.1"
8
8
  ---
9
9
 
10
- # RSP Skill
10
+ # RSP Core
11
11
 
12
- Use RSP to derive one current action from project authority and durable work artifacts. This Skill is the preferred operational guide; `.rsp/rsp-rules.md` is the runtime fallback when the Skill is unavailable.
12
+ Carry the authorized request through execution, applicable evidence and needed knowledge updates. Core owns the goal, boundary, capability selection, cross-capability decisions and result acceptance. Capabilities own their methods and may be invoked directly. Skills are the only workflow. A missing or unusable required Skill stops dependent work; report the incomplete installation without reading retired Rules or installing implicitly.
13
13
 
14
- Nearest project instructions and relevant `CONTEXT.md` remain authoritative. Use the response-language and artifact-language rules in [response language](references/response-language.md) for user-visible narration and durable prose. Preserve canonical headings, paths, commands, identifiers, and machine values. WorkRefs are stable identities independent from prose language and locale; Shape owns naming when a new identity must be inferred.
14
+ ## Select the work and responsibility
15
15
 
16
- ## Scope
16
+ Before mutation, read nearest instructions and relevant CONTEXT; establish intent, authority and the existing owner from evidence. Use known paths and discover missing context as needed. An explicit WorkRef wins; multiple focus markers alone do not block work. Preserve dirty work and its owner. Before switching owners, check overlapping product and knowledge paths; overlap transfers no authority.
17
17
 
18
- Use this Skill for RSP setup or repair, focused `.rsp/` work, and the durable-update decision before archive. Do not use it for unrelated coding or create a Change for a simple session task unless the user explicitly requests tracking.
18
+ - **Direct:** a clear bounded request needing no durable continuity. Create no Change and run no tracking preflight merely to execute it.
19
+ - **Change:** one delivery/acceptance boundary needing sustained work or cross-session recovery. Read its six sections and relevant Specs; Focus is only a sparse recovery pointer.
20
+ - **Group:** independently acceptable/deliverable child Changes with dependencies or integration obligations. Read the Brief then select a child; the Brief is not executable work. File count, complexity and agent count alone do not create a Group.
19
21
 
20
- ## Derive one next action
22
+ Load the [work model](references/work-model.md) when tracked identities are missing from context; required tracking cannot be bypassed by relabelling work Direct. Use rsp status for needed owner, dependency or recovery facts, and JSON for exact dependency data. Required dependency checks and fresh archive readiness still apply.
21
23
 
22
- Read user intent, nearest authority, `rsp status --json`, the selected Change and its readiness, fresh verification evidence, and blockers. Stages are derived guidance, never persisted state.
24
+ Use the CLI invocation selected by the project AGENTS entry; `rsp` in these Skills denotes that selection. Resolve needed settings through the selected CLI's successful `rsp config --json` summary. Reuse it until relevant drift or recovery; raw YAML is diagnostic only. Projection failure blocks choices depending on unknown settings, while independent authorized work continues.
23
25
 
24
- Use the canonical transient control vocabulary from the maintainer Skill Control Model. Before Core returns or composes a phase result, read the canonical [control outcome](references/control-outcome.md) contract. Route and stop dispositions, dispatch disposition, topology, lane results, acceptance, and closeout remain nested phase-specific details or gates; do not expose them as peer status flows or persist any control object. Core transfers current-phase control to Manage or one Discipline and receives its bounded result. Manage-to-worker communication is delegation, not control transfer: the worker never becomes owner of the managed goal. Core may mutate only RSP control-plane state; product mutation belongs to Implement or a bounded manual Discipline action. Every stop is fail-closed until its declared resume rule succeeds.
26
+ Select capabilities from their descriptions and the task contract. Executors load applicable methods and inspect sources; Core consults method details when needed for its own work or a concrete coordination question. Select the responsibility needed now:
25
27
 
26
- Apply these routes in order:
28
+ - rsp-shape: bounded read-only design or authorized planning; reopen planning only for material unresolved choices.
29
+ - rsp-implement: diagnosis, authorized implementation or accepted-finding correction, including ordinary own checks.
30
+ - rsp-doc: substantive document/Skill writing, needed knowledge writeback and final Change reconciliation.
31
+ - rsp-verify: a requested declared-evidence result or a separately required verification obligation; ordinary implementation checks stay with Implement.
32
+ - rsp-review: fixed-scope read-only judgment or explicitly bounded structural discovery. Supporting checks remain within that review.
33
+ - rsp-commit: separately authorized exact local delivery; required for Git execution, with no Core substitute if unavailable.
27
34
 
28
- Before later-turn mutation under a direct report, design, tiny, or small route, rederive from the newly authorized objective and prospective work. Independent slices, recovery, distinct execution and acceptance owners, repeated production-path correction, real-host, provider, or hardware validation, bounded review convergence, managed lifecycle delivery, or a clear ready successor requires the smallest sufficient WorkRef plus fresh owner preflight and Manage qualification before mutation. Multiple files or documentation surfaces alone do not. Unchanged direct follow-ups remain direct. Elapsed time and message count alone never escalate work.
35
+ Continue authorized same-scope work without another continuation request. A phase, role or method change alone requires no tool call, worker, review or test run. Required review, independent execution and protected operations still apply. For ownerless release checks, establish the exact candidate, check contract and effects authority, plus a baseline for any comparison; invent no Change or Verify owner.
29
36
 
30
- 1. Route explicit fixed-scope review to `rsp-review`, release finalization or reconciliation to `rsp-release-docs`, and one bounded design question to installed `rsp-design`; never manually emulate it. Without a selected Change, use report-only Pre-Change Design without inventing a WorkRef or artifact. Only when unavailable, its manual fallback stays bounded to the same question.
31
- 2. Return `RouteDisposition: direct` only for one ready owner, one writer, one execution phase, one integrated decisive check, no recovery, no independent acceptance obligation, no managed lifecycle coordination, and no ready successor. Multiple changed files or documentation surfaces do not by themselves alter that route. Perform no Manage handoff or managed Assignment. After the direct result and fresh verification exist, explicit local commit authority may route exactly once to `rsp-commit` with a `direct` owner summary, exact allowed paths, decisive evidence, and current authority; do not invent a Change, WorkRef, lifecycle state, or RSP trailer. An available Commit refusal returns its real missing condition to Core and never becomes a manual fallback. Rederive before further mutation if any condition changes.
32
- 3. Core resolves whether one unambiguous shape-ready Change or shallow Group is the `WorkOwner` before Manage qualification. Missing or non-ready ownership reports `RouteDisposition: shape`; Core invokes Shape only with independently granted planning-artifact authority. Material product or authority questions stop for their `DecisionOwner`; ask one highest-impact owner question that resumes through fresh Core derivation after the answer. Invalid ownership, topology, dirty paths, scope, route, or authority stops for rerouting.
33
- 4. Read [managed routing](references/managed-routing.md) for initial qualification and handoff. On `selected`, pass the WorkRef, authority, evidence, closeout ceiling, and return boundaries to `rsp-manage`. Once selected, Manage solely owns same-goal revalidation, interruption and resume, selected-goal execution, and lifecycle orchestration; `rsp-commit` retains the exact local delivery procedure. Automatic selection grants routing only.
34
- 5. If Manage is declined, continue ordinary routing when the owner and authority are clear; otherwise return the one required input. For incomplete or failed evidence use [Implementation evidence](#implementation-evidence). When required Tasks and verification pass, load [durable writeback decision](references/durable-review.md); do not infer release, archive, Git, publication, approval, or human acceptance.
37
+ ## Execute and reconcile evidence
35
38
 
36
- Return the canonical outer `ControlOutcome` in localized prose through the Core-owned contract. Preserve exact machine values as secondary technical values and keep route, dispatch disposition, or topology only as nested technical evidence.
39
+ Implement owns ordinary self-checks. Main-agent inspection can assess results, but an implementation participant cannot certify required independent review. Select extra Verify/Review only when requested, required or supported by concrete risk, not per task or per worker automatically.
37
40
 
38
- For managed evaluation, report `selected` or `declined` and the decisive signal; report a sequential or parallel choice only when dispatch applies. Name at most one optional capability when it is the next action and available. A missing optional Discipline Skill does not invalidate RSP: use its bounded manual fallback against the same owner. This fallback never substitutes for a required managed worker or required independent Verify. Do not preload or recursively invoke capabilities.
41
+ Reuse traceable observations, checks and reviews while their target, acceptance boundary and relevant inputs still apply. Changed code, dependencies, configuration, tools or environment invalidate affected evidence; role changes and delivery-scope confirmation alone do not. Include excluded worktree inputs when assessing a staged slice, and recognize behavior changes in normative Specs or executable Skills even when stored as Markdown.
39
42
 
40
- ### Implementation evidence
43
+ Check paths, diff, outcomes, omissions and evidence applicability. Reuse executor checks when applicable. Independent semantic review may use implementer test evidence; required independent execution must run. Preserve original evidence and verdicts with their existing owner; Change retains only applicable conclusions and material failure dispositions. Add no evidence ledger.
41
44
 
42
- For incomplete or failed implementation evidence, read [implementation evidence](references/implementation-evidence.md) before selecting Diagnose, TDD, ordinary Implement, or Verify. Diagnosis precedes TDD; every branch returns evidence to the same Change, and fresh Required verification remains mandatory.
45
+ For required correction/re-review, load [review convergence](references/coordination-review.md). Batch compatible findings into one correction, run covering checks, then review finding resolution and new risks in the correction. Stop for changed scope/authority, unsafe replay, missing required capability, non-convergence or no new discriminating evidence. Required failures remain incomplete.
43
46
 
44
- ## Operate the selected Change
47
+ Dependent writes require successful prerequisites; observe each required result rather than relying on a batch's final exit status. Recover tool failures within unchanged authority, inspecting uncertain effects before safe replay. Named checks and Commit's one-attempt rule remain binding.
45
48
 
46
- Before focusing or mutating a different WorkRef, compare dirty product or durable-truth paths with the prior owner's paths. Overlap never transfers ownership; continue, explicitly reopen, use an authorized integration owner, or stop for boundary resolution. Disjoint work may proceed without staging or forcing a commit.
49
+ ## Coordinate only when needed and allowed
47
50
 
48
- Read the focused Change, its sibling Group Brief when grouped, and only the relevant Specs and Decision Records. Use `rsp specs` for direct tree navigation or bounded literal discovery, then re-read the exact authoritative source before a material decision or mutation; generated index files are migration inputs, not navigation authority. Only a `focus.d/` marker path selects current work. When a Focus Capsule exists, is inspected or mutated, reports warnings, or a continuation resumes, read [focus and continuation recovery](references/focus-continuation.md). Run the focused check before treating the owner as ready. Preserve the canonical Proposal, Spec, Design, Tasks, Verify, and Blockers sections.
51
+ Work shape does not choose agent topology. Automatic delegation defaults off. An explicit worker request or binding independent-worker requirement permits that bounded dispatch; otherwise resolve workflow.delegation before automatic delegation. When auto is enabled, the user or main agent chooses zero, one or multiple execution workers. RSP has no worker-count tiers or maximum; host constraints still apply.
49
52
 
50
- Keep the Change a convergent snapshot of the current plan and final decisive evidence. Replace superseded content; keep routine attempts, temporary probes, and command transcripts in the response. Persist only `open` and `archived`; focus, readiness, routing, and capability availability grant no implementation, review, Git, publication, or approval authority.
53
+ Load [worker coordination](references/coordination.md) for actual dispatch, dependencies/shared-resource arbitration or required independent workers. Keep tightly coupled work local; never simulate missing worker identity or independence. Workers do not delegate further by default. Main retains integration and result acceptance; child passes do not establish integration coverage.
51
54
 
52
- RSP remains repository-native and derives workflow state from current project artifacts and checkout evidence; it requires no hidden runtime state.
55
+ Load [interruption recovery](references/coordination-recovery.md) for pause/resume or unsettled host effects, and [focus continuation](references/focus-continuation.md) for a recovery snapshot. Cross-session continuation refreshes current authority, owner, applicable status, Git index, dirty paths, evidence applicability and replay safety. Cancelling a wait does not stop workers or release resources.
53
56
 
54
- When archived acceptance is incomplete, read [reopen recovery](references/reopen-recovery.md) before lifecycle mutation. Reopen requires explicit lifecycle authority and grants no Git or external authority.
57
+ ## Maintain records and prepare delivery
55
58
 
56
- Load detailed procedures only when active:
59
+ During execution apply the [current work record rules](references/work-model.md#current-work-records), loading them when absent from context. Update affected Tasks/Verify directly when scope, contract, design and knowledge remain accurate; do not append attempts or postpone current-state corrections until archive. Use the same work model for Blockers syntax. Passing checks or recovery alone adds no whole-document rewrite. Focus supplies only missing recovery context, never acceptance or authority.
57
60
 
58
- - [setup and repair](references/setup-repair.md) for initialization, audit, migration, or repair.
59
- - [groups and dependencies](references/groups-dependencies.md) for grouped or dependent work.
60
- - [conflict handling](references/conflict-handling.md) for an intersecting Git operation.
61
- - [durable writeback decision](references/durable-review.md) after required Tasks and implementation verification pass.
61
+ Ordinary completion and checkpoint commits leave Change open; a generic commit request does not establish final delivery. At established final delivery or an explicit close request, load [delivery closeout](references/closeout.md). workflow.closeout is ask (default), auto or manual; no setting grants Git, push, publication, deployment, approval or human acceptance authority.
62
62
 
63
- ## Ownership and safety
63
+ For necessary stable-knowledge updates, load [durable writeback](references/durable-review.md) to establish facts, update their owners and reconcile affected records. Final delivery or closure additionally requires whole-Change convergence and consistency checks. Reuse applicable evidence and fill missing or invalidated coverage and separately required review. Already-accurate records need no edit; current readiness is a lifecycle observation, not semantic acceptance.
64
64
 
65
- Route planned design to the selected Change; implemented facts to the smallest fact owner; rationale to one Decision Record; stable navigation to project-owned `CONTEXT.md`; operating rules to project-owned `AGENTS.md`; temporary continuation to the response. Never write planned state as current truth or duplicate facts into rationale.
65
+ Operate command-owned state through RSP commands. Persist only open and archived; derive readiness and routing. A complete Task list never closes work. Reopen is exceptional recovery requiring explicit authority: load [reopen recovery](references/reopen-recovery.md) only when actually needed.
66
66
 
67
- Use RSP commands for command-owned files. Do not directly create command-owned files; preserve unrelated work. Core recommends archive only after the durable decision; it does not execute archive or grant staging, commit, push, publication, deletion, deployment, approval, or human-acceptance authority. Detailed Manage closeout, local Commit, conflict, and recovery rules remain in their owning Skills or conditional references. Execution-environment selection and cross-branch integration remain host, user, or Git concerns outside RSP workflow state.
67
+ Other conditional procedures:
68
68
 
69
- When accepted work remains or a continuation resumes, read [focus and continuation recovery](references/focus-continuation.md), then return a localized continuation with these semantic fields in order: `WorkRef`, `Authority`, `Current state`, `Changed artifacts`, `Fresh verification`, `Blockers`, `Next action`. Preserve technical values; the continuation is not a second state store. On resume, reopen its pointers to authority and owned artifacts, inspect drift and replay safety, and refresh decisive evidence before mutation.
69
+ - [Architecture knowledge](references/architecture.md) when coordinating work on modeled structure or responsibilities.
70
+ - [Setup and repair](references/setup-repair.md) before initialization, managed-asset inspection, upgrade or repair.
71
+ - [Groups and dependencies](references/groups-dependencies.md) for grouped work.
72
+ - [Context migration](references/context-migration.md) when a root/relevant legacy CONTEXT-MAP.md is found or migration requested; preserve context, discovery alone grants no migration.
73
+ - [Conflict handling](references/conflict-handling.md) for an intersecting Git operation.
70
74
 
71
- ## Durable decision output
75
+ ## Return the result
72
76
 
73
- After loading [durable writeback decision](references/durable-review.md), use its canonical localized output and choose current facts and lasting rationale independently. A required unwritten update, incomplete Task, incomplete Required Verify item, or real blocker makes archive readiness `no`; Optional coverage warnings do not. Before lifecycle closeout, consume fresh `rsp ready <work-ref> --json` evidence with `completionGate: pass` and `archiveReady: yes`.
77
+ Follow explicit response language, personal instructions, then conversation language. Existing artifacts retain their language; new artifacts follow explicit instruction, effective project settings, scoped instructions, then conversation language. Keep identifiers and machine values exact; load [language details](references/response-language.md) only for contested choices.
78
+
79
+ Report the outcome, decisive evidence, material limits and needed next action. Distinguish observed effects, checks, review and acceptance; unverified claims stay unverified. Missing Required evidence blocks only dependent completion. No mandatory phase receipts or repeated logs. Load [control outcome](references/control-outcome.md) only for a consumer needing its technical rendering. For unfinished work retain only the owner, authority, evidence, blocker and safe continuation needed by the next actor.
@@ -0,0 +1,39 @@
1
+ # Architecture knowledge
2
+
3
+ Use when a task concerns a project's structure, responsibilities, dependencies or
4
+ architecture model. Follow relevant CONTEXT navigation to `.rsp/architecture.json`
5
+ when present. The model maps current structure and relationships to documents;
6
+ Specs own contracts and decisions retain rationale. An absent model does not
7
+ require creation or block work.
8
+
9
+ ## Read
10
+
11
+ Read only the relevant nodes, relations and bound documents, using the selected
12
+ project CLI's `rsp architecture --node <id> --json` or the model directly.
13
+ Use the current checkout/worktree's content. Treat the model as navigation and
14
+ check decisive claims against the owning code and contracts; it does not override
15
+ them or establish a mandatory Skill execution order.
16
+
17
+ ## Update
18
+
19
+ When an authorized implementation changes modeled responsibilities, boundaries,
20
+ dependencies or document bindings, update the affected model entries with the
21
+ implemented facts. Preserve stable IDs for unchanged identities and keep detailed
22
+ contracts in their documents. Proposed structure stays in the Change Design until
23
+ implemented. Read-only Shape and Review report discrepancies without editing.
24
+ If a needed model correction is outside the authorized scope, return the gap to
25
+ the owner rather than silently expanding the task.
26
+
27
+ When authorized to add a model, register one link in root CONTEXT, reusing an
28
+ existing entry or creating minimal CONTEXT if absent. Installation or upgrade
29
+ alone neither creates the model nor rewrites context.
30
+
31
+ ## Check
32
+
33
+ For affected model entries, implementation self-checks and Review compare the
34
+ represented responsibilities and relations with the changed code and contracts.
35
+ After model or bound-document changes, use `rsp doctor` for structural and
36
+ document/chapter-reference checks, reusing applicable passing evidence under the
37
+ ordinary verification rules. A pass does not establish semantic agreement with
38
+ implementation. Keep this within the task's existing checks and review scope;
39
+ unrelated tasks need no whole-model read, extra review or unconditional doctor run.
@@ -0,0 +1,38 @@
1
+ # Final delivery and lifecycle closeout
2
+
3
+ Load for an established final-delivery boundary, an explicit close request, or a delivery question requiring checkpoint classification. Ordinary completion never activates closeout. A generic commit request defaults to a checkpoint unless final delivery is already established; checkpoints keep Change open and require only the authorized slice and applicable evidence.
4
+
5
+ ## Decide closure independently of Git
6
+
7
+ Use the validated workflow.closeout setting from rsp config --json:
8
+
9
+ - ask (default): prepare a concrete final boundary, applicable evidence and required knowledge/Change updates, then ask whether to close before terminal staging. Reuse explicit closure authority already granted; do not ask twice.
10
+ - auto: close eligible work at established final delivery without another closure request, subject to nearer denial.
11
+ - manual: close only on an explicit close request. Authorized final commits may leave work open and must report that fact.
12
+
13
+ Explicit refusal keeps work open. A decision to leave it open does not block an otherwise authorized commit. Neither policy, readiness nor archive grants Git authority. An explicit standalone close request can close eligible work without a commit. Do not interpret finishing implementation, a pass, a successor task or elapsed time as final delivery.
14
+
15
+ ## Reconcile the final boundary
16
+
17
+ 1. Confirm exact delivery scope and inspect existing evidence for that boundary.
18
+ 2. Apply [durable writeback](durable-review.md): necessary stable knowledge first, final Change reconciliation second. These can be one operation with no edits when already current.
19
+ 3. Fill missing or invalidated checks and separately required review. Reuse applicable results; ordinary record cleanup does not invalidate code tests. Changed normative contracts and executable Skills need affected checks/judgment. Fresh independent review is not a universal closeout prerequisite.
20
+ 4. For each Change to close, obtain current rsp ready <work-ref> --json with completionGate: pass and archiveReady: yes. Also require accurate final records, completed or unnecessary knowledge updates, applicable Required evidence and every separately required review. Readiness alone does not establish semantic acceptance.
21
+
22
+ Missing Required evidence, active blockers or contradictory contracts prevent closure. Optional omissions remain visible. Fresh authority, owner and exact Git/lifecycle observations remain necessary even when tests are reused.
23
+
24
+ ## Close only when authorized
25
+
26
+ Run rsp archive <work-ref>. Inspect the resulting archive and entire lifecycle diff, including Focus removal and cleanup warnings. Use the returned filename in the selected WorkRef's archive directory: .rsp/archives/ for an ungrouped Change, .rsp/archives/<group>/ for a child. Do not guess dates, suffixes or directories. Expand read-only discovery only for incomplete or contradictory output/effects; do not replay the mutation.
27
+
28
+ For a Group, archive eligible authorized children independently, reconcile the Brief and integrated evidence, then run rsp group close <group> after every child and Group gate passes. Request-only integration conditions must first be recorded in the Brief; child passes alone do not prove integration.
29
+
30
+ Never delete or copy lifecycle files to bypass commands. If archive succeeds but commit fails, report the archived, uncommitted state. Do not automatically reopen, rewrite history or repeat uncertain mutations.
31
+
32
+ ## Route exact delivery separately
33
+
34
+ With explicit local commit authority, route to rsp-commit with the delivery kind (direct, change, integration, group or release), purpose (checkpoint or terminal), real owner/WorkRefs, exact paths, applicable verification and lifecycle evidence only when applicable. No transport schema or duplicate receipt is required.
35
+
36
+ Integration requires at least two real WorkRefs and one shared delivery boundary but creates no Group. Ambiguous, mixed, stale or denied boundaries stop before staging. Missing Commit capability has no Core fallback. Commit audits the exact index and owns Git execution.
37
+
38
+ Push requires explicit authority and an unambiguous remote, branch and milestone. Never infer it from commit or closure; no force push or automatic publication. Remote failure preserves local commits and stops at that boundary.
@@ -0,0 +1,22 @@
1
+ # Context migration
2
+
3
+ Load when a legacy CONTEXT-MAP.md is found, CLI reports it, or the user requests context migration. This is a conditional Core method, not a separate Skill or a mandatory project phase. CONTEXT.md remains the target model for vocabulary, domain relationships, and navigation.
4
+
5
+ ## Inspect without migrating
6
+
7
+ Read the relevant legacy map, existing root/local CONTEXT files, scoped instructions, and incoming references. File presence is a migration signal, not proof that its content is obsolete or that an existing CONTEXT already contains it. Resolve overlapping or contradictory definitions with their owner; do not choose a winner from the filename.
8
+
9
+ Without migration authority, preserve files and use the legacy content relevant to the current task alongside current context. Report the pending migration without repeatedly demanding it or blocking unrelated work. Stop only work that depends on an unresolved meaning or authority conflict. Do not follow unsafe or out-of-scope paths merely because a legacy map points to them.
10
+
11
+ ## Migrate within explicit scope
12
+
13
+ Establish authorized source files, target owners, reference updates, and whether retiring the old file is included. Reuse the selected WorkRef when tracked; bounded direct migration needs no new work record.
14
+
15
+ 1. Map useful terms, relationships, and navigation to their root/local CONTEXT owners. Keep contracts and operating rules with their existing Spec/AGENTS owners, using links instead of parallel definitions. Resolve material conflicts before changing their meaning.
16
+ 2. Merge into existing context without overwriting unrelated content or renaming concepts for consistency alone. For substantial writing use Doc when available; otherwise preserve meaning and verify the reader's navigation directly. Doc supplies the writing method, not migration or deletion authority.
17
+ 3. Update active references and entry instructions. Check both lost meaning and broken paths; historical snapshots need not be rewritten.
18
+ 4. Retire the old map only after checking preserved meaning, active references, and explicit retirement authority. If any gate is missing, keep it and report the remaining work.
19
+
20
+ `rsp update` and `rsp doctor` only detect the root legacy path and provide guidance; they do not compare semantics, merge context, or retire project files. A successful command is not migration acceptance.
21
+
22
+ Return the source-to-owner result, changed files, checks, and unresolved conflicts or permissions. Migration completion derives from inspected documents and references, not a new marker or stored lifecycle state.
@@ -1,31 +1,5 @@
1
- # Control outcome
1
+ # Optional control outcome
2
2
 
3
- Load this reference whenever Core returns or composes the current phase result. `ControlOutcome` is the single outer response receipt for one current WorkRef. Its default session rendering is localized labeled natural language, not a required YAML or JSON object, durable workflow state, or a second status store. Use JSON only for an explicitly identified machine consumer, encode the same semantics, and do not emit a duplicate JSON copy by default.
3
+ Load only when a real technical consumer needs Core's phase-result rendering. This is response-only, never persisted controller state or an inter-Skill protocol. Normal responses answer the current request with outcome, necessary evidence and material limits in the requested language, without a mandatory schema or duplicated evidence. Include a next action only when work or a user decision remains.
4
4
 
5
- ## Compose the outer receipt
6
-
7
- Use these contextual fields, localize their labels, and omit empty optional fields:
8
-
9
- ```text
10
- Work: <current WorkRef>
11
- Mode: <solo | delegated | coordinated>
12
- Status: <running | waiting | completed>
13
- Phase: <current control or execution phase>
14
- Result: <phase-specific result>
15
- Stop: <phase-specific StopDisposition and reason>
16
- Evidence: <decisive evidence>
17
- Changed artifacts: <changed artifacts>
18
- Next owner: <NextOwner>
19
- Next action: <next action>
20
- Recovery: <bounded recovery guidance>
21
- ```
22
-
23
- Exactly one of Result or Stop applies. Evidence, Changed artifacts, and Recovery appear only when present. Next owner and Next action form one transition and must not contradict the phase result or stop. The contextual labels shorten and localize the response form; canonical domain concepts such as `ControlOutcome`, `WorkRef`, `NextOwner`, and `StopDisposition` retain their precise names.
24
-
25
- ## Preserve one status flow
26
-
27
- Outer status transitions are only `running -> waiting | completed` and `waiting -> running | completed`. Failure, cancellation, rerouting, verification blocking, and capability loss use the phase-specific `stop`; they never create peer outer status values. Route, dispatch, topology, lane result, acceptance, and closeout remain nested phase details or gates.
28
-
29
- The canonical fields retain `mode: solo | delegated | coordinated` and `status: running | waiting | completed`. Use `solo` when no worker participates, including selected Manage execution through a bounded local Discipline; use `delegated` when one worker participates; use `coordinated` when multiple workers participate or acceptance requires a separate verifier. Raw worker messages, host events, retry chronology, and unaccepted evidence never appear as outer receipt fields.
30
-
31
- Core composes this receipt from the selected phase result. Shape, Disciplines, and Manage return only their owned bounded result and evidence; they may name this invoking contract but never redefine its complete form. A `ControlOutcome` is response-only, not durable workflow state.
5
+ When a machine consumer needs it, preserve the established values mode: solo | delegated | coordinated and status: running | waiting | completed, with route, dispatch, acceptance and closeout nested. Solo means no worker participated; delegated one worker; coordinated multiple workers or a required separate verifier. Identity and independence come from host observations, never worker prose. A Change WorkOwner uses its WorkRef; a Group uses its Group reference. State is presentation, not lifecycle. Do not emit duplicate JSON by default or include raw worker messages, host events, retry chronology or unaccepted evidence.
@@ -0,0 +1,25 @@
1
+ # Coordinated interruption and recovery
2
+
3
+ Load this reference only for a progress or status inquiry, explicit pause, an environment or verification stop, or resume from continuation pointers.
4
+
5
+ Reread the complete owner and authority only on a real invalidation, recovery, cross-session continuation, or closeout boundary.
6
+
7
+ Answer status inquiries with current evidence and continuing intent, then continue while authority, verification and blockers permit. Status inquiries do not pause work. Host liveness and elapsed time neither change a Discipline result nor justify cancelling healthy work.
8
+
9
+ For an explicit pause, interrupt through the host and confirm active workers or owned background processes have stopped before acknowledging it. Until then, start no conflicting mutation or verification. A cancelled wait, terminal message or partial output proves no stop.
10
+
11
+ Preserve the focused owner (`WorkOwner`) and focused child WorkRef when applicable during ordinary pause or blockers. Only an explicit release or unfocus request, archive, or another authorized lifecycle action changes selection. Update the Change only with accepted outcomes, decisive verification, and durable blockers.
12
+
13
+ When work needs a durable recovery snapshot, a Focus Capsule needs inspection or replacement, or a portable continuation handoff is required, read [focus and continuation recovery](focus-continuation.md). Same-session worker continuation alone does not require that reference. The capsule is a recovery pointer, never worker coordination, authority or acceptance.
14
+
15
+ ## Resume from effects, not tool status
16
+
17
+ On same-session resume, reopen pointers to authority and owned artifacts, inspect drift and replay safety, and reassess decisive evidence applicability; rerun only missing or invalidated checks, not merely because work resumed.
18
+
19
+ Inspect actual effects before replay. An idempotent action may repeat after boundary inspection. An inspection-dependent action must first check prior effects; a non-repeatable action stops for recovery or owner input. Exit codes or partial results do not prove that nothing happened. Unknown mutation blocks replay; safe read-only observation may continue.
20
+
21
+ A permitted method change preserves authority, owner, scope, baseline and required evidence. Named checks, provenance and required independence remain binding. Once effects and host facts are established, [worker coordination](coordination.md) owns reuse or fresh dispatch; preserve the existing correction-loop counts and accepted outcomes across recovery.
22
+
23
+ For cross-session or cross-device recovery, distrust transient worker and liveness claims. Before mutation or delegation, reread current authority, selected owner, applicable tracking status, Git index, checkout diff, dirty paths, conflicting resources, blockers and execution location. Revalidate the selected handoff, decisive evidence and required verification against those facts; re-establish coordination qualification and host evidence for worker attribution or independence. Host completion without an attributable required worker result keeps acceptance incomplete. Current authority always wins.
24
+
25
+ For incomplete archived acceptance, read [reopen recovery](reopen-recovery.md) before any lifecycle mutation. It requires separate explicit lifecycle authority and owns exact archive selection and the closed-Group-before-child sequence. Restore neither children nor dependents implicitly.
@@ -0,0 +1,15 @@
1
+ # Core-owned correction and review convergence
2
+
3
+ Load for a required correction/re-review loop or an evidenced failure in already delegated work. Core coordinates the existing authorized request; loading this method grants no worker dispatch, automatic closeout or new worker authority. Direct capability use needs no full Core entry: when the request includes correction and review, its caller applies this same loop rather than starting a capability-local copy.
4
+
5
+ ## One owner, bounded passes
6
+
7
+ Core retains the original scope, authority, comparison, required evidence and transient pass counts. Implement supplies one bounded correction with finding dispositions, changed paths, checks and limits. Review supplies a fresh fixed-scope judgment of the actual corrected target and its impact. Implement never certifies review-clean. Required independent Verify or Review still needs a distinct worker proved by host observations.
8
+
9
+ 1. Correlate the returned result with the requested boundary and actual effects. An `accepted` finding can proceed only within existing correction authority; `rejected` needs evidence, and `needs-clarification` returns the material decision to its owner.
10
+ 2. Batch compatible accepted findings into one Implement correction with affected checks; preserve separate owners and incompatible writer boundaries. Continue ordinary same-scope repair without asking the user to repeat permission. A capability transition creates no extra worker or test phase by itself.
11
+ 3. Consume that result, preserve findings and limits, then obtain the required read-only Review of finding resolution and risks introduced by the fix diff. Unrelated improvements do not extend this loop. Reuse applicable test evidence, but never reuse an earlier review verdict for changed behavior. Continue only for remaining accepted findings with improving evidence; clean review is evidence for this boundary, not overall completion or delivery permission.
12
+
13
+ Only Core counts repeated cross-capability passes. Preserve the existing ceilings: at most three worker correction passes for an evidenced same-scope failure, and separately at most three finding-resolution passes per Change or bounded direct request. Stop when the same finding survives two completed corrections. Returning through a capability, resuming a worker or changing tools resets neither count. Counts and chronology stay transient; do not add a controller record.
14
+
15
+ Stop earlier for repeated evidence, non-convergence, changed scope/authority, unsafe or unknown effects, an unavailable required capability, unverifiable correction or missing decisive evidence. Seek owner input for a material product/interface choice or a real-host, provider or network run outside existing authority. Report the unresolved finding, gap or decision. Limits leave work incomplete; they waive no acceptance gate. Continue eligible in-scope corrections without another generic continuation request.
@@ -0,0 +1,59 @@
1
+ # Worker delegation and resource evidence
2
+
3
+ Load for actual workers, dependencies/shared-resource arbitration or required independent acceptance. Work shape and worker count are independent. Explicit worker requests or binding worker requirements permit bounded dispatch; otherwise use the validated workflow.delegation setting (off by default, auto when enabled). Recovery and ordinary continuation do not enable delegation.
4
+
5
+ Core decides none, preferred or required from the actual obligation. Keep tightly coupled work local; prefer independently executable slices only when delegation is allowed. Required dispatch needs attributable host execution; required independence needs a distinct worker. The main agent or user chooses worker count without RSP tiers or limits; host resource limits still apply. No setting grants product, Git or lifecycle authority. Missing optional delegation falls back locally; missing required workers leave acceptance incomplete.
6
+
7
+ ## Delegate one bounded task
8
+
9
+ For grouped or dependent work, use [groups and dependencies](groups-dependencies.md) and the current `rsp status --json` plan. Only children in the first non-empty `plan.waves` wave are eligible; a prerequisite in `plan.blocked` prevents dispatch. Recheck dependencies and integrated evidence before the next wave. Child passes alone do not satisfy Group integration.
10
+
11
+ Before parallel work, check write boundaries and shared resources: generated outputs, manifests/lockfiles, Git index, test services, databases, browsers and hardware. Different filenames prove neither interface compatibility nor isolation. Require host-proven isolation or run serially. Unknown required isolation blocks concurrency; otherwise safe serial work may continue.
12
+
13
+ Send one independently executable vertical slice. Tell the recipient it is already dispatched and must not rerun parent routing or delegate further. Include only what it needs to act safely:
14
+
15
+ ```text
16
+ Work: <exact WorkRef>
17
+ Objective: <bounded outcome or review target and comparison>
18
+ Authority: <exact owner sections or paths>
19
+ Read: <needed sources and supporting references within the allowed boundary>
20
+ Write: <allowed write boundary>
21
+ Verify: <required verification boundary>
22
+ Known facts: <only decisive current facts>
23
+ Prohibited actions: <explicit denials>
24
+ Stop conditions: <when to return without continuing>
25
+ Replay caution: <only when repeating effects may be unsafe>
26
+ ```
27
+
28
+ For direct work, identify the bounded request instead of inventing a WorkRef. Supply source locations and decisive facts, not copied method bodies. Distinguish the review target from supporting references. Workers load their methods and inspect actual sources and applicable instructions; Core retains result validation.
29
+
30
+ Omit empty optional fields. Do not attach host lifecycle schemas, correlation identifiers, JSON transport contracts, evaluator instructions, token targets, or acceptance fields. Workers receive no implied focus, lifecycle, Git, publication, deployment, approval, or nested-delegation authority. Nested delegation is prohibited unless the task explicitly grants a bounded descendant role and the parent remains responsible for its work and result.
31
+
32
+ Reuse a host-resumable worker only while goal, role, authority, writer boundary and evidence remain compatible; otherwise send a complete fresh task. Pass changed facts explicitly, never hidden inheritance as authority. After interruption use [recovery](coordination-recovery.md) to inspect effects and re-establish host facts before dispatch.
33
+
34
+ Each delegated Discipline owns its own result:
35
+
36
+ - **Diagnose:** `rsp-implement` read-only diagnosis mode; `confirmed | unresolved` with cause evidence and scope impact.
37
+ - **Inspect:** Core-owned read-only evidence packet.
38
+ - **Fix:** `rsp-implement`; `changed | no-change` with changed paths, verification, omissions, and any scope issue.
39
+ - **Verify:** `rsp-verify`; `pass | fail | unavailable` with named checks, evidence delta, omissions, and any scope issue.
40
+
41
+ One worker may return both the Fix and ordinary Verify results for the same Change when independent verification is not required. The combined result is implementation evidence, not self-certified acceptance.
42
+
43
+ Fixed-scope review remains owned by `rsp-review`, including a required independent reviewer. Core adds no universal worker receipt and never asks a worker to self-report identity, independence, settlement, or acceptance.
44
+
45
+ ## Validate results and host facts
46
+
47
+ Treat three evidence sources separately:
48
+
49
+ - the worker-authored Discipline result states what the worker did and observed;
50
+ - host observations, when available, establish dispatch, attribution, activity, cancellation, completion, and whether different workers participated;
51
+ - Core validates authority, actual changed paths, local diff, declared verification, omissions, and current acceptance.
52
+
53
+ Derive host facts from observations, not prose, handles, elapsed time, topology or passing tests. Missing observations remain unavailable. Host facts create no RSP domain objects. Workers cannot certify their own identity, independence, resource release, evidence validity or acceptance.
54
+
55
+ For required delegation, Core must have an attributable worker-authored result covering the assigned boundary. For required independent Verify or Review, host observations must establish distinct workers from the accepted implementation. If not, acceptance remains `incomplete`. Core cannot author or substitute the missing result.
56
+
57
+ When one worker owns Fix and ordinary checks, Core validates the result before deriving `evidence-complete`. Reuse applicable observations and checks; required Review still independently judges the actual target. Integration or changed inputs require affected checks. Archive and commit keep separate gates. Corrections return through [Core review convergence](coordination-review.md), not a worker-local loop.
58
+
59
+ Host completion, transport shape or passing tests alone cannot establish acceptance; use the actual result and host facts above.
@@ -1,16 +1,40 @@
1
1
  # Durable writeback decision
2
2
 
3
- Load this reference only after required Tasks and implementation verification pass, or when auditing archive readiness.
3
+ Load for a necessary stable-knowledge update or preparation/audit of lifecycle or terminal delivery. Passing Tasks/checks or resuming work alone does not activate it. An evidence-only Tasks/Verify refresh with accurate scope, contract, design and stable knowledge stays in Core's direct path; it neither establishes closeout eligibility nor skips separately required Review.
4
4
 
5
- This operation is the durable writeback decision, not implementation verification and not fixed-scope change review. Implementation verification supplies fresh evidence after mutation. Fixed-scope change review is a report-only comparison owned by Review and is required only when explicitly requested, required by nearer authority or risk, or needed to derive managed `review-clean`; it is not automatically required for every tiny direct action. The durable writeback decision is always required before archive and independently decides current-fact and Decision Record updates. It never substitutes for fixed-scope change review.
5
+ ## Establish the evidence boundary
6
6
 
7
- Run `rsp check --focused` and `rsp show --focused --json`, or `rsp ready <name> --json` for an explicit Change. Treat `durableReview.factCandidateTargets` and `decisionRecordsPath` as routing advice, not permission. Spec delta markers are planning aids and are never promoted automatically.
7
+ For routine writeback, establish the relevant facts, update justified knowledge using the methods below, reconcile only affected Change sections when tracked, and check those edits. Preserve ongoing plans and unfinished work; this does not trigger final whole-Change convergence, readiness or closure. Before archive, current-fact and Decision Record decisions are both required. Keep these evidence owners separate:
8
8
 
9
- If `rsp show --focused --json` or `rsp ready <name> --json` reports only `RSP project requires an update` after required Tasks and implementation verification already passed, and update mutation is not explicitly authorized, do not run `rsp update`. Preserve the passed implementation verification and `first_fix_result`; report the durable writeback decision and readiness as incomplete because migration evidence is unavailable, and keep archive and commit blocked. This exception never converts a failed declared implementation or independent verification check into success, and other inspection failures remain unresolved.
9
+ - Implementation verification supplies applicable evidence for the final content, reusing unchanged coverage and rerunning affected checks after mutation.
10
+ - Review owns fixed-scope, report-only comparison. Use it when explicitly requested, required by nearer authority or risk, or needed by the selected acceptance; tiny direct actions do not automatically need it.
11
+ - Durable writeback decides what belongs in current facts or lasting rationale. It never substitutes for implementation checks or a required Review.
10
12
 
11
- Choose current facts and rationale independently. Use no update when there is no stable fact or lasting rationale worth rereading.
13
+ Inspect existing evidence and the selected Change when tracked. Use `rsp ready <name> --json` when current readiness or durable target advice is needed; obtain fresh readiness immediately before an authorized archive. Do not query readiness twice merely for separate writing and delivery roles. Treat `durableReview.factCandidateTargets` and `decisionRecordsPath` as routing advice, not permission. Spec delta markers are planning aids and are never promoted automatically.
12
14
 
13
- Return the durable decision in this semantic field order. Localize headings and labels while preserving the canonical values:
15
+ When a diagnostic tool fails, inspect its cause and effects. Use another permitted read/search method for the same authoritative artifacts. Do not replace named required checks, infer readiness from manual reading or mutate protected RSP files to obtain a gate. Missing decisive migration, structural or verification evidence leaves dependent closeout incomplete.
16
+
17
+ If inspection reports only `RSP project requires an update` without update authority, do not run `rsp update`. Preserve supported implementation and verification outcomes; report affected knowledge, readiness or delivery gaps. Archive requires current readiness. Commit may assess a separately authorized checkpoint against its exact boundary and required evidence; it stops if that evidence is affected or unavailable. Other inspection failures and required checks remain unresolved.
18
+
19
+ ## Close out in order
20
+
21
+ Apply this sequence only for established final delivery or preparation/audit of closure. Routine knowledge updates use the bounded writeback above.
22
+
23
+ 1. **Verify outcome facts.** Establish the approved delivered result from current implementation, authoritative contracts and decisive evidence. Distinguish passed, failed, unverified and superseded conclusions. This establishes truth, not a preliminary full-document rewrite; plans and recovery notes alone cannot establish current facts.
24
+ 2. **Distill Focus as needed.** Integrate only verified outcomes, evidence applicability or material limits missing from Change; no useful addition means no edit. Resolve or safely transfer outstanding recovery obligations before discarding their notes. Recovery state alone supplies no required acceptance evidence.
25
+ 3. **Write back knowledge as needed.** Using the verified result and Change delta, decide current facts and lasting rationale independently using the methods below. Update existing owners only when justified. No stable change means no edit; a delivered contract that leaves its authoritative Spec stale requires correction before closeout. Do not copy the whole Change or its verification history into knowledge documents.
26
+ 4. **Converge the whole Change.** After necessary writeback, use `rsp-doc`'s artifact method to reconcile all six sections under the [current work record rules](work-model.md#current-work-records). Retain the delivered delta, relevant design and result comparisons, applicable scoped evidence, material failure dispositions/limits and knowledge-update references; leave already-converged text unchanged. Remove obsolete plans and duplicate or misplaced content without moving history into a new report or Focus. Group integration conclusions stay in the Brief. Without Doc, perform the same bounded convergence locally without installation or replacing required Review.
27
+ 5. **Check final consistency, then archive when authorized.** Compare the final Change and knowledge owners with the verified result; an earlier review of another revision or a passing readiness command proves no text quality. Reuse applicable implementation/test evidence, check new knowledge/document edits, and fill only missing or invalidated coverage. Document-only writeback and archive preparation do not themselves invalidate code checks. Complete separately required Review before the archive gate below. Fix prose defects in scope, but return material contract or implementation contradictions to the decision, implementation or verification owner. Unresolved Required failures still block closeout.
28
+
29
+ These are dependency constraints, not persisted phases or mandatory separate tool calls. Edit only what needs writeback; required updates cannot be waived. Resolve stale statements from verified outcomes. Preserve settled planning, unrelated style and original evidence/verdict owners; add no no-op reports. Author checks establish no independent review.
30
+
31
+ Observe acceptance-critical commands separately by default. A batch must stop on failure and expose every result and exit status; trailing success proves no earlier pass. For a missing result, re-observe only that read-only or proven repeat-safe check by its declared method. Inspect effects before repeating mutations. Keep dependent lifecycle actions incomplete until required checks pass. Use existing document/link checks or known-path inspection instead of improvised general Markdown regex parsing. Ordinary reads may be batched.
32
+
33
+ ## Decide current facts and lasting rationale
34
+
35
+ Use no update when there is no stable fact or lasting rationale worth rereading.
36
+
37
+ Report actual knowledge updates, unresolved decisions and requested readiness conclusions concisely. Current-fact and Decision Record decisions remain independently required before archive, but routine no-op fields need not appear in the response. Include exact targets and decisive rationale when needed; a readiness report retains `yes | no`, gate evidence and blockers. Use the complete rendering below only for an explicit request or real technical consumer. Localize headings and labels while preserving the canonical values:
14
38
 
15
39
  ```md
16
40
  ## <localized Durable Decision heading>
@@ -23,14 +47,38 @@ Return the durable decision in this semantic field order. Localize headings and
23
47
  - <localized Archive ready label>: <yes | no>
24
48
  ```
25
49
 
26
- Response-only Continuation and Durable Decision labels are not canonical artifact headings. In Chinese, for example, use `## 持久化决策`, `决策记录(Decision Record)`, and `可归档(Archive ready)`, not English labels alone.
50
+ This is a response-only decision summary, not a block to paste into Change or archive. Persist actual knowledge updates and material decisions in the appropriate existing sections; omit empty targets, transient readiness and authorization receipts unless a declared consumer requires them. In Chinese, for example, use `## 持久化决策`, `决策记录(Decision Record)`, and `可归档(Archive ready)`, not English labels alone. Compact presentation changes no decision or closeout gate.
51
+
52
+ ## Write current facts to their owner
53
+
54
+ Write only a changed stable fact that future maintainers need. Select the smallest existing owner; summarize and link rather than maintain the same rule twice:
55
+
56
+ - `README` owns introduction, usage and starting points, not duplicate specifications.
57
+ - `AGENTS.md` owns scoped operating rules, authority and checks, not product behavior.
58
+ - Authorized root or local `CONTEXT.md` owns canonical vocabulary, domain relationships and navigation, not implementation notes or session history. Define a term once in its domain and link it elsewhere.
59
+ - Specs own current capabilities, collaboration contracts, boundaries and necessary constraints, not code inventories or future plans. Domain contracts use their relevant Spec; project-wide architecture uses `.rsp/specs/design.md`. Keep design references when they define normative evidence.
60
+ - Change owns this outcome's delta, design, work and evidence, not a full baseline copy. Decision Records own significant choices, alternatives and consequences, not another current-contract definition. Archives retain historical evidence, not current authority.
61
+
62
+ Create a Spec only for reusable truth with no suitable existing owner.
63
+
64
+ For substantial authorized writeback, use `rsp-doc` when available. A partial or older installation may instead apply these local checks; neither method replaces required Review:
65
+
66
+ - State consumers/value, handoffs, observable behavior, invariants and limits that survive replaceable internals.
67
+ - New domain Specs may use Purpose, Boundaries, Contracts, Scenarios and Constraints as a scaffold. Domain headings and normative design references remain valid; neither table shape nor template conformity selects ownership.
68
+ - Include only useful discriminating scenarios; Given/When/Then is optional. Plain-prose hints may stay, but requirements and limits remain visible.
69
+ - Link rationale to its Decision Record and verification to the Change. Resolve Spec/code discrepancies before choosing the correction owner; code alone supplies no new promise.
70
+ - Check that the future reader can find and use grounded facts, understand conditions and unknowns, and follow valid references. Preserve meaning; do not rewrite existing Specs merely for matching headings.
71
+
72
+ ## Write lasting rationale when needed
73
+
74
+ Create or update a Decision Record only for a hard-to-reverse or surprising choice with a real tradeoff. It owns rationale, alternatives, tradeoffs and consequences, not duplicated current facts. Choose one exact file under `durableReview.decisionRecordsPath`, not the directory itself.
27
75
 
28
- Write a current-fact update only when implementation changed a stable behavior, boundary, default, or constraint that future maintainers need. Prefer the smallest existing domain Spec, `.rsp/specs/design.md` for project-wide boundaries/navigation, or an explicitly authorized scoped `CONTEXT.md`/`AGENTS.md`; create a new Spec only for reusable project-level truth that fits nowhere existing.
76
+ Never use generated indexes, archives, or the managed RSP block as ordinary writeback targets. Keep narrative history, debugging notes, task chronology, and transient evidence out of Specs and Decisions.
29
77
 
30
- Create or update a Decision Record only for a hard-to-reverse or surprising choice with a real tradeoff. It owns rationale, alternatives, tradeoffs, and consequences—not duplicated current facts. Choose one exact file under `durableReview.decisionRecordsPath`, not the directory itself.
78
+ ## Prepare the Change for archive
31
79
 
32
- Never use generated indexes, archives, `.rsp/rsp-rules.md`, or the managed RSP block as ordinary writeback targets. Keep narrative history, debugging notes, task chronology, and transient evidence out of Specs and Decisions.
80
+ Before archive, require the converged final Change, completed or unnecessary knowledge writeback, applicable passing verification, current readiness and every separately required Review clean. Authorized archive preserves Change and clears its Focus marker; clearing the Capsule cannot substitute for writeback. Archive grants no local commit authority.
33
81
 
34
- Before archive, compress the Change to current design, completed outcomes, decisive evidence, omissions, remaining risks, and blockers. Archive only after required writeback is complete or explicitly unnecessary and every separately required fixed-scope change review is clean. Ordinary work needs later explicit Git authority for one independently reviewable logical commit. A `manage.closeout` preset applies only when Core selected and qualified Manage for the current continuation; declined, unavailable, or unselected Manage leaves Core advisory and configuration executes neither archive nor commit. In a qualified managed continuation, lifecycle closeout is independent from Git and follows the effective ceiling: `manual` leaves archive advisory, while `lifecycle` or `local` permits `rsp archive <change-work-ref>` after the durable writeback decision unless nearer authority narrows it. For a shallow Group with lifecycle closeout, make the durable writeback decision and archive each child independently, re-derive completion, and run `rsp group close <group>` only after every child and Group gate passes. Inspect each complete lifecycle diff before deciding Git separately. `manual` and `lifecycle` grant no commit; `local` may justify recovery checkpoints and, after lifecycle closeout, requires one `rsp-commit` invocation for a terminal non-small Change or Group when owner, paths, fresh decisive verification, and a clean exact boundary are known and no nearer denial exists. Terminal small work defaults to no commit; ambiguous, mixed, stale, or denied boundaries stop without staging. A separately authorized release operation may use a dedicated release commit. Push remains separate and requires the user to mention it explicitly.
82
+ ## Deliver with explicit boundaries
35
83
 
36
- When commit eligibility and authority exist, give `rsp-commit` one envelope containing the `change`, `group`, or `release` owner variant, exact allowed paths, decisive evidence, applicable lifecycle or release-boundary evidence, and current authority. Only if that Skill is unavailable, perform the same bounded manual action: reread nearest authority and owner; inspect staged, unstaged, and untracked paths, the cached diff, and recent non-merge messages; stop without staging on ambiguity or stale evidence; stage only allowed paths; re-inspect the complete cached boundary; derive a repository-consistent Conventional subject plus a proportionate body and truthful owner-derived trailers; create one local commit; then observe its complete message, paths, remaining worktree, and remote safety without amending or performing any external action. An available Commit Skill that rejects its envelope returns the missing condition and does not authorize manual reimplementation.
84
+ [Delivery closeout](closeout.md) owns checkpoint/final classification, the ask/auto/manual closure decision, Group-close sequence and exact Git handoff. Ordinary completion leaves work open. Apply the selected policy and current gates regardless of delegation. Git delivery separately needs explicit authority for one independently reviewable logical commit; closure grants none. Reuse applicable evidence.
@@ -1,9 +1,17 @@
1
1
  # Focus and continuation recovery
2
2
 
3
- Load this reference only when a Focus Capsule exists, is inspected or mutated, reports warnings, accepted work needs a continuation, or a continuation resumes.
3
+ Load when tracked work needs a recovery snapshot, a Capsule needs inspection or replacement, or a portable continuation handoff is required. Same-session worker continuation alone uses [coordinated interruption and recovery](coordination-recovery.md), not this format. Short direct tasks need no new WorkRef or Capsule.
4
4
 
5
- The optional bounded Markdown Focus Capsule is a Manager-owned recovery pointer, never selection, authority, acceptance, worker transport, or host runtime state. A portable commit-safe v1 capsule permits only one leading version comment, blank lines, exactly one non-empty single-line `Current`, `Evidence`, and `Next`, and at most one non-empty single-line `Resume check`; unknown non-empty lines or fields are invalid. It excludes worker identity, handles, machine-specific paths, raw worker messages, chronology, topology, authority, acceptance, logs, diffs, and duplicated Tasks.
5
+ Core owns the selected WorkRef's optional recovery snapshot. At a pause, handoff or recovery-relevant checkpoint, create or replace it only when the existing snapshot is insufficient or stale. Keep only context unavailable from the Change, current workspace or existing evidence whose loss would make continuation unsafe or require costly repeated discovery. Ordinary same-session progress needs no update. Refer to Change items rather than maintain another task, verification or blocker list; a delivery blocker belongs in Change, with only missing operational detail here.
6
6
 
7
- When accepted work remains, return a localized continuation with these semantic fields in order: `WorkRef`, `Authority`, `Current state`, `Changed artifacts`, `Fresh verification`, `Blockers`, `Next action`. Preserve technical values; the continuation is not a second state store.
7
+ Retain the current recovery position, necessary evidence pointers, next action and resume conditions. Unfinished experiments, pending cleanup and operations with uncertain effects may matter; a ruled-out approach needs only its still-applicable conclusion when repeating it would be costly. Do not record command sequences, attempts, repair/test rounds or how the diagnosis evolved. Use `rsp focus <work-ref> --capsule-file <path|->` to replace the snapshot as facts change, not append history.
8
8
 
9
- On same-session resume, reopen its pointers to authority and owned artifacts, inspect drift and replay safety, and refresh decisive evidence. On cross-session or cross-device resume, distrust transient worker and liveness claims and rederive authority, focus, baseline, dirty state, conflicting resources, blockers, evidence freshness, route, and Manage qualification before mutation.
9
+ Remove notes when their obligations are discharged, obsolete or safely transferred to their existing owner. Do not clear unresolved effects or hard-to-reconstruct safety context merely to shorten the snapshot. An empty capsule file clears notes while retaining the focus marker; cleanup alone does not authorize unfocus, closure or deletion of evidence. Respect nearer mutation restrictions. For Group work use the selected child's Capsule, not a Group marker.
10
+
11
+ The existing v1 format is bounded to 4096 UTF-8 bytes: one leading `<!-- rsp-focus:v1 -->`, blank lines, exactly one non-empty single-line `Current`, `Evidence`, `Next`, and at most one non-empty single-line `Resume check`. No other non-empty lines are valid. Keep raw logs/diffs, runtime identifiers, host paths, credentials and execution history out. The marker path selects work; its notes grant no authority or acceptance and are never worker transport or controller state.
12
+
13
+ Before closeout, use the [durable-writeback sequence](durable-review.md) to establish outcome facts and update their owners as needed. No useful Focus addition requires no edit; recovery obligations still need disposition before clearing the marker. Detailed evidence stays with its existing owner, never solely in the Capsule.
14
+
15
+ When accepted work remains, return a localized continuation with these semantic fields in order: `WorkOwner`, `Authority`, `Current state`, `Changed artifacts`, `Fresh verification`, `Blockers`, `Next action`. A Change WorkOwner uses its WorkRef; a Group WorkOwner uses its Group reference and direct child Changes. Preserve technical values; the continuation is not a second state store.
16
+
17
+ For same-session, cross-session or cross-device resume, follow [interruption and recovery](coordination-recovery.md#resume-from-effects-not-tool-status) before continuing from this snapshot. That method owns drift, evidence applicability, replay safety and re-establishing current authority and host facts.