nccgs 2.1.0 → 2.1.1

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/agents/nccgs-adversarial-reviewer.md +1 -1
  2. package/.claude/agents/nccgs-engine-programmer.md +1 -1
  3. package/.claude/agents/nccgs-fast-implementer.md +1 -1
  4. package/.claude/agents/nccgs-game-designer.md +1 -1
  5. package/.claude/agents/nccgs-gameplay-programmer.md +1 -1
  6. package/.claude/agents/nccgs-qa-engineer.md +1 -1
  7. package/.claude/agents/nccgs-task-scout.md +1 -1
  8. package/.claude/agents/nccgs-ui-programmer.md +1 -1
  9. package/.claude/agents/nccgs-unity-build-specialist.md +1 -1
  10. package/.claude/agents/nccgs-unity-implementer.md +1 -1
  11. package/.claude/agents/nccgs-unity-systems-specialist.md +1 -1
  12. package/.claude/agents/nccgs-unity-ui-specialist.md +1 -1
  13. package/.claude/agents/nccgs-verification-engineer.md +1 -1
  14. package/.claude/nccgs/MEMORY.md +3 -1
  15. package/.claude/nccgs/VERSION +1 -1
  16. package/.claude/nccgs/constitution.md +187 -176
  17. package/.claude/nccgs/hooks/closure-guard.mjs +2 -0
  18. package/.claude/nccgs/hooks/unity-transport-guard.mjs +11 -0
  19. package/.claude/nccgs/pipeline.json +260 -260
  20. package/.claude/nccgs/protocols/context-packets.md +5 -0
  21. package/.claude/nccgs/protocols/model-routing.md +46 -46
  22. package/.claude/nccgs/protocols/review-handoff.md +21 -1
  23. package/.claude/nccgs/protocols/shared-workflow-context.md +33 -0
  24. package/.claude/nccgs/protocols/unity-boundary.md +20 -0
  25. package/.claude/nccgs/routing.generated.md +4 -4
  26. package/.claude/nccgs/settings.fragment.json +84 -24
  27. package/.claude/nccgs/studio.json +53 -53
  28. package/.claude/nccgs/tools/autonomy.mjs +13 -0
  29. package/.claude/nccgs/tools/command-tokens.mjs +22 -0
  30. package/.claude/nccgs/tools/hook-transport.mjs +34 -0
  31. package/.claude/nccgs/tools/native-completion.mjs +10 -1
  32. package/.claude/nccgs/tools/returned-handoff.mjs +11 -2
  33. package/.claude/nccgs/tools/shared-context-guard.mjs +60 -0
  34. package/.claude/nccgs/tools/shared-context.mjs +25 -0
  35. package/.claude/nccgs/tools/tool-guard.mjs +120 -131
  36. package/.claude/nccgs/tools/unity-transport.mjs +170 -0
  37. package/.claude/nccgs/workflow-catalog.json +4 -4
  38. package/CHANGELOG.md +235 -200
  39. package/CLAUDE.md +10 -8
  40. package/MEMORY.md +109 -60
  41. package/README.md +206 -191
  42. package/UPGRADING.md +130 -118
  43. package/VERSION +1 -1
  44. package/docs/ARCHITECTURE.md +131 -131
  45. package/docs/ASSET-PRODUCTION-GRAPHIFY-PLAN.md +230 -0
  46. package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +117 -116
  47. package/docs/NCCGS-1.5.md +237 -237
  48. package/docs/PROJECT-POLICY.md +94 -94
  49. package/docs/RELEASE-STATUS.md +17 -9
  50. package/docs/UNINSTALL.md +3 -3
  51. package/docs/WFK17-HOOK-REPAIR.md +71 -0
  52. package/docs/WORKFLOWS.md +85 -85
  53. package/package.json +1 -1
  54. package/scaffold/.nccgs/project.yaml +109 -108
  55. package/scripts/benchmark-v15.mjs +173 -173
  56. package/scripts/doctor.mjs +261 -261
  57. package/scripts/install.mjs +530 -529
  58. package/scripts/run.mjs +5 -4
  59. package/scripts/supervise.mjs +4 -0
  60. package/scripts/uninstall.mjs +292 -292
  61. package/scripts/validate.mjs +285 -280
  62. package/tests/autonomy.test.mjs +126 -113
  63. package/tests/design-readiness.test.mjs +199 -199
  64. package/tests/fixtures/compiler-shutdown.cs +67 -64
  65. package/tests/fixtures/native-provider.mjs +61 -0
  66. package/tests/framework.test.mjs +740 -740
  67. package/tests/hook-repair.test.mjs +106 -0
  68. package/tests/lifecycle-v15.test.mjs +346 -300
  69. package/tests/native-completion-notices.test.mjs +181 -0
  70. package/tests/phase1.test.mjs +427 -416
  71. package/tests/phase2.test.mjs +250 -250
  72. package/tests/policy-v15.test.mjs +234 -234
  73. package/tests/returned-handoff-notices.test.mjs +170 -0
  74. package/tests/runtime-v15.test.mjs +1197 -1191
  75. package/tests/task-slices.test.mjs +285 -285
  76. package/tests/unity-transport.test.mjs +348 -0
