nccgs 2.0.0-rc.3 → 2.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/.claude/nccgs/MEMORY.md +7 -2
  2. package/.claude/nccgs/VERSION +1 -1
  3. package/.claude/nccgs/packages/ponytail/README.md +2 -2
  4. package/.claude/nccgs/protocols/agent-contract.md +15 -2
  5. package/.claude/nccgs/protocols/bounded-repair.md +135 -7
  6. package/.claude/nccgs/protocols/editor-session-evidence.md +52 -0
  7. package/.claude/nccgs/protocols/orchestration.md +7 -5
  8. package/.claude/nccgs/protocols/review-handoff.md +17 -1
  9. package/.claude/nccgs/protocols/standalone-gates.md +64 -8
  10. package/.claude/nccgs/protocols/standalone.md +33 -13
  11. package/.claude/nccgs/protocols/task-gates.md +13 -1
  12. package/.claude/nccgs/protocols/task-slices.md +106 -0
  13. package/.claude/nccgs/routing.generated.md +20 -0
  14. package/.claude/nccgs/tools/command-process.mjs +10 -4
  15. package/.claude/nccgs/tools/compile-policy.mjs +8 -0
  16. package/.claude/nccgs/tools/configure-models.mjs +4 -0
  17. package/.claude/nccgs/tools/editor-session-evidence.mjs +66 -0
  18. package/.claude/nccgs/tools/gates.mjs +7 -4
  19. package/.claude/nccgs/tools/handoff.mjs +51 -0
  20. package/.claude/nccgs/tools/inputs.mjs +36 -1
  21. package/.claude/nccgs/tools/installation-guard.mjs +55 -0
  22. package/.claude/nccgs/tools/lifecycle.mjs +21 -0
  23. package/.claude/nccgs/tools/orchestration.mjs +264 -14
  24. package/.claude/nccgs/tools/repair-packet.mjs +29 -10
  25. package/.claude/nccgs/tools/returned-handoff.mjs +38 -0
  26. package/.claude/nccgs/tools/review-budget.mjs +171 -0
  27. package/.claude/nccgs/tools/review-handoff.mjs +42 -8
  28. package/.claude/nccgs/tools/runtime.mjs +7 -2
  29. package/.claude/nccgs/tools/session-budget.mjs +67 -0
  30. package/.claude/nccgs/tools/task-slices.mjs +147 -0
  31. package/.claude/nccgs/tools/task.mjs +39 -2
  32. package/.claude/nccgs/tools/tool-guard.mjs +19 -5
  33. package/.claude/nccgs/tools/unity-repair.mjs +128 -0
  34. package/.claude/nccgs/tools/verification-jobs.mjs +13 -3
  35. package/.claude/nccgs/tools/windows-compiler-server.cs +163 -0
  36. package/.claude/nccgs/tools/windows-job.cs +8 -1
  37. package/CHANGELOG.md +142 -0
  38. package/MEMORY.md +7 -2
  39. package/README.md +57 -27
  40. package/UPGRADING.md +27 -18
  41. package/VERSION +1 -1
  42. package/docs/ARCHITECTURE.md +45 -18
  43. package/docs/BOUNDED-REPAIR.md +76 -7
  44. package/docs/EDITOR-SESSION-EVIDENCE.md +52 -0
  45. package/docs/HANDOFF-AUTOMATION.md +144 -0
  46. package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +68 -11
  47. package/docs/PHASE-1-OPERATIONS.md +142 -1
  48. package/docs/PHASE-2-OPERATIONS.md +1 -1
  49. package/docs/RELEASE-STATUS.md +102 -4
  50. package/docs/TASK-SLICING.md +57 -0
  51. package/docs/UNINSTALL.md +134 -0
  52. package/docs/UPGRADE-QUALIFICATION.md +1 -1
  53. package/docs/WORKFLOWS.md +1 -1
  54. package/package.json +2 -2
  55. package/scaffold/.nccgs/templates/repair-unity-code.json +18 -0
  56. package/scaffold/.nccgs/templates/repair-unity-editor.json +21 -0
  57. package/scaffold/.nccgs/templates/task-slices.json +28 -0
  58. package/scripts/cli.mjs +15 -2
  59. package/scripts/install.mjs +14 -0
  60. package/scripts/recover-session.mjs +89 -0
  61. package/scripts/run.mjs +21 -8
  62. package/scripts/supervise.mjs +30 -6
  63. package/scripts/uninstall.mjs +292 -0
  64. package/scripts/validate.mjs +6 -0
  65. package/scripts/work-handoff.mjs +38 -0
  66. package/tests/editor-session-evidence.test.mjs +45 -0
  67. package/tests/fixtures/compiler-shutdown.cs +64 -0
  68. package/tests/orchestration-v15.test.mjs +52 -1
  69. package/tests/phase1.test.mjs +92 -0
  70. package/tests/policy-v15.test.mjs +14 -0
  71. package/tests/review-budget.test.mjs +177 -0
  72. package/tests/runtime-v15.test.mjs +572 -4
  73. package/tests/session-budget.test.mjs +34 -0
  74. package/tests/task-slices.test.mjs +285 -0
  75. package/tests/uninstall.test.mjs +477 -0
  76. package/tests/unity-generated.test.mjs +140 -0
@@ -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
+
@@ -1,9 +1,13 @@
1
- # Hướng dẫn cài đặt và sử dụng NCCGS 2.0 RC
1
+ # Hướng dẫn cài đặt và sử dụng NCCGS 2.1.0
2
2
 
