nccgs 1.3.0 → 2.0.0-rc.2

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 (180) hide show
  1. package/.claude/agents/nccgs-adversarial-reviewer.md +17 -6
  2. package/.claude/agents/nccgs-engine-programmer.md +2 -2
  3. package/.claude/agents/nccgs-fast-implementer.md +30 -0
  4. package/.claude/agents/nccgs-game-designer.md +26 -0
  5. package/.claude/agents/nccgs-gameplay-programmer.md +3 -4
  6. package/.claude/agents/nccgs-qa-engineer.md +2 -2
  7. package/.claude/agents/nccgs-task-scout.md +24 -0
  8. package/.claude/agents/nccgs-ui-programmer.md +2 -2
  9. package/.claude/agents/nccgs-unity-build-specialist.md +2 -2
  10. package/.claude/agents/nccgs-unity-implementer.md +7 -6
  11. package/.claude/agents/nccgs-unity-systems-specialist.md +2 -2
  12. package/.claude/agents/nccgs-unity-ui-specialist.md +2 -2
  13. package/.claude/agents/nccgs-verification-engineer.md +2 -2
  14. package/.claude/nccgs/MEMORY.md +59 -0
  15. package/.claude/nccgs/THIRD_PARTY_NOTICES.md +16 -0
  16. package/.claude/nccgs/VERSION +1 -1
  17. package/.claude/nccgs/agent-library/nccgs-adversarial-reviewer.md +16 -5
  18. package/.claude/nccgs/agent-library/nccgs-fast-implementer.md +28 -0
  19. package/.claude/nccgs/agent-library/nccgs-game-designer.md +1 -2
  20. package/.claude/nccgs/agent-library/nccgs-gameplay-programmer.md +1 -2
  21. package/.claude/nccgs/agent-library/nccgs-task-scout.md +22 -0
  22. package/.claude/nccgs/agent-library/nccgs-unity-implementer.md +5 -4
  23. package/.claude/nccgs/constitution.md +44 -12
  24. package/.claude/nccgs/hooks/agent-audit.mjs +2 -2
  25. package/.claude/nccgs/hooks/closure-guard.mjs +31 -8
  26. package/.claude/nccgs/hooks/common.mjs +2 -1
  27. package/.claude/nccgs/hooks/runtime-observation.mjs +2 -2
  28. package/.claude/nccgs/hooks/session-start.mjs +11 -4
  29. package/.claude/nccgs/packages/ponytail/LICENSE +21 -0
  30. package/.claude/nccgs/packages/ponytail/NOTICE.md +32 -0
  31. package/.claude/nccgs/packages/ponytail/README.md +46 -0
  32. package/.claude/nccgs/packages/ponytail/complexity-review.md +47 -0
  33. package/.claude/nccgs/packages/ponytail/engineering.md +68 -0
  34. package/.claude/nccgs/packages/ponytail/manifest.json +24 -0
  35. package/.claude/nccgs/pipeline.json +92 -8
  36. package/.claude/nccgs/protocols/agent-contract.md +50 -1
  37. package/.claude/nccgs/protocols/astra-claude.md +46 -12
  38. package/.claude/nccgs/protocols/bounded-repair.md +118 -0
  39. package/.claude/nccgs/protocols/context-packets.md +5 -0
  40. package/.claude/nccgs/protocols/delivery-acceptance.md +105 -0
  41. package/.claude/nccgs/protocols/design-lifecycle.md +139 -0
  42. package/.claude/nccgs/protocols/evidence.md +11 -1
  43. package/.claude/nccgs/protocols/model-routing.md +44 -42
  44. package/.claude/nccgs/protocols/orchestration.md +46 -5
  45. package/.claude/nccgs/protocols/review-handoff.md +65 -0
  46. package/.claude/nccgs/protocols/standalone-gates.md +273 -0
  47. package/.claude/nccgs/protocols/standalone-pilot.md +144 -0
  48. package/.claude/nccgs/protocols/standalone.md +187 -0
  49. package/.claude/nccgs/protocols/task-autonomy.md +55 -0
  50. package/.claude/nccgs/protocols/task-gates.md +73 -7
  51. package/.claude/nccgs/routing.generated.md +25 -7
  52. package/.claude/nccgs/settings.fragment.json +153 -141
  53. package/.claude/nccgs/studio.json +135 -101
  54. package/.claude/nccgs/tools/autonomy.mjs +27 -0
  55. package/.claude/nccgs/tools/command-process.mjs +44 -0
  56. package/.claude/nccgs/tools/compile-policy.mjs +34 -4
  57. package/.claude/nccgs/tools/configure-models.mjs +13 -5
  58. package/.claude/nccgs/tools/criteria.mjs +121 -0
  59. package/.claude/nccgs/tools/delivery-budget.mjs +52 -0
  60. package/.claude/nccgs/tools/design-readiness.mjs +158 -0
  61. package/.claude/nccgs/tools/evidence.mjs +153 -0
  62. package/.claude/nccgs/tools/gates.mjs +151 -24
  63. package/.claude/nccgs/tools/inputs.mjs +73 -0
  64. package/.claude/nccgs/tools/lifecycle.mjs +521 -0
  65. package/.claude/nccgs/tools/native-completion.mjs +21 -0
  66. package/.claude/nccgs/tools/orchestration.mjs +430 -0
  67. package/.claude/nccgs/tools/paths.mjs +60 -0
  68. package/.claude/nccgs/tools/policy.mjs +58 -13
  69. package/.claude/nccgs/tools/process-lock.mjs +74 -0
  70. package/.claude/nccgs/tools/repair-packet.mjs +87 -0
  71. package/.claude/nccgs/tools/review-handoff.mjs +32 -0
  72. package/.claude/nccgs/tools/runtime.mjs +33 -7
  73. package/.claude/nccgs/tools/task.mjs +62 -31
  74. package/.claude/nccgs/tools/tool-guard.mjs +117 -0
  75. package/.claude/nccgs/tools/verification-jobs.mjs +161 -0
  76. package/.claude/nccgs/tools/verification-worker.mjs +71 -0
  77. package/.claude/nccgs/tools/windows-job.cs +96 -0
  78. package/.claude/nccgs/workflow-catalog.json +286 -26
  79. package/.claude/skills/accessibility-review/SKILL.md +12 -5
  80. package/.claude/skills/architecture-decision/SKILL.md +12 -5
  81. package/.claude/skills/asset-audit/SKILL.md +12 -5
  82. package/.claude/skills/audit/SKILL.md +12 -5
  83. package/.claude/skills/balance-review/SKILL.md +12 -5
  84. package/.claude/skills/bug-triage/SKILL.md +12 -5
  85. package/.claude/skills/bug-triage/references/astra.md +12 -5
  86. package/.claude/skills/closure/SKILL.md +12 -5
  87. package/.claude/skills/compatibility-review/SKILL.md +12 -5
  88. package/.claude/skills/context-pack/SKILL.md +12 -5
  89. package/.claude/skills/dependency-review/SKILL.md +12 -5
  90. package/.claude/skills/design/SKILL.md +14 -5
  91. package/.claude/skills/design-review/SKILL.md +14 -5
  92. package/.claude/skills/evidence-review/SKILL.md +12 -5
  93. package/.claude/skills/hotfix/SKILL.md +12 -5
  94. package/.claude/skills/hotfix/references/astra.md +12 -5
  95. package/.claude/skills/incident-recovery/SKILL.md +12 -5
  96. package/.claude/skills/incident-recovery/references/astra.md +12 -5
  97. package/.claude/skills/localize-game/SKILL.md +12 -5
  98. package/.claude/skills/localize-game/references/astra.md +12 -5
  99. package/.claude/skills/migrate-project/SKILL.md +12 -5
  100. package/.claude/skills/migrate-project/references/astra.md +12 -5
  101. package/.claude/skills/migrate-project/references/procedure.md +2 -1
  102. package/.claude/skills/milestone-review/SKILL.md +12 -5
  103. package/.claude/skills/nccgs-code-review/SKILL.md +12 -5
  104. package/.claude/skills/nccgs-code-review/references/astra.md +8 -2
  105. package/.claude/skills/performance-audit/SKILL.md +12 -5
  106. package/.claude/skills/plan-feature/SKILL.md +12 -5
  107. package/.claude/skills/playtest/SKILL.md +12 -5
  108. package/.claude/skills/playtest/references/astra.md +16 -5
  109. package/.claude/skills/project-stage/SKILL.md +12 -5
  110. package/.claude/skills/prototype-feature/SKILL.md +12 -5
  111. package/.claude/skills/prototype-feature/references/astra.md +16 -5
  112. package/.claude/skills/qa-plan/SKILL.md +12 -5
  113. package/.claude/skills/release/SKILL.md +12 -5
  114. package/.claude/skills/release/references/astra.md +12 -5
  115. package/.claude/skills/release-readiness/SKILL.md +12 -5
  116. package/.claude/skills/retrospective/SKILL.md +12 -5
  117. package/.claude/skills/review/SKILL.md +12 -5
  118. package/.claude/skills/review/references/astra.md +8 -2
  119. package/.claude/skills/security-audit/SKILL.md +12 -5
  120. package/.claude/skills/sprint-plan/SKILL.md +12 -5
  121. package/.claude/skills/status/SKILL.md +12 -5
  122. package/.claude/skills/status/references/astra.md +6 -0
  123. package/.claude/skills/story-readiness/SKILL.md +14 -5
  124. package/.claude/skills/test/SKILL.md +12 -5
  125. package/.claude/skills/test/references/astra.md +12 -5
  126. package/.claude/skills/ui-review/SKILL.md +12 -5
  127. package/.claude/skills/work/SKILL.md +12 -5
  128. package/.claude/skills/work/references/astra.md +17 -5
  129. package/CHANGELOG.md +42 -0
  130. package/CLAUDE.md +2 -0
  131. package/MEMORY.md +55 -0
  132. package/README.md +132 -180
  133. package/THIRD_PARTY_NOTICES.md +15 -0
  134. package/UPGRADING.md +91 -69
  135. package/VERSION +1 -1
  136. package/docs/ARCHITECTURE.md +19 -5
  137. package/docs/BOUNDED-REPAIR.md +11 -0
  138. package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +46 -34
  139. package/docs/NCCGS-1.3.md +10 -122
  140. package/docs/NCCGS-1.4.1.md +149 -0
  141. package/docs/NCCGS-1.4.md +184 -0
  142. package/docs/NCCGS-1.5-IMPLEMENTATION-PLAN.md +378 -0
  143. package/docs/NCCGS-1.5-PILOT.md +130 -0
  144. package/docs/NCCGS-1.5.md +237 -0
  145. package/docs/PHASE-1-OPERATIONS.md +137 -0
  146. package/docs/PHASE-2-OPERATIONS.md +183 -0
  147. package/docs/PROJECT-POLICY.md +21 -9
  148. package/docs/RELEASE-STATUS.md +42 -0
  149. package/docs/WORKFLOWS.md +42 -24
  150. package/package.json +7 -3
  151. package/scaffold/.nccgs/autonomy.json +4 -0
  152. package/scaffold/.nccgs/execution.json +10 -0
  153. package/scaffold/.nccgs/inputs.json +6 -0
  154. package/scaffold/.nccgs/project.yaml +4 -2
  155. package/scaffold/.nccgs/templates/agent-handoff.md +2 -0
  156. package/scaffold/.nccgs/templates/design-contract.json +34 -0
  157. package/scaffold/.nccgs/templates/feature-contract.md +21 -5
  158. package/scaffold/.nccgs/templates/implementation-report.md +4 -1
  159. package/scaffold/.nccgs/templates/repair-packet.json +14 -0
  160. package/scripts/benchmark-snapshot.mjs +205 -0
  161. package/scripts/benchmark-v15.mjs +173 -0
  162. package/scripts/cli.mjs +129 -2
  163. package/scripts/doctor.mjs +128 -22
  164. package/scripts/install.mjs +96 -34
  165. package/scripts/run.mjs +72 -0
  166. package/scripts/supervise.mjs +124 -0
  167. package/scripts/validate.mjs +45 -4
  168. package/tests/autonomy.test.mjs +113 -0
  169. package/tests/benchmark-v15.test.mjs +65 -0
  170. package/tests/design-readiness.test.mjs +200 -0
  171. package/tests/evidence.test.mjs +186 -0
  172. package/tests/framework.test.mjs +333 -16
  173. package/tests/gates.test.mjs +313 -4
  174. package/tests/lifecycle-v15.test.mjs +300 -0
  175. package/tests/orchestration-v15.test.mjs +545 -0
  176. package/tests/phase1.test.mjs +324 -0
  177. package/tests/phase2.test.mjs +250 -0
  178. package/tests/policy-v15.test.mjs +220 -0
  179. package/tests/ponytail-package.test.mjs +75 -0
  180. package/tests/runtime-v15.test.mjs +624 -0
