nccgs 1.0.0 → 1.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.
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.1
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "node:fs";
4
+ import path from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { fingerprintFile } from "./integrity.mjs";
7
+
8
+ const ownDir = path.dirname(fileURLToPath(import.meta.url));
9
+ const args = process.argv.slice(2);
10
+ const projectArg = args.indexOf("--project");
11
+ const project = path.resolve(projectArg >= 0 ? args[projectArg + 1] : path.resolve(ownDir, "../../../.."));
12
+ const approvePending = args.includes("--approve-pending");
13
+ const manifestPath = path.join(project, ".nccgs", "framework-overrides.json");
14
+
15
+ if (projectArg >= 0 && !args[projectArg + 1]) {
16
+ console.error("--project requires a directory path.");
17
+ process.exit(2);
18
+ }
19
+ if (!fs.existsSync(manifestPath)) {
20
+ console.log("No NCCGS framework overrides are recorded.");
21
+ process.exit(0);
22
+ }
23
+
24
+ let manifest;
25
+ try { manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8")); }
26
+ catch (error) {
27
+ console.error(`Invalid framework override manifest: ${error.message}`);
28
+ process.exit(2);
29
+ }
30
+ if (manifest.schemaVersion !== 1) {
31
+ console.error(`Unsupported framework override schema: ${manifest.schemaVersion ?? "unknown"}`);
32
+ process.exit(2);
33
+ }
34
+ for (const item of manifest.overrides ?? []) {
35
+ if (!isManagedRelative(item.path) || !new Set(["preserve", "absent"]).has(item.disposition)
36
+ || !new Set(["approved", "pending_review"]).has(item.status)) {
37
+ console.error(`Invalid framework override record: ${item.path ?? "path missing"}`);
38
+ process.exit(2);
39
+ }
40
+ }
41
+
42
+ const pending = (manifest.overrides ?? []).filter((item) => item.status !== "approved");
43
+ if (!approvePending) {
44
+ if (!pending.length) console.log("All NCCGS framework overrides are approved.");
45
+ else {
46
+ console.log(`${pending.length} NCCGS framework override(s) await migration review:`);
47
+ for (const item of pending) console.log(`- ${item.path} (${item.disposition})`);
48
+ console.log("After reviewing/rebasing every item, run again with --approve-pending.");
49
+ }
50
+ process.exit(pending.length ? 1 : 0);
51
+ }
52
+
53
+ for (const item of pending) {
54
+ const file = path.join(project, ...item.path.split("/"));
55
+ if (item.disposition === "absent") {
56
+ if (fs.existsSync(file)) {
57
+ console.error(`Cannot approve absent override because the file exists: ${item.path}`);
58
+ process.exit(2);
59
+ }
60
+ item.sha256 = null;
61
+ item.canonicalSha256 = null;
62
+ } else {
63
+ if (!fs.existsSync(file)) {
64
+ console.error(`Cannot approve preserved override because the file is missing: ${item.path}`);
65
+ process.exit(2);
66
+ }
67
+ Object.assign(item, fingerprintFile(file));
68
+ }
69
+ item.status = "approved";
70
+ item.reviewedAt = new Date().toISOString();
71
+ }
72
+
73
+ manifest.updatedAt = new Date().toISOString();
74
+ fs.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
75
+ console.log(`Approved ${pending.length} NCCGS framework override(s) after migration review.`);
76
+
77
+ function isManagedRelative(value) {
78
+ if (typeof value !== "string" || !value.startsWith(".claude/")) return false;
79
+ const parts = value.split("/");
80
+ return !parts.includes("") && !parts.includes(".") && !parts.includes("..");
81
+ }
@@ -6,6 +6,10 @@ const ownDir = path.dirname(fileURLToPath(import.meta.url));
6
6
  const args = process.argv.slice(2);
7
7
  const projectArg = args.indexOf("--project");
8
8
  const profileArg = args.indexOf("--profile");
9
+ const skippedPaths = new Set();
10
+ for (let index = 0; index < args.length; index++) {
11
+ if (args[index] === "--skip-path" && args[index + 1]) skippedPaths.add(args[index + 1].replace(/\\/g, "/"));
12
+ }
9
13
  const project = path.resolve(projectArg >= 0 ? args[projectArg + 1] : path.resolve(ownDir, "../../../.."));
10
14
  const catalogPath = path.join(project, ".claude", "nccgs", "studio.json");
11
15
  const catalog = JSON.parse(fs.readFileSync(catalogPath, "utf8"));
@@ -19,6 +23,7 @@ if (!profile) throw new Error(`Unknown model profile '${profileName}'. Expected:
19
23
  let changed = 0;
20
24
  for (const agent of catalog.agents) {
21
25
  const file = path.join(project, ".claude", "agents", `${agent.name}.md`);
26
+ if (skippedPaths.has(`.claude/agents/${agent.name}.md`)) continue;
22
27
  if (!fs.existsSync(file)) continue;
23
28
  let text = fs.readFileSync(file, "utf8");
24
29
  const model = profile[agent.modelClass];
@@ -0,0 +1,69 @@
1
+ import crypto from "node:crypto";
2
+ import fs from "node:fs";
3
+
4
+ const utf8 = new TextDecoder("utf-8", { fatal: true });
5
+
6
+ export function sha256(value) {
7
+ return crypto.createHash("sha256").update(value).digest("hex");
8
+ }
9
+
10
+ export function textContent(value) {
11
+ const buffer = Buffer.isBuffer(value) ? value : Buffer.from(value);
12
+ if (buffer.includes(0)) return null;
13
+ try { return utf8.decode(buffer); }
14
+ catch { return null; }
15
+ }
16
+
17
+ export function normalizeLf(value) {
18
+ const text = textContent(value);
19
+ if (text === null) return null;
20
+ return `${text.replace(/\r\n?/g, "\n").replace(/\n*$/, "")}\n`;
21
+ }
22
+
23
+ export function fingerprintBuffer(value) {
24
+ const buffer = Buffer.isBuffer(value) ? value : Buffer.from(value);
25
+ const normalized = normalizeLf(buffer);
26
+ return {
27
+ sha256: sha256(buffer),
28
+ ...(normalized === null ? {} : { canonicalSha256: sha256(Buffer.from(normalized, "utf8")) })
29
+ };
30
+ }
31
+
32
+ export function fingerprintFile(file) {
33
+ return fingerprintBuffer(fs.readFileSync(file));
34
+ }
35
+
36
+ export function equivalentBuffers(left, right) {
37
+ const a = fingerprintBuffer(left);
38
+ const b = fingerprintBuffer(right);
39
+ if (a.sha256 === b.sha256) return true;
40
+ return Boolean(a.canonicalSha256 && a.canonicalSha256 === b.canonicalSha256);
41
+ }
42
+
43
+ export function equivalentFiles(left, right) {
44
+ return equivalentBuffers(fs.readFileSync(left), fs.readFileSync(right));
45
+ }
46
+
47
+ export function matchesFingerprint(file, expected) {
48
+ if (!expected || !fs.existsSync(file)) return false;
49
+ const buffer = fs.readFileSync(file);
50
+ const actual = fingerprintBuffer(buffer);
51
+ if (expected.sha256 && actual.sha256 === expected.sha256) return true;
52
+ if (expected.canonicalSha256 && actual.canonicalSha256 === expected.canonicalSha256) return true;
53
+
54
+ // NCCGS 1.1.0 stored only a raw hash. Accept the two normal Git text
55
+ // representations so a checkout's LF policy does not manufacture drift.
56
+ if (expected.sha256 && actual.canonicalSha256) {
57
+ const lf = normalizeLf(buffer);
58
+ if (sha256(Buffer.from(lf, "utf8")) === expected.sha256) return true;
59
+ const crlf = lf.replace(/\n/g, "\r\n");
60
+ if (sha256(Buffer.from(crlf, "utf8")) === expected.sha256) return true;
61
+ }
62
+ return false;
63
+ }
64
+
65
+ export function sameFingerprint(left, right) {
66
+ if (!left || !right) return false;
67
+ if (left.sha256 && right.sha256 && left.sha256 === right.sha256) return true;
68
+ return Boolean(left.canonicalSha256 && right.canonicalSha256 && left.canonicalSha256 === right.canonicalSha256);
69
+ }
@@ -130,7 +130,7 @@
130
130
  "defaultClassification": "STANDARD"
131
131
  },
132
132
  {
133
- "name": "code-review",
133
+ "name": "nccgs-code-review",
134
134
  "type": "module",
135
135
  "primaryRoles": [
136
136
  "nccgs-programming-lead"
@@ -6,16 +6,20 @@ allowed-tools: Read, Glob, Grep, Write, Edit, Bash, Task, AskUserQuestion
6
6
 
7
7
  # Migrate project
8
8
 
9
- Treat brownfield adoption and NCCGS upgrades as CONTROLLED work. Read the complete [migration procedure](references/procedure.md). Default to `review` when no mode is given.
9
+ Treat brownfield adoption and migrations explicitly requested by the installer as CONTROLLED work. Read the complete [migration procedure](references/procedure.md). Default to `full` when no mode is given. Do not require migration merely because NCCGS was updated when the installer reported `No project migration required`.
10
+
11
+ When `.nccgs/framework-overrides.json` exists, treat every `pending_review` entry as preserved project truth, not installer debris. Compare the project version with the current NCCGS version, keep or rebase the customization deliberately, and record the decision in the migration plan. Only after every pending item has been reviewed and the final bytes or intentional absence are correct, run `node .claude/nccgs/tools/approve-overrides.mjs --project . --approve-pending`. Never approve first to make `doctor` green.
10
12
 
11
13
  ## Modes
12
14
 
15
+ - `full` (default): run review, plan, apply, and verify in one invocation. Continue across phase boundaries without asking for ceremonial approval. Pause only for an unresolved Product Owner decision, destructive action, external side effect, or authority outside the current request.
13
16
  - `review`: read-only inventory and KEEP/ADAPT/MIGRATE/DEPRECATE/REMOVE/MISSING classification.
14
17
  - `plan`: write a dated reversible plan and proposed schema-2 policy without overwriting project truth.
15
18
  - `apply`: execute an approved plan in validated batches with backups.
16
19
  - `verify`: prove policy, routing, hooks, Unity integration, evidence, closure, and a representative work path.
17
20
 
18
- Migration decisions must cover canonical sources, ownership/protected paths, architecture, Unity tooling, model profile/fallback, enabled departments, context packets, verification baselines, closure safeguards, Git tracking, local settings, obsolete global skills, and rollback.
21
+ Migration decisions must cover canonical sources, ownership/protected paths, architecture, Unity tooling, model profile/fallback, enabled departments, context packets, verification baselines, closure safeguards, Git tracking, local settings, preserved framework overrides, obsolete global skills, and rollback.
19
22
 
20
- Never remove reports, registers, checklists, user settings, source assets, or legacy instructions until their live purpose is mapped and the Product Owner approves the replacement. Do not infer canon from code. Return batches, commits, preserved evidence, unresolved decisions, rollback, and final migration state.
23
+ In `full` mode, write the plan before applying it, preserve the same evidence and rollback guarantees as the individual modes, and stop safely if review finds a decision that would materially change project truth. A reversible plan created within the same invocation is approved for in-scope application unless project policy explicitly requires a separate approval.
21
24
 
25
+ Never remove reports, registers, checklists, user settings, source assets, or legacy instructions until their live purpose is mapped and the Product Owner approves the replacement. Do not infer canon from code. Return batches, commits, preserved evidence, unresolved decisions, rollback, and final migration state.
@@ -1,5 +1,17 @@
1
1
  # Brownfield migration procedure
2
2
 
3
+ ## Full run
4
+
5
+ `/migrate-project` without a mode executes Review -> Plan -> Apply -> Verify as one
6
+ CONTROLLED operation. Keep the phase boundaries in the migration record, but do not
7
+ make the user invoke each phase separately. Continue automatically when changes are
8
+ reversible, backed up, within the requested adoption/migration scope, and do not
9
+ alter unresolved project truth. Stop before apply only when review exposes a genuine
10
+ Product Owner decision, destructive action, external side effect, or authority gap.
11
+
12
+ If the NCCGS installer and current schema indicate that an ordinary framework update
13
+ requires no project migration, report that fact and do not manufacture migration work.
14
+
3
15
  ## Review
4
16
 
5
17
  1. Inspect repository status and project root without modifying it.
@@ -16,6 +28,10 @@
16
28
  strongest active safeguard until the PO explicitly accepts a weaker model.
17
29
  7. Determine the project model profile, enabled departments, permitted fallback,
18
30
  orchestration depth/parallelism, context-packet locations, and hook compatibility.
31
+ 8. If `.nccgs/framework-overrides.json` exists, inspect every override. Diff its
32
+ preserved bytes or intentional absence against the installed upstream version,
33
+ and distinguish a still-needed project policy from a customization now supplied
34
+ by NCCGS. Line-ending-only differences are not overrides.
19
35
 
20
36
  ## Plan
21
37
 
@@ -30,6 +46,7 @@ Create `.nccgs/migrations/<date>-migration-plan.md` with:
30
46
  - ordered reversible batches and dependencies;
31
47
  - exact broad/irreversible decisions requiring PO authority;
32
48
  - backup/rollback method;
49
+ - an explicit KEEP/REBASE/RETIRE decision for every pending framework override;
33
50
  - validation for each batch and final end-to-end proof.
34
51
 
35
52
  Prioritize authority and policy conflicts, then model/routing conflicts, Unity
@@ -52,6 +69,12 @@ traceability/evidence, lifecycle hooks, workflow replacement, and cleanup.
52
69
  - Do not leave two active agents/skills advertising mutually exclusive Unity
53
70
  execution bridges. Disable obsolete global routing signals outside the repository
54
71
  through an explicit user action.
72
+ - Preserve pending framework overrides while reviewing them. Rebase each retained
73
+ override onto the newly installed upstream content when needed. After all entries
74
+ match the migration decisions, run
75
+ `node .claude/nccgs/tools/approve-overrides.mjs --project . --approve-pending`.
76
+ Approval records the final hashes; it is the last apply step, never a substitute
77
+ for the review.
55
78
 
56
79
  ## Verify
57
80
 
@@ -60,4 +83,5 @@ role/workflow catalogs, bounded delegation, hook health, context packet freshnes
60
83
  canonical map, requirements/state, Unity Skills integrity, CLI/Pipeline operation,
61
84
  relevant tests, runtime evidence, and subjective-gate routing. Verify that required
62
85
  linked artifacts block DONE in `linked` or `strict` mode. Use a small representative
63
- task or dry run when product changes are not authorized.
86
+ task or dry run when product changes are not authorized. Run `npx nccgs@latest doctor`
87
+ and require zero pending framework overrides before declaring migration complete.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: code-review
2
+ name: nccgs-code-review
3
3
  description: Performs a read-only code review against requirements, architecture, Unity constraints, ownership, tests, performance, security, and regression risk.
4
4
  allowed-tools: Read, Glob, Grep, Bash, Task
5
5
  ---
@@ -11,4 +11,3 @@ Read `.nccgs/project.yaml`, `.nccgs/state.md`, and the active context packet whe
11
11
  Read the context packet, final diff, governing decisions, affected callers, and tests. Route distinct Unity, networking, security, performance, or UI lenses when needed. Report only actionable findings with severity, exact evidence, impact, and remediation direction. Verify that tests assert requirements and that serialized/lifecycle behavior is addressed. Do not edit or praise generally; state when no material issue is found.
12
12
 
13
13
  Return outcome, evidence, affected records, blockers or decisions, residual risk, and the exact next workflow. Do not claim DONE unless this is the `closure` skill and every configured gate passes.
14
-
package/README.md CHANGED
@@ -5,7 +5,7 @@ specialization of a full game-development team with project-aware governance,
5
5
  bounded orchestration, configurable model routing, official Unity Skills, objective
6
6
  evidence, and strict closure.
7
7
 
8
- Version 1.0 contains:
8
+ Version 1.1.1 contains:
9
9
 
10
10
  - 45 studio agents across leadership, design, programming, Unity, content, quality,
11
11
  and release;
@@ -48,13 +48,21 @@ npx nccgs@latest install
48
48
  For an existing NCCGS installation:
49
49
 
50
50
  ```powershell
51
- npx nccgs@latest install --dry-run
52
- npx nccgs@latest install --force
51
+ npx nccgs@latest update --dry-run
52
+ npx nccgs@latest update
53
+ npx nccgs@latest doctor
53
54
  ```
54
55
 
55
56
  The current directory is the installation target. `--project <directory>` remains
56
57
  available for automation, but is not needed for ordinary use.
57
58
 
59
+ Updates are hash-aware and line-ending-aware. Files that still match the previous
60
+ install state update automatically even when Git converted CRLF to LF. Genuine
61
+ project modifications are preserved, recorded in `.nccgs/framework-overrides.json`,
62
+ and routed through one `/migrate-project` review instead of blocking the whole
63
+ framework update. `--force` remains an explicit discard-and-replace escape hatch;
64
+ it is not the normal upgrade path.
65
+
58
66
  The installer validates the package, backs up replaced framework/settings files to
59
67
  `.nccgs/backups/<timestamp>/`, copies `.claude/`, initializes missing `.nccgs/`
60
68
  scaffold files without overwriting project truth, merges managed hooks into shared
@@ -64,13 +72,16 @@ import to `CLAUDE.md`.
64
72
  Select a model profile during installation when needed:
65
73
 
66
74
  ```powershell
67
- npx nccgs@latest install --force --model-profile quality
68
- npx nccgs@latest install --force --model-profile balanced
69
- npx nccgs@latest install --force --model-profile inherit
75
+ npx nccgs@latest update --model-profile quality
76
+ npx nccgs@latest update --model-profile balanced
77
+ npx nccgs@latest update --model-profile inherit
70
78
  ```
71
79
 
72
- Open a new Claude Code session after installation. Run `/migrate-project review` for
73
- an existing project; installing framework files alone is not migration.
80
+ Open a new Claude Code session after first-time adoption of an existing project and
81
+ run `/migrate-project` once. It performs review, plan, apply, and verify as one
82
+ CONTROLLED operation, pausing only for a real Product Owner decision or unsafe side
83
+ effect. Ordinary framework updates report `No project migration required` and need
84
+ no Claude migration command.
74
85
 
75
86
  ## Model routing
76
87
 
@@ -105,7 +116,7 @@ node .\.claude\nccgs\tools\configure-models.mjs --project . --profile inherit
105
116
  | `/status` | Current work, roles/models, evidence, blockers, closure, and next action |
106
117
 
107
118
  Thirty-six discoverable workflows include focused modules for architecture decisions,
108
- context packets, story readiness, code/design/evidence review, closure, QA planning,
119
+ context packets, story readiness, NCCGS code/design/evidence review, closure, QA planning,
109
120
  triage, performance, security, accessibility, balance, prototypes, playtests,
110
121
  localization, hotfixes, milestones, assets, compatibility, incidents, and UI review.
111
122
  Ordinary natural-language requests still work; the user does not need to manually
@@ -116,6 +127,7 @@ chain these modules.
116
127
  ```text
117
128
  .nccgs/
118
129
  project.yaml authority, model, studio, context, ownership and gate policy
130
+ framework-overrides.json reviewed project-specific framework customizations
119
131
  state.md compact recovery checkpoint
120
132
  requirements.yaml targeted requirement registry
121
133
  context/ task-specific source and ownership maps
package/UPGRADING.md CHANGED
@@ -4,23 +4,40 @@ Always inspect a dry run and preserve project policy.
4
4
 
5
5
  ```powershell
6
6
  cd "D:\path\to\UnityProject"
7
- npx nccgs@latest install --dry-run
8
- npx nccgs@latest install --force
7
+ npx nccgs@latest update --dry-run
8
+ npx nccgs@latest update
9
+ npx nccgs@latest doctor
9
10
  ```
10
11
 
11
- Version 1.0 is a framework and policy-schema upgrade from 0.2. The installer updates
12
- framework files and merges managed hooks, but deliberately does not overwrite an
13
- existing `.nccgs/project.yaml`. After installation, open a new Claude Code session
14
- and run:
12
+ Version 1.1.1 makes updates hash-aware, line-ending-aware, and override-aware.
13
+ Managed files that still match the previous install state update automatically;
14
+ CRLF/LF conversion alone is accepted as the same text. Genuine project-modified or
15
+ intentionally missing framework files are preserved and recorded in
16
+ `.nccgs/framework-overrides.json` as `pending_review`. The rest of the framework is
17
+ updated normally, so `--force` is no longer required to get past intentional local
18
+ customizations. Existing `.nccgs/project.yaml` remains project-owned and is never
19
+ blindly overwritten.
20
+
21
+ When pending overrides are reported, open a fresh Claude Code session and run
22
+ `/migrate-project` once. The workflow reviews and rebases each override, migrates the
23
+ project policy when needed, and records approval of the final hashes. A direct
24
+ `doctor` remains red until pending override review is complete. Use `--force` only
25
+ when you intentionally want to back up and discard every detected customization.
26
+
27
+ NCCGS 1.1.1 also names its specialized review command `/nccgs-code-review` to avoid
28
+ colliding with Claude Code's built-in `/code-review` command.
29
+
30
+ When the installer reports that project migration is required, open a new Claude
31
+ Code session and run one command:
15
32
 
16
33
  ```text
17
- /migrate-project review
18
- /migrate-project plan
19
- /migrate-project apply
20
- /migrate-project verify
34
+ /migrate-project
21
35
  /status full
22
36
  ```
23
37
 
38
+ The workflow retains review, plan, apply, and verify internally. Do not run it after
39
+ an ordinary update when the installer reports `No project migration required`.
40
+
24
41
  The migration plan must move schema 1 policy to schema 2, choose a model profile,
25
42
  enable departments, configure context packets and orchestration, preserve closure
26
43
  artifacts, verify hooks, and resolve obsolete global skills. Keep
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.1
@@ -1,6 +1,6 @@
1
- # Hướng dẫn migrate và sử dụng NCCGS 1.0
1
+ # Hướng dẫn migrate và sử dụng NCCGS 1.1.1
2
2
 
3
- NCCGS 1.0 là studio operating system dành cho Unity project trong Claude Code. Nó
3
+ NCCGS 1.1.1 là studio operating system dành cho Unity project trong Claude Code. Nó
4
4
  không thay thế cách chat trực tiếp; nó tự phân loại rủi ro, chọn workflow, agent và
5
5
  model phù hợp, sử dụng official Unity Skills, thu thập bằng chứng và áp dụng closure.
6
6
 
@@ -38,13 +38,21 @@ npx nccgs@latest install
38
38
  Nếu project đã có NCCGS:
39
39
 
40
40
  ```powershell
41
- npx nccgs@latest install --dry-run
42
- npx nccgs@latest install --force
41
+ npx nccgs@latest update --dry-run
42
+ npx nccgs@latest update
43
+ npx nccgs@latest doctor
43
44
  ```
44
45
 
45
46
  NCCGS mặc định cài vào directory hiện tại. Bạn không cần truyền đường dẫn project;
46
47
  hãy mở PowerShell tại Unity project root hoặc dùng `cd` đến đó trước.
47
48
 
49
+ Từ 1.1.1, update kiểm tra cả raw hash và hash text đã chuẩn hóa line ending. Việc Git
50
+ đổi CRLF/LF không còn bị báo nhầm là sửa file. File thật sự đã customize hoặc cố ý
51
+ xóa sẽ được giữ nguyên, ghi vào `.nccgs/framework-overrides.json` với trạng thái
52
+ `pending_review`, còn các file an toàn khác vẫn cập nhật bình thường. Sau đó chỉ cần
53
+ chạy `/migrate-project` một lần để review/rebase và phê duyệt các override. Không cần
54
+ `--force`; chỉ dùng cờ đó khi thực sự muốn backup rồi loại bỏ customization.
55
+
48
56
  Installer sẽ:
49
57
 
50
58
  1. validate NCCGS;
@@ -55,6 +63,10 @@ Installer sẽ:
55
63
  6. cấu hình model cho agents;
56
64
  7. thêm NCCGS import vào `CLAUDE.md`.
57
65
 
66
+ Nếu installer báo `Project migration required`, mở Claude Code session mới và chạy
67
+ `/migrate-project`. `doctor` trực tiếp sẽ tiếp tục báo pending cho tới khi workflow
68
+ đã review xong mọi override; đây là safety gate có chủ đích.
69
+
58
70
  Sau khi cài, đóng phiên Claude Code cũ và mở phiên mới tại project root.
59
71
 
60
72
  ## 3. Chọn model profile
@@ -68,7 +80,7 @@ Sau khi cài, đóng phiên Claude Code cũ và mở phiên mới tại project
68
80
  Cài với profile cụ thể:
69
81
 
70
82
  ```powershell
71
- npx nccgs@latest install --force --model-profile quality
83
+ npx nccgs@latest update --model-profile quality
72
84
  ```
73
85
 
74
86
  Đổi profile trong project đã cài:
@@ -82,12 +94,17 @@ khoản hoặc context mode hiện tại, dùng `inherit` hoặc cho phép inher
82
94
 
83
95
  ## 4. Migrate project cũ
84
96
 
85
- Migration gồm bốn bước:
97
+ Thông thường chỉ cần gọi một command:
86
98
 
87
99
  ```text
88
- review -> plan -> apply -> verify
100
+ /migrate-project
89
101
  ```
90
102
 
103
+ NCCGS vẫn thực hiện bốn phase `review -> plan -> apply -> verify` ở bên trong một
104
+ lần chạy. Nó chỉ dừng khi có quyết định Product Owner thật sự, thao tác destructive,
105
+ external side effect hoặc thiếu authority. Các mode riêng dưới đây vẫn tồn tại để
106
+ debug hoặc kiểm soát thủ công.
107
+
91
108
  ### Review
92
109
 
93
110
  ```text
@@ -175,7 +192,7 @@ NCCGS sẽ tự chọn:
175
192
  | `/release` | Tạo release candidate |
176
193
  | `/status` | Xem trạng thái, model, agents, evidence và blockers |
177
194
 
178
- Các workflow chuyên biệt như `/architecture-decision`, `/code-review`,
195
+ Các workflow chuyên biệt như `/architecture-decision`, `/nccgs-code-review`,
179
196
  `/performance-audit`, `/security-audit`, `/balance-review`, `/playtest`, `/hotfix`,
180
197
  `/incident-recovery` có thể gọi trực tiếp, nhưng thông thường `/work` tự phối hợp.
181
198
 
@@ -258,7 +275,7 @@ Sau migration:
258
275
  ```powershell
259
276
  git add .claude .nccgs CLAUDE.md
260
277
  git status --short
261
- git commit -m "chore: adopt NCCGS 1.0 studio workflow"
278
+ git commit -m "chore: adopt NCCGS 1.1 studio workflow"
262
279
  ```
263
280
 
264
281
  Luôn đọc diff trước commit.
@@ -1,6 +1,6 @@
1
- # CCGS to NCCGS 1.0 migration matrix
1
+ # CCGS to NCCGS 1.1 migration matrix
2
2
 
3
- | CCGS capability | NCCGS 1.0 treatment | Reason |
3
+ | CCGS capability | NCCGS 1.1 treatment | Reason |
4
4
  |---|---|---|
5
5
  | Three-tier studio hierarchy | ADAPT into 44 roles and a central one-level orchestrator | Preserve specialization without recursive context chains |
6
6
  | Opus/Sonnet/Haiku agent pins | ADAPT into quality/balanced/inherit profiles | Preserve model routing while handling compatibility and cost |
package/docs/WORKFLOWS.md CHANGED
@@ -33,7 +33,7 @@ available when a user wants a bounded workflow or output.
33
33
  - **Design**: `design`, `design-review`, `balance-review`, `accessibility-review`,
34
34
  `ui-review`, `prototype-feature`, `playtest`.
35
35
  - **Technical**: `architecture-decision`, `dependency-review`,
36
- `compatibility-review`, `code-review`, `performance-audit`, `security-audit`.
36
+ `compatibility-review`, `nccgs-code-review`, `performance-audit`, `security-audit`.
37
37
  - **Implementation/quality**: `work`, `qa-plan`, `test`, `bug-triage`,
38
38
  `evidence-review`, `review`, `asset-audit`, `closure`.
39
39
  - **Delivery/recovery**: `release-readiness`, `release`, `hotfix`,
@@ -0,0 +1,2 @@
1
+ backups/
2
+ runtime/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nccgs",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Unity-first game-studio operating system for Claude Code",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/scripts/cli.mjs CHANGED
@@ -19,13 +19,15 @@ if (command === "version" || command === "--version" || command === "-v") {
19
19
  process.exit(0);
20
20
  }
21
21
 
22
- if (command !== "install") {
22
+ if (!new Set(["install", "update", "doctor"]).has(command)) {
23
23
  console.error(`Unknown command: ${command}`);
24
24
  printHelp();
25
25
  process.exit(2);
26
26
  }
27
27
 
28
- const result = spawnSync(process.execPath, [path.join(scriptDir, "install.mjs"), ...args], {
28
+ const script = command === "doctor" ? "doctor.mjs" : "install.mjs";
29
+ const forwardedArgs = command === "update" ? ["--update-only", ...args] : args;
30
+ const result = spawnSync(process.execPath, [path.join(scriptDir, script), ...forwardedArgs], {
29
31
  cwd: process.cwd(),
30
32
  stdio: "inherit"
31
33
  });
@@ -41,6 +43,8 @@ function printHelp() {
41
43
 
42
44
  Usage:
43
45
  nccgs install [options]
46
+ nccgs update [options]
47
+ nccgs doctor [options]
44
48
  nccgs --version
45
49
 
46
50
  Install target:
@@ -49,7 +53,7 @@ Install target:
49
53
 
50
54
  Options:
51
55
  --dry-run Preview without writing files
52
- --force Back up and replace framework conflicts
56
+ --force Back up and discard detected project overrides
53
57
  --model-profile <profile> quality, balanced, or inherit
54
58
  --project <directory> Optional explicit target directory
55
59
  --allow-non-unity Allow a target without Unity markers`);