3
- Bản hiện tại: **2.0.0-rc.3**, kênh npm **next**. `latest` là kênh stable riêng.
4
- Đây là ứng viên phát hành. Nâng cấp từ npm 1.3.0 đã được kiểm chứng trong phạm vi
5
- [các tình huống thử](UPGRADE-QUALIFICATION.md); chạy trọn một đầu việc mới bằng
6
- chính RC này vẫn là bước riêng chưa hoàn tất. Xem [trạng thái phát hành](RELEASE-STATUS.md).
3
+ Mã nguồn tiếp theo: **2.1.0**, chưa phát hành npm; bổ sung lệnh gỡ NCCGS.
4
+ Bản **2.0.0** đã phát hành ngày 28/10/2026 và được giữ nguyên.
5
+ Dùng gói 2.1.0 cục bộ cùng mã SHA-256 đi kèm; việc chuẩn bị không đổi các kênh npm.
6
+ Biên bản operator dừng Editor phải được đưa vào hồ sơ reviewer bằng
7
+ [hướng dẫn bằng chứng Editor](EDITOR-SESSION-EVIDENCE.md).
8
+ Kiểm thử tính năng gỡ là kiểm thử framework; không được tính thành một lượt
9
+ Claude Code/Unity mới. Các bằng chứng cũ vẫn gắn với đúng gói đã kiểm chứng.
10
+ Xem [trạng thái phát hành](RELEASE-STATUS.md).
7
11
 
8
12
  ## Cài mới vào bản sao dự án
9
13
 
@@ -12,14 +16,15 @@ Chức năng điều khiển Unity cần thêm Editor/CLI phù hợp. Thay đư
12
16
  dự án của bạn; đọc kết quả xem trước rồi mới áp dụng:
13
17
 
14
18
  ```powershell
15
- npx --yes nccgs@2.0.0-rc.3 install --project "D:\path\to\UnityProject" --dry-run
16
- npx --yes nccgs@2.0.0-rc.3 install --project "D:\path\to\UnityProject"
17
- npx --yes nccgs@2.0.0-rc.3 doctor --project "D:\path\to\UnityProject"
19
+ $NccgsArchive = "D:\path\to\nccgs-2.1.0.tgz"
20
+ npx --yes --package "$NccgsArchive" nccgs install --project "D:\path\to\UnityProject" --dry-run
21
+ npx --yes --package "$NccgsArchive" nccgs install --project "D:\path\to\UnityProject"
22
+ npx --yes --package "$NccgsArchive" nccgs doctor --project "D:\path\to\UnityProject"
18
23
  ```
19
24
 
20
- Có thể dùng `nccgs@next` để theo RC mới nhất; dùng số phiên bản cụ thể để tái lập.
25
+ Dùng đúng gói cục bộ và SHA-256 đã ghi; các kênh npm không chọn gói chưa phát hành này.
21
26
  Cài mới mặc định dùng Claude Code standalone, không yêu cầu Astra/Fable. Dự án cũ
22
- vẫn giữ nghĩa vụ đã cấu hình; không tự bỏ một bước duyệt chỉ vì cài RC.
27
+ vẫn giữ nghĩa vụ đã cấu hình; không tự bỏ một bước duyệt chỉ vì cài gói mới.
23
28
 
24
29
  ## Dự án đã cài NCCGS
25
30
 
@@ -33,10 +38,38 @@ execution policy, dùng `migrate-execution --to standalone --dry-run` theo hư
33
38
  Không tự đổi task cũ, xóa lịch sử hay đặt lại số lượt đã dùng. Sau thay hook/cấu hình,
34
39
  mở lại phiên Claude Code.
35
40
 
41
+ ## Gỡ NCCGS khi không còn dùng
42
+
43
+ Đóng các phiên Claude Code và chờ worker/kiểm tra kết thúc. Từ terminal bên ngoài,
44
+ dùng gói 2.1.0 cục bộ để xem trước rồi gỡ khỏi đúng dự án:
45
+
46
+ ```powershell
47
+ npx --yes --package "$NccgsArchive" nccgs uninstall --project "D:\path\to\UnityProject" --dry-run
48
+ npx --yes --package "$NccgsArchive" nccgs uninstall --project "D:\path\to\UnityProject"
49
+ ```
50
+
51
+ Có thể gỡ trực tiếp dự án đã cài 2.0.0, không cần nâng cấp trước. Lệnh chỉ xóa
52
+ tệp quản lý còn nguyên bản và tháo hook/import NCCGS; giữ mã game, tệp tùy chỉnh,
53
+ lịch sử task/review/nghiệm thu/chi phí và cấu hình trong `.nccgs`. Các thiết lập
54
+ Claude dùng chung được giữ vì bản cũ chưa ghi nhận quyền sở hữu từng giá trị.
55
+
56
+ Kết quả trả về mã `id` của bản sao lưu. Để khôi phục, dùng cùng gói với
57
+ `uninstall --project DIR --rollback ID --dry-run`, sau đó bỏ `--dry-run`.
58
+ Khôi phục sẽ bị chặn nếu tệp đã được sửa tiếp. Lệnh không dừng tiến trình, không
59
+ xóa lịch sử và không hoàn lại ngân sách. Xem [chi tiết](UNINSTALL.md).
60
+
61
+ Nếu launcher bị dừng bất thường, dùng `recover-session --id UUID --dry-run` để
62
+ xem khóa. Chỉ xác nhận `--confirm-process-tree-stopped` sau khi operator đã kiểm
63
+ tra toàn bộ cây tiến trình thực sự dừng; PID chết không đủ để suy ra điều đó.
64
+ Lệnh yêu cầu đúng mã băm xem trước và lý do, lưu nguyên khóa cùng biên bản,
65
+ không chạm khóa task/job/run. Các lệnh agent/migration/policy cũng bị chặn trong
66
+ lúc gỡ. Gỡ bị chặn trước khi sửa tệp được ghi là `cancelled`; lỗi dọn thư mục
67
+ rỗng chỉ là cảnh báo và vẫn trả về mã rollback.
68
+
36
69
  ## Bắt đầu một đầu việc rõ ràng
37
70
 
38
71
  ```powershell
39
- npx --yes nccgs@2.0.0-rc.3 run --project "D:\path\to\UnityProject"
72
+ npx --yes --package "$NccgsArchive" nccgs run --project "D:\path\to\UnityProject"
40
73
  ```
41
74
 