@@ -1,30 +1,53 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
- import { readInput } from "./common.mjs";
4
- import { profilePolicy, json } from "../tools/policy.mjs";
3
+ import { readInput, projectRoot } from "./common.mjs";
4
+ import { profilePolicy, json, resolveExecution } from "../tools/policy.mjs";
5
5
  import { check, taskPath } from "../tools/gates.mjs";
6
6
  import { boundTask } from "../tools/runtime.mjs";
7
+ import { guardTool, recoveryTool } from "../tools/tool-guard.mjs";
8
+ import { pendingJobs } from "../tools/verification-jobs.mjs";
7
9
 
8
10
  const input = await readInput();
9
- const project = process.cwd();
11
+ const project = projectRoot();
10
12
  try {
11
- if (profilePolicy(project).name !== "astra-claude") process.exit(0);
13
+ if (process.argv[2] === "pre" && recoveryTool(input, project)) process.exit(0);
14
+ const policy = profilePolicy(project);
15
+ const execution = resolveExecution(project);
16
+ if (execution.name !== "standalone" && policy.name !== "astra-claude") process.exit(0);
12
17
  const mode = process.argv[2];
18
+ if (mode === "stop" && !process.env.NCCGS_SUPERVISED_SESSION) {
19
+ const taskId = boundTask(project, input.session_id);
20
+ const jobs = taskId ? pendingJobs(project, taskId) : [];
21
+ if (jobs.length) throw new Error(`Verification still pending: ${jobs.map(j => `${j.jobId}:${j.status}`).join(", ")}. Use task job-wait --id ${taskId} --job ID; retain the checkpoint if a process is unverified`);
22
+ }
13
23
  const tool = input.tool_input ?? {};
14
- const absolute = path.resolve(tool.file_path || tool.path || project);
24
+ const guardOutput = mode === "pre" && execution.name === "standalone" ? guardTool(project, input) : null;
25
+ if (mode === "pre" && execution.name !== "standalone" && tool.subagent_type === policy.pipeline.contract.reviewAgent) {
26
+ const id = boundTask(project, input.session_id);
27
+ if (id) {
28
+ const readiness = check(project, json(taskPath(project, id)), "review");
29
+ if (!readiness.allowed) throw new Error(readiness.message);
30
+ }
31
+ }
32
+ const absolute = path.resolve(project, tool.file_path || tool.path || ".");
15
33
  const relative = path.relative(project, absolute).split(path.sep).join("/");
16
34
  const text = tool.content ?? tool.new_string ?? "";
17
- if (mode === "pre" && /^\.nccgs\/(tasks|approvals)\//.test(relative)) throw new Error("Use the task gate CLI for task records. Astra/PO sign-offs must be imported outside Claude; never write them on their behalf.");
35
+ if (mode === "pre" && ["Write", "Edit", "MultiEdit", "NotebookEdit"].includes(input.tool_name) && /^\.nccgs\/(tasks|approvals)\//i.test(relative)) throw new Error("Use the task gate CLI for task records. Astra/PO sign-offs must be imported outside Claude; never write them on their behalf.");
18
36
  const shell = tool.command ?? "";
37
+ if (mode === "pre" && /\b(?:task(?:\.mjs)?|nccgs\s+task)\s+[\s\S]*?\bextend-review\b/i.test(shell)) throw new Error("Review budget extensions require an explicit external decision; Claude cannot extend its own review loop.");
19
38
  if (mode === "pre" && /(?:--stage\s+["']?(?:astra|acceptance)\b|\.nccgs[\\/]approvals[\\/])/i.test(shell)) throw new Error("Claude cannot create/import Astra or Product Owner sign-offs.");
20
39
  const completion = /(?:^|\n)\s*(?:[-*]\s*)?(?:\*\*)?(?:Final state|Status|State|Trạng thái)(?:\*\*)?\s*:\s*(?:\*\*)?DONE\b|^\s*(?:\*\*)?DONE\b|"(?:state|status)"\s*:\s*"DONE"/im;
21
40
  const claimsDone = mode === "stop"
22
41
  ? completion.test(input.last_assistant_message ?? "")
23
42
  : /^\.nccgs\/(?:closures\/|state\.md$)/.test(relative) && completion.test(text);
24
- if (!claimsDone) process.exit(0);
43
+ if (!claimsDone) {
44
+ if (guardOutput) console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: "PreToolUse", ...guardOutput } }));
45
+ process.exit(0);
46
+ }
25
47
  const id = boundTask(project, input.session_id);
26
48
  if (!id) throw new Error("A DONE claim needs a session bound to an NCCGS task");
27
- check(project, json(taskPath(project, id)), "done");
49
+ const readiness = check(project, json(taskPath(project, id)), "done");
50
+ if (!readiness.allowed) throw new Error(readiness.message);
28
51
  } catch (error) {
29
52
  if (process.argv[2] === "stop") {
30
53
  // Do not trap the session in an endless Stop-hook loop; the canonical close
@@ -1,6 +1,7 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { spawnSync } from "node:child_process";
4
+ import { hookProjectRoot } from "../tools/autonomy.mjs";
4
5
 
5
6
  export async function readInput() {
6
7
  let text = "";
@@ -10,7 +11,7 @@ export async function readInput() {
10
11
  }
11
12
 
12
13
  export function projectRoot() {
13
- return process.cwd();
14
+ return hookProjectRoot();
14
15
  }
15
16
 
16
17
  export function readText(relative, limit = 12000) {
@@ -1,8 +1,8 @@
1
- import { readInput, appendRuntime } from "./common.mjs";
1
+ import { readInput, appendRuntime, projectRoot } from "./common.mjs";
2
2
  import { observe } from "../tools/runtime.mjs";
3
3
  try {
4
4
  const input = await readInput();
5
- const result = observe(process.cwd(), input, "agent_result");
5
+ const result = observe(projectRoot(), input, process.argv[2] === "failure" ? "agent_failure" : "agent_result");
6
6
  appendRuntime({ event: "runtime_observation", path: result.path, sessionId: result.sessionId, agentId: result.agentId, missing: result.missing });
7
7
  console.log(`NCCGS runtime evidence: ${result.path}; missing observation: ${result.missing.join(", ") || "none"}. Configuration is not runtime proof.`);
8
8
  } catch (error) {
@@ -1,5 +1,6 @@
1
- import { git, readText, yamlValue, readInput } from "./common.mjs";
2
- import { profilePolicy } from "../tools/policy.mjs";
1
+ import { git, readText, yamlValue, readInput, projectRoot } from "./common.mjs";
2
+ import { profilePolicy, resolveExecution } from "../tools/policy.mjs";
3
+ import { autonomyPolicy, fullTaskAutonomy } from "../tools/autonomy.mjs";
3
4
 
4
5
  const version = readText(".claude/nccgs/VERSION", 100).trim() || "unknown";
5
6
  const policy = readText(".nccgs/project.yaml");
@@ -10,8 +11,14 @@ const model = yamlValue(policy, "models", "profile") || "unconfigured";
10
11
  const input = await readInput();
11
12
 
12
13
  console.log(`NCCGS ${version} | branch ${branch} | ${changes} working-tree change(s) | model profile ${model}`);
13
- if (model === "astra-claude") {
14
- const { profile } = profilePolicy(process.cwd());
14
+ const execution = resolveExecution(projectRoot());
15
+ if (fullTaskAutonomy(projectRoot())) console.log("TASK AUTONOMY: assigned work preauthorizes ordinary Bash/PowerShell, reports and required outside-project commands. Do not request repeated permission for these operations. Follow protocols/task-autonomy.md; integrity and destructive-action guards remain effective.");
16
+ else if (autonomyPolicy(projectRoot()).mode === "full") console.log("Task autonomy is configured but not active. Start with external nccgs run; project settings alone cannot enable native bypassPermissions.");
17
+ if (execution.name === "standalone") {
18
+ console.log(`Claude Code standalone | external review ${execution.externalReview.mode} | at most ${execution.maxParallelWorkers} writers. Read .claude/nccgs/MEMORY.md and protocols/standalone.md. Bind a schema-2 task; reserve Agent calls before dispatch. Unknown runtime effort/cost remains unknown.`);
19
+ if (/^[\w-]+$/.test(input.session_id ?? "")) console.log(`Bind the active task with: node .claude/nccgs/tools/task.mjs bind --id TASK_ID --session ${input.session_id}`);
20
+ } else if (model === "astra-claude") {
21
+ const { profile } = profilePolicy(projectRoot());
15
22
  console.log(`Astra owns planning/documents. Implementation: ${profile.models.standard.model}/${profile.models.standard.effort}; independent review: ${profile.models.review.model}/${profile.models.review.effort}. Read the profile protocol and use task gates. DONE requires Astra check and explicit Product Owner acceptance.`);
16
23
  if (/^[\w-]+$/.test(input.session_id ?? "")) console.log(`Bind the active task with: node .claude/nccgs/tools/task.mjs bind --id TASK_ID --session ${input.session_id}`);
17
24
  }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DietrichGebert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,32 @@
1
+ # Third-party attribution: Ponytail
2
+
3
+ This NCCGS package **borrows and adapts selected content from Ponytail** by
4
+ DietrichGebert. The borrowed material is not original NCCGS work. The adapted
5
+ guidance is distributed under MIT; retain this attribution and the complete
6
+ [upstream MIT license](LICENSE) when redistributing it.
7
+
8
+ - Upstream project: [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail).
9
+ - Reviewed version: 4.10.3.
10
+ - Pinned commit: `c982cd411abb53323c4baa1baa3c2f020b8d0b08`.
11
+ - Upstream copyright: **Copyright (c) 2026 DietrichGebert**.
12
+ - NCCGS adaptation date: 2026-10-04; package version: 1.0.0.
13
+ - Source fingerprints: [manifest.json](manifest.json), SHA-256 over UTF-8 with LF
14
+ line endings. The LICENSE text is unchanged from upstream.
15
+
16
+ | Upstream source | Selected material and NCCGS destination |
17
+ |---|---|
18
+ | [ponytail/SKILL.md](https://github.com/DietrichGebert/ponytail/blob/c982cd411abb53323c4baa1baa3c2f020b8d0b08/skills/ponytail/SKILL.md) | Comprehension before simplification, caller/root-cause analysis, reuse ladder, safety boundaries and deliberate-limit comments in engineering.md |
19
+ | [ponytail-review/SKILL.md](https://github.com/DietrichGebert/ponytail/blob/c982cd411abb53323c4baa1baa3c2f020b8d0b08/skills/ponytail-review/SKILL.md) | Reuse, native features and unnecessary-complexity checks in complexity-review.md |
20
+ | [ponytail-debt/SKILL.md](https://github.com/DietrichGebert/ponytail/blob/c982cd411abb53323c4baa1baa3c2f020b8d0b08/skills/ponytail-debt/SKILL.md) | Source-comment limits, triggers and upgrade paths in complexity-review.md |
21
+ | [LICENSE](https://github.com/DietrichGebert/ponytail/blob/c982cd411abb53323c4baa1baa3c2f020b8d0b08/LICENSE) | Complete MIT permission and disclaimer in LICENSE |
22
+
23
+ NCCGS modifications: assignment-scoped loading, full-contract precedence, Unity
24
+ lifecycle/serialization cautions, existing verification and handoff requirements,
25
+ bounded-repair exception, and advisory complexity findings within full independent
26
+ review. The adaptation is maintained by NCCGS; it is not an unmodified upstream
27
+ plugin and does not imply endorsement by the upstream author.
28
+
29
+ Not imported: global persona/persistence, lite/full/ultra modes, lifecycle hooks,
30
+ state files, MCP/server/adapters, install scripts, benchmark scoring, LOC targets,
31
+ shortened delivery promises, one-check testing limits or output-length limits.
32
+ No upstream benchmark saving is claimed for NCCGS.
@@ -0,0 +1,46 @@
1
+ # NCCGS Ponytail shared package
2
+
3
+ Selective guidance borrowed and adapted from **Ponytail by DietrichGebert**,
4
+ v4.10.3, under the [MIT license](LICENSE). See [attribution and changes](NOTICE.md)
5
+ and the pinned source metadata in [manifest.json](manifest.json).
6
+
7
+ Choose the simplest implementation that fully satisfies the approved contract.
8
+ Correctness, completeness and required evidence come before implementation size.
9
+
10
+ ## Load by assignment
11
+
12
+ The coordinator and every studio agent reach this package through the constitution
13
+ or shared agent contract. Select by the actual assignment, not the model alias,
14
+ workflow mode alone, or a missing/unknown role. Read only the relevant module:
15
+
16
+ | Assignment | Module and responsibility |
17
+ |---|---|
18
+ | Technical planning, architecture or root-cause analysis | [Engineering](engineering.md): technical/programming leads, architect and the assigned technical analyst |
19
+ | Code implementation, bug fix, refactor or technical prototype | [Engineering](engineering.md): fast/Unity implementers, domain programmers and coding specialists |
20
+ | Independent review or audit of code | [Complexity review](complexity-review.md): an additional pass within the existing independent review |
21
+ | Maintenance of deliberate code simplifications | [Complexity review](complexity-review.md): inspect markers and report their limits in the existing handoff |
22
+ | Game design, GDD review, story readiness, QA, playtest or release acceptance | No Ponytail module for that assignment; use the domain procedure and full acceptance obligations |
23
+
24
+ An adversarial reviewer assigned a design document does not run a complexity-only
25
+ review of that document. An unknown assignment does not activate this package by
26
+ default. If one assignment spans code review and acceptance, the complexity pass
27
+ covers code only; acceptance still covers every required criterion.
28
+
29
+ For a bounded repair, the coordinator applies Engineering while preparing the
30
+ chosen solution and pinned packet. The repair worker follows that packet and its
31
+ existing limits; do not add package-reading calls or restart diagnosis in the
32
+ worker. Missing context returns PARTIAL to the coordinator.
33
+
34
+ ## Integration and limits
35
+
36
+ This is one shared, on-demand guidance package bundled with NCCGS. It adds no
37
+ Ponytail plugin, global persona, lifecycle hooks, modes, dependencies, model calls,
38
+ telemetry or separate CLI/skill commands. NCCGS install/update copies it as managed
39
+ framework content, including its license and notice. Local overrides use the
40
+ existing migration-review process. No separate installation is needed.
41
+
42
+ These are agent instructions, not a semantic acceptance gate or a guarantee that
43
+ a model follows them. Existing NCCGS ownership, budgets, evidence, independent
44
+ review and closure gates remain authoritative. This package does not repair the
45
+ separate standalone design/readiness workflow gap. Its effect on delivery quality,
46
+ time and token use requires fresh real Claude Code evaluation.
@@ -0,0 +1,47 @@
1
+ # Complexity review and deliberate simplifications
2
+
3
+ Adapted from [Ponytail review/debt](NOTICE.md), copyright (c) 2026 DietrichGebert,
4
+ [MIT](LICENSE). This is a supplementary code review pass, read-only on source.
5
+
6
+ ## Review after checking the contract and correctness
7
+
8
+ The independent reviewer still covers correctness, requirements, security,
9
+ performance risks, regressions and evidence. Do not replace that review with this
10
+ checklist or create another reviewer dispatch just to run it.
11
+
12
+ Inspect the actual changed code and affected callers for:
13
+
14
+ - Duplicated project helpers or systems: name the reusable path and confirm its
15
+ behavior covers the same requirement and edge cases.
16
+ - Custom code or a dependency replaced by an appropriate stdlib/native feature:
17
+ identify the feature and platform/behavioral constraints.
18
+ - Unused configuration, dead code or speculative abstraction: verify references,
19
+ including Unity serialized references, reflection and public compatibility
20
+ obligations, before recommending removal.
21
+ - Unnecessary indirection: propose a readable equivalent, preserving state,
22
+ ownership, failure behavior, required tuning and test coverage.
23
+
24
+ For each actionable finding, give file/line, current behavior, simpler alternative,
25
+ why behavior is preserved, and any affected check. Incomplete evidence means an
26
+ unverified suggestion, not a demanded deletion. Do not request code golf, remove
27
+ required tests or refactor unchanged code merely for style. A small one-caller
28
+ interface may still serve an actual boundary or contract.
29
+
30
+ Complexity preferences are advisory unless tied to a violated requirement or a
31
+ demonstrated actionable failure. Use the existing severity and closure rules.
32
+ No complexity findings means only that this pass found none; it is not a product
33
+ PASS, review approval, a LOC score, or permission to close DONE.
34
+
35
+ ## Inspect known limits during relevant maintenance
36
+
37
+ For a maintenance/debt assignment, search source comments for `ponytail:` within
38
+ the assigned scope. Exclude vendored dependencies and generated output such as
39
+ Unity Library/Temp/Logs, node_modules and builds. Do not scan or rewrite the whole
40
+ project on every code review; ordinary review checks affected markers only.
41
+
42
+ Summarize relevant markers in the existing handoff: file/line, stated limit,
43
+ revisit trigger, upgrade path and whether current evidence reaches that limit.
44
+ Flag missing triggers or unknown measurements explicitly. No markers means no
45
+ documented Ponytail limits were found; it does not prove an absence of debt.
46
+ Do not apply fixes or create a new ledger without an assignment to do so. Required
47
+ behavior remains required even if a comment describes it as deferred.
@@ -0,0 +1,68 @@
1
+ # Engineering: understand, reuse, implement completely
2
+
3
+ Adapted from [Ponytail](NOTICE.md), copyright (c) 2026 DietrichGebert, [MIT](LICENSE).
4
+ Use only for the technical assignments selected by [the package entrypoint](README.md).
5
+
6
+ ## Preserve the contract
7
+
8
+ Keep every approved requirement, gameplay rule, edge case, tuning surface and
9
+ acceptance method. Resolve ordinary implementation choices within delegated
10
+ authority. If a missing product decision changes behavior or acceptance, identify
11
+ the ambiguity and stop that dependent work; do not silently choose a reduced
12
+ feature or redefine the criterion to match the implementation.
13
+
14
+ Never remove trust-boundary validation, data-loss protection, security,
15
+ accessibility, serialization/save compatibility or required platform behavior for
16
+ a shorter diff. Existing interfaces, engine lifecycle rules and tested project
17
+ patterns can justify abstraction even when only one current caller exists.
18
+
19
+ ## Understand the affected flow
20
+
21
+ Read the assigned contract and relevant code before choosing a solution. Trace the
22
+ trigger, state changes, outputs and failure paths. For a bug, find callers and
23
+ shared state of the function being changed, including sibling paths and relevant
24
+ tests. Fix the shared root cause where the evidence supports it. Do not broaden a
25
+ search into a whole-project audit without a concrete unresolved dependency.
26
+
27
+ A bounded repair uses the coordinator's pinned diagnosis and chosen solution.
28
+ Respect its exact files and tool budget. If that solution conflicts with the
29
+ observed code, report PARTIAL; do not expand scope or experiment outside the packet.
30
+
31
+ ## Prefer the first option that covers the full requirement
32
+
33
+ 1. Check whether the proposed *extra mechanism* is necessary. Omit speculative
34
+ scope, never an approved feature or acceptance obligation.
35
+ 2. Reuse an existing project helper, system or established pattern after checking
36
+ its actual behavior, ownership, lifecycle and supported inputs.
37
+ 3. Prefer a suitable standard-library or native Unity/platform feature over
38
+ custom infrastructure; verify platform/version and behavioral compatibility.
39
+ 4. Use an already installed dependency when it covers the need. A new dependency
40
+ follows existing project approval policy; this package grants no extra authority.
41
+ 5. Otherwise write a small, readable implementation. Add abstraction/configuration
42
+ for demonstrated variation, required tuning or an existing contract, not for an
43
+ imagined future. Do not compress readable code merely to reduce line count.
44
+
45
+ Compare complexity only among solutions that satisfy the same contract. Reuse is
46
+ not correct if it changes timing, random selection, persistence or player feedback.
47
+ Use official Unity Skills for Editor/asset operations; never hand-edit serialized
48
+ scenes, prefabs, assets or metadata as a shortcut.
49
+
50
+ ## Verify and hand off
51
+
52
+ Use the project's existing test tools and the checks required by the task. Add a
53
+ focused regression for meaningful changed logic and affected caller behavior when
54
+ needed; avoid tests that only mirror the implementation. Required Unity compilation,
55
+ EditMode/PlayMode, build, runtime and manual checks remain required. A single smoke
56
+ check, fewer lines or a passing helper exit code cannot substitute for them.
57
+ In bounded repair, the coordinator runs the checks after the worker returns.
58
+
59
+ Mark a deliberate simplification only when it has a real known limit:
60
+ `// ponytail: <limit and affected behavior>; revisit when <measurable trigger>; upgrade <path>.`
61
+ Keep required tuning controls. A marker documents a valid tradeoff within the
62
+ approved contract; it cannot authorize missing behavior or defer a failed criterion.
63
+ Mention relevant limits in the existing Risks and deviations handoff field.
64
+
65
+ Report what changed, reuse/root-cause rationale when material, executed evidence,
66
+ unverified behavior and remaining decisions. Keep the existing NCCGS handoff and
67
+ status format, including COMPLETE versus product PASS. Do not impose a three-line
68
+ limit, suppress failures or generate an extra report solely for this package.
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "nccgs-ponytail",
4
+ "version": "1.0.0",
5
+ "kind": "shared-guidance",
6
+ "entrypoint": "README.md",
7
+ "license": "MIT",
8
+ "licenseFile": "LICENSE",
9
+ "noticeFile": "NOTICE.md",
10
+ "files": ["manifest.json", "README.md", "engineering.md", "complexity-review.md", "NOTICE.md", "LICENSE"],
11
+ "upstream": {
12
+ "name": "Ponytail",
13
+ "repository": "https://github.com/DietrichGebert/ponytail",
14
+ "version": "4.10.3",
15
+ "commit": "c982cd411abb53323c4baa1baa3c2f020b8d0b08",
16
+ "copyright": "Copyright (c) 2026 DietrichGebert",
17
+ "sources": [
18
+ { "path": "LICENSE", "sha256LF": "fb1bc6909ac3ef82d5c22106e32ef682b0cff66788fa915fb9b53b15c9d2f3ab" },
19
+ { "path": "skills/ponytail/SKILL.md", "sha256LF": "1316a2f3f95741d2300b116fe0c2d81ce4a9568656ed0a62643f54aaf09957f2" },
20
+ { "path": "skills/ponytail-review/SKILL.md", "sha256LF": "7f8bfd0da3ba7c6fe0cd0de53e6f910adfef52166c6e99d7fa4de3360650b9b6" },
21
+ { "path": "skills/ponytail-debt/SKILL.md", "sha256LF": "d3611761039bdb2955e31856834feeec6ed5483a3fc64576e9a166f949a131d1" }
22
+ ]
23
+ }
24
+ }
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "defaultProfile": "astra-claude",
3
+ "defaultProfile": "claude-standalone",
4
4
  "profiles": {
5
5
  "astra-claude": {
6
6
  "models": {
7
7
  "lightweight": {
8
- "model": "claude-opus-5-5",
9
- "effort": "xhigh"
8
+ "model": "sonnet",
9
+ "effort": "medium"
10
10
  },
11
11
  "standard": {
12
12
  "model": "claude-opus-5-5",
13
- "effort": "xhigh"
13
+ "effort": "medium"
14
14
  },
15
15
  "deep": {
16
16
  "model": "claude-opus-5-5",
17
- "effort": "xhigh"
17
+ "effort": "high"
18
18
  },
19
19
  "leadership": {
20
20
  "model": "claude-opus-5-5",
21
- "effort": "xhigh"
21
+ "effort": "high"
22
22
  },
23
23
  "review": {
24
24
  "model": "fable",
@@ -29,6 +29,9 @@
29
29
  "class": "standard"
30
30
  },
31
31
  "activeAgents": [
32
+ "nccgs-fast-implementer",
33
+ "nccgs-task-scout",
34
+ "nccgs-game-designer",
32
35
  "nccgs-gameplay-programmer",
33
36
  "nccgs-engine-programmer",
34
37
  "nccgs-ui-programmer",
@@ -118,6 +121,48 @@
118
121
  },
119
122
  "session": null,
120
123
  "activeAgents": "all"
124
+ },
125
+ "claude-standalone": {
126
+ "models": {
127
+ "lightweight": {
128
+ "effort": "medium",
129
+ "model": "sonnet"
130
+ },
131
+ "standard": {
132
+ "effort": "medium",
133
+ "model": "opus"
134
+ },
135
+ "deep": {
136
+ "effort": "high",
137
+ "model": "opus"
138
+ },
139
+ "leadership": {
140
+ "effort": "high",
141
+ "model": "opus"
142
+ },
143
+ "review": {
144
+ "effort": "high",
145
+ "model": "opus"
146
+ }
147
+ },
148
+ "session": {
149
+ "class": "standard"
150
+ },
151
+ "activeAgents": [
152
+ "nccgs-fast-implementer",
153
+ "nccgs-task-scout",
154
+ "nccgs-game-designer",
155
+ "nccgs-gameplay-programmer",
156
+ "nccgs-engine-programmer",
157
+ "nccgs-ui-programmer",
158
+ "nccgs-unity-implementer",
159
+ "nccgs-unity-systems-specialist",
160
+ "nccgs-unity-ui-specialist",
161
+ "nccgs-unity-build-specialist",
162
+ "nccgs-qa-engineer",
163
+ "nccgs-verification-engineer",
164
+ "nccgs-adversarial-reviewer"
165
+ ]
121
166
  }
122
167
  },
123
168
  "contract": {
@@ -126,7 +171,7 @@
126
171
  "reviewAgent": "nccgs-adversarial-reviewer",
127
172
  "sequence": [
128
173
  "astra-plan",
129
- "opus-implementation",
174
+ "risk-routed-implementation",
130
175
  "fable-review",
131
176
  "report-to-astra",
132
177
  "astra-check",
@@ -134,6 +179,20 @@
134
179
  ],
135
180
  "requiredForAllCodeChanges": true,
136
181
  "allowInheritFallback": false,
182
+ "taskTiers": {
183
+ "FAST": {
184
+ "implementationClass": "lightweight",
185
+ "maxReviewRounds": 2
186
+ },
187
+ "STANDARD": {
188
+ "implementationClass": "standard",
189
+ "maxReviewRounds": 3
190
+ },
191
+ "CONTROLLED": {
192
+ "implementationClass": "deep",
193
+ "maxReviewRounds": 3
194
+ }
195
+ },
137
196
  "astraWorkflows": [
138
197
  "design",
139
198
  "context-pack",
@@ -162,6 +221,9 @@
162
221
  ".vs"
163
222
  ],
164
223
  "coreAgents": [
224
+ "nccgs-fast-implementer",
225
+ "nccgs-task-scout",
226
+ "nccgs-game-designer",
165
227
  "nccgs-gameplay-programmer",
166
228
  "nccgs-engine-programmer",
167
229
  "nccgs-ui-programmer",
@@ -172,5 +234,27 @@
172
234
  "nccgs-qa-engineer",
173
235
  "nccgs-verification-engineer",
174
236
  "nccgs-adversarial-reviewer"
175
- ]
237
+ ],
238
+ "executionPolicies": {
239
+ "standalone": {
240
+ "reviewAgent": "nccgs-adversarial-reviewer",
241
+ "documentsOwner": "Claude Code",
242
+ "runtime": "claude-code",
243
+ "sequence": [
244
+ "intake",
245
+ "plan",
246
+ "implementation",
247
+ "verification",
248
+ "independent-review",
249
+ "report",
250
+ "optional-external-review",
251
+ "contract-acceptance"
252
+ ],
253
+ "planningOwner": "Claude Code"
254
+ },
255
+ "compatibility": {
256
+ "contract": "astra-claude",
257
+ "runtime": "claude-code"
258
+ }
259
+ }
176
260
  }
@@ -4,7 +4,11 @@ All studio agents use this contract in addition to their role file.
4
4
 
5
5
  ## Inputs
6
6
 
7
- For the `astra-claude` profile, first read `protocols/astra-claude.md` relative to
7
+ For standalone execution, first read `protocols/standalone.md`; the coordinator
8
+ reserves every worker and owns lifecycle records. Audit/plan/review workers may
9
+ write only declared analysis artifacts. Return facts and unresolved findings.
10
+
11
+ For compatibility execution with `astra-claude`, first read `protocols/astra-claude.md` relative to
8
12
  `.claude/nccgs/`. Astra supplies planning and canonical documents. Claude produces
9
13
  implementation, evidence, and handoff reports; Fable independently reviews. Never
10
14
  impersonate Astra or infer Product Owner acceptance.
@@ -28,12 +32,57 @@ load every project document.
28
32
 
29
33
  ## Work standard
30
34
 
35
+ For design documents, document review or story readiness in standalone execution,
36
+ follow [the design lifecycle](design-lifecycle.md), including semantic coverage,
37
+ decision authority and the reviewed handoff. Schema validation alone is not review.
38
+
39
+ For technical planning, coding, code review or code-debt maintenance, read the
40
+ relevant module selected by the [shared Ponytail package](../packages/ponytail/README.md)
41
+ before acting. This applies in either execution policy. Game design, document
42
+ readiness and QA/acceptance do not use Ponytail as their procedure. For bounded
43
+ repair, the coordinator applies the package before pinning the solution; the
44
+ worker follows the supplied packet without extra package reads or diagnosis.
45
+
31
46
  Separate facts, inferences, recommendations, edits, and evidence. Follow project
32
47
  patterns before generic preferences. Use official Unity Skills for Unity operation
33
48
  mechanics. Record deviations instead of silently normalizing the project.
34
49
 
50
+ Do not add speculative scope. Use the scout only to answer a specific missing fact,
51
+ and propose another reviewer only for a distinct risk. Stop once assigned criteria
52
+ and relevant checks pass without actionable blockers. Rerun checks only when
53
+ inputs change, a failure needs resolution, or new evidence warrants it. Subjective
54
+ questions should become a playable Product Owner test. Return budget exhaustion
55
+ with evidence and unresolved findings; do not spend more rounds or infer approval.
56
+ General context/time guidance is advisory; task review-round limits are enforced
57
+ separately. A bounded repair packet additionally enforces its tool-call allowances
58
+ and deadline at each tool admission. Its chosen solution, exact source files and
59
+ handoff are the assignment. No shell, MCP, web, nested delegation or unplanned
60
+ experiments are allowed in that repair worker; return PARTIAL if diagnosis is still
61
+ needed. The coordinator owns verification after the edits. Follow the injected
62
+ packet and use remaining tool allowances to hand off before native turn exhaustion.
63
+
35
64
  ## Required handoff
36
65
 
66
+ When the reservation declares handoffPaths, write a concise draft to the assigned
67
+ path early, before extended investigation. Start it with `NCCGS-HANDOFF: PARTIAL`.
68
+ Update it as facts become available. Reserve your final few turns for the handoff;
69
+ do not spend a bounded worker invocation polling engine jobs owned by the coordinator.
70
+ Replace that line with `NCCGS-HANDOFF: COMPLETE` only after the assigned bounded
71
+ work is finished and remaining product failures are explicitly documented. A complete
72
+ negative review is valid; COMPLETE is not a product PASS or permission to close DONE.
73
+ Missing/partial handoffs fail the attempt even when native transport says completed.
74
+ Native harness turn exhaustion also makes the attempt incomplete even if the file
75
+ says COMPLETE. For every review assignment follow [review handoff](review-handoff.md):
76
+ the reviewer owns the structured verdict and explicit remaining conditions; a
77
+ conditional PASS is not permitted under the new standalone review policy.
78
+
79
+ For unfinished work, leave PARTIAL with exact next steps and return. Continuation
80
+ uses a fresh foreground reservation and fresh handoff path within the existing
81
+ remaining dispatch/purpose budget. The coordinator must carry forward the previous
82
+ attempt and its findings. Never resume a worker outside reservation tracking, edit
83
+ its captured handoff after completion, reset quota, or spend protected repair slots
84
+ on extra ordinary delivery. Stop partial if no eligible attempt remains.
85
+
37
86
  Return: **Outcome**, **Changed/produced**, **Evidence**, **Risks and deviations**,
38
87
  **Decisions needed**, and **Next owner**. Do not claim `DONE`; only the closure
39
88
  workflow evaluates final project gates.