nccgs 2.0.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.
- package/.claude/agents/nccgs-adversarial-reviewer.md +1 -1
- package/.claude/agents/nccgs-engine-programmer.md +1 -1
- package/.claude/agents/nccgs-fast-implementer.md +1 -1
- package/.claude/agents/nccgs-game-designer.md +1 -1
- package/.claude/agents/nccgs-gameplay-programmer.md +1 -1
- package/.claude/agents/nccgs-qa-engineer.md +1 -1
- package/.claude/agents/nccgs-task-scout.md +1 -1
- package/.claude/agents/nccgs-ui-programmer.md +1 -1
- package/.claude/agents/nccgs-unity-build-specialist.md +1 -1
- package/.claude/agents/nccgs-unity-implementer.md +1 -1
- package/.claude/agents/nccgs-unity-systems-specialist.md +1 -1
- package/.claude/agents/nccgs-unity-ui-specialist.md +1 -1
- package/.claude/agents/nccgs-verification-engineer.md +1 -1
- package/.claude/nccgs/MEMORY.md +9 -3
- package/.claude/nccgs/VERSION +1 -1
- package/.claude/nccgs/constitution.md +187 -176
- package/.claude/nccgs/hooks/closure-guard.mjs +2 -0
- package/.claude/nccgs/hooks/unity-transport-guard.mjs +11 -0
- package/.claude/nccgs/pipeline.json +260 -260
- package/.claude/nccgs/protocols/context-packets.md +5 -0
- package/.claude/nccgs/protocols/model-routing.md +46 -46
- package/.claude/nccgs/protocols/review-handoff.md +21 -1
- package/.claude/nccgs/protocols/shared-workflow-context.md +33 -0
- package/.claude/nccgs/protocols/unity-boundary.md +20 -0
- package/.claude/nccgs/routing.generated.md +4 -4
- package/.claude/nccgs/settings.fragment.json +84 -24
- package/.claude/nccgs/studio.json +53 -53
- package/.claude/nccgs/tools/autonomy.mjs +13 -0
- package/.claude/nccgs/tools/command-tokens.mjs +22 -0
- package/.claude/nccgs/tools/compile-policy.mjs +4 -0
- package/.claude/nccgs/tools/configure-models.mjs +4 -0
- package/.claude/nccgs/tools/hook-transport.mjs +34 -0
- package/.claude/nccgs/tools/installation-guard.mjs +55 -0
- package/.claude/nccgs/tools/native-completion.mjs +10 -1
- package/.claude/nccgs/tools/returned-handoff.mjs +11 -2
- package/.claude/nccgs/tools/shared-context-guard.mjs +60 -0
- package/.claude/nccgs/tools/shared-context.mjs +25 -0
- package/.claude/nccgs/tools/tool-guard.mjs +120 -131
- package/.claude/nccgs/tools/unity-transport.mjs +170 -0
- package/.claude/nccgs/workflow-catalog.json +4 -4
- package/CHANGELOG.md +235 -165
- package/CLAUDE.md +10 -8
- package/MEMORY.md +109 -56
- package/README.md +206 -168
- package/UPGRADING.md +130 -112
- package/VERSION +1 -1
- package/docs/ARCHITECTURE.md +131 -131
- package/docs/ASSET-PRODUCTION-GRAPHIFY-PLAN.md +230 -0
- package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +117 -87
- package/docs/NCCGS-1.5.md +237 -237
- package/docs/PROJECT-POLICY.md +94 -94
- package/docs/RELEASE-STATUS.md +32 -7
- package/docs/UNINSTALL.md +134 -0
- package/docs/WFK17-HOOK-REPAIR.md +71 -0
- package/docs/WORKFLOWS.md +85 -85
- package/package.json +1 -1
- package/scaffold/.nccgs/project.yaml +109 -108
- package/scripts/benchmark-v15.mjs +173 -173
- package/scripts/cli.mjs +11 -2
- package/scripts/doctor.mjs +261 -261
- package/scripts/install.mjs +530 -515
- package/scripts/recover-session.mjs +89 -0
- package/scripts/run.mjs +22 -9
- package/scripts/supervise.mjs +4 -0
- package/scripts/uninstall.mjs +292 -0
- package/scripts/validate.mjs +285 -278
- package/tests/autonomy.test.mjs +126 -113
- package/tests/design-readiness.test.mjs +199 -199
- package/tests/fixtures/compiler-shutdown.cs +67 -64
- package/tests/fixtures/native-provider.mjs +61 -0
- package/tests/framework.test.mjs +740 -740
- package/tests/hook-repair.test.mjs +106 -0
- package/tests/lifecycle-v15.test.mjs +346 -300
- package/tests/native-completion-notices.test.mjs +181 -0
- package/tests/phase1.test.mjs +427 -416
- package/tests/phase2.test.mjs +250 -250
- package/tests/policy-v15.test.mjs +234 -234
- package/tests/returned-handoff-notices.test.mjs +170 -0
- package/tests/runtime-v15.test.mjs +1197 -1191
- package/tests/task-slices.test.mjs +285 -285
- package/tests/uninstall.test.mjs +477 -0
- package/tests/unity-transport.test.mjs +348 -0
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"standard": "opus",
|
|
36
36
|
"deep": "opus",
|
|
37
37
|
"leadership": "opus",
|
|
38
|
-
"review": "
|
|
38
|
+
"review": "fable"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"orchestration": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"modelClass": "lightweight",
|
|
52
52
|
"maxTurns": 12,
|
|
53
53
|
"defaultModel": "sonnet",
|
|
54
|
-
"defaultEffort": "
|
|
54
|
+
"defaultEffort": "high"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"name": "nccgs-task-scout",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"modelClass": "lightweight",
|
|
60
60
|
"maxTurns": 10,
|
|
61
61
|
"defaultModel": "sonnet",
|
|
62
|
-
"defaultEffort": "
|
|
62
|
+
"defaultEffort": "high"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"name": "nccgs-creative-director",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"modelClass": "leadership",
|
|
68
68
|
"defaultModel": "opus",
|
|
69
69
|
"maxTurns": 24,
|
|
70
|
-
"defaultEffort": "
|
|
70
|
+
"defaultEffort": "xhigh"
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"name": "nccgs-technical-director",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"modelClass": "leadership",
|
|
76
76
|
"defaultModel": "opus",
|
|
77
77
|
"maxTurns": 24,
|
|
78
|
-
"defaultEffort": "
|
|
78
|
+
"defaultEffort": "xhigh"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "nccgs-producer",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"modelClass": "leadership",
|
|
84
84
|
"defaultModel": "opus",
|
|
85
85
|
"maxTurns": 20,
|
|
86
|
-
"defaultEffort": "
|
|
86
|
+
"defaultEffort": "xhigh"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"name": "nccgs-game-design-lead",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"modelClass": "standard",
|
|
92
92
|
"defaultModel": "opus",
|
|
93
93
|
"maxTurns": 20,
|
|
94
|
-
"defaultEffort": "
|
|
94
|
+
"defaultEffort": "high"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"name": "nccgs-programming-lead",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"modelClass": "standard",
|
|
100
100
|
"defaultModel": "opus",
|
|
101
101
|
"maxTurns": 20,
|
|
102
|
-
"defaultEffort": "
|
|
102
|
+
"defaultEffort": "high"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"name": "nccgs-art-direction-lead",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"modelClass": "standard",
|
|
108
108
|
"defaultModel": "opus",
|
|
109
109
|
"maxTurns": 18,
|
|
110
|
-
"defaultEffort": "
|
|
110
|
+
"defaultEffort": "high"
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
"name": "nccgs-audio-direction-lead",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"modelClass": "standard",
|
|
116
116
|
"defaultModel": "opus",
|
|
117
117
|
"maxTurns": 18,
|
|
118
|
-
"defaultEffort": "
|
|
118
|
+
"defaultEffort": "high"
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"name": "nccgs-narrative-lead",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"modelClass": "standard",
|
|
124
124
|
"defaultModel": "opus",
|
|
125
125
|
"maxTurns": 20,
|
|
126
|
-
"defaultEffort": "
|
|
126
|
+
"defaultEffort": "high"
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"name": "nccgs-qa-lead",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"modelClass": "standard",
|
|
132
132
|
"defaultModel": "opus",
|
|
133
133
|
"maxTurns": 20,
|
|
134
|
-
"defaultEffort": "
|
|
134
|
+
"defaultEffort": "high"
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
"name": "nccgs-release-lead",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"modelClass": "standard",
|
|
140
140
|
"defaultModel": "opus",
|
|
141
141
|
"maxTurns": 20,
|
|
142
|
-
"defaultEffort": "
|
|
142
|
+
"defaultEffort": "high"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"name": "nccgs-localization-lead",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"modelClass": "standard",
|
|
148
148
|
"defaultModel": "opus",
|
|
149
149
|
"maxTurns": 18,
|
|
150
|
-
"defaultEffort": "
|
|
150
|
+
"defaultEffort": "high"
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
"name": "nccgs-game-designer",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"modelClass": "standard",
|
|
156
156
|
"defaultModel": "opus",
|
|
157
157
|
"maxTurns": 48,
|
|
158
|
-
"defaultEffort": "
|
|
158
|
+
"defaultEffort": "high"
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"name": "nccgs-systems-designer",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"modelClass": "standard",
|
|
164
164
|
"defaultModel": "opus",
|
|
165
165
|
"maxTurns": 18,
|
|
166
|
-
"defaultEffort": "
|
|
166
|
+
"defaultEffort": "high"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
"name": "nccgs-level-designer",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"modelClass": "standard",
|
|
172
172
|
"defaultModel": "opus",
|
|
173
173
|
"maxTurns": 18,
|
|
174
|
-
"defaultEffort": "
|
|
174
|
+
"defaultEffort": "high"
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"name": "nccgs-economy-designer",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"modelClass": "standard",
|
|
180
180
|
"defaultModel": "opus",
|
|
181
181
|
"maxTurns": 18,
|
|
182
|
-
"defaultEffort": "
|
|
182
|
+
"defaultEffort": "high"
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
"name": "nccgs-ux-designer",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"modelClass": "standard",
|
|
188
188
|
"defaultModel": "opus",
|
|
189
189
|
"maxTurns": 18,
|
|
190
|
-
"defaultEffort": "
|
|
190
|
+
"defaultEffort": "high"
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
"name": "nccgs-accessibility-specialist",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"modelClass": "standard",
|
|
196
196
|
"defaultModel": "opus",
|
|
197
197
|
"maxTurns": 18,
|
|
198
|
-
"defaultEffort": "
|
|
198
|
+
"defaultEffort": "high"
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
"name": "nccgs-prototyper",
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"modelClass": "standard",
|
|
204
204
|
"defaultModel": "opus",
|
|
205
205
|
"maxTurns": 18,
|
|
206
|
-
"defaultEffort": "
|
|
206
|
+
"defaultEffort": "high"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
"name": "nccgs-technical-architect",
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
"modelClass": "deep",
|
|
212
212
|
"defaultModel": "opus",
|
|
213
213
|
"maxTurns": 22,
|
|
214
|
-
"defaultEffort": "
|
|
214
|
+
"defaultEffort": "xhigh"
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
217
|
"name": "nccgs-gameplay-programmer",
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
"modelClass": "standard",
|
|
220
220
|
"defaultModel": "opus",
|
|
221
221
|
"maxTurns": 120,
|
|
222
|
-
"defaultEffort": "
|
|
222
|
+
"defaultEffort": "high"
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
"name": "nccgs-engine-programmer",
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"modelClass": "standard",
|
|
228
228
|
"defaultModel": "opus",
|
|
229
229
|
"maxTurns": 22,
|
|
230
|
-
"defaultEffort": "
|
|
230
|
+
"defaultEffort": "high"
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"name": "nccgs-ai-programmer",
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
"modelClass": "standard",
|
|
236
236
|
"defaultModel": "opus",
|
|
237
237
|
"maxTurns": 22,
|
|
238
|
-
"defaultEffort": "
|
|
238
|
+
"defaultEffort": "high"
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
"name": "nccgs-network-programmer",
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"modelClass": "standard",
|
|
244
244
|
"defaultModel": "opus",
|
|
245
245
|
"maxTurns": 24,
|
|
246
|
-
"defaultEffort": "
|
|
246
|
+
"defaultEffort": "high"
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
"name": "nccgs-tools-programmer",
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
"modelClass": "standard",
|
|
252
252
|
"defaultModel": "opus",
|
|
253
253
|
"maxTurns": 20,
|
|
254
|
-
"defaultEffort": "
|
|
254
|
+
"defaultEffort": "high"
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
"name": "nccgs-ui-programmer",
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"modelClass": "standard",
|
|
260
260
|
"defaultModel": "opus",
|
|
261
261
|
"maxTurns": 22,
|
|
262
|
-
"defaultEffort": "
|
|
262
|
+
"defaultEffort": "high"
|
|
263
263
|
},
|
|
264
264
|
{
|
|
265
265
|
"name": "nccgs-security-engineer",
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
"modelClass": "standard",
|
|
268
268
|
"defaultModel": "opus",
|
|
269
269
|
"maxTurns": 20,
|
|
270
|
-
"defaultEffort": "
|
|
270
|
+
"defaultEffort": "high"
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
"name": "nccgs-performance-analyst",
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
"modelClass": "standard",
|
|
276
276
|
"defaultModel": "opus",
|
|
277
277
|
"maxTurns": 20,
|
|
278
|
-
"defaultEffort": "
|
|
278
|
+
"defaultEffort": "high"
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
"name": "nccgs-technical-artist",
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"modelClass": "standard",
|
|
284
284
|
"defaultModel": "opus",
|
|
285
285
|
"maxTurns": 20,
|
|
286
|
-
"defaultEffort": "
|
|
286
|
+
"defaultEffort": "high"
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
289
|
"name": "nccgs-sound-designer",
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
"modelClass": "standard",
|
|
292
292
|
"defaultModel": "opus",
|
|
293
293
|
"maxTurns": 18,
|
|
294
|
-
"defaultEffort": "
|
|
294
|
+
"defaultEffort": "high"
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
297
|
"name": "nccgs-writer",
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
"modelClass": "standard",
|
|
300
300
|
"defaultModel": "opus",
|
|
301
301
|
"maxTurns": 18,
|
|
302
|
-
"defaultEffort": "
|
|
302
|
+
"defaultEffort": "high"
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
"name": "nccgs-world-builder",
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
"modelClass": "standard",
|
|
308
308
|
"defaultModel": "opus",
|
|
309
309
|
"maxTurns": 18,
|
|
310
|
-
"defaultEffort": "
|
|
310
|
+
"defaultEffort": "high"
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
313
|
"name": "nccgs-analytics-engineer",
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
"modelClass": "standard",
|
|
316
316
|
"defaultModel": "opus",
|
|
317
317
|
"maxTurns": 18,
|
|
318
|
-
"defaultEffort": "
|
|
318
|
+
"defaultEffort": "high"
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
"name": "nccgs-live-ops-designer",
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
"modelClass": "standard",
|
|
324
324
|
"defaultModel": "opus",
|
|
325
325
|
"maxTurns": 18,
|
|
326
|
-
"defaultEffort": "
|
|
326
|
+
"defaultEffort": "high"
|
|
327
327
|
},
|
|
328
328
|
{
|
|
329
329
|
"name": "nccgs-qa-engineer",
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
"modelClass": "standard",
|
|
332
332
|
"defaultModel": "opus",
|
|
333
333
|
"maxTurns": 22,
|
|
334
|
-
"defaultEffort": "
|
|
334
|
+
"defaultEffort": "high"
|
|
335
335
|
},
|
|
336
336
|
{
|
|
337
337
|
"name": "nccgs-verification-engineer",
|
|
@@ -339,13 +339,13 @@
|
|
|
339
339
|
"modelClass": "standard",
|
|
340
340
|
"defaultModel": "opus",
|
|
341
341
|
"maxTurns": 22,
|
|
342
|
-
"defaultEffort": "
|
|
342
|
+
"defaultEffort": "high"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"name": "nccgs-adversarial-reviewer",
|
|
346
346
|
"department": "quality",
|
|
347
347
|
"modelClass": "review",
|
|
348
|
-
"defaultModel": "
|
|
348
|
+
"defaultModel": "fable",
|
|
349
349
|
"maxTurns": 200,
|
|
350
350
|
"defaultEffort": "high"
|
|
351
351
|
},
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
"modelClass": "lightweight",
|
|
356
356
|
"defaultModel": "sonnet",
|
|
357
357
|
"maxTurns": 14,
|
|
358
|
-
"defaultEffort": "
|
|
358
|
+
"defaultEffort": "high"
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
"name": "nccgs-release-engineer",
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
"modelClass": "standard",
|
|
364
364
|
"defaultModel": "opus",
|
|
365
365
|
"maxTurns": 24,
|
|
366
|
-
"defaultEffort": "
|
|
366
|
+
"defaultEffort": "high"
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
369
|
"name": "nccgs-unity-implementer",
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"modelClass": "deep",
|
|
372
372
|
"defaultModel": "opus",
|
|
373
373
|
"maxTurns": 120,
|
|
374
|
-
"defaultEffort": "
|
|
374
|
+
"defaultEffort": "xhigh"
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
"name": "nccgs-unity-systems-specialist",
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
"modelClass": "standard",
|
|
380
380
|
"defaultModel": "opus",
|
|
381
381
|
"maxTurns": 22,
|
|
382
|
-
"defaultEffort": "
|
|
382
|
+
"defaultEffort": "high"
|
|
383
383
|
},
|
|
384
384
|
{
|
|
385
385
|
"name": "nccgs-unity-ui-specialist",
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
"modelClass": "standard",
|
|
388
388
|
"defaultModel": "opus",
|
|
389
389
|
"maxTurns": 22,
|
|
390
|
-
"defaultEffort": "
|
|
390
|
+
"defaultEffort": "high"
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
"name": "nccgs-unity-rendering-specialist",
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
"modelClass": "standard",
|
|
396
396
|
"defaultModel": "opus",
|
|
397
397
|
"maxTurns": 22,
|
|
398
|
-
"defaultEffort": "
|
|
398
|
+
"defaultEffort": "high"
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
"name": "nccgs-unity-content-specialist",
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
"modelClass": "standard",
|
|
404
404
|
"defaultModel": "opus",
|
|
405
405
|
"maxTurns": 22,
|
|
406
|
-
"defaultEffort": "
|
|
406
|
+
"defaultEffort": "high"
|
|
407
407
|
},
|
|
408
408
|
{
|
|
409
409
|
"name": "nccgs-unity-build-specialist",
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
"modelClass": "standard",
|
|
412
412
|
"defaultModel": "opus",
|
|
413
413
|
"maxTurns": 24,
|
|
414
|
-
"defaultEffort": "
|
|
414
|
+
"defaultEffort": "high"
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
417
|
"name": "nccgs-production-coordinator",
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
"modelClass": "standard",
|
|
420
420
|
"defaultModel": "opus",
|
|
421
421
|
"maxTurns": 18,
|
|
422
|
-
"defaultEffort": "
|
|
422
|
+
"defaultEffort": "high"
|
|
423
423
|
}
|
|
424
424
|
],
|
|
425
425
|
"effortProfiles": {
|
|
@@ -452,10 +452,10 @@
|
|
|
452
452
|
"review": null
|
|
453
453
|
},
|
|
454
454
|
"claude-standalone": {
|
|
455
|
-
"lightweight": "
|
|
456
|
-
"standard": "
|
|
457
|
-
"deep": "
|
|
458
|
-
"leadership": "
|
|
455
|
+
"lightweight": "high",
|
|
456
|
+
"standard": "high",
|
|
457
|
+
"deep": "xhigh",
|
|
458
|
+
"leadership": "xhigh",
|
|
459
459
|
"review": "high"
|
|
460
460
|
}
|
|
461
461
|
},
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
},
|
|
467
467
|
"claude-standalone": {
|
|
468
468
|
"model": "opus",
|
|
469
|
-
"effortLevel": "
|
|
469
|
+
"effortLevel": "high"
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
}
|
|
@@ -10,6 +10,19 @@ export function autonomyPolicy(project) {
|
|
|
10
10
|
return { schemaVersion: 1, mode: value.mode };
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
// Fixed framework-owned launch prefix. It has exactly one fixed value and is the
|
|
14
|
+
// only argv permitted before strict MCP isolation (see unity-transport.mjs).
|
|
15
|
+
export function permissionModeArgs(mode) {
|
|
16
|
+
if (!["full", "guarded"].includes(mode)) throw new Error("Invalid NCCGS autonomy policy");
|
|
17
|
+
return ["--permission-mode", mode === "full" ? "bypassPermissions" : "default"];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// NCCGS owns session permission, root, settings and hook activation. --bare and
|
|
21
|
+
// --safe-mode skip project hooks; --restricted ignores project settings and hooks
|
|
22
|
+
// (installed CLI 2.1.316 help). The installed CLI documents no short aliases.
|
|
23
|
+
// Retained recovery reuses this policy through unity-transport.mjs.
|
|
24
|
+
export const conflictingLaunchOption = /^(?:--permission-mode|--dangerously-skip-permissions|--allow-dangerously-skip-permissions|--settings|--setting-sources|--worktree|--agent|--bare|--safe-mode|--restricted)(?:=|$)|^-w$/;
|
|
25
|
+
|
|
13
26
|
// Session markers are workflow context, not a sandbox against arbitrary code.
|
|
14
27
|
// Project configuration alone cannot activate Claude's native permission mode.
|
|
15
28
|
export function fullTaskAutonomy(project, env = process.env) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function commandTokens(command) {
|
|
2
|
+
if (typeof command !== "string") return null;
|
|
3
|
+
// Parse data quotes without interpreting a shell. Punctuation inside report
|
|
4
|
+
// text is data; composition/redirection/expansion outside quotes stays blocked.
|
|
5
|
+
const tokens = []; let token = "", quote = null, started = false;
|
|
6
|
+
for (let i = 0; i < command.length; i++) {
|
|
7
|
+
const c = command[i];
|
|
8
|
+
if (quote) {
|
|
9
|
+
if (c === quote) { quote = null; continue; }
|
|
10
|
+
if (quote === '"' && /[`$]/.test(c)) return null;
|
|
11
|
+
if (quote === '"' && c === "\\" && ['"', "\\"].includes(command[i + 1])) { token += command[++i]; continue; }
|
|
12
|
+
token += c; continue;
|
|
13
|
+
}
|
|
14
|
+
if (/[;&|<>`$\r\n]/.test(c)) return null;
|
|
15
|
+
if (c === '"' || c === "'") { quote = c; started = true; continue; }
|
|
16
|
+
if (/\s/.test(c)) { if (started) { tokens.push(token); token = ""; started = false; } continue; }
|
|
17
|
+
token += c; started = true;
|
|
18
|
+
}
|
|
19
|
+
if (quote) return null;
|
|
20
|
+
if (started) tokens.push(token);
|
|
21
|
+
return tokens;
|
|
22
|
+
}
|
|
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { json, loadPipeline } from "./policy.mjs";
|
|
5
|
+
import { acquireInstallationLease } from "./installation-guard.mjs";
|
|
5
6
|
|
|
6
7
|
export function renderAgent(template, route) {
|
|
7
8
|
const match = template.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
@@ -98,6 +99,8 @@ export function generated(project) {
|
|
|
98
99
|
return outputs;
|
|
99
100
|
}
|
|
100
101
|
export function compile(project, write = false) {
|
|
102
|
+
const lease = write ? acquireInstallationLease(project, "nccgs-policy") : null;
|
|
103
|
+
try {
|
|
101
104
|
const differences = [];
|
|
102
105
|
for (const [relative, content] of generated(project)) {
|
|
103
106
|
const file = path.join(project, relative);
|
|
@@ -106,6 +109,7 @@ export function compile(project, write = false) {
|
|
|
106
109
|
if (write) { fs.mkdirSync(path.dirname(file), { recursive: true }); fs.writeFileSync(file, content, "utf8"); }
|
|
107
110
|
}
|
|
108
111
|
return differences;
|
|
112
|
+
} finally { lease?.release(); }
|
|
109
113
|
}
|
|
110
114
|
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
111
115
|
const project = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");
|
|
@@ -4,6 +4,7 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
import { atomicJson, hash, json, profilePolicy, contained, resolveExecution } from "./policy.mjs";
|
|
5
5
|
import { renderAgent } from "./compile-policy.mjs";
|
|
6
6
|
import { fingerprintFile } from "./integrity.mjs";
|
|
7
|
+
import { acquireInstallationLease } from "./installation-guard.mjs";
|
|
7
8
|
|
|
8
9
|
const args = process.argv.slice(2);
|
|
9
10
|
const values = flag => args.flatMap((arg, index) => {
|
|
@@ -12,6 +13,8 @@ const values = flag => args.flatMap((arg, index) => {
|
|
|
12
13
|
return [args[index + 1]];
|
|
13
14
|
});
|
|
14
15
|
const project = path.resolve(values("--project")[0] || path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../.."));
|
|
16
|
+
const lease = acquireInstallationLease(project, "nccgs-agents");
|
|
17
|
+
try {
|
|
15
18
|
const explicit = values("--profile")[0];
|
|
16
19
|
const { name, profile, pipeline } = profilePolicy(project, explicit);
|
|
17
20
|
// Profile changes never change the execution policy or pending task obligations.
|
|
@@ -90,3 +93,4 @@ console.log(`NCCGS model profile '${name}' configured; ${writes.length} agent fi
|
|
|
90
93
|
console.log("Model configuration records requested aliases/effort only. Runtime resolution requires Claude Code observation; execution policy and existing task approvals are unchanged.");
|
|
91
94
|
if (legacyPolicy && !policyPattern.test(oldPolicy)) console.log("Legacy project policy preserved; model selection is stored in activation/install metadata until explicit policy migration.");
|
|
92
95
|
for (const warning of warnings) console.warn(warning);
|
|
96
|
+
} finally { lease.release(); }
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Exact managed-hook identity across legacy shell and direct-executable forms.
|
|
2
|
+
// Never identify a hook by the executable alone: many custom hooks use node.
|
|
3
|
+
const scriptPattern = /^(?:\$\{CLAUDE_PROJECT_DIR\}\/)?(\.claude\/nccgs\/hooks\/[\w-]+\.mjs)$/;
|
|
4
|
+
const phases = new Set(['pre', 'stop', 'start', 'failure']);
|
|
5
|
+
|
|
6
|
+
export function managedHookKey(hook) {
|
|
7
|
+
if (!hook || hook.type !== 'command' || typeof hook.command !== 'string') return null;
|
|
8
|
+
let script, args;
|
|
9
|
+
if (Object.hasOwn(hook, 'args')) {
|
|
10
|
+
if (hook.command !== 'node' || !Array.isArray(hook.args) || !hook.args.every(x => typeof x === 'string')) return null;
|
|
11
|
+
[script, ...args] = hook.args;
|
|
12
|
+
} else {
|
|
13
|
+
const match = hook.command.match(/^node (?:"([^"\r\n]+)"|([^\s"'`$;&|<>]+))(?: (pre|stop|start|failure))?$/);
|
|
14
|
+
if (!match) return null;
|
|
15
|
+
script = match[1] ?? match[2];
|
|
16
|
+
args = match[3] ? [match[3]] : [];
|
|
17
|
+
}
|
|
18
|
+
const relative = typeof script === 'string' ? script.match(scriptPattern)?.[1] : null;
|
|
19
|
+
if (!relative || args.length > 1 || args.some(x => !phases.has(x))) return null;
|
|
20
|
+
return JSON.stringify([relative, ...args]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function requiredHookPresent(actual, expected) {
|
|
24
|
+
return actual && actual.type === expected.type && actual.command === expected.command
|
|
25
|
+
&& JSON.stringify(actual.args) === JSON.stringify(expected.args)
|
|
26
|
+
&& actual.onFailure === expected.onFailure
|
|
27
|
+
&& actual.if === undefined && actual.once !== true && actual.async !== true
|
|
28
|
+
&& (actual.timeout === undefined || actual.timeout >= expected.timeout);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function referencesNccgsHook(hook) {
|
|
32
|
+
return [hook?.command, ...(Array.isArray(hook?.args) ? hook.args : [])]
|
|
33
|
+
.some(x => typeof x === 'string' && /(?:^|[\\/])\.claude[\\/]nccgs[\\/]/i.test(x));
|
|
34
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import crypto from "node:crypto";
|
|
3
|
+
import { containedPath } from "./paths.mjs";
|
|
4
|
+
import { acquireLock, ownerState } from "./process-lock.mjs";
|
|
5
|
+
|
|
6
|
+
const unverifiedAdmission = cause => new Error("NCCGS installation admission is busy or unverified; the lock may be changing or unreadable. Retry after other work finishes; inspect permissions or retained lock records if it persists.", { cause });
|
|
7
|
+
|
|
8
|
+
export function assertInstallationAvailable(project, ownToken = null) {
|
|
9
|
+
for (const relative of [".nccgs/uninstall.lock", ".nccgs/uninstall.lock.recovery"]) {
|
|
10
|
+
const lock = containedPath(project, relative);
|
|
11
|
+
if (fs.existsSync(lock)) {
|
|
12
|
+
let record;
|
|
13
|
+
try {
|
|
14
|
+
record = JSON.parse(fs.readFileSync(lock, "utf8"));
|
|
15
|
+
if (!record || typeof record !== "object" || Array.isArray(record)) throw new Error("Invalid lock record");
|
|
16
|
+
} catch (error) { throw unverifiedAdmission(error); }
|
|
17
|
+
if (relative === ".nccgs/uninstall.lock" && ownToken && record.token === ownToken) continue;
|
|
18
|
+
if (ownerState(record) !== "dead")
|
|
19
|
+
throw new Error(record.operation === "installation-admission"
|
|
20
|
+
? "NCCGS installation admission is busy or unverified; another launch or configuration is being admitted. Retry after it finishes."
|
|
21
|
+
: "NCCGS uninstall is active or unverified; wait for it to finish before starting other work.");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const directory = containedPath(project, ".nccgs/uninstall");
|
|
25
|
+
if (!fs.existsSync(directory)) return;
|
|
26
|
+
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
27
|
+
const folder = containedPath(project, `.nccgs/uninstall/${entry.name}`);
|
|
28
|
+
if (!fs.statSync(folder).isDirectory()) continue;
|
|
29
|
+
const file = containedPath(project, `.nccgs/uninstall/${entry.name}/manifest.json`);
|
|
30
|
+
if (!fs.existsSync(file)) continue;
|
|
31
|
+
const manifest = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
32
|
+
if (!["completed", "restored", "cancelled"].includes(manifest.status))
|
|
33
|
+
throw new Error(`Interrupted uninstall ${entry.name}; inspect its backup and use uninstall --rollback before starting other work.`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Serialize admission with uninstall/rollback. No new cooperating writer can
|
|
38
|
+
// leave a transient lease during apply/restore; the session lease then protects
|
|
39
|
+
// the entire operation after this short gate is released. Nested configurators
|
|
40
|
+
// may register their own leases without holding the gate for their lifetime.
|
|
41
|
+
export function acquireInstallationLease(project, operation) {
|
|
42
|
+
assertInstallationAvailable(project);
|
|
43
|
+
let gate;
|
|
44
|
+
try { gate = acquireLock(containedPath(project, ".nccgs/uninstall.lock"), { operation: "installation-admission" }); }
|
|
45
|
+
catch (error) {
|
|
46
|
+
// A competing admission may have arrived after the first check. Explain the
|
|
47
|
+
// current holder without retrying, taking over, or changing its lease.
|
|
48
|
+
assertInstallationAvailable(project);
|
|
49
|
+
throw unverifiedAdmission(error);
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
assertInstallationAvailable(project, gate.record.token);
|
|
53
|
+
return acquireLock(containedPath(project, `.nccgs/sessions/${crypto.randomUUID()}.lock`), { operation });
|
|
54
|
+
} finally { gate.release(); }
|
|
55
|
+
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { hash } from "./policy.mjs";
|
|
2
2
|
|
|
3
|
+
// This provider-designated block is an inventory, not an incomplete-run notice.
|
|
4
|
+
// Match the entire block and a bounded identifier list; unknown mixed text must
|
|
5
|
+
// continue to fail closed. Never recognize this marker in model-authored prose.
|
|
6
|
+
const toolSummary = /^\s*<tools-used-before-summary>[A-Za-z][A-Za-z0-9_.:-]*(?:\s*,\s*[A-Za-z][A-Za-z0-9_.:-]*)*<\/tools-used-before-summary>\s*$/;
|
|
7
|
+
const informationalNote = block => block?.type === "text"
|
|
8
|
+
&& typeof block.text === "string" && block.text.length <= 4096
|
|
9
|
+
&& toolSummary.test(block.text);
|
|
10
|
+
|
|
3
11
|
// The native harness reports an ended invocation as "completed" even when its
|
|
4
12
|
// worker hit maxTurns. Inspect only harness-designated blocks, never the model's
|
|
5
13
|
// prose. Store a diagnosis/hash, not prompts or arbitrary tool-result content.
|
|
@@ -15,7 +23,8 @@ export function nativeCompletion(response) {
|
|
|
15
23
|
const limit = noteText.match(/\bthis agent stopped at its (\d+)-turn limit before finishing\b/i);
|
|
16
24
|
// A previously unseen harness advisory needs reconciliation; it cannot silently
|
|
17
25
|
// certify completion. Text outside these provider-designated blocks is ignored.
|
|
18
|
-
const reason = limit ? "turn-limit"
|
|
26
|
+
const reason = limit ? "turn-limit"
|
|
27
|
+
: notes.length && !notes.every(informationalNote) ? "unrecognized-harness-notice" : null;
|
|
19
28
|
return { reportedStatus, status: reason ? "failed" : reportedStatus, reason,
|
|
20
29
|
turnLimit: limit ? Number(limit[1]) : null, noteHash: notes.length ? hash(noteText) : null };
|
|
21
30
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { artifact, contained } from "./policy.mjs";
|
|
4
|
+
import { nativeCompletion } from "./native-completion.mjs";
|
|
4
5
|
|
|
5
6
|
// Opt-in transport for read-only workers whose native client returns reports as
|
|
6
7
|
// text. Copy the sole model text block verbatim; never synthesize a verdict,
|
|
@@ -15,9 +16,17 @@ export function captureReturnedHandoff(project, dispatch, input, completion, cur
|
|
|
15
16
|
|| !dispatch.agentId || dispatch.agentId !== response?.agentId
|
|
16
17
|
|| dispatch.agent !== input.tool_input?.subagent_type || dispatch.snapshot !== currentSnapshot)
|
|
17
18
|
return reject("identity-or-snapshot-mismatch");
|
|
18
|
-
|
|
19
|
+
// Preserve an upstream failure and independently classify the actual response.
|
|
20
|
+
// A caller-supplied completion cannot certify unknown or incomplete metadata.
|
|
21
|
+
if (completion?.status !== "completed" || completion.reason)
|
|
19
22
|
return reject("native-incomplete");
|
|
20
|
-
const
|
|
23
|
+
const actual = nativeCompletion(response);
|
|
24
|
+
if (actual.status !== "completed" || actual.reason) return reject("native-incomplete");
|
|
25
|
+
// Classification validates every designated note and both counts. Strip only
|
|
26
|
+
// those blocks; model text, including lookalike tags, remains byte-for-byte.
|
|
27
|
+
const all = response.content;
|
|
28
|
+
const leading = response.harnessNoteCount ?? 0, tail = response.harnessTailCount ?? 0;
|
|
29
|
+
const blocks = Array.isArray(all) ? all.slice(leading, all.length - tail) : null;
|
|
21
30
|
if (!Array.isArray(blocks) || blocks.length !== 1 || blocks[0]?.type !== "text"
|
|
22
31
|
|| typeof blocks[0].text !== "string" || !blocks[0].text.trim()
|
|
23
32
|
|| Buffer.byteLength(blocks[0].text, "utf8") > 262144)
|