42
75
  Trong Claude Code, cung cấp mục tiêu, phạm vi, yêu cầu cố định, phần được phép sửa
@@ -57,3 +90,27 @@ mong muốn, không phải bằng chứng model thực chạy. Chỉ gọi chuy
57
90
  review hợp lệ và mọi gate áp dụng đều đạt. Nghiệm thu kỹ thuật và quyết định nghiệm
58
91
  thu của người dùng được ghi riêng. Một lượt thất bại phải được giữ cùng chi phí,
59
92
  nguyên nhân và kết quả sửa lại.
93
+
94
+ ## Hỗ trợ handoff, Unity repair và chia nhỏ task trong NCCGS 2.0.0
95
+
96
+ Các hỗ trợ đã có từ 2.0.0 được giữ nguyên trong 2.1.0. Coordinator dùng
97
+ `task dispatch-prompt` để lấy prompt và khung bàn giao PARTIAL cho lượt đã đăng ký.
98
+ Worker có thể dùng `task handoff-validate` để phát hiện lỗi cấu trúc trước khi kết
99
+ thúc; repair worker theo giới hạn riêng của gói repair. Sau khi reviewer hoàn thành,
100
+ coordinator dùng `task record-review` để ghi đúng kết luận từ handoff đã ghim,
101
+ qua đầy đủ cổng kiểm tra hiện có. Các lệnh này không tự chấp thuận hay đóng task.
102
+ Xem [cú pháp và giới hạn](HANDOFF-AUTOMATION.md). Dùng source/package mới theo quy
103
+ trình nâng cấp; các lệnh ở trên dùng chính gói 2.1.0 cục bộ chưa phát hành.
104
+
105
+ Repair cũ giữ nguyên. Gói mới `unity-code` cho sửa/tạo tối đa 8 tệp mã; `unity-editor`
106
+ cho sửa scene/prefab/asset bằng thao tác Editor đã chốt trước. Tệp mới phải được
107
+ Unity import và tạo metadata trước khi worker kết thúc. Không sửa tay GUID hay
108
+ dùng kết quả thao tác Editor thay bằng chứng kiểm thử. Khi thao tác Editor chưa rõ
109
+ đã dừng hay chưa, giữ lượt repair và quyền sở hữu cho tới khi được đối soát; không
110
+ tự chạy lại hoặc hoàn ngân sách. Xem [luồng repair và mẫu gói](BOUNDED-REPAIR.md).
111
+
112
+ Với task quá lớn cho một lượt, dùng `task slice-preview`, `task slice-plan` và
113
+ `task slice-status` để chia thành các phần có mục tiêu, tệp và phụ thuộc rõ ràng
114
+ trong cùng task. Phần cuối tích hợp toàn bộ điều kiện gốc trước review độc lập.
115
+ Các phần dùng chung ngân sách hiện có; lịch sử, lượt thất bại và các cổng nghiệm
116
+ thu vẫn được giữ. Xem [hướng dẫn chia nhỏ task](TASK-SLICING.md).
@@ -1,7 +1,7 @@
1
1
  # Phase 1: durable verification and bounded continuation
2
2
 
3
3
  These verification and continuation mechanisms originated in the 1.5 preview
4
- and are included in 2.0 RC. Historical test descriptions below retain their original
4
+ and are included in 2.0.0. Historical test descriptions below retain their original
5
5
  scope. See [current release status](RELEASE-STATUS.md) for completed and pending checks.
6
6
 
7
7
  ## Run a verification once
@@ -50,6 +50,47 @@ Framework options end at `--`. A helper's later `--project` is passed to that he
50
50
  it is not interpreted as the framework root. The framework's own `--project` must
51
51
  still resolve to the bound root. Shell composition and expansion remain blocked.
52
52
 
53
+ ## Unity-generated IDE files on first import
54
+
55
+ Before `task init` for a new Unity project, declare its known derived files in
56
+ `.nccgs/inputs.json`. Preserve existing canonical inputs, build outputs and check
57
+ timeouts. For example, add this optional field to the existing manifest, replacing
58
+ the project/assembly names with the actual outputs:
59
+
60
+ ```json
61
+ "unityGeneratedFiles": [
62
+ "Assembly-CSharp.csproj",
63
+ "MyGame.slnx",
64
+ ".vscode/extensions.json",
65
+ ".vscode/launch.json",
66
+ ".vscode/settings.json",
67
+ "UserSettings/EditorUserSettings.asset",
68
+ "UserSettings/Search.settings"
69
+ ]
70
+ ```
71
+
72
+ This is an explicit declaration of derived output, not automatic recognition of
73
+ file contents or proof that Unity was the writer. Inspect existing files first;
74
+ do not list user-owned IDE settings, custom project files or any file consumed as
75
+ a build/test input. Such files remain tracked and may also be canonical inputs.
76
+ If another tool builds from a root `.csproj`, that file is an input, not an output.
77
+
78
+ Only exact root `.csproj`/`.sln`/`.slnx` paths and the five IDE/user-setting paths
79
+ shown above are allowed, at most 256 entries in an actual Unity project. Whole
80
+ directories, globs, traversal, links, duplicates and overlap with canonical inputs
81
+ are rejected. All other files, including nested project files, `.vscode/tasks.json`,
82
+ source/tests, assets and their `.meta` files, packages and ProjectSettings remain
83
+ covered by the existing source snapshot. No Git ignore file is consulted.
84
+
85
+ The manifest itself remains a canonical input pinned at task initialization.
86
+ Managed requests capture each declared file's original hash or absence; receipts
87
+ retain the before/after hashes and changed paths. This metadata change record is
88
+ separate from source integrity and never overrides a failed command, timeout,
89
+ source change, criterion or review. Missing/null output hashes mean absence, not
90
+ an unverified source exemption. Empty/omitted declarations retain the previous
91
+ strict behavior. Changing the list changes the canonical fingerprint; it cannot
92
+ retroactively repair a FAIL, reuse a stale approval or reset a task's allowance.
93
+
53
94
  ## Supervise headless Claude Code