@@ -0,0 +1,230 @@
1
+ # NCCGS Asset Production and Graphify Update Plan
2
+
3
+ Date: 2026-10-31 (Asia/Saigon)
4
+
5
+ Status: Implementation plan. The two feature directions are agreed; runtime changes, installation, qualification and publication have not started under this plan.
6
+
7
+ ## 1. Agreed scope
8
+
9
+ Update NCCGS in two areas:
10
+
11
+ 1. Add focused asset-production support through existing studio responsibilities: an art-direction brief, an asset manifest and production/import/visual-QA checklists.
12
+ 2. Use an existing project-level Graphify setup when present and usable. Synchronize its selected inputs after NCCGS changes them. If the project has no Graphify setup, skip this integration without installing anything.
13
+
14
+ NCCGS remains New Claude Code Game Studio and targets Claude Code. Archify remains an optional tool in the shared project workflow and is outside this change. Do not import the complete external game-dev skill catalog or introduce another orchestrator.
15
+
16
+ The implementation choices below make the agreed scope concrete. They describe proposed behavior and files, not commands or settings already implemented in NCCGS.
17
+
18
+ ### Shared-workflow boundary clarified on 2026-10-31
19
+
20
+ The outer sequence stays PO + ChatGPT/Codex brainstorm -> confirmed approach -> English prompt -> Claude Code executes through NCCGS -> PO + ChatGPT/Codex review. NCCGS's whole internal process is part of the Claude step. Internal planning, orchestration, reviews and task closure remain its own responsibility within the approved assignment. Do not require compatibility migration or native external-review/PO gates merely to reproduce the outer sequence. Internal DONE can return a candidate while outer review remains pending. Preserve existing native obligations until an actual blocker is assessed and a correction authorized.
21
+
22
+ Graphify is the common integration contract: both layers use the same effective project configuration, corpus/exclusions, configured graph location, backend/resource limits and freshness record. Both account for their selected source changes. NCCGS uses existing project setup or skips; it does not create a second graph, bootstrap one or invoke shared install policy as a side effect.
23
+
24
+ ## 2. Current baseline and relevant findings
25
+
26
+ The inspected source is unpublished NCCGS 2.1.0. Published 2.0.0 and frozen qualification records remain unchanged. New behavior requires its own verification; previous native execution evidence does not transfer automatically.
27
+
28
+ | Existing area | Inspected location | Consequence for this change |
29
+ |---|---|---|
30
+ | Authority and extension rules | `NCCGS/MEMORY.md`, `.claude/nccgs/constitution.md`, `docs/ARCHITECTURE.md` | Extend existing responsibilities and preserve acceptance authority. |
31
+ | Art ownership | `.claude/nccgs/agent-library/nccgs-art-direction-lead.md`, `nccgs-technical-artist.md`; existing Unity content specialist | Reuse these roles; do not make additional specialists mandatory. |
32
+ | Asset audit | `.claude/skills/asset-audit/SKILL.md` | Add assignment-specific guidance through its underlying protocol/reference route. |
33
+ | Selective shared guidance | `.claude/nccgs/packages/ponytail/README.md` | Follow the existing on-demand package pattern without mixing art guidance into Ponytail. |
34
+ | Project configuration and templates | `scaffold/.nccgs/project.yaml`, `scaffold/.nccgs/templates/` | Reuse existing configuration and scaffold mechanisms. |
35
+ | Context and handoff | `protocols/context-packets.md`, `protocols/agent-contract.md`, `protocols/standalone.md`, `templates/context-packet.yaml` | The coordinator owns retrieval and synchronization; bounded workers keep existing limits. |
36
+ | Session hooks | `hooks/session-start.mjs`, `hooks/session-stop.mjs`, `settings.fragment.json` | Keep hooks short; do not perform model extraction inside a stop hook. |
37
+ | Snapshot and source guards | `tools/gates.mjs`, `tools/inputs.mjs`, `pipeline.json` | Root `graphify-out/` is currently included in source snapshots. Refresh timing matters. |
38
+ | Generated policy | `tools/compile-policy.mjs`, agent library, workflow catalog | Edit source templates/protocols and regenerate generated files. |
39
+ | Distribution lifecycle | `scripts/install.mjs`, `doctor.mjs`, `uninstall.mjs`, `validate.mjs` | Ship and diagnose the additions without taking ownership of an existing Graphify installation. |
40
+
41
+ In particular, `inputs.json` currently permits dedicated build output directories and specific Unity-generated metadata, not an arbitrary Graphify exclusion. This plan does not weaken that rule or add a blanket `graphify-out` snapshot exclusion.
42
+
43
+ ## 3. Asset-production support
44
+
45
+ ### Deliverables
46
+
47
+ Create a small on-demand package and two project templates. Adapt useful upstream material from `create-game-assets`; pin the reviewed upstream commit and selected files during implementation. Keep its applicable license, attribution and adaptation notice.
48
+
49
+ | Deliverable | Purpose | Existing owner |
50
+ |---|---|---|
51
+ | Art-direction brief | Record visual constraints, target display, asset scale and the accepted reference | Art Direction / accountable coordinator |
52
+ | Asset manifest | Track required assets and variants, technical specifications, provenance and approval status | Technical Artist / Unity content specialist |
53
+ | Production checklist | Move from representative reference to a consistent asset family | Assigned art/content owner |
54
+ | Import and visual-QA checklist | Check technical fit and actual appearance in the game | Technical Artist, relevant Unity specialist and QA |
55
+
56
+ Use these only for relevant asset assignments. Preserve existing briefs, approved style and user-owned source art. Distinguish technical checks from aesthetic approval. Image generation is an optional production method, not a dependency or a completion claim.
57
+
58
+ The first implementation will not vendor the upstream image-processing scripts or add Python/Pillow dependencies to NCCGS. Existing approved tools and official Unity Skills handle operations. Add a helper later only when a real assignment demonstrates a repeatable gap.
59
+
60
+ ### Acceptance
61
+
62
+ - An asset assignment can produce a usable brief and manifest without an image-generation tool.
63
+ - The manifest distinguishes placeholders, candidates, technically checked assets and assets with the required visual acceptance. These labels never create approval by themselves.
64
+ - Checks cover the approved specifications and in-context inspection; a schema-valid manifest alone cannot satisfy visual acceptance.
65
+ - Unrelated programming tasks do not load the package, create asset documents or activate art specialists.
66
+
67
+ ## 4. Graphify policy: use an existing project setup
68
+
69
+ ### Detect project adoption before checking readiness
70
+
71
+ The policy is **auto-existing**, with an explicit project/shared-workflow disable taking precedence. This name describes the intended NCCGS policy; it is not a native Graphify option.
72
+
73
+ A globally installed `graphify` executable or `graphifyy` package is not sufficient evidence that the current project uses Graphify. Accept explicit shared-workflow configuration or validated project artifacts identifying this target's graph/corpus. Configuration files such as `.graphifyrc` or `.graphifyignore` are discovery signals, not proof that a usable graph exists.
74
+
75
+ Resolve the actual project/subproject root and configured graph location. Preserve existing paths and ownership; do not create a second graph or assume that a nearby graph belongs to this project.
76
+
77
+ | Observed project state | NCCGS behavior |
78
+ |---|---|
79
+ | Graphify explicitly disabled | Skip use and refresh; preserve all existing files. |
80
+ | No project Graphify setup, including a machine with only a global CLI | Skip quietly in ordinary work; status/doctor may report `not applicable`. No Graphify command, installation or new project configuration. |
81
+ | Project setup and usable current graph | Use focused retrieval, then inspect original sources for decisions and edits. |
82
+ | Project setup and stale graph | Refresh the relevant supported inputs at a safe boundary within existing permissions and budgets. |
83
+ | Project setup but executable, initial graph or semantic backend unavailable | Report the specific unavailable/pending capability and use direct source inspection. No installation, initial full-corpus bootstrap or new provider setup. |
84
+ | Incompatible schema/version or uncertain graph ownership | Do not mutate or trust the graph; report the reason and use sources directly. |
85
+
86
+ No Graphify software upgrades, package-extra installs, assistant-skill registration, new git hooks, watcher startup or hosted-service adoption belong to this adapter. A shared workflow can manage installation under its own separately authorized policy; NCCGS does not invoke that policy as a side effect of discovery.
87
+
88
+ ### Minimal configuration
89
+
90
+ Resolve the existing shared-workflow/project Graphify configuration as the single effective integration policy. Do not add an independently editable NCCGS override for activation, corpus, backend or graph location. The adapter may retain a configuration identity/reference for validation; it must not become another policy authority. If no shared-workflow binding exists, use the existing project Graphify configuration directly under the same existing-setup-or-skip rule.
91
+
92
+ Graph/corpus paths, exclusions and backend settings keep their current owner. Machine-local executable discovery must not enable a disabled project or silently select another provider. No new configuration key or parser is claimed to exist.
93
+
94
+ ## 5. Graph freshness and synchronization
95
+
96
+ ### Separate code freshness from document freshness
97
+
98
+ The reviewed Graphify documentation distinguishes code refresh from semantic document refresh. `graphify update` refreshes code; it does not reprocess changed documents. Watch mode can mark semantic changes as pending instead of completing them. Therefore a successful code update cannot establish that a new NCCGS Markdown document is indexed.
99
+
100
+ Implement a version-aware adapter around the project's existing Graphify capability:
101
+
102
+ - Use its supported incremental code path for code changes.
103
+ - Use its supported incremental semantic path for documents, with the already configured backend and allowances. The documented headless `extract` path can be incremental, but exact behavior must be qualified for the supported installed version.
104
+ - If semantic refresh cannot run under existing controls, retain pending document paths and disclose stale coverage. Do not select credentials, buy capacity or launch an unmanaged assistant session.
105
+
106
+ Do not invoke the upstream `/graphify` skill wholesale inside an NCCGS worker: its orchestration may conflict with NCCGS reservations, worker depth and budget controls. Any necessary assistant-owned work must follow the existing Claude Code lifecycle.
107
+
108
+ ### Corpus and change detection
109
+
110
+ Honor the existing project corpus and exclusions. NCCGS does not index every file it creates. Prefer relevant source, tests and canonical design/decision documents. Exclude graph outputs, temporary reports, build/cache directories and mutable synchronization state from the corpus to prevent self-triggering loops. An intentionally excluded file remains excluded.
111
+
112
+ Compare content fingerprints, including new, edited, renamed and deleted files and uncommitted changes. Reconcile a worker's changed-file list with actual corpus changes, because shell and Editor/MCP operations can bypass text-edit hooks. Track code and semantic completion separately. Failed or omitted semantic chunks must remain pending.
113
+
114
+ ### Lifecycle and one update owner
115
+
116
+ 1. **Before retrieval:** inspect project adoption, readiness, relevant input hashes and coverage. Refresh stale context when allowed; otherwise use original sources with a visible limitation.
117
+ 2. **During an editing batch:** accumulate changed paths. Do not rebuild after every save.
118
+ 3. **After writers settle:** the coordinator invokes one bounded refresh before the next graph-dependent handoff or source snapshot used for verification/review.
119
+ 4. **At handoff:** record `current`, `partial`, `stale`, `unavailable` or `skipped`, with pending paths and the next action when relevant. Only a successful refresh against the current relevant bytes may report `current`.
120
+
121
+ Use the shared updater when it exposes a compatible supported interface. That runner is not assumed to exist today: NCCGS also needs a small adapter to the existing installed CLI for supported versions. Both routes use one update owner for a graph. If an external watcher/update is active and coordination cannot be established, defer mutation and keep the pending status; do not kill another process or write concurrently.
122
+
123
+ The shared workflow applies the same contract to its own selected decision, task and prompt writes before graph-dependent dispatch. NCCGS applies it after its implementation batches and before handoff. They use one logical graph/freshness record per configured corpus. A private adapter receipt may reference the common result but cannot independently declare different coverage current. Handoff reports link the same configuration/input identity and pending paths.
124
+
125
+ Long refreshes use owned processes with finite deadlines and output limits. Do not detach, start a daemon or conceal backend work in a short session hook. A refresh is context maintenance with declared writes, not a verification command pretending the source stayed unchanged.
126
+
127
+ ### Preserve review and acceptance integrity
128
+
129
+ Finish refreshes that write inside the source snapshot before recording implementation/review evidence. Do not refresh while an independent reviewer holds that snapshot. A later source or in-snapshot graph change invalidates prior evidence under the existing rules; do not mask it with a broad exclusion or rewrite a frozen verdict.
130
+
131
+ Keep the shared freshness record at the project's existing accepted derived location, accessible to both layers. If none exists, agree one during adapter design. `.nccgs/context/` may hold NCCGS attempt references, but not a competing authoritative freshness record. Exclude derived records from the Graphify corpus. Final operational notes should use existing excluded evidence/handoff locations, preventing an endless index-report-index cycle.
132
+
133
+ Read-only assignments may inspect an existing current graph but must not rebuild it when their write authority forbids that mutation. Bounded repair workers continue following their exact packets; the coordinator handles context refresh outside the repair invocation.
134
+
135
+ Index synchronization does not replace game verification or add a universal subjective gate. Failed optional context maintenance must remain visible separately from the technical outcome. If a task explicitly requires an up-to-date graph as an acceptance criterion, that criterion remains unsatisfied until verified.
136
+
137
+ ## 6. Proposed implementation files
138
+
139
+ Paths below are relative to `NCCGS/`. New paths are proposals; confirm their final names against the implementation diff.
140
+
141
+ | Area | Existing files to change | Proposed additions |
142
+ |---|---|---|
143
+ | Asset guidance | `.claude/nccgs/protocols/agent-contract.md`, `.claude/nccgs/constitution.md`; relevant art/content role source files | `.claude/nccgs/packages/asset-production/README.md`, `production-checklist.md`, `manifest.json`, `LICENSE`, `NOTICE.md` |
144
+ | Project asset templates | Existing scaffold installation path; no generated example art | `scaffold/.nccgs/templates/art-direction-brief.md`, `asset-manifest.json` |
145
+ | Graphify adapter | Existing policy parsing utilities and `scripts/doctor.mjs` | `.claude/nccgs/tools/graphify.mjs`, `.claude/nccgs/protocols/graphify-context.md` |
146
+ | Coordinator integration | `protocols/context-packets.md`, `protocols/standalone.md`, affected compatibility procedures, `tools/handoff.mjs` and coordinator lifecycle boundaries in `tools/task.mjs` as needed | Focused read-only inspection and bounded synchronization entry points, names finalized during implementation |
147
+ | Session visibility | `hooks/session-start.mjs`, `hooks/session-stop.mjs` only for short status/pending notices | No extraction hook or new background service |
148
+ | Context and reports | `scaffold/.nccgs/templates/context-packet.yaml`; affected existing handoff/report templates without rewriting their execution-policy ownership | Optional graph provenance/freshness reference; no mandatory graph fields for projects without it |
149
+ | Configuration | Existing project/shared Graphify configuration resolution | Configuration identity/reference only; no independently editable NCCGS Graphify override |
150
+ | Packaging and attribution | `scripts/validate.mjs`, install/doctor/uninstall handling where necessary, `THIRD_PARTY_NOTICES.md`, existing package notice index | Focused package/template validation |
151
+ | Documentation | `docs/ARCHITECTURE.md`, `MEMORY.md`, `README.md`, `UPGRADING.md`, `CHANGELOG.md` | `docs/ASSET-PRODUCTION.md`, `docs/GRAPHIFY-INTEGRATION.md` |
152
+ | Tests | Existing framework, lifecycle, installer and uninstaller suites | `tests/asset-production.test.mjs`, `tests/graphify-integration.test.mjs` |
153
+
154
+ Do not directly patch generated role/model pins or generated workflow wrappers. Use their authoritative sources and `policy:build`. Leave official Unity Skills unchanged. No modification to snapshot exclusions or acceptance thresholds is planned.
155
+
156
+ ## 7. Implementation sequence
157
+
158
+ | Phase | Work and stopping point | Validation |
159
+ |---|---|---|
160
+ | 1. Freeze contracts | Pin upstream asset files/licenses; establish supported installed Graphify capabilities, project discovery rules and fixture corpus. Resolve the internal adapter interface. | Review the allowed writes, provider path, state matrix and snapshot timing before runtime edits. |
161
+ | 2. Add asset support | Add the focused package/templates and assignment routing through existing roles. | Exercise a small artist-handoff example without generation tools; confirm unrelated assignments stay unaffected. |
162
+ | 3. Add Graphify support | Implement read-only discovery, freshness tracking, single-owner refresh and pending/fallback reporting. Connect coordinator boundaries. | Run behavioral fixtures for absence, code updates, semantic updates, failure and concurrent changes. |
163
+ | 4. Integrate distribution | Update managed-file recognition, doctor diagnostics, docs, attribution and generated outputs. | Fresh install/update/uninstall in disposable fixtures; preserve custom files and externally owned Graphify data. |
164
+ | 5. Qualify and package | Run relevant regression, inspect the exact archive and obtain fresh independent review. | Complete the cases below; document remaining external/provider limitations. Keep publication separate. |
165
+
166
+ Use one small change set per feature area plus distribution integration so each change remains reviewable. Choose release numbering during release preparation; do not silently promote the unpublished candidate or republish frozen archives.
167
+
168
+ ## 8. Acceptance scenarios
169
+
170
+ | ID | Scenario | Observable result |
171
+ |---|---|---|
172
+ | AP-01 | An approved asset brief already exists | Its style and constraints are retained; the new template does not invent a redesign. |
173
+ | AP-02 | Artist handoff without an image-generation tool | A coherent brief, manifest and relevant checks are produced; no tool installation or fabricated art approval. |
174
+ | AP-03 | An asset violates its required dimensions/alpha or fails in-game readability | The appropriate technical/visual condition remains unresolved despite valid JSON. |
175
+ | AP-04 | An ordinary code fix | No asset package bulk-read, new asset files or mandatory art-role dispatch. |
176
+ | GF-01 | No project Graphify setup | No Graphify process, installation, graph directory or optional state file is created. |
177
+ | GF-02 | Global CLI exists but project has not adopted Graphify | Same skip behavior; machine installation alone does not activate integration. |
178
+ | GF-03 | Project/shared policy disables an existing setup | No queries or refresh; existing graph and external settings remain intact. |
179
+ | GF-04 | Correct current graph exists | Scoped retrieval refers to this corpus; precise claims still inspect original sources. |
180
+ | GF-05 | Code changes without a commit | The change is detected and the code graph refreshed before graph-dependent reuse. |
181
+ | GF-06 | NCCGS creates or edits an indexed Markdown document | Semantic processing is performed and checked; a code-only receipt cannot mark documents current. |
182
+ | GF-07 | Indexed source is renamed/deleted | Refresh removes or updates stale source references; the old content is not silently retained as current. |
183
+ | GF-08 | Several writes form one batch | One settled update handles the batch; no model request per file save. |
184
+ | GF-09 | Semantic chunk fails or backend/budget is unavailable | Affected documents remain pending, original sources remain available, and no provider or allowance is invented. |
185
+ | GF-10 | Source changes during a refresh | Hash reconciliation prevents a false current status; the new version remains pending. |
186
+ | GF-11 | Another updater owns the graph | No concurrent writer, process termination or false success; synchronization is deferred visibly. |
187
+ | GF-12 | Graph is for another root, malformed or unsupported | No mutation or trust; direct-source fallback with the concrete reason. |
188
+ | GF-13 | Graph outputs and sync receipts change | They do not re-enter the input corpus and trigger endless extraction. |
189
+ | GF-14 | Refresh writes a root `graphify-out/` | It completes before the reviewed snapshot; a later mutation is still detected by the existing source guard. |
190
+ | GF-15 | Audit/review or bounded repair has restricted writes | No new mutation/shell privilege; coordinator or direct-source fallback respects the current mode. |
191
+ | GF-16 | Shared-workflow author changes a selected decision/prompt; NCCGS later changes selected code/documents | Both use the same configuration, graph and freshness record; each batch is refreshed or remains visibly pending before graph-dependent handoff. |
192
+ | GF-17 | An adapter cache disagrees with project configuration or another layer owns an active refresh | Project configuration prevails; no second graph, independent current claim or concurrent writer. |
193
+ | DIST-01 | Update an existing customized NCCGS project | Existing execution obligations, settings, custom templates, history and spent budgets survive. |
194
+ | DIST-02 | Uninstall NCCGS after this addition | Owned unchanged additions can be removed; project asset documents and externally owned Graphify installation/config/graphs remain. |
195
+
196
+ Use a fake Graphify executable only to test adapter behavior, failure handling and command boundaries. Add a real CLI qualification against a disposable supported corpus when available. A stub that fabricates semantic nodes does not prove real document extraction. Any claim about Claude Code orchestration requires an actual fresh Claude Code run; framework tests and Codex maintenance do not provide it.
197
+
198
+ Planned maintainer checks are `npm run policy:build`, `npm run policy:check`, `npm run validate`, focused Node test files, the required `npm test` regression and `npm pack --dry-run`. Run them during implementation, not as proof that this planning-only change implemented the features.
199
+
200
+ ## 9. Scope limits and recovery
201
+
202
+ - Preserve task/model/execution policies and evidence thresholds. No new roles, compulsory multi-agent chain, global Graphify hooks or Archify dependency.
203
+ - Install/update owns only its managed NCCGS additions. Project production documents and existing external tools keep their current ownership.
204
+ - Preserve the last usable graph on failed publication where the supported Graphify route permits it. Always retain a failed/pending receipt; do not promise recovery behavior that the installed tool does not supply.
205
+ - Stop at partial semantic coverage, unknown backend allowance or incompatible output behavior rather than inventing current context or spending a new budget.
206
+ - Keep new source work separate from frozen evaluations, contaminated CP0 and exact published release archives.
207
+
208
+ ## 10. Source references
209
+
210
+ ### NCCGS baseline
211
+
212
+ - [Portable decisions](../MEMORY.md)
213
+ - [Architecture](ARCHITECTURE.md)
214
+ - [Release status and evidence boundaries](RELEASE-STATUS.md)
215
+ - [Existing shared guidance pattern](../.claude/nccgs/packages/ponytail/README.md)
216
+ - [Context packet protocol](../.claude/nccgs/protocols/context-packets.md)
217
+ - [Snapshot implementation](../.claude/nccgs/tools/gates.mjs)
218
+ - [Canonical input/output controls](../.claude/nccgs/tools/inputs.mjs)
219
+
220
+ ### External references reviewed for this proposal
221
+
222
+ - [Game asset production skill](https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/create-game-assets/SKILL.md)
223
+ - [Game-dev skills repository and licensing](https://github.com/gamedev-skills/awesome-gamedev-agent-skills)
224
+ - [Graphify official repository](https://github.com/Graphify-Labs/graphify)
225
+ - [Graphify incremental updates](https://docs.graphify.com/open-source/features/incremental-updates)
226
+ - [Graphify documents and media](https://docs.graphify.com/open-source/features/documents-and-media)
227
+ - [Graphify CLI reference](https://docs.graphify.com/open-source/configuration/cli)
228
+ - [Graphify watcher behavior](https://github.com/Graphify-Labs/graphify/blob/v8/graphify/skills/agents/references/add-watch.md)
229
+
230
+ These external links identify the reviewed capabilities. Resolve and record exact upstream revisions and the supported installed Graphify version during implementation; no floating upstream release is adopted by this plan.
@@ -1,116 +1,117 @@
1
- # Hướng dẫn cài đặt và sử dụng NCCGS 2.1.0
2
-
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).
11
-
12
- ## Cài mới vào bản sao dự án
13
-
14
- Cần Node.js 18+, Claude Code và Unity project có Assets, Packages, ProjectSettings.
15
- Chức năng điều khiển Unity cần thêm Editor/CLI phù hợp. Thay đường dẫn ví dụ bằng
16
- dự án của bạn; đọc kết quả xem trước rồi mới áp dụng:
17
-
18
- ```powershell
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"
23
- ```
24
-
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.
26
- Cài mới mặc định dùng Claude Code standalone, không yêu cầu Astra/Fable. Dự án cũ
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.
28
-
29
- ## Dự án đã cài NCCGS
30
-
31
- Sao lưu toàn bộ dự án và dừng phiên đang chạy. Dùng `update` thay `install`, luôn
32
- xem `--dry-run` trên bản sao trước. Update giữ cấu hình dự án và các tùy chỉnh;
33
- không dùng `--force` chỉ để xóa cảnh báo. Đọc [hướng dẫn nâng cấp](../UPGRADING.md)
34
- để xử lý override, task đang mở, chuyển execution policy và khôi phục.
35
-
36
- Nâng cấp file và chuyển sang standalone là hai thao tác riêng. Nếu muốn chuyển
37
- execution policy, dùng `migrate-execution --to standalone --dry-run` theo hướng dẫn.
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,
39
- mở lại phiên Claude Code.
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
-
69
- ## Bắt đầu một đầu việc rõ ràng
70
-
71
- ```powershell
72
- npx --yes --package "$NccgsArchive" nccgs run --project "D:\path\to\UnityProject"
73
- ```
74
-
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
76
- và điều kiện nghiệm thu. NCCGS lập hợp đồng công việc, phân loại mức rủi ro, gọi
77
- worker phù hợp, thu bằng chứng kiểm tra và yêu cầu review độc lập trước khi đóng.
78
-
79
- - `/work`: triển khai thay đổi.
80
- - `/design`: làm rõ thiết kế/yêu cầu; tính năng có design gate phải được review trước.
81
- - `/audit`: kiểm tra mà không sửa source.
82
- - `/test`, `/review`: kiểm chứng và review theo hợp đồng.
83
- - `/status`: xem trạng thái, bằng chứng và việc còn chặn.
84
-
85
- Có 47 vai trò trong thư viện, 13 vai trò bật mặc định. FAST yêu cầu Sonnet/medium;
86
- STANDARD Opus/medium; CONTROLLED Opus/high; reviewer Opus/high. Đây là cấu hình
87
- mong muốn, không phải bằng chứng model thực chạy. Chỉ gọi chuyên gia khi cần.
88
-
89
- Đạt test chưa tự động nghĩa là DONE. Phải có bằng chứng đúng source/contract,
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
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í,
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
+ # Hướng dẫn cài đặt và sử dụng NCCGS 2.1.1
2
+
3
+ Mã nguồn tiếp theo: **2.1.1**, 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.1 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).
11
+
12
+ ## Cài mới vào bản sao dự án
13
+
14
+ Cần Node.js 18+, Claude Code và Unity project có Assets, Packages, ProjectSettings.
15
+ Chức năng điều khiển Unity cần thêm Editor/CLI phù hợp. Thay đường dẫn ví dụ bằng
16
+ dự án của bạn; đọc kết quả xem trước rồi mới áp dụng:
17
+
18
+ ```powershell
19
+ $NccgsArchive = "D:\path\to\nccgs-2.1.1.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"
23
+ ```
24
+
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.
26
+ Cài mới mặc định dùng Claude Code standalone, không yêu cầu Astra/Fable. Dự án cũ
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.
28
+
29
+ ## Dự án đã cài NCCGS
30
+
31
+ Sao lưu toàn bộ dự án và dừng phiên đang chạy. Dùng `update` thay `install`, luôn
32
+ xem `--dry-run` trên bản sao trước. Update giữ cấu hình dự án và các tùy chỉnh;
33
+ không dùng `--force` chỉ để xóa cảnh báo. Đọc [hướng dẫn nâng cấp](../UPGRADING.md)
34
+ để xử lý override, task đang mở, chuyển execution policy và khôi phục.
35
+
36
+ Nâng cấp file và chuyển sang standalone là hai thao tác riêng. Nếu muốn chuyển
37
+ execution policy, dùng `migrate-execution --to standalone --dry-run` theo hướng dẫn.
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,
39
+ mở lại phiên Claude Code.
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.1 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
+
69
+ ## Bắt đầu một đầu việc rõ ràng
70
+
71
+ ```powershell
72
+ npx --yes --package "$NccgsArchive" nccgs run --project "D:\path\to\UnityProject"
73
+ ```
74
+
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
76
+ và điều kiện nghiệm thu. NCCGS lập hợp đồng công việc, phân loại mức rủi ro, gọi
77
+ worker phù hợp, thu bằng chứng kiểm tra và yêu cầu review độc lập trước khi đóng.
78
+
79
+ - `/work`: triển khai thay đổi.
80
+ - `/design`: làm rõ thiết kế/yêu cầu; tính năng có design gate phải được review trước.
81
+ - `/audit`: kiểm tra mà không sửa source.
82
+ - `/test`, `/review`: kiểm chứng và review theo hợp đồng.
83
+ - `/status`: xem trạng thái, bằng chứng và việc còn chặn.
84
+
85
+ Có 47 vai trò trong thư viện, 13 vai trò bật mặc định. FAST yêu cầu Sonnet/high;
86
+ STANDARD Opus/high; CONTROLLED Opus/xhigh;
87
+ leadership Opus/xhigh; reviewer Fable/high. Đây là cấu hình
88
+ mong muốn, không phải bằng chứng model thực chạy. Chỉ gọi chuyên gia khi cần.
89
+
90
+ Đạt test chưa tự động nghĩa là DONE. Phải có bằng chứng đúng source/contract,
91
+ 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
92
+ 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í,
93
+ nguyên nhân và kết quả sửa lại.
94
+
95
+ ## Hỗ trợ handoff, Unity repair và chia nhỏ task trong NCCGS 2.0.0
96
+
97
+ Các hỗ trợ đã có từ 2.0.0 được giữ nguyên trong 2.1.1. Coordinator dùng
98
+ `task dispatch-prompt` để lấy prompt và khung bàn giao PARTIAL cho lượt đã đăng ký.
99
+ Worker có thể dùng `task handoff-validate` để phát hiện lỗi cấu trúc trước khi kết
100
+ thúc; repair worker theo giới hạn riêng của gói repair. Sau khi reviewer hoàn thành,
101
+ coordinator dùng `task record-review` để ghi đúng kết luận từ handoff đã ghim,
102
+ 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.
103
+ Xem [cú pháp và giới hạn](HANDOFF-AUTOMATION.md). Dùng source/package mới theo quy
104
+ trình nâng cấp; các lệnh ở trên dùng chính gói 2.1.1 cục bộ chưa phát hành.
105
+
106
+ 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`
107
+ cho sửa scene/prefab/asset bằng thao tác Editor đã chốt trước. Tệp mới phải được
108
+ Unity import và tạo metadata trước khi worker kết thúc. Không sửa tay GUID hay
109
+ 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õ
110
+ đã 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
111
+ 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).
112
+
113
+ Với task quá lớn cho một lượt, dùng `task slice-preview`, `task slice-plan` và
114
+ `task slice-status` để chia thành các phần có mục tiêu, tệp và phụ thuộc rõ ràng
115
+ 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.
116
+ 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
117
+ thu vẫn được giữ. Xem [hướng dẫn chia nhỏ task](TASK-SLICING.md).