nccgs 2.0.0-rc.2 → 2.0.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/nccgs/MEMORY.md +3 -2
- package/.claude/nccgs/VERSION +1 -1
- package/.claude/nccgs/packages/ponytail/README.md +2 -2
- package/.claude/nccgs/protocols/agent-contract.md +15 -2
- package/.claude/nccgs/protocols/bounded-repair.md +135 -7
- package/.claude/nccgs/protocols/editor-session-evidence.md +52 -0
- package/.claude/nccgs/protocols/orchestration.md +7 -5
- package/.claude/nccgs/protocols/review-handoff.md +17 -1
- package/.claude/nccgs/protocols/standalone-gates.md +64 -8
- package/.claude/nccgs/protocols/standalone.md +33 -13
- package/.claude/nccgs/protocols/task-gates.md +13 -1
- package/.claude/nccgs/protocols/task-slices.md +106 -0
- package/.claude/nccgs/routing.generated.md +20 -0
- package/.claude/nccgs/tools/command-process.mjs +10 -4
- package/.claude/nccgs/tools/compile-policy.mjs +4 -0
- package/.claude/nccgs/tools/editor-session-evidence.mjs +66 -0
- package/.claude/nccgs/tools/gates.mjs +7 -4
- package/.claude/nccgs/tools/handoff.mjs +51 -0
- package/.claude/nccgs/tools/inputs.mjs +36 -1
- package/.claude/nccgs/tools/lifecycle.mjs +21 -0
- package/.claude/nccgs/tools/orchestration.mjs +264 -14
- package/.claude/nccgs/tools/repair-packet.mjs +29 -10
- package/.claude/nccgs/tools/returned-handoff.mjs +38 -0
- package/.claude/nccgs/tools/review-budget.mjs +171 -0
- package/.claude/nccgs/tools/review-handoff.mjs +42 -8
- package/.claude/nccgs/tools/runtime.mjs +7 -2
- package/.claude/nccgs/tools/session-budget.mjs +67 -0
- package/.claude/nccgs/tools/task-slices.mjs +147 -0
- package/.claude/nccgs/tools/task.mjs +39 -2
- package/.claude/nccgs/tools/tool-guard.mjs +19 -5
- package/.claude/nccgs/tools/unity-repair.mjs +128 -0
- package/.claude/nccgs/tools/verification-jobs.mjs +13 -3
- package/.claude/nccgs/tools/windows-compiler-server.cs +163 -0
- package/.claude/nccgs/tools/windows-job.cs +8 -1
- package/CHANGELOG.md +123 -0
- package/MEMORY.md +3 -2
- package/README.md +35 -27
- package/UPGRADING.md +26 -22
- package/VERSION +1 -1
- package/docs/ARCHITECTURE.md +45 -18
- package/docs/BOUNDED-REPAIR.md +76 -7
- package/docs/EDITOR-SESSION-EVIDENCE.md +52 -0
- package/docs/HANDOFF-AUTOMATION.md +144 -0
- package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +40 -11
- package/docs/PHASE-1-OPERATIONS.md +142 -1
- package/docs/PHASE-2-OPERATIONS.md +1 -1
- package/docs/RELEASE-STATUS.md +92 -9
- package/docs/TASK-SLICING.md +57 -0
- package/docs/UPGRADE-QUALIFICATION.md +45 -0
- package/docs/WORKFLOWS.md +1 -1
- package/package.json +2 -2
- package/scaffold/.nccgs/templates/repair-unity-code.json +18 -0
- package/scaffold/.nccgs/templates/repair-unity-editor.json +21 -0
- package/scaffold/.nccgs/templates/task-slices.json +28 -0
- package/scripts/cli.mjs +4 -0
- package/scripts/install.mjs +10 -0
- package/scripts/run.mjs +4 -3
- package/scripts/supervise.mjs +30 -6
- package/scripts/validate.mjs +4 -0
- package/scripts/work-handoff.mjs +38 -0
- package/tests/editor-session-evidence.test.mjs +45 -0
- package/tests/fixtures/compiler-shutdown.cs +64 -0
- package/tests/framework.test.mjs +38 -0
- package/tests/orchestration-v15.test.mjs +52 -1
- package/tests/phase1.test.mjs +92 -0
- package/tests/policy-v15.test.mjs +14 -0
- package/tests/review-budget.test.mjs +177 -0
- package/tests/runtime-v15.test.mjs +572 -4
- package/tests/session-budget.test.mjs +34 -0
- package/tests/task-slices.test.mjs +285 -0
- package/tests/unity-generated.test.mjs +140 -0
package/README.md
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
# NCCGS — New Claude Code Game Studio
|
|
2
2
|
|
|
3
|
-
**2.0.0
|
|
4
|
-
in **Claude Code
|
|
5
|
-
|
|
3
|
+
**2.0.0** is a prepared stable package for standalone game-development
|
|
4
|
+
orchestration in **Claude Code**. It is not published and does not move npm tags.
|
|
5
|
+
It includes handoff automation, bounded task slicing and Unity repair, protected
|
|
6
|
+
final-review allocation, managed Unity settlement and exact first-import output
|
|
7
|
+
declarations. New repair steps block unsaved loaded scenes before execution.
|
|
8
|
+
See [handoff operations](docs/HANDOFF-AUTOMATION.md), [bounded repair](docs/BOUNDED-REPAIR.md),
|
|
9
|
+
[task slicing](docs/TASK-SLICING.md) and [release notes](CHANGELOG.md).
|
|
6
10
|
|
|
7
11
|
Claude Code handles intake, planning, specialist dispatch, testing, independent
|
|
8
12
|
review and reporting. External review can be configured separately. This major
|
|
9
|
-
|
|
13
|
+
version introduces standalone defaults and explicit execution-policy migration
|
|
10
14
|
from the older compatibility workflow; existing task obligations remain preserved.
|
|
11
15
|
|
|
12
16
|
## Validation and limits
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
The frozen exact RC4 archive was exercised through actual Claude Code on a
|
|
19
|
+
controlled Unity scene repair: dirty-scene refusal preserved unsaved content,
|
|
20
|
+
a fresh worker repaired the target, deterministic PARTIAL handoff required no
|
|
21
|
+
continuation, all five checks and 28 criteria/385 assertions passed, and a fresh
|
|
22
|
+
independent reviewer returned unconditional PASS before normal task closure.
|
|
23
|
+
This is scoped workflow evidence, not broad game-quality or productivity proof.
|
|
24
|
+
|
|
25
|
+
Version 2.0.0 keeps those runtime guards and adds a receipt publisher so external
|
|
26
|
+
Editor stop evidence is available inside the reviewer's project. It does not
|
|
27
|
+
operate processes or alter acceptance. See [Editor evidence](docs/EDITOR-SESSION-EVIDENCE.md).
|
|
28
|
+
Release receipts separately record archive tests, installation/upgrades and
|
|
29
|
+
independent maintenance review. Preparation does not publish npm or claim a new
|
|
30
|
+
full Unity game run through the stable archive. Frozen history remains intact.
|
|
31
|
+
See [release status](docs/RELEASE-STATUS.md), [upgrading](UPGRADING.md),
|
|
32
|
+
[Vietnamese quick start](docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md) and [decisions](MEMORY.md).
|
|
28
33
|
|
|
29
34
|
## What changed
|
|
30
35
|
|
|
@@ -63,20 +68,23 @@ The studio retains 47 roles (13 active by default, including Game Designer), 36
|
|
|
63
68
|
rules, lifecycle hooks and unmodified official Unity Skills. Enable specialists
|
|
64
69
|
when their expertise resolves a concrete problem; do not dispatch the whole studio.
|
|
65
70
|
|
|
66
|
-
## Try the
|
|
71
|
+
## Try the prepared stable package
|
|
67
72
|
|
|
68
73
|
Requirements: Claude Code and Node.js 18+. Unity CLI/Pipeline is needed for live
|
|
69
74
|
Unity operations. Run against a disposable Unity project first:
|
|
70
75
|
|
|
76
|
+
Use the locally prepared archive and its accompanying SHA-256 manifest:
|
|
77
|
+
|
|
71
78
|
```powershell
|
|
72
|
-
|
|
73
|
-
npx --yes nccgs
|
|
74
|
-
npx --yes nccgs
|
|
79
|
+
$NccgsArchive = "D:\path\to\nccgs-2.0.0.tgz"
|
|
80
|
+
npx --yes --package "$NccgsArchive" nccgs install --project "D:\path\to\UnityProject" --dry-run
|
|
81
|
+
npx --yes --package "$NccgsArchive" nccgs install --project "D:\path\to\UnityProject"
|
|
82
|
+
npx --yes --package "$NccgsArchive" nccgs doctor --project "D:\path\to\UnityProject"
|
|
75
83
|
```
|
|
76
84
|
|
|
77
|
-
|
|
78
|
-
repeatability. Use update for an existing installation only after reviewing its
|
|
79
|
-
dry run and backup.
|
|
85
|
+
Before publication, use this local archive. After publication, pin nccgs@2.0.0
|
|
86
|
+
for repeatability; npm tags are not changed by this preparation. Use update for an existing installation only after reviewing its
|
|
87
|
+
dry run and backup. See [the tested upgrade matrix](docs/UPGRADE-QUALIFICATION.md) and its limits.
|
|
80
88
|
The installer preserves customized files and unrelated Claude settings, records
|
|
81
89
|
overrides and backs up replacements. Do not use --force as an ordinary update path.
|
|
82
90
|
|
|
@@ -84,7 +92,7 @@ New installs default to standalone with `claude-standalone`. Existing installati
|
|
|
84
92
|
without execution.json remain compatibility. To migrate explicitly:
|
|
85
93
|
|
|
86
94
|
```powershell
|
|
87
|
-
npx --yes nccgs
|
|
95
|
+
npx --yes --package "$NccgsArchive" nccgs migrate-execution --project "D:\path\to\UnityProject" --to standalone --model-profile claude-standalone --dry-run
|
|
88
96
|
```
|
|
89
97
|
|
|
90
98
|
Inspect the dry run, then remove `--dry-run`. Omitting `--model-profile` preserves
|
|
@@ -96,7 +104,7 @@ task handling. Updating files never converts an old approval into a new one.
|
|
|
96
104
|
Start a task session with native permissions already selected:
|
|
97
105
|
|
|
98
106
|
```powershell
|
|
99
|
-
npx --yes nccgs
|
|
107
|
+
npx --yes --package "$NccgsArchive" nccgs run --project "D:\path\to\UnityProject"
|
|
100
108
|
```
|
|
101
109
|
|
|
102
110
|
New installations default to task autonomy `full`. Existing installations keep
|
package/UPGRADING.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Upgrading NCCGS 2.0
|
|
1
|
+
# Upgrading NCCGS 2.0.0
|
|
2
2
|
|
|
3
|
-
Current
|
|
4
|
-
|
|
3
|
+
Current prepared stable package: **2.0.0**, unpublished. Preparation does not change
|
|
4
|
+
npm `next` or `latest`. Use the local archive for reproducible evaluation.
|
|
5
5
|
Read [release status](docs/RELEASE-STATUS.md) for what has and has not been verified.
|
|
6
6
|
|
|
7
7
|
## Choose the operation
|
|
@@ -13,9 +13,11 @@ Read [release status](docs/RELEASE-STATUS.md) for what has and has not been veri
|
|
|
13
13
|
| Intentionally adopt standalone execution | `migrate-execution --to standalone` | Explicitly changes execution configuration; separate from updating files |
|
|
14
14
|
| Resume work | `run` | Launches Claude Code with the project's configured obligations |
|
|
15
15
|
|
|
16
|
-
**
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
**Historical published-1.3.0 → RC3 upgrade qualification covers its tested fixture matrix.**
|
|
17
|
+
See [upgrade qualification](docs/UPGRADE-QUALIFICATION.md) for scope and the RC2
|
|
18
|
+
issue corrected in RC3. RC4 archive checks are recorded separately in its release
|
|
19
|
+
receipts; historical results do not certify a different archive. Try a complete
|
|
20
|
+
copy before applying this package to active work.
|
|
19
21
|
|
|
20
22
|
## New installation
|
|
21
23
|
|
|
@@ -24,9 +26,10 @@ Unity project with Assets, Packages and ProjectSettings. Live Unity operations
|
|
|
24
26
|
also require the appropriate Unity Editor/CLI integration.
|
|
25
27
|
|
|
26
28
|
```powershell
|
|
27
|
-
|
|
28
|
-
npx --yes nccgs
|
|
29
|
-
npx --yes nccgs
|
|
29
|
+
$NccgsArchive = "D:\path\to\nccgs-2.0.0.tgz"
|
|
30
|
+
npx --yes --package "$NccgsArchive" nccgs install --project "D:\path\to\UnityProject" --dry-run
|
|
31
|
+
npx --yes --package "$NccgsArchive" nccgs install --project "D:\path\to\UnityProject"
|
|
32
|
+
npx --yes --package "$NccgsArchive" nccgs doctor --project "D:\path\to\UnityProject"
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
New installations select standalone execution and the claude-standalone model
|
|
@@ -41,9 +44,9 @@ open task records and evidence. Stop active NCCGS sessions before applying an
|
|
|
41
44
|
update. Do not update a frozen evaluation in place.
|
|
42
45
|
|
|
43
46
|
```powershell
|
|
44
|
-
npx --yes nccgs
|
|
45
|
-
npx --yes nccgs
|
|
46
|
-
npx --yes nccgs
|
|
47
|
+
npx --yes --package "$NccgsArchive" nccgs update --project "D:\path\to\ProjectCopy" --dry-run
|
|
48
|
+
npx --yes --package "$NccgsArchive" nccgs update --project "D:\path\to\ProjectCopy"
|
|
49
|
+
npx --yes --package "$NccgsArchive" nccgs doctor --project "D:\path\to\ProjectCopy"
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
Inspect the dry-run changes before the second command. Ordinary updates preserve
|
|
@@ -57,9 +60,9 @@ reviewed migration workflow; do not use `--force` just to make doctor green. Kee
|
|
|
57
60
|
the project's canonical requirements and applicable gates. Reopen Claude Code
|
|
58
61
|
after changing hooks, settings or managed agents.
|
|
59
62
|
|
|
60
|
-
If update reports that NCCGS is not installed, use the exact
|
|
63
|
+
If update reports that NCCGS is not installed, use the exact local-archive `install` command
|
|
61
64
|
above after checking the target. Some legacy CLI messages mention `@latest`;
|
|
62
|
-
that selects the stable channel
|
|
65
|
+
that selects the published stable channel, not this unpublished local archive.
|
|
63
66
|
|
|
64
67
|
## Optional execution-policy migration
|
|
65
68
|
|
|
@@ -67,34 +70,35 @@ After installing/updating, migrate only when the owner intends to adopt standalo
|
|
|
67
70
|
Review any active task's pinned obligations before changing policy.
|
|
68
71
|
|
|
69
72
|
```powershell
|
|
70
|
-
npx --yes nccgs
|
|
73
|
+
npx --yes --package "$NccgsArchive" nccgs migrate-execution --project "D:\path\to\ProjectCopy" --to standalone --model-profile claude-standalone --dry-run
|
|
71
74
|
```
|
|
72
75
|
|
|
73
76
|
Inspect the result, then repeat without `--dry-run` to apply. Omit
|
|
74
77
|
`--model-profile` to preserve model routes. An update alone does not perform this
|
|
75
78
|
migration. Schema-1 tasks retain their original gates/history; do not relabel them
|
|
76
|
-
as schema-2, reuse stale approvals or reset consumed attempts. Finish
|
|
77
|
-
|
|
79
|
+
as schema-2, reuse stale approvals or reset consumed attempts. A changed pipeline can block resuming an old task. Finish it before upgrading,
|
|
80
|
+
or explicitly scope subsequent work with retained lineage/evidence; updating or
|
|
81
|
+
rolling back execution settings does not re-approve an old task.
|
|
78
82
|
|
|
79
83
|
The command archives configuration under `.nccgs/backups/execution/<ID>`. To
|
|
80
84
|
preview restoration of that execution migration:
|
|
81
85
|
|
|
82
86
|
```powershell
|
|
83
|
-
npx --yes nccgs
|
|
87
|
+
npx --yes --package "$NccgsArchive" nccgs migrate-execution --project "D:\path\to\ProjectCopy" --rollback "MIGRATION_UUID" --dry-run
|
|
84
88
|
```
|
|
85
89
|
|
|
86
90
|
Use the actual printed UUID; remove `--dry-run` only after reviewing the preview.
|
|
87
91
|
Rollback refuses changed current configuration or altered backup hashes and
|
|
88
92
|
requires a compatible framework version. It restores execution configuration,
|
|
89
93
|
**not a complete package downgrade**. A full recovery uses the complete project
|
|
90
|
-
backup. Do not install 1.3.0 over
|
|
94
|
+
backup. Do not install 1.3.0 over a 2.0 project and assume task-schema downgrade
|
|
91
95
|
is safe. Caught migration failures restore captured configuration; an OS kill is
|
|
92
96
|
not an atomic transaction and may require manual recovery.
|
|
93
97
|
|
|
94
98
|
## Start and review work
|
|
95
99
|
|
|
96
100
|
```powershell
|
|
97
|
-
npx --yes nccgs
|
|
101
|
+
npx --yes --package "$NccgsArchive" nccgs run --project "D:\path\to\UnityProject"
|
|
98
102
|
```
|
|
99
103
|
|
|
100
104
|
Use `/status` in Claude Code to inspect obligations. Use `/migrate-project` when
|
|
@@ -104,5 +108,5 @@ game quality, completion of a task or human acceptance.
|
|
|
104
108
|
|
|
105
109
|
Existing projects that intentionally use Astra/Fable keep their configured chain.
|
|
106
110
|
See [compatibility gates](.claude/nccgs/protocols/task-gates.md). Historical 1.4/1.5
|
|
107
|
-
guides describe their original versions; this document governs the current
|
|
108
|
-
installation commands and release status.
|
|
111
|
+
guides describe their original versions; this document governs the current 2.0.0 package's
|
|
112
|
+
installation commands and release status.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0.0
|
|
1
|
+
2.0.0
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -11,8 +11,9 @@ distinct decision surface, failure mode, artifact, or verification lens.
|
|
|
11
11
|
1. **Kernel** — constitution, authority, project policy, ownership, state, closure.
|
|
12
12
|
2. **Router** — domain/risk classification, model profile, context packet, execution
|
|
13
13
|
graph and write ownership.
|
|
14
|
-
3. **Studio roles** —
|
|
15
|
-
|
|
14
|
+
3. **Studio roles** — a focused active set plus optional specialists. Counts, model
|
|
15
|
+
routes and native turn ceilings come from the [generated routing reference](../.claude/nccgs/routing.generated.md).
|
|
16
|
+
Activation choices survive updates; customized files are preserved.
|
|
16
17
|
4. **Workflow modules** — 36 composable skills with eight user-facing entrypoints.
|
|
17
18
|
5. **Unity operations** — unmodified official Unity Skills and Unity CLI/Pipeline.
|
|
18
19
|
6. **Automation** — Node hooks for recovery, audit and safety.
|
|
@@ -20,18 +21,32 @@ distinct decision surface, failure mode, artifact, or verification lens.
|
|
|
20
21
|
|
|
21
22
|
## Bounded orchestration
|
|
22
23
|
|
|
23
|
-
The primary Claude Code session is the sole Claude subagent orchestrator.
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
The primary Claude Code session is the sole Claude subagent orchestrator. New
|
|
25
|
+
installations use standalone execution: Claude Code owns intake, planning,
|
|
26
|
+
documents, dispatch and reporting. It constructs an implementation DAG,
|
|
26
27
|
selects the smallest complete role set, passes a context packet, assigns one writer
|
|
27
28
|
per path, and merges handoffs. Studio agents do not recursively delegate.
|
|
28
29
|
|
|
29
30
|
This preserves domain decomposition while preventing context-amplifying chains such
|
|
30
|
-
as director → lead → engine lead → specialist.
|
|
31
|
-
|
|
31
|
+
as director → lead → engine lead → specialist. The 2.0.0 operating protocol launches
|
|
32
|
+
one foreground Agent call at a time and waits for its final result. The configured
|
|
33
|
+
worker ceiling is not a promise of parallel dispatch. Review/analysis reserves a
|
|
34
|
+
stable snapshot and cannot overlap source writers in the same project.
|
|
35
|
+
|
|
36
|
+
Execution obligations are selected before models. Missing execution.json means
|
|
37
|
+
compatibility; existing Astra/Fable/Product Owner gates survive updates. Explicit
|
|
38
|
+
execution migration and model-profile selection are separate operations.
|
|
32
39
|
|
|
33
40
|
## Context architecture
|
|
34
41
|
|
|
42
|
+
Large standalone implementation tasks can use a pinned [slice plan](TASK-SLICING.md)
|
|
43
|
+
within the same task. Exact file ownership, original criterion IDs and dependency
|
|
44
|
+
dispatches bound each assignment. One final integration receives the full contract;
|
|
45
|
+
intermediate handoffs cannot satisfy implementation or acceptance. Independent
|
|
46
|
+
review excludes every implementation contributor in the task subtree. Plans and
|
|
47
|
+
revisions retain attempts and reserve capacity inside existing ancestor limits;
|
|
48
|
+
they create no child task, review round or session budget.
|
|
49
|
+
|
|
35
50
|
The feature contract stores approved scope. The context packet stores the current
|
|
36
51
|
working-set map: source anchors and revisions, decision summaries, ownership,
|
|
37
52
|
dependencies, verification, and reasons for any full-source read. Agents receive the
|
|
@@ -45,9 +60,11 @@ require reconstructing truth from chat history.
|
|
|
45
60
|
Each catalog role has a capability class: lightweight, standard, deep, leadership,
|
|
46
61
|
or review. `pipeline.json` is the routing source; the compiler generates catalog
|
|
47
62
|
routes and agent frontmatter, and validation rejects drift. The default
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
63
|
+
claude-standalone profile requests Sonnet/medium for FAST, Opus/medium for STANDARD,
|
|
64
|
+
Opus/high for CONTROLLED and Opus/high for independent review. Requested routes
|
|
65
|
+
do not establish actual provider execution. The generated reference includes
|
|
66
|
+
compatibility routes; quality, balanced and inherit profiles remain available
|
|
67
|
+
without duplicating agent prompts.
|
|
51
68
|
|
|
52
69
|
Legacy profiles support policy-directed fallback. The astra-claude profile instead
|
|
53
70
|
blocks a required stage when its model/effort cannot be confirmed; it never labels
|
|
@@ -61,10 +78,12 @@ SHA-256 manifest makes upstream modifications visible.
|
|
|
61
78
|
|
|
62
79
|
## Evidence and closure
|
|
63
80
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
Standalone work follows scoped intake and reviewed design where required ->
|
|
82
|
+
risk-selected implementation -> measured verification -> independent review ->
|
|
83
|
+
report -> configured external/manual/acceptance gates. The accountable implementer
|
|
84
|
+
fixes findings and an independent reviewer re-reviews changed work. Compatibility
|
|
85
|
+
with astra-claude retains Fable review, Astra checking and explicit Product Owner
|
|
86
|
+
acceptance. `task.mjs` enforces the selected sequence using snapshot hashes, immutable
|
|
68
87
|
artifact references, runtime observations and explicit external decisions. A changed
|
|
69
88
|
snapshot invalidates previous review/acceptance. Re-recording an earlier stage clears
|
|
70
89
|
downstream stages while retaining history. Hooks supplement the task gate; they are
|
|
@@ -75,15 +94,23 @@ Task risk selects a frozen implementation route and a review budget from
|
|
|
75
94
|
CONTROLLED/deep/3. Valid review records consume rounds even for negative verdicts.
|
|
76
95
|
Re-recording implementation preserves the counter. A PASS at the limit can proceed;
|
|
77
96
|
otherwise exhaustion stops the task until an explicit external, reasoned extension.
|
|
78
|
-
|
|
97
|
+
Planning estimates are advisory. Standalone dispatch and configured worker
|
|
98
|
+
time/cost limits govern admission using observed telemetry; they do not measure
|
|
99
|
+
account-wide usage or interrupt a provider request already running.
|
|
79
100
|
|
|
80
101
|
Requested model settings and observed runtime values are separate fields. Native
|
|
81
102
|
events can report the resolved model and fallback history; absent observed effort
|
|
82
103
|
stays unknown until supporting runtime evidence is imported.
|
|
83
104
|
|
|
84
|
-
Every workflow dispatcher
|
|
85
|
-
|
|
86
|
-
|
|
105
|
+
Every workflow dispatcher selects execution policy first. Standalone loads the
|
|
106
|
+
shared standalone protocol; design entrypoints also load the design lifecycle.
|
|
107
|
+
Compatibility loads exactly one Astra or legacy reference. Risk selects scope and
|
|
108
|
+
model routing; all standalone tiers retain independent review.
|
|
109
|
+
|
|
110
|
+
Handoff helpers generate bounded prompts and PARTIAL drafts, validate structure
|
|
111
|
+
before completion, and import a completed reviewer's pinned result through the
|
|
112
|
+
existing record gate. They never supply provider evidence, change a verdict,
|
|
113
|
+
close the task, or reset budgets. See [handoff operations](HANDOFF-AUTOMATION.md).
|
|
87
114
|
|
|
88
115
|
One implementer remains accountable for the task. The scout closes a named factual
|
|
89
116
|
gap; specialist reviewers add distinct risk coverage. Neither is a compulsory
|
package/docs/BOUNDED-REPAIR.md
CHANGED
|
@@ -1,11 +1,80 @@
|
|
|
1
|
-
# Bounded
|
|
1
|
+
# Bounded repair — NCCGS 2.0.0
|
|
2
2
|
|
|
3
3
|
Read the [complete bounded repair protocol](../.claude/nccgs/protocols/bounded-repair.md).
|
|
4
4
|
It is installed in every project at `.claude/nccgs/protocols/bounded-repair.md`,
|
|
5
|
-
alongside the guards that enforce it. The
|
|
6
|
-
|
|
5
|
+
alongside the guards that enforce it. The stable package is prepared but unpublished; existing
|
|
6
|
+
reservations keep their pinned policy. New Editor steps use a single `eval` body
|
|
7
|
+
with fully qualified C# types. The runner checks all loaded scenes immediately
|
|
8
|
+
before the body in the same Editor call. Dirty named, additive or untitled scenes
|
|
9
|
+
block execution without saving/discarding user work. The failed attempt remains
|
|
10
|
+
recorded; resolving the scene does not replay or refund it. The owner resolves
|
|
11
|
+
unsaved work before a new authorized repair packet.
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
Choose one template after diagnosing the recorded failure:
|
|
14
|
+
|
|
15
|
+
| Template under `.nccgs/templates/` | Use |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `repair-packet.json` | Unchanged small source edit: 1–4 existing files, 12 work calls. |
|
|
18
|
+
| `repair-unity-code.json` | 1–8 exact code files including new regression tests; 24 work calls. Import new metadata through a pinned Editor step before returning. |
|
|
19
|
+
| `repair-unity-editor.json` | 1–8 exact scenes/prefabs/assets through pinned Editor commands; 20 work calls. No raw serialized-file or metadata edits. |
|
|
20
|
+
|
|
21
|
+
Each profile has a separate handoff allowance. Unity packets bind file operations,
|
|
22
|
+
Editor commands, timeouts and original GUIDs; they detect changes outside scope.
|
|
23
|
+
An uncertain Editor call retains exclusive ownership until external reconciliation.
|
|
24
|
+
Attempts and original receipts remain in history; no automatic retry or refund.
|
|
25
|
+
|
|
26
|
+
Flow: recorded failure → chosen packet → reserve/dispatch-prompt → bounded edits
|
|
27
|
+
and import/save → native completion → coordinator checks → independent re-review
|
|
28
|
+
→ existing acceptance gates. An Editor receipt never substitutes for compile,
|
|
29
|
+
EditMode, PlayMode, runtime, build or manual checks required by the contract.
|
|
30
|
+
|
|
31
|
+
Local fixtures establish framework behavior only. On 2026-10-27, an actual
|
|
32
|
+
Claude Code/Unity regression case exercised a schema-2 `unity-code` repair of one
|
|
33
|
+
existing file after a disclosed post-review fault caused a real PlayMode failure.
|
|
34
|
+
Fresh checks and a second independent unconditional PASS allowed normal closure,
|
|
35
|
+
with the original criteria, history, GUID and total budgets retained. See
|
|
36
|
+
[qualification scope](RELEASE-STATUS.md). This known-component case does not qualify
|
|
37
|
+
new-file imports, `unity-editor` operations or scene/prefab repair; those still
|
|
38
|
+
need fresh native qualification against the installed Unity CLI command catalog.
|
|
39
|
+
|
|
40
|
+
A subsequent new-script/scene/prefab attempt on 2026-10-27 stopped before independent
|
|
41
|
+
design review: the native coordinator pinned a per-worker `maxCostUsd` ceiling,
|
|
42
|
+
but the completed designer's cost was unknown. The reservation guard correctly
|
|
43
|
+
refused the reviewer. The attempt spent USD 2.3247276 of its shared USD 12 envelope;
|
|
44
|
+
no native repair or Unity acceptance was performed. Its original cap, partial
|
|
45
|
+
report and history remain intact. Session cost cannot replace missing worker cost
|
|
46
|
+
telemetry. The subsequent source fix admits a separately recorded, exclusive
|
|
47
|
+
supervised-session ceiling only when prior native costs plus its allowance fit
|
|
48
|
+
the unchanged cap and cover all started worker sessions;
|
|
49
|
+
see [telemetry and pinned limits](../.claude/nccgs/protocols/standalone-gates.md).
|
|
50
|
+
The preserved attempt was then continued under that unchanged aggregate cap. Actual
|
|
51
|
+
Claude workers created the script, imported Unity-generated metadata, and repaired
|
|
52
|
+
the existing prefab and connected scene through three pinned Editor operations.
|
|
53
|
+
The initial 16 PASS/3 FAIL and intermediate 17 PASS/2 FAIL EditMode runs remain;
|
|
54
|
+
the intermediate run proves the script worked before asset repair. All five final
|
|
55
|
+
checks passed: 19/19 EditMode, 8/8 PlayMode, and 28 criteria/385 measured assertions.
|
|
56
|
+
The final delivery review did not run: aggregate native list-cost reached
|
|
57
|
+
USD 11.589259/12 and the coordinator stopped with insufficient review allowance.
|
|
58
|
+
The task remains PARTIAL and unclosed, with no recorded implementation approval
|
|
59
|
+
or invented reviewer verdict. This establishes observed repair/test execution,
|
|
60
|
+
not full qualification of the new-script/scene/prefab delivery lifecycle.
|
|
61
|
+
|
|
62
|
+
A separately authorized case on 2026-10-28 pinned a USD4/15-minute final-review
|
|
63
|
+
reserve inside a new USD12/75-minute total before any native work. The same
|
|
64
|
+
new-script/import and prefab/scene repair path then reached a fresh independent
|
|
65
|
+
unconditional PASS and normal closure: all five final checks, 19/19 EditMode,
|
|
66
|
+
8/8 PlayMode and the unchanged 28 criteria/385 assertions passed. It spent
|
|
67
|
+
USD9.816888 in 22 min 35 s, with 5 dispatches and 2 independent reviewers. The
|
|
68
|
+
single allowed automatic continuation and its work-phase handoff stop remain
|
|
69
|
+
recorded; no failed attempt or consumed allowance was erased. The old PARTIAL
|
|
70
|
+
case remains unchanged; combined old/new cost is USD21.406147. This is scoped
|
|
71
|
+
qualification of the disclosed warmed fixture and exact pinned operations,
|
|
72
|
+
not arbitrary scene editing or cold-start behavior. See the findings and limits
|
|
73
|
+
in [release status](RELEASE-STATUS.md) and the
|
|
74
|
+
[protected allocation procedure](PHASE-1-OPERATIONS.md#protect-the-final-independent-review-before-starting-work).
|
|
75
|
+
|
|
76
|
+
## External Editor stop handoff
|
|
77
|
+
|
|
78
|
+
Publish the original operator start/shutdown/stop receipts into reviewer-readable
|
|
79
|
+
project evidence before handing off. Preserve sealed cases through a separate
|
|
80
|
+
addendum; never recreate or overwrite historical process facts. See [Editor lifecycle evidence](EDITOR-SESSION-EVIDENCE.md).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Editor lifecycle evidence visible to the reviewer
|
|
2
|
+
|
|
3
|
+
An external operator may own a Unity Editor while native workers run bounded
|
|
4
|
+
operations. Keep ownership with that operator. Before handing the task to review,
|
|
5
|
+
publish the operator's existing start, graceful shutdown command and settled stop
|
|
6
|
+
receipts under the project's `.nccgs/evidence/editor-control/` directory.
|
|
7
|
+
An external artifact directory alone is insufficient when the reviewer can only
|
|
8
|
+
read the project tree.
|
|
9
|
+
|
|
10
|
+
Use the installed helper from the external operator's existing harness:
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
import { publishEditorSessionEvidence } from './.claude/nccgs/tools/editor-session-evidence.mjs';
|
|
14
|
+
const reference = publishEditorSessionEvidence(project, {
|
|
15
|
+
sourceProject: project,
|
|
16
|
+
startFile: absoluteStartReceipt,
|
|
17
|
+
stopFile: absoluteStopReceipt,
|
|
18
|
+
shutdownFile: absoluteShutdownCommandReceipt
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The supported receipt format is the Windows owned-Editor harness format: start
|
|
23
|
+
has `at`, `project`, and `identity` (`pid`, `windowsJob`, `groupName`); stop has the
|
|
24
|
+
same identity, `state: "dead"`, `forced: false`, and `result: {code: 0, signal: null}`.
|
|
25
|
+
The shutdown command receipt has `at`, fixed Unity `args` with the exact
|
|
26
|
+
`--project-path` and `UnityEditor.EditorApplication.Exit(0)`, its own owned CLI
|
|
27
|
+
identity, `treeState: "dead"`, `code: 0`, and `signal: null`.
|
|
28
|
+
|
|
29
|
+
The helper checks ownership/project consistency, event order and reported normal
|
|
30
|
+
settlement. It copies the three original files byte for byte, adds SHA-256
|
|
31
|
+
references, and returns the reference to an immutable receipt bundle. Existing
|
|
32
|
+
bundle IDs cannot be overwritten. Include that reference in the coordinator's
|
|
33
|
+
review handoff alongside the ordinary managed-check receipts.
|
|
34
|
+
|
|
35
|
+
This publisher performs no process operation or live process probe. The operator
|
|
36
|
+
must still verify its owned group is dead using the existing process manager.
|
|
37
|
+
Forced, failed, live or uncertain stops retain their original evidence and cannot
|
|
38
|
+
be published as a normal stop by this helper. A copied receipt is not a new stop,
|
|
39
|
+
native worker execution, a reviewer verdict, or acceptance evidence for gameplay.
|
|
40
|
+
Untrusted receipt contents never authorize commands. Other producer formats need
|
|
41
|
+
an explicit adapter and qualification; do not invent observations to fit this one.
|
|
42
|
+
|
|
43
|
+
When the original case is already sealed, publish to a separate addendum project
|
|
44
|
+
and pass the original absolute `sourceProject`. The bundle marks itself as a
|
|
45
|
+
historical import. Keep the original task, findings, costs and hashes untouched;
|
|
46
|
+
a fresh independent reviewer assesses the addendum without rewriting the old
|
|
47
|
+
verdict. Do not restart the Editor merely to manufacture a replacement receipt.
|
|
48
|
+
|
|
49
|
+
For future runs, publish after every externally controlled normal stop, including
|
|
50
|
+
the stop after resolving an unsaved-scene refusal, before the next native handoff.
|
|
51
|
+
This evidence step does not grant save/discard authority, expand worker scope,
|
|
52
|
+
waive any check, or enlarge the original total budget.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Handoff preparation, validation and review recording
|
|
2
|
+
|
|
3
|
+
These helpers are included in the prepared, unpublished 2.0.0 stable package.
|
|
4
|
+
Package preparation does not establish fresh Claude Code execution. They reduce mechanical copying within the
|
|
5
|
+
existing standalone workflow. Existing task gates, native completion, measured
|
|
6
|
+
acceptance, independent review, history and budgets remain authoritative.
|
|
7
|
+
|
|
8
|
+
## Prepare a registered assignment
|
|
9
|
+
|
|
10
|
+
Reserve the worker normally, including fresh `handoffPaths`. Read-only paths must
|
|
11
|
+
already be declared in the task's `analysisArtifacts`. Then run one plain command:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
node .claude/nccgs/tools/task.mjs dispatch-prompt --id TASK --dispatch DISPATCH_ID
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For implementation, analysis and review, the response includes the Agent prompt,
|
|
18
|
+
role and PARTIAL handoff templates with task/dispatch/contract identities. It reads
|
|
19
|
+
the existing reservation and does not write files, launch a worker, reserve another
|
|
20
|
+
attempt or grant source ownership. Give the returned prompt to that foreground
|
|
21
|
+
Agent. Add only bounded assignment context consistent with the contract. The
|
|
22
|
+
worker writes its draft early and owns its contents. No declared handoff is created
|
|
23
|
+
automatically; a missing handoff still fails completion.
|
|
24
|
+
|
|
25
|
+
A review template begins BLOCKED with an explicit unfinished-review condition.
|
|
26
|
+
Only the reviewer replaces the draft with actual findings and its own verdict.
|
|
27
|
+
Review policy, objective checks and source-backed reasoning are still required.
|
|
28
|
+
Bounded repair uses its injected packet and separate tool allowances. The handoff
|
|
29
|
+
helpers do not grant repair permissions; see [typed Unity repair](BOUNDED-REPAIR.md)
|
|
30
|
+
for the separate, opt-in Editor operation workflow.
|
|
31
|
+
|
|
32
|
+
## Validate before returning
|
|
33
|
+
|
|
34
|
+
After writing the handoff, a running non-repair worker may execute this one fixed,
|
|
35
|
+
read-only operation for its own task, dispatch and declared file:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
node .claude/nccgs/tools/task.mjs handoff-validate --id TASK --dispatch DISPATCH_ID --file .nccgs/evidence/analysis/TASK-review.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The coordinator can also call it. It checks the current contract/source, declared
|
|
42
|
+
path and marker. Review handoffs additionally check JSON fields, finding enums,
|
|
43
|
+
design acceptance impacts and the prohibition on conditional PASS. A PARTIAL draft
|
|
44
|
+
can be structurally VALID with `complete: false`; VALID is never acceptance or a
|
|
45
|
+
claim that review finished. General handoff inspection checks structure only,
|
|
46
|
+
not completeness of prose or evidence.
|
|
47
|
+
|
|
48
|
+
This is the only worker shell exception added here. Extra flags, duplicate flags,
|
|
49
|
+
forwarded commands, another dispatch/path and shell composition are rejected.
|
|
50
|
+
Repair workers do not gain this validation shell exception; typed Unity packets
|
|
51
|
+
may separately permit the fixed repair-editor wrapper. Their coordinator can
|
|
52
|
+
inspect the captured handoff after return. Validation changes no file or ledger,
|
|
53
|
+
and consumes no new dispatch or review round. Native tool/turn usage still applies.
|
|
54
|
+
|
|
55
|
+
Fix structural errors while the same worker owns its draft. Once the invocation
|
|
56
|
+
ends, its captured handoff is immutable. Failed/incomplete attempts retain their
|
|
57
|
+
costs and quotas and still need an eligible fresh attempt to continue.
|
|
58
|
+
|
|
59
|
+
## Record the completed review
|
|
60
|
+
|
|
61
|
+
For tasks with `reviewContractRequired: true`, the coordinator can import the
|
|
62
|
+
completed reviewer's pinned handoff without copying its JSON into another file:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
node .claude/nccgs/tools/task.mjs record-review --id TASK --dispatch DISPATCH_ID --file .nccgs/evidence/analysis/TASK-review.md
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The command derives runtime identity, source snapshot and evidence from the
|
|
69
|
+
completed reservation, and copies verdict, criteriaMet, findings and conditions
|
|
70
|
+
exactly from the pinned JSON block. It calls the existing `record --stage review`
|
|
71
|
+
gate. It never edits the reviewer document or chooses a verdict. Missing runtime,
|
|
72
|
+
same-agent review, stale source, tampered evidence, unproven criteria, exhausted
|
|
73
|
+
budgets and previously consumed dispatches still reject recording. A complete
|
|
74
|
+
negative verdict can be recorded honestly. A successful record appends the usual
|
|
75
|
+
history and consumes the usual review round; rejected recording does not refund
|
|
76
|
+
the already-spent dispatch. Repeating the command does not record a second round.
|
|
77
|
+
|
|
78
|
+
Reporting, configured external review, manual acceptance and `task close` remain
|
|
79
|
+
separate. The helper never closes a task. Older policies without a reviewer-owned
|
|
80
|
+
JSON contract keep their original record workflow and are not migrated by import.
|
|
81
|
+
|
|
82
|
+
## Deterministic protected-work handoff
|
|
83
|
+
|
|
84
|
+
After a supervised implementation invocation ends, the work phase can record a
|
|
85
|
+
PARTIAL report without spending another Claude continuation solely on reporting.
|
|
86
|
+
This requires a pinned final-review allocation, complete native session cost,
|
|
87
|
+
no active/uncertain worker or pending job, a current implementation record made
|
|
88
|
+
within this run after the latest receipt, review readiness and all automatic
|
|
89
|
+
measured criteria passing. Stale, failed or incomplete evidence keeps the ordinary
|
|
90
|
+
bounded continuation/blocked path. Existing coordinator reports are preserved.
|
|
91
|
+
|
|
92
|
+
The report is marked **supervisor-work-handoff**, identifies its run and uses the
|
|
93
|
+
normal report/history writer. It means only “awaiting independent review”. It
|
|
94
|
+
cannot create a reviewer verdict, close the task, satisfy manual/external gates,
|
|
95
|
+
refund attempts or enlarge any cap. Recovery reuses the recorded handoff.
|
|
96
|
+
This automation is disabled for analysis/design and final-review phases.
|
|
97
|
+
|
|
98
|
+
## Configuration and validation limits
|
|
99
|
+
|
|
100
|
+
Read [generated routing and native ceilings](../.claude/nccgs/routing.generated.md)
|
|
101
|
+
and check the actual installed role/session override before dispatch. A prompt's
|
|
102
|
+
turn count cannot change native capacity. Run source checks with `npm run
|
|
103
|
+
policy:check`, `npm run validate` and `npm test`. Fixture tests are synthetic.
|
|
104
|
+
The controlled Claude Code/Unity case on 2026-10-27 exercised generated dispatch
|
|
105
|
+
prompts, worker handoffs and exact independent review import; see
|
|
106
|
+
[qualification scope](RELEASE-STATUS.md). It does not establish general efficiency.
|
|
107
|
+
|
|
108
|
+
Update only through the documented [upgrade workflow](../UPGRADING.md). Do not
|
|
109
|
+
install new source into a frozen evaluation or rewrite an existing source/input
|
|
110
|
+
pin to carry an old approval forward.
|
|
111
|
+
|
|
112
|
+
External operator Editor stop receipts must be visible in the project before
|
|
113
|
+
review. See [the evidence publication procedure](EDITOR-SESSION-EVIDENCE.md).
|
|
114
|
+
## Native returned text for read-only handoffs
|
|
115
|
+
|
|
116
|
+
An analysis or independent review reservation may opt into
|
|
117
|
+
`"handoffTransport": "native-result"` with exactly one fresh `handoffPaths` entry
|
|
118
|
+
already declared in the task's `analysisArtifacts`. Use `dispatch-prompt` to supply
|
|
119
|
+
the assignment. The worker returns the complete Markdown document as its sole
|
|
120
|
+
final text block, without an outer code fence, and does not write that path.
|
|
121
|
+
This supports native clients that require read-only subagents to return findings.
|
|
122
|
+
|
|
123
|
+
The correlated foreground PostToolUse hook copies the exact UTF-8 text (maximum
|
|
124
|
+
256 KiB) using exclusive creation and pins its hash in the native observation.
|
|
125
|
+
Session, tool call, agent identity and unchanged source snapshot must match.
|
|
126
|
+
Missing, multiple, oversized, incomplete or ambiguous native output fails closed;
|
|
127
|
+
existing files cannot be replaced. The hook never supplies a COMPLETE marker or
|
|
128
|
+
edits a review verdict. Existing file transport and old dispatches are unchanged.
|
|
129
|
+
|
|
130
|
+
The coordinator still records analysis with current checks, or imports the exact
|
|
131
|
+
review using `record-review`. Required measured acceptance, independent identity,
|
|
132
|
+
conditions, review limits and closure gates remain mandatory. A captured report is
|
|
133
|
+
not automatic acceptance. A historical failed dispatch stays failed; use a fresh
|
|
134
|
+
authorized attempt and preserve its lineage and spent allowances.
|
|
135
|
+
|
|
136
|
+
Audit work must use the task's selected model route, just like implementation.
|
|
137
|
+
For a FAST audit use a Sonnet analysis role; an Opus role does not satisfy that
|
|
138
|
+
route merely because its handoff was captured. Classify broader runtime/governance
|
|
139
|
+
changes with their actual scope before launching work. Audit tasks with a pinned
|
|
140
|
+
review reserve use `work` for analysis and `final-review` for their independent
|
|
141
|
+
review; that reserve cannot dispatch another analyst or an implementation worker.
|
|
142
|
+
Plan/design reviews retain their work-phase rules and cannot consume the final
|
|
143
|
+
delivery reserve.
|
|
144
|
+
|