54
95
 
55
96
  Initialize an implementation task first. Start from an external terminal:
@@ -76,6 +117,61 @@ invocation receives only the remaining allowance. Missing/decreasing usage block
76
117
  another invocation and remains unknown, not zero. Client list-cost is not billing,
77
118
  and in-flight provider requests can exceed a stop threshold.
78
119
 
120
+ For pinned dispatch cost limits, supervised admission can cover missing worker
121
+ cost using the whole-session allowance plus verified prior session totals. It
122
+ retains unknown worker telemetry and records the separate budget basis. One
123
+ project-wide supervision lock prevents concurrent allowance reuse; unexplained
124
+ worker sessions or missing prior cost fail closed. A fresh authorized run must
125
+ fit the remainder of every ancestor cap; it cannot erase spent attempts or cost.
126
+
127
+ ### Protect the final independent review before starting work
128
+
129
+ Before the first session, the external operator registers an allocation on the
130
+ root task (children inherit it):
131
+
132
+ ```text
133
+ node .claude/nccgs/tools/task.mjs budget-plan --id ROOT --file .nccgs/evidence/budget-plan.json
134
+ ```
135
+
136
+ The JSON has `schemaVersion: 1`, a human-readable `authority`, `totalUsd`,
137
+ `finalReviewUsd`, `totalDurationMs`, and `finalReviewDurationMs`. For a USD 12,
138
+ 75-minute case, reserving USD 4 and 15 minutes leaves at most USD 8 and 60 minutes
139
+ for design, design review, implementation, verification and repair together.
140
+ This is an explicit allocation, not a prediction that every reviewer will finish.
141
+ Provider requests in flight can exceed a stop threshold; actual terminal usage is
142
+ always retained and subtracted, never inferred for individual workers.
143
+
144
+ Use `nccgs run ... --budget-phase work` (the default) for those work sessions.
145
+ The supervisor clamps the requested session allowance and deadline to the
146
+ remaining shared work allocation. A fresh session or child task cannot take the
147
+ protected amount. Finish the implementation record and invoke
148
+ `node .claude/nccgs/tools/task.mjs report --id TASK --outcome partial --summary "Awaiting protected independent review"`.
149
+ A prose PARTIAL response is not itself a task record. NCCGS 2.0.0 can settle it without
150
+ another model invocation only when the protected work phase has current recorded
151
+ implementation, all latest checks and automatic criteria pass, no active work,
152
+ and complete session cost. It writes an attributed PARTIAL report through the
153
+ normal lifecycle. Otherwise the bounded continuation/blocked path remains.
154
+ See [deterministic handoff](HANDOFF-AUTOMATION.md#deterministic-protected-work-handoff).
155
+ Then start `nccgs run ... --budget-phase final-review` on that same
156
+ implementation task with a fresh native coordinator/reviewer session. The latter
157
+ may use unused work funds as well as its protected remainder; all previous spend
158
+ stays charged. Design review cannot use the final delivery reserve.
159
+
160
+ The final-review phase admits only independent delivery reviewer dispatches and
161
+ settlement of existing evidence. Source workers, repairs and new verification
162
+ jobs are rejected; all normal review/acceptance gates still apply. A negative
163
+ review can return to work only if its original work time/cost remain. A retry,
164
+ replacement session or recovered launcher never restores spent review funds.
165
+ `task budget-status --id TASK` shows settled totals, protected remainder and the
166
+ current allocation, explicitly leaving in-flight actual cost unknown.
167
+
168
+ Plan terms are pinned once; native sessions cannot register or replace them.
169
+ Missing allocation/run history or a started worker without correlated supervised
170
+ session coverage fails closed, even if the old task omitted optional `maxCostUsd`.
171
+ An existing case cannot reserve
172
+ money already spent or receive a later deadline. A separately authorized new
173
+ case has its own budget and must retain/report the earlier case's cost and result.
174
+
79
175
  Run records and native streams live in `.nccgs/runs/RUN_ID/`. Resume a recoverable
80
176
  external launcher interruption with:
81
177
 
@@ -89,6 +185,19 @@ usage and ambiguous launch windows block recovery. This is not an unlimited retr
89
185
  service. Keep local job/run ownership records in their original project; move only
90
186
  archived evidence when collecting a report.
91
187
 
188
+ An installed framework update changes the source fingerprint of an open plan or
189
+ audit. Do not reuse its old analysis/review or silently edit its baseline. An
190
+ external operator can run `task.mjs migrate-framework --id TASK --decision FILE`
191
+ with a JSON decision containing `reason`, `authority`, and `beforeFiles` (the exact
192
+ sorted `[path, sha256]` inventory from the original snapshot). The command proves
193
+ that inventory against the locked baseline and permits changes only under
194
+ `.claude/`, with unchanged canonical inputs and execution/pipeline policy. It
195
+ archives all old stages and the exact delta, retains task identity and budgets,
196
+ and requires fresh native analysis plus independent review. Missing original
197
+ inventory, game/source changes, live workers or pending checks block migration.
198
+ This is an external maintenance operation, never automatic acceptance or a
199
+ budget extension.
200
+
92
201
  ## Process ownership and locks
93
202
 
94
203
  On Windows 10+, the bundled inspectable C# helper uses a named Windows Job Object,
@@ -101,6 +210,38 @@ change PowerShell/system policy, install a runtime, or require WMI access.
101
210
  On POSIX, foreground commands use an owned process group; commands must not detach
102
211
  or daemonize out of that group. Windows is the locally tested platform for this change.
103
212
 
213
+ In the prepared 2.0.0 package, managed verification commands and their
214
+ wrappers inherit `UNITY_NO_AUTH_BROKER=1`.
215
+ Unity CLI then uses its supported direct OS-keyring authentication path instead
216
+ of starting a resident auth broker that waits two idle minutes after a short test.
217
+ The flag is scoped to the command tree: the caller's environment, stored account
218
+ settings, peer-signature policy, credentials and other environment entries are
219
+ not changed. No environment values are added to the saved command specification.
220
+ All actual descendants remain owned; root exit, test XML or a wrapper's PASS
221
+ alone cannot release the group or publish the verification receipt. Surviving
222
+ children still hold the slot until exit or the original timeout; an interrupted
223
+ or timed-out command still fails. These source fixes do not rewrite old jobs,
224
+ reviews, acceptance definitions or budgets.
225
+
226
+ For cold Unity compilation on Windows, the helper can request graceful shutdown
227
+ of a qualified Roslyn server after the command root has exited. It first verifies
228
+ that only recognized Unity compiler servers and system console hosts remain in
229
+ the Job Object. The exact open named-pipe connection must belong to that live,
230
+ owned compiler PID before any shutdown bytes are sent. Connection and I/O waits
231
+ are bounded; an acknowledgement never counts as process completion. The normal
232
+ empty-group check, original root exit code and original deadline still apply.
233
+ No compiler outside the job is stopped, and no global compiler setting is changed.
234
+
235
+ Qualification currently covers the Roslyn 4.3.1 / .NET host binary pair measured
236
+ with Editor 6000.3.17f1 and Unity CLI 1.0.0-beta.14 on Windows. The compiler and host
237
+ SHA-256 hashes and exact protocol revision are pinned in
238
+ `windows-compiler-server.cs`; matching a process name or version string is not
239
+ sufficient. Unknown binaries, ambiguous process data or another remaining worker
240
+ do not authorize shutdown. They retain normal ownership and may still time out.
241
+ The helper cache includes both C# source hashes, so updating this logic rebuilds
242
+ the executable. Adding another binary pair requires protocol and real cold-run
243
+ qualification, not widening detection to every `dotnet` or `VBCSCompiler` process.
244
+
104
245
  Local task/orchestration locks can recover a verifiably dead owner. Engine locks
105
246
  also require all managed descendants to be gone. Recovery writes an audit entry;
106
247
  it never refunds a dispatch, fabricates completion or resets a ledger. Live owners,
@@ -1,7 +1,7 @@
1
1
  # Phase 2: measured acceptance and a protected repair cycle
2
2
 
3
3
  These acceptance and dispatch mechanisms originated in the 1.5 preview and are
4
- included in 2.0 RC. They do not tune a game or rewrite frozen evaluations. See
4
+ included in 2.0.0. They do not tune a game or rewrite frozen evaluations. See
5
5
  [current release status](RELEASE-STATUS.md) for validation scope.
6
6
 
7
7
  The owner revised the evaluation scope on 2026-10-04: NCCGS must support delivery
@@ -1,20 +1,118 @@
1
- # NCCGS 2.0 RC release status
1
+ # NCCGS release status
2
2
 
3
- Current candidate: **2.0.0-rc.3**. Release channel: **next**. Latest/stable is not
4
- promoted by this candidate. Pin the exact version for reproducible evaluation.
3
+ Current source: **2.1.0**, unpublished. It adds reversible project uninstallation,
4
+ safe backup/rollback and launch/update protection during interrupted removal.
5
+ See [removal semantics](UNINSTALL.md). Local tests do not claim a new native
6
+ Claude Code/Unity run. The first independent maintenance review returned
7
+ CHANGES_REQUIRED. This candidate adds logged operator session reconciliation,
8
+ shared admission locking for configuration writers, pre-mutation cancellation
9
+ and best-effort directory cleanup. Its exact archive requires fresh full
10
+ regression and independent review; the earlier negative verdict is retained.
11
+
12
+ Version **2.0.0** was published on 2026-10-28 after exact-archive qualification.
13
+ The frozen publication receipt verified npm metadata and downloaded bytes,
14
+ fresh consumer installation and all 472 packaged files. Its archive SHA-256 is
15
+ `008df044b2486b273dbd0716782823b60da9750a676fa41cd4651a0e2f149cf3`.
16
+ Its maintenance audit and native Unity case completed with independent PASS;
17
+ the Unity case retained all 28 criteria/385 assertions, handoff, repair and the
18
+ unsaved-scene guard. Detailed private task/provider/cost receipts stay outside
19
+ the public package. That evidence does not transfer to 2.1.0 automatically.
20
+
21
+ ## Historical 2.0.0 preparation evidence
22
+
23
+ The preparation-time notes below are retained for context. Their pending stable
24
+ run/publication statements were superseded by the exact 2.0.0 completion above.
25
+
26
+ - Exact RC4 archive SHA-256: a1db9783f3f4077c742cbc346d0fa935c438fdd783e13c058e13b0bd0521bbf6.
27
+ The 2026-10-28 native Claude Code case qualified dirty-scene refusal, subsequent
28
+ scene repair and deterministic PARTIAL handoff without a continuation. All five
29
+ checks, 28 unchanged criteria/385 assertions, 19 EditMode and 8 PlayMode tests
30
+ passed; independent review was PASS with no mandatory conditions, then normal
31
+ closure. It spent USD7.8510068/12 in 16 min 12 s, retaining the failed attempt.
32
+ - The reviewer retained one LOW evidence-location finding: operator stop receipts
33
+ existed outside its project tree. Version 2.0.0 adds a publisher and protocol to
34
+ expose those existing bytes to reviewers. Old verdicts and frozen files remain
35
+ unchanged. See [Editor lifecycle evidence](EDITOR-SESSION-EVIDENCE.md).
36
+ - Existing acceptance, independent review, source, process and budget gates remain
37
+ mandatory. The Editor helper only validates and copies operator evidence; it
38
+ does not stop an Editor, query a live process or approve a task. An explicit
39
+ read-only `native-result` handoff transport also captures exact correlated
40
+ worker output when the client requires returned text; it never rewrites a
41
+ historical failed attempt, a verdict or a pending condition.
42
+ - Stable archive framework tests and maintenance review are separate from a full
43
+ native Unity run through the stable archive. That broader new run is not claimed.
44
+ Publication, human acceptance and broad productivity remain separate decisions.
45
+
46
+ ## Historical release notes
47
+
48
+ The following notes preserve their earlier preparation-time status. Statements
49
+ about pending RC4 execution below were superseded by the exact-RC4 case above.
50
+
51
+ ### Earlier RC preparation record
52
+
53
+ Prepared candidate: **2.0.0-rc.4**, unpublished. No npm tag is changed and stable
54
+ is not promoted. Use the local archive and its SHA-256 manifest for evaluation.
55
+
56
+ RC4 collects handoff automation, bounded task slices, typed Unity repair, process
57
+ settlement, first-import output declarations and protected review budgets. It
58
+ adds deterministic PARTIAL work handoff and an atomic dirty-scene precondition.
59
+ The historical RC3 archive and all frozen native cases remain unchanged. Their
60
+ execution evidence does not qualify these last additions or the exact RC4 archive.
61
+ See [handoff operations](HANDOFF-AUTOMATION.md), [bounded repair](BOUNDED-REPAIR.md)
62
+ and [task slicing](TASK-SLICING.md).
5
63
 
6
64
  ## What the evidence supports
7
65
 
8
66
  | Check | Status and scope |
9
67
  |---|---|
68
+ | RC4 deterministic work handoff and dirty-scene precondition (2026-10-28 Asia/Saigon) | Framework fixtures exercise prose-only PARTIAL settlement, stale/failed/missing evidence, current negative checks, idempotent recovery, unchanged final-review reserve and legacy reservations. An operator probe with Unity 6000.3.17f1 / CLI 1.0.0-beta.14 blocked named dirty and non-active additive untitled scenes without source loss, then allowed the saved-scene operation with existing GUIDs retained. The owned Editor exited normally and its process group was verified dead. These additions have no new Claude Code execution credit. |
69
+ | RC4 release preparation | Local archive only. Accompanying release receipts record full regression, source/archive hashes, fresh install and disposable upgrade results. Exact-RC native workflow qualification and publication remain separate pending steps. |
10
70
  | Framework functional regression | Previous maintained source: 183 PASS, 0 FAIL, 6 Windows symlink skips across 189 tests. RC3 changes installer recognition of previously generated agents and adds a focused regression. Installer/policy suites and exact-archive upgrade qualification are rerun for this change. |
11
71
  | Scoped native delivery V2 case | 24/24 criteria,137 EditMode,52 PlayMode and independent unconditional Claude Code PASS. Operator-assisted; used a frozen framework with a session-only reviewer capacity override. |
72
+ | Unreleased source: slices and Unity code repair (2026-10-27) | Actual Claude Code workers delivered two dependent slices in one task, then repaired a disclosed post-review fault through a typed `unity-code` packet. The real PlayMode failure remains recorded. Fresh final checks passed 24/24 original criteria (349 assertions), 16/16 EditMode and 7/7 PlayMode; both independent reviews were unconditional PASS. Original tests, installed framework, role limits, task history and total budgets were retained. No capacity override. |
73
+ | Managed Unity test settlement fix (2026-10-27) | On Windows with Unity CLI 1.0.0-beta.14 and Editor 6000.3.17f1, observed the idle auth broker remaining inside the owned process group. The process-local direct-keyring setting reduced warm EditMode total time from 121.37 s to 7.46 s; final PlayMode took 26.75 s. Post-wrapper settlement was 0.373/0.383 s. All 24 unchanged criteria passed (16/16 EditMode, 7/7 PlayMode). Framework regression: 207 PASS, 0 FAIL, 6 Windows symlink skips across 213 tests. Operator-run maintenance; no new Claude session or modification of the prior native evidence. |
74
+ | Cold Unity compiler settlement fix (2026-10-27) | Qualified compiler/host binary pair: Windows, Editor 6000.3.17f1, Roslyn 4.3.1, CLI 1.0.0-beta.14. Graceful shutdown of the exact owned compiler pipe settled a fresh-project run in 28.55 s; its source-change guard correctly retained FAIL when Unity generated IDE files. With those initialization files present and Library removed, a fresh full compilation passed 16/16 EditMode in 31.28 s. PlayMode passed 7/7 in 28.89 s; all 24 unchanged criteria (349 assertions) passed. Framework regression: 208 PASS, 0 FAIL, 6 Windows symlink skips across 214 tests. The original 360 s deadline and process ownership remain. Operator-run maintenance, not a new Claude game run; previous failures, reviews and spent budgets remain immutable. |
75
+ | First-import source classification (2026-10-27) | With nine exact generated IDE/local metadata files declared before init, a project with no Library or IDE files passed its first real EditMode attempt: 16/16 in 31.53 s. Their absence and resulting hashes are retained in the receipt; source stayed unchanged. Fresh PlayMode passed 7/7 in 30.82 s. All 24 original criteria (349 assertions) passed. Framework regression: 215 PASS, 0 FAIL, 6 Windows symlink skips across 221 tests, including seven focused source/output guard tests. Opt-in declarations are canonical inputs; undeclared source/configuration remains tracked. Windows, Editor 6000.3.17f1 and CLI 1.0.0-beta.14; operator-run maintenance, not new Claude execution. Previous source-change FAIL, reviews and budgets are retained. |
76
+ | Fresh-project full native component workflow (2026-10-27) | Actual Claude Code completed native design and independent design review, two dependent implementation slices from API scaffolds, whole-task review, a disclosed post-review fault, typed existing-code repair and fresh independent re-review. First cold EditMode passed 16/16 in 35.17 s with all nine generated outputs audited; no timeout or source drift. The fault produced a retained real 6 PASS/1 FAIL PlayMode run. Final EditMode passed 16/16 in 9.45 s and PlayMode 7/7 in 26.71 s; all 24 unchanged criteria (349 assertions) passed. All three independent reviews were unconditional PASS. The design/implementation parent-child lifecycle shared 7/12 dispatches, USD 10.214066/12 and 25 min 28 s/75 min, with no continuation or extension. Installed framework, checks, source controls, process ownership, history and earlier evidence remained intact; both owned process groups settled. |
12
77
  | RC package integrity | Release procedure verifies version consistency, public contents, documentation links, and install/doctor on a fresh disposable fixture using the packed archive. This is not an upgrade or provider task test. |
78
+ | Native new-script and scene/prefab repair attempt (2026-10-27) | NOT QUALIFIED. A native designer completed an extension contract preserving all original 24 criteria and adding four fixed criteria (385 assertions total); structural validation passed. The coordinator pinned optional per-worker `maxCostUsd: 12`, but the worker's native cost was null, so the next reservation correctly failed closed before independent design review. Actual whole-session cost was USD 2.3247276/12; 1/12 dispatches and no review invocation. No native script creation, asset repair or Unity acceptance checks occurred. Pinned controls, unknown telemetry, partial report, source and earlier evaluations remain unchanged; all owned process groups stopped. |
13
79
  | Upgrade from published npm 1.3.0 | Qualified within the disposable fixture matrix; RC2 exposed a generated-agent issue corrected in RC3. See [scope and limits](UPGRADE-QUALIFICATION.md). |
80
+ | Supervised cost coverage and continued asset repair (2026-10-27 UTC) | PARTIAL, not delivery-qualified. Missing worker cost now uses a separately recorded supervised-session ceiling plus verified historical native spend; worker cost stays unknown. A framework-only baseline migration archived stale analysis and required fresh native validation and independent design PASS. Actual Claude workers then created/imported the new script and repaired the existing prefab and connected scene via pinned Unity operations. Initial 16/19 and intermediate 17/19 EditMode results remain as failures; final 19/19 EditMode, 8/8 PlayMode and all 28 criteria/385 assertions passed. Aggregate spend including both earlier blocked phases is USD 11.589259/12, with 5/12 dispatches and 1/3 reviews in 58 min/75. The coordinator stopped before implementation recording and final independent review; task remains PARTIAL/unclosed. No verdict, review allowance, source exemption or total cap was manufactured. Framework regression: 218 PASS, 0 FAIL, 6 Windows symlink skips across 224 tests. |
14
81
  | Fresh task through this exact RC | PENDING — separate qualification step. Earlier delivery evidence is not attributed to a new run. |
82
+ | Protected final-review allocation and new-script/asset repair (2026-10-28 Asia/Saigon) | QUALIFIED within the disclosed fixture. A separately authorized new USD12/75-minute case pinned USD4/15 minutes for final independent review. Native design/design review spent USD2.9107512; a requested USD9.0892488 work session was clamped to USD5.0892488, and actual repair/verification spending was USD3.6935616. Two native workers created/imported the script and repaired the prefab/connected scene through three pinned Editor operations. Initial 16/19 and intermediate 17/19 EditMode failures remain; final 19/19 EditMode, 8/8 PlayMode and all 28 unchanged criteria/385 assertions passed. The protected review session received USD5.3956872, spent USD3.2125752, imported the fresh independent unconditional PASS unchanged, and normally closed the same implementation task. Total USD9.816888/12, 22 min 35 s/75, 5/12 dispatches, 2/3 reviewers and 1/1 automatic continuation. The work coordinator returned prose PARTIAL without recording the task report, so its continuation-limit stop remains recorded; the separately planned review phase completed delivery. All 32 final audit checks passed; frozen source controls, process ownership, prior evidence and the old USD11.589259 PARTIAL remain intact. Combined prior plus new cost is USD21.406147. |
15
83
  | Human third-party acceptance | Separate decision; not supplied by installation, tests or this release status. |
16
84
  | Broad game quality/productivity | Not established. No universal quality, balance, cost or efficiency claim. |
17
85
 
86
+ The 2026-10-27 cases use a known component, unchanged tests and deliberate
87
+ regressions. The fresh-project case starts with API scaffolds and existing metadata;
88
+ native workers author the implementation, but its fixed brief and tests are reused.
89
+ It qualifies the exercised workflow, not independent game creation, large-project
90
+ productivity, new-file import or scene/prefab repair. Design and implementation use
91
+ separate required lifecycle sessions under one cumulative budget, not replacement
92
+ attempts. The native workers and Unity tests ran locally; detailed task, provider
93
+ and measurement evidence is retained outside the public package. This source
94
+ qualification does not qualify the exact published RC archive or promote a release.
95
+
96
+ The 2026-10-28 reserve case qualifies the exact new-script/import and existing
97
+ prefab/scene repair path exercised against Editor 6000.3.17f1 and Unity CLI
98
+ 1.0.0-beta.14. It used a warmed, disclosed fixture and copied dependency code,
99
+ not a cold start or blind game creation. The final reviewer retained one LOW
100
+ non-blocking process finding about a missing dirty-scene precondition; no source
101
+ loss or acceptance impact was observed. The frozen native installation remains
102
+ unchanged. Subsequent source hardening adds coverage checks for legacy worker
103
+ sessions even without optional per-worker cost limits, and explicitly prompts
104
+ the lifecycle `report` command; those additions receive framework tests, not
105
+ new native-execution credit.
106
+ Pre-RC4 maintained-source regression: 230 PASS, 0 FAIL and 6 Windows symlink skips
107
+ across 236 tests; the focused reserve/supervisor suites passed all 30 tests.
108
+
109
+ The settlement fixes do not bypass live descendants. The original cold-project
110
+ compiler-server timeout remains a failed historical attempt. The subsequent
111
+ compiler fix requests graceful shutdown only for the qualified binary pair;
112
+ unknown compilers retain the normal wait and may still time out. Neither change
113
+ removes every possible engine startup, compilation or shutdown delay. See
114
+ [managed process ownership](PHASE-1-OPERATIONS.md#process-ownership-and-locks).
115
+
18
116
  ## Public package boundary
19
117
 
20
118
  The package contains the CLI, framework roles/protocols/hooks, project scaffold,
@@ -29,7 +127,7 @@ change current defaults or add new delivery gates. Current installation guidance
29
127
  is in [UPGRADING.md](../UPGRADING.md) and the
30
128
  [Vietnamese quick start](HUONG-DAN-MIGRATE-VA-SU-DUNG.md).
31
129
 
32
- ## RC3 change scope
130
+ ## Historical RC3 change scope
33
131
 
34
132
  RC1 already standardized package metadata and removed private memory. RC2 finishes
35
133
  public documentation: current standalone defaults, exact-version npm commands,
@@ -0,0 +1,57 @@
1
+ # Chia nhỏ task lớn trong NCCGS
2
+
3
+ Tính năng này được đóng gói trong bản chuẩn bị `2.0.0`, chưa phát hành npm.
4
+ NCCGS vẫn dùng Claude Code để điều phối và thực thi.
5
+
6
+ Task lớn được chia thành các phần việc có mục tiêu, tệp được sửa và quan hệ phụ
7
+ thuộc rõ ràng **trong cùng task**. Mỗi phần nhận đúng các điều kiện nghiệm thu gốc
8
+ liên quan. Phần tích hợp cuối nhận toàn bộ điều kiện. Chia nhỏ không tự tạo task
9
+ con, thêm lượt review hay tăng ngân sách.
10
+
11
+ 1. Coordinator đọc task và thiết kế đã review, chọn ít phần nhất đủ để mỗi lượt
12
+ làm việc có phạm vi rõ ràng. Mỗi phần có 1–8 tệp cụ thể; cả kế hoạch có 2–12 phần.
13
+ Tính cả test và metadata Unity cần tạo. Phần cuối có thể vừa làm hành vi cuối
14
+ vừa tích hợp, tránh thêm một bước bàn giao hình thức.
15
+ 2. Dùng mẫu `.nccgs/templates/task-slices.json`, điền task ID, contract hash,
16
+ snapshot hiện tại, agent, tệp, phụ thuộc và ID điều kiện gốc. Lưu bản nháp vào
17
+ `.nccgs/evidence/slice-plans/`. Mỗi điều kiện gốc, kể cả điều kiện thủ công,
18
+ phải có một phần chịu trách nhiệm chính. Các cổng nghiệm thu vẫn thuộc task.
19
+ 3. Chạy preview để kiểm tra cấu trúc và phần ngân sách còn lại, rồi đăng ký:
20
+
21
+ ```text
22
+ node .claude/nccgs/tools/task.mjs slice-preview --id TASK --file .nccgs/evidence/slice-plans/TASK.json
23
+ node .claude/nccgs/tools/task.mjs slice-plan --id TASK --file .nccgs/evidence/slice-plans/TASK.json
24
+ node .claude/nccgs/tools/task.mjs slice-status --id TASK
25
+ ```
26
+
27
+ 4. Lưu đối tượng `next` từ status vào tệp request và dùng luồng `reserve` →
28
+ `dispatch-prompt` → Agent foreground → handoff hiện có. Các lệnh mới không tự
29
+ khởi chạy agent. Hoàn tất từng phần trước khi làm phần tiếp theo. Checkpoint
30
+ sớm của task vẫn phải được đo trước khi mở rộng.
31
+ 5. Khi mọi phần có trạng thái `DELIVERED`, chạy kiểm tra trên kết quả tích hợp
32
+ hiện tại, ghi implementation bằng lượt tích hợp cuối, rồi review độc lập và
33
+ nghiệm thu theo task gốc. `DELIVERED` chỉ xác nhận bàn giao đầy đủ, không phải
34
+ PASS. Reviewer phải độc lập với tất cả người đã triển khai các phần.
35
+
36
+ Ngân sách đã ghim, ngân sách cha, chi phí/thời gian đo được và ngân sách phiên
37
+ `nccgs run` tiếp tục áp dụng. Nếu chưa có giới hạn dispatch được ghim, đăng ký kế
38
+ hoạch dùng mức mặc định hiện có của task. Kế hoạch phải đủ chỗ cho các phần còn
39
+ lại, review độc lập và phần dự phòng repair/QA/review gốc. Đây là mức tối thiểu về
40
+ số lượt, không bảo đảm đủ tiền hoặc thời gian cho mọi lần thử lại. Không tự tăng
41
+ giới hạn để hoàn tất kế hoạch.
42
+
43
+ Khi cần điều chỉnh, giữ các lượt cũ, tạo plan ID mới với lý do và `supersedes`
44
+ trỏ đến kế hoạch hiện tại. Giữ ID các phần đã thử. Thay đổi phạm vi một phần hoặc
45
+ chạy lại phần nền tảng sẽ làm các kết quả phụ thuộc hết hiệu lực; chúng cần lượt
46
+ bàn giao mới. Phần không thay đổi có thể tái sử dụng khi lần thử mới nhất và các
47
+ phụ thuộc vẫn hợp lệ. Lịch sử, kết luận review âm tính và ngân sách đã tiêu không
48
+ bị xóa. Repair sau tích hợp dùng đúng luồng repair đã có.
49
+
50
+ Xem [giao thức đầy đủ](../.claude/nccgs/protocols/task-slices.md),
51
+ [handoff](HANDOFF-AUTOMATION.md) và [Unity repair](BOUNDED-REPAIR.md).
52
+ Ngày 2026-10-27, một lượt Claude Code/Unity thực đã kiểm chứng hai phần phụ thuộc
53
+ trong cùng task, tích hợp, review độc lập, lỗi PlayMode được ghi nhận, repair và
54
+ review độc lập lần nữa. Cả 24 điều kiện gốc đạt lại; test, lịch sử và ngân sách
55
+ tổng được giữ nguyên. Đây là ca hồi quy có kiểm soát trên component đã có lời
56
+ giải, gồm lỗi được chủ động cài để kiểm chứng repair; chưa chứng minh hiệu quả
57
+ trên task lớn hoặc game mới. Xem [phạm vi bằng chứng](RELEASE-STATUS.md).