cabloy 5.1.190 → 5.1.192
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/.cabloy-version +1 -1
- package/.github/workflows/agent-governance.yml +39 -0
- package/.github/workflows/docs-pages.yml +1 -0
- package/.gitignore +3 -0
- package/CHANGELOG.md +17 -0
- package/README.md +2 -2
- package/package.json +11 -5
- package/repo-agent-governance/adapters/claude/contract-loop-gate.ts +199 -0
- package/{.claude → repo-agent-governance}/commands/release.md +20 -20
- package/repo-agent-governance/managed-assets.json +887 -0
- package/repo-agent-governance/manifest.json +56 -0
- package/{CLAUDE.md → repo-agent-governance/policies/repository.md} +4 -2
- package/repo-agent-governance/scripts/governance.mjs +570 -0
- package/repo-agent-governance/scripts/pack-check.mjs +43 -0
- package/{.claude → repo-agent-governance}/skills/cabloy-contract-loop/references/contract-loop-map.md +4 -4
- package/{.claude → repo-agent-governance}/skills/cabloy-master-detail/SKILL.md +1 -1
- package/{.claude → repo-agent-governance}/skills/cabloy-module-removal/SKILL.md +1 -1
- package/{.claude → repo-agent-governance}/skills/cabloy-spec-execution/SKILL.md +1 -1
- package/{.claude → repo-agent-governance}/skills/cabloy-spec-execution/references/execution-protocol.md +8 -8
- package/{.claude → repo-agent-governance}/skills/cabloy-spec-execution/references/status-and-evidence.md +9 -9
- package/{.claude → repo-agent-governance}/skills/cabloy-spec-generation/SKILL.md +2 -2
- package/{.claude → repo-agent-governance}/skills/cabloy-spec-generation/references/repo-aware-discovery.md +7 -7
- package/{.claude → repo-agent-governance}/skills/cabloy-spec-generation/references/repo-specs-document-set.md +30 -30
- package/{.claude → repo-agent-governance}/skills/cabloy-spec-generation/references/traceability-and-status-rules.md +9 -9
- package/{.claude → repo-agent-governance}/skills/cabloy-workflow/SKILL.md +7 -8
- package/{.claude → repo-agent-governance}/skills/cabloy-worktree-environment/SKILL.md +9 -9
- package/{.claude → repo-agent-governance}/skills/cabloy-zova-source-reading/SKILL.md +5 -5
- package/repo-agent-governance/tests/governance.test.mjs +295 -0
- package/repo-agent-governance/tools/contract-loop/check.mjs +71 -0
- package/repo-agent-governance/tools/contract-loop/core.mjs +189 -0
- package/repo-agent-governance/tools/spec-charts/generate-implementation-charts.mjs +858 -0
- package/{.claude/skills/cabloy-spec-generation/scripts → repo-agent-governance/tools/spec-charts}/generate-implementation-charts.test.mjs +95 -20
- package/repo-docs/.vitepress/config.mjs +2 -0
- package/repo-docs/ai/agent-governance.md +80 -0
- package/repo-docs/ai/cli-to-skill-map.md +3 -3
- package/repo-docs/ai/docs-skills-rules-mapping.md +27 -26
- package/repo-docs/ai/edition-consistency-checklist.md +8 -6
- package/repo-docs/ai/future-skill-roadmap.md +2 -2
- package/repo-docs/ai/introduction.md +7 -6
- package/repo-docs/ai/repo-guidance.md +3 -2
- package/repo-docs/ai/rules-and-config.md +23 -15
- package/repo-docs/ai/skills.md +7 -7
- package/repo-docs/ai/verification.md +2 -1
- package/repo-docs/demo.md +12 -0
- package/repo-docs/fullstack/contract-loop-playbook.md +1 -1
- package/repo-docs/fullstack/quickstart.md +1 -1
- package/repo-docs/index.md +3 -0
- package/repo-docs/reference/package-map.md +3 -2
- package/repo-docs/reference/repo-scripts.md +17 -2
- package/scripts/bootstrapAgentGovernance.mjs +81 -0
- package/scripts/init.ts +1 -0
- package/scripts/release.ts +15 -0
- package/scripts/upgrade.ts +66 -7
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +3 -3
- package/zova/src/suite/a-home/modules/home-passport/src/model/passport.ts +2 -7
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/bean/tableCell.actionOperationsRow.tsx +19 -13
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx +11 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockToolbarBulk/controller.tsx +7 -4
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/formFieldDetails/controller.tsx +14 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/lib/detailsPermissions.ts +65 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/lib/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/lib/utils.ts +3 -3
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/details.ts +6 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/test/lib/detailsPermissions.test.ts +125 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/permissions.ts +2 -8
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +2 -1
- package/zova/src/suite-vendor/a-zova/package.json +3 -3
- package/.claude/hooks/contract-loop-gate.ts +0 -421
- package/.claude/scheduled_tasks.lock +0 -1
- package/.claude/skills/cabloy-spec-generation/scripts/generate-implementation-charts.mjs +0 -385
- /package/{.claude → repo-agent-governance/adapters/claude}/settings.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-backend-scaffold/SKILL.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-backend-scaffold/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-backend-scaffold/references/backend-thread-map.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-contract-loop/SKILL.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-contract-loop/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-contract-loop/references/verification-checklist.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-domain-planning/SKILL.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-frontend-scaffold/SKILL.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-frontend-scaffold/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-frontend-scaffold/references/frontend-thread-map.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-resource-field-update/SKILL.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-resource-field-update/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-resource-field-update/references/custom-renderer-demo-checklist.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-resource-field-update/references/field-update-decision-tree.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-resource-field-update/references/follow-up-checklist.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-resource-field-update/references/verification-checklist.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-spec-execution/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-spec-generation/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-workflow/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-workflow/references/cli-strategy.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-workflow/references/edition-detection.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-worktree-environment/evals/evals.json +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-zova-source-reading/references/analysis-modes.md +0 -0
- /package/{.claude → repo-agent-governance}/skills/cabloy-zova-source-reading/references/core-reading-paths.md +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
1
2
|
import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
2
3
|
import { tmpdir } from 'node:os';
|
|
3
4
|
import { resolve } from 'node:path';
|
|
4
5
|
import { test } from 'node:test';
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
import {
|
|
7
8
|
createChartModel,
|
|
8
9
|
generateCharts,
|
|
@@ -92,6 +93,51 @@ test('requires formal ATP definitions rather than prose mentions', () => {
|
|
|
92
93
|
assert.deepEqual([...parseAtpIds('A prose mention of ATP-DEMO-99.')], []);
|
|
93
94
|
});
|
|
94
95
|
|
|
96
|
+
test('parses progress rows by formal WBS and Status header columns', () => {
|
|
97
|
+
const progress = parseProgress(
|
|
98
|
+
[
|
|
99
|
+
'# Progress',
|
|
100
|
+
'',
|
|
101
|
+
'> 最后审查日期: 2026-09-01',
|
|
102
|
+
'',
|
|
103
|
+
'| WBS ID | Work item | Status |',
|
|
104
|
+
'| --- | --- | --- |',
|
|
105
|
+
'| `WBS-DEMO-01` | Implementation title | `verified` |',
|
|
106
|
+
'',
|
|
107
|
+
].join('\r\n'),
|
|
108
|
+
);
|
|
109
|
+
assert.equal(progress.reviewed, '2026-09-01');
|
|
110
|
+
assert.deepEqual([...progress.rows], [['WBS-DEMO-01', 'verified']]);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test('does not parse prose wildcard ATP references as concrete IDs', () => {
|
|
114
|
+
const model = parseWbs(
|
|
115
|
+
[
|
|
116
|
+
'# Delivery Plan',
|
|
117
|
+
'',
|
|
118
|
+
'### Phase 10: Baseline',
|
|
119
|
+
'',
|
|
120
|
+
'#### WBS-DEMO-01: Freeze the baseline',
|
|
121
|
+
'',
|
|
122
|
+
'- Track every `ATP-DEMO-*` after planning.',
|
|
123
|
+
'',
|
|
124
|
+
].join('\n'),
|
|
125
|
+
);
|
|
126
|
+
assert.deepEqual(model.tasks[0].atps, []);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
test('rejects malformed WBS headings with a trailing hyphen', () => {
|
|
130
|
+
assert.throws(
|
|
131
|
+
() =>
|
|
132
|
+
parseWbs(
|
|
133
|
+
['# Delivery Plan', '', '### Phase 10: Baseline', '', '#### WBS-DEMO-01-: Freeze', ''].join(
|
|
134
|
+
'\n',
|
|
135
|
+
),
|
|
136
|
+
),
|
|
137
|
+
/No formal `#### WBS-…:` tasks/,
|
|
138
|
+
);
|
|
139
|
+
});
|
|
140
|
+
|
|
95
141
|
test('creates a mixed-status model with deferred scope separated', () => {
|
|
96
142
|
const model = createChartModel({
|
|
97
143
|
readme: files['README.md'],
|
|
@@ -126,8 +172,14 @@ test('renders a phase description directly beneath its phase label', async t =>
|
|
|
126
172
|
});
|
|
127
173
|
t.after(() => removeFixture(directory));
|
|
128
174
|
const gantt = (await generateCharts(directory)).artifacts.get('implementation-gantt.svg');
|
|
129
|
-
assert.match(
|
|
130
|
-
|
|
175
|
+
assert.match(
|
|
176
|
+
gantt,
|
|
177
|
+
/<text class="phase" x="72" y="270">Phase 10<\/text><text class="small" x="72" y="283">A deliberately extended<\/text><text class="small" x="72" y="295"><phase> & description that<\/text><text class="small" x="72" y="307">wraps safely<\/text><text class="num" x="265" y="329">WBS-10-01<\/text>/,
|
|
178
|
+
);
|
|
179
|
+
assert.match(
|
|
180
|
+
gantt,
|
|
181
|
+
/<text class="phase" x="72" y="363">Phase 20<\/text><text class="small" x="72" y="376">Delivery<\/text><text class="num" x="265" y="398">WBS-20-01<\/text>/,
|
|
182
|
+
);
|
|
131
183
|
assert.doesNotMatch(gantt, /y="432">Delivery<\/text>/);
|
|
132
184
|
});
|
|
133
185
|
|
|
@@ -141,7 +193,10 @@ test('widens and wraps the Dependencies column without covering status', async t
|
|
|
141
193
|
t.after(() => removeFixture(directory));
|
|
142
194
|
const gantt = (await generateCharts(directory)).artifacts.get('implementation-gantt.svg');
|
|
143
195
|
assert.match(gantt, /<text class="small" x="680" y="246">Dependencies<\/text>/);
|
|
144
|
-
assert.match(
|
|
196
|
+
assert.match(
|
|
197
|
+
gantt,
|
|
198
|
+
/<text class="small" x="680" y="\d+"><tspan x="680" dy="0">[^<]+<\/tspan><tspan x="680" dy="12">[^<]+<\/tspan><\/text><circle cx="905" cy="\d+"/,
|
|
199
|
+
);
|
|
145
200
|
});
|
|
146
201
|
|
|
147
202
|
test('selects Chinese chart copy from a Chinese README', () => {
|
|
@@ -156,18 +211,26 @@ test('selects Chinese chart copy from a Chinese README', () => {
|
|
|
156
211
|
});
|
|
157
212
|
|
|
158
213
|
test('rejects missing progress rows and dangling ATP references', () => {
|
|
159
|
-
assert.throws(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
214
|
+
assert.throws(
|
|
215
|
+
() =>
|
|
216
|
+
createChartModel({
|
|
217
|
+
readme: files['README.md'],
|
|
218
|
+
wbs: files['pdp-wbs.md'],
|
|
219
|
+
progress: files['progress.md'].replace('| `WBS-20-01` | `in-progress` |\n', ''),
|
|
220
|
+
testPlan: files['test-plan.md'],
|
|
221
|
+
}),
|
|
222
|
+
/WBS-20-01 has no corresponding progress/,
|
|
223
|
+
);
|
|
224
|
+
assert.throws(
|
|
225
|
+
() =>
|
|
226
|
+
createChartModel({
|
|
227
|
+
readme: files['README.md'],
|
|
228
|
+
wbs: files['pdp-wbs.md'].replace('ATP-DEMO-01', 'ATP-MISSING-01'),
|
|
229
|
+
progress: files['progress.md'],
|
|
230
|
+
testPlan: files['test-plan.md'],
|
|
231
|
+
}),
|
|
232
|
+
/references undefined ATP-MISSING-01/,
|
|
233
|
+
);
|
|
171
234
|
});
|
|
172
235
|
|
|
173
236
|
test('renders partial burndown progress at its remaining-count position', async t => {
|
|
@@ -180,8 +243,14 @@ test('renders partial burndown progress at its remaining-count position', async
|
|
|
180
243
|
assert.match(burndown, />1 remaining · 1 verified</);
|
|
181
244
|
assert.match(burndown, />2 remaining</);
|
|
182
245
|
assert.doesNotMatch(burndown, />0 \/ 2</);
|
|
183
|
-
assert.match(
|
|
184
|
-
|
|
246
|
+
assert.match(
|
|
247
|
+
burndown,
|
|
248
|
+
/<line x1="190" y1="410" x2="550\.0" y2="530\.0" stroke="var\(--blue\)" stroke-width="2"\/>/,
|
|
249
|
+
);
|
|
250
|
+
assert.match(
|
|
251
|
+
burndown,
|
|
252
|
+
/<line x1="550\.0" y1="530\.0" x2="910" y2="650" stroke="var\(--blue\)" stroke-width="2" stroke-dasharray="6 5"/,
|
|
253
|
+
);
|
|
185
254
|
assert.match(burndown, /<circle cx="550\.0" cy="530\.0" r="8"/);
|
|
186
255
|
assert.doesNotMatch(burndown, /r="14" fill="var\(--aqua\)"/);
|
|
187
256
|
});
|
|
@@ -209,7 +278,13 @@ test('writes deterministic XML-escaped artifacts and detects stale output', asyn
|
|
|
209
278
|
assert.match(first.artifacts.get('implementation-burndown.svg'), /role="img"/);
|
|
210
279
|
assert.equal((await generateCharts(directory, { check: true })).stale.length, 0);
|
|
211
280
|
await writeFile(resolve(directory, 'implementation-gantt.svg'), 'stale');
|
|
212
|
-
await assert.rejects(
|
|
281
|
+
await assert.rejects(
|
|
282
|
+
() => generateCharts(directory, { check: true }),
|
|
283
|
+
/implementation-gantt\.svg/,
|
|
284
|
+
);
|
|
213
285
|
const second = await generateCharts(directory);
|
|
214
|
-
assert.equal(
|
|
286
|
+
assert.equal(
|
|
287
|
+
second.artifacts.get('implementation-gantt.svg'),
|
|
288
|
+
first.artifacts.get('implementation-gantt.svg'),
|
|
289
|
+
);
|
|
215
290
|
});
|
|
@@ -21,6 +21,7 @@ const aiItems = [
|
|
|
21
21
|
collapsed: true,
|
|
22
22
|
items: [
|
|
23
23
|
{ text: 'Repo Guidance', link: '/ai/repo-guidance' },
|
|
24
|
+
{ text: 'Agent Governance', link: '/ai/agent-governance' },
|
|
24
25
|
{ text: 'Skills', link: '/ai/skills' },
|
|
25
26
|
{ text: 'Docs / Skills Mapping', link: '/ai/docs-skills-rules-mapping' },
|
|
26
27
|
{ text: 'CLI to Skill Map', link: '/ai/cli-to-skill-map' },
|
|
@@ -245,6 +246,7 @@ export default defineConfig({
|
|
|
245
246
|
{ text: 'Frontend (Zova)', link: '/frontend/introduction', activeMatch: '^/frontend/' },
|
|
246
247
|
],
|
|
247
248
|
},
|
|
249
|
+
{ text: 'Demo', link: '/demo' },
|
|
248
250
|
{ text: 'Blogs', link: '/blogs/', activeMatch: '^/blogs/' },
|
|
249
251
|
{ text: 'Editions', link: '/editions/overview', activeMatch: '^/editions/' },
|
|
250
252
|
{ text: 'AI Development', link: '/ai/introduction', activeMatch: '^/ai/' },
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Agent Governance
|
|
2
|
+
|
|
3
|
+
Cabloy keeps shared AI-development guidance in one authored repository surface while providing adapters for the coding agents used in this repository.
|
|
4
|
+
|
|
5
|
+
## Canonical source and generated adapters
|
|
6
|
+
|
|
7
|
+
`repo-agent-governance/` is the canonical source for portable repository rules, root workflow skill bundles, bundled references, deterministic tools, and adapter metadata.
|
|
8
|
+
|
|
9
|
+
Do not hand-edit generated adapter output. Regenerate it instead:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm run agent:governance:render
|
|
13
|
+
npm run agent:governance:check
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The committed repository adapter outputs are:
|
|
17
|
+
|
|
18
|
+
| Agent surface | Generated repository assets |
|
|
19
|
+
| ------------- | ---------------------------------------------------------------------------------------------- |
|
|
20
|
+
| Claude Code | `CLAUDE.md`, `.claude/skills/`, `.claude/commands/`, `.claude/settings.json`, `.claude/hooks/` |
|
|
21
|
+
| Codex | `AGENTS.md`, `.agents/skills/` |
|
|
22
|
+
| Cursor | `.cursor/rules/cabloy-governance.mdc`, `.cursor/skills/` |
|
|
23
|
+
|
|
24
|
+
The same root rule and skill sources are copied to every listed adapter. Platform-specific discovery metadata is intentionally thin and lives in the adapter layer. The generated Codex and Cursor skill paths are configured adapter locations; their client discovery behavior requires a version-pinned external smoke check before it is claimed as supported.
|
|
25
|
+
|
|
26
|
+
### Package migration bridge
|
|
27
|
+
|
|
28
|
+
The transition package deliberately excludes generated root adapters because the immediately preceding upgrader overwrites those paths before it starts the incoming initializer. This prevents that legacy path from silently replacing customized adapters. The package still includes canonical governance and `scripts/init.ts`; `npm run init` performs ownership-aware adoption for both a staged upgrade and a fresh project. A source checkout retains its committed generated adapters. This bridge is package-transition behavior, not a claim that agents generate instructions at startup.
|
|
29
|
+
|
|
30
|
+
## Capability boundary
|
|
31
|
+
|
|
32
|
+
Rules, procedural skills, references, eval fixtures, contract-loop analysis, and ordinary deterministic repository tools are portable.
|
|
33
|
+
|
|
34
|
+
Hooks, tool permissions, local settings, credentials, MCP registration, slash-command discovery, confirmation UI, and automatic command execution are not portable contracts. Claude Code retains the repository `PostToolUse` contract-loop convenience hook. Codex and Cursor receive the same advisory contract-loop guidance but must not be described as running the Claude hook or its automatic commands.
|
|
35
|
+
|
|
36
|
+
No adapter output owns `settings.local.json`, `CLAUDE.local.md`, worktree state, scheduled-task state, credentials, or arbitrary user-owned agent files.
|
|
37
|
+
|
|
38
|
+
## Maintain and verify governance assets
|
|
39
|
+
|
|
40
|
+
Use these commands during repository maintenance:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run agent:governance:render
|
|
44
|
+
npm run agent:governance:check
|
|
45
|
+
npm run test:agent-governance
|
|
46
|
+
npm run agent:governance:pack-check
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`agent:governance:check` is read-only and fails when a committed adapter output or `managed-assets.json` is stale. `agent:governance:pack-check` verifies that the npm package includes the canonical and adapter assets but excludes local state.
|
|
50
|
+
|
|
51
|
+
For an existing project whose adapter files predate governance ownership, inspect adoption first:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm run agent:governance:adopt
|
|
55
|
+
npm run agent:governance:adopt -- --apply
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Adoption creates missing assets and records byte-identical assets. It preserves differing legacy or locally changed managed files as conflicts. Only an explicit path-specific `--force <target>` can replace a conflict.
|
|
59
|
+
|
|
60
|
+
## Contract-loop tooling
|
|
61
|
+
|
|
62
|
+
The portable advisory checker accepts a reviewed source path and never starts a build by default:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm run contract:gate -- --file zova/src/suite/<suite>/modules/<module>/src/.metadata/index.ts --format json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Follow [Contract Loop Playbook](/fullstack/contract-loop-playbook) for the full forward, reverse, consumer-drift, and local-dependency-drift workflow. The checker provides a signal and command guidance; it is not proof that generation, build, or dependency refresh has completed.
|
|
69
|
+
|
|
70
|
+
## Placement rules
|
|
71
|
+
|
|
72
|
+
Keep the existing Cabloy knowledge boundary:
|
|
73
|
+
|
|
74
|
+
- `repo-docs/` explains durable workflows for people and agents.
|
|
75
|
+
- `repo-docs-internal/` records supporting maintainer rationale and ADRs.
|
|
76
|
+
- `repo-specs/<suite>/` remains authority for suite product, delivery, acceptance, and evidence records.
|
|
77
|
+
- `repo-agent-governance/` owns portable agent rules, root skill workflows, adapters, and deterministic governance tooling.
|
|
78
|
+
- platform directories are generated runtime/discovery adapters, not a second authored source.
|
|
79
|
+
|
|
80
|
+
For a broader placement decision, see [Docs, Skills, Rules, and CLI Mapping](/ai/docs-skills-rules-mapping).
|
|
@@ -189,10 +189,10 @@ Avoid these mistakes in skills:
|
|
|
189
189
|
|
|
190
190
|
## Current root skill example
|
|
191
191
|
|
|
192
|
-
The root-level skill:
|
|
192
|
+
The canonical root-level skill:
|
|
193
193
|
|
|
194
|
-
-
|
|
194
|
+
- `repo-agent-governance/skills/cabloy-workflow/SKILL.md`
|
|
195
195
|
|
|
196
|
-
already follows this philosophy: detect edition, classify layer, prefer CLI, then verify.
|
|
196
|
+
is rendered to the Claude adapter path and already follows this philosophy: detect edition, classify layer, prefer CLI, then verify.
|
|
197
197
|
|
|
198
198
|
Future skills should follow the same mapping pattern.
|
|
@@ -71,49 +71,50 @@ Relevant internal records answer questions like:
|
|
|
71
71
|
- why is AI enablement structured this way?
|
|
72
72
|
- what invariants should future contributors preserve?
|
|
73
73
|
|
|
74
|
-
### 4.
|
|
74
|
+
### 4. Agent governance, rules, and commands
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Canonical location:
|
|
77
77
|
|
|
78
|
-
- `
|
|
79
|
-
- `.claude/commands/`
|
|
78
|
+
- `repo-agent-governance/`
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
Generated adapter locations include:
|
|
82
81
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- short durable constraints such as edition detection and CLI-first preference
|
|
82
|
+
- policy adapters: `CLAUDE.md`, `AGENTS.md`, and `.cursor/rules/`
|
|
83
|
+
- Claude-specific command adapter: `.claude/commands/`
|
|
86
84
|
|
|
87
|
-
|
|
85
|
+
Codex and Cursor adapter paths are configured output locations; verify active-client discovery externally before claiming that behavior is supported.
|
|
88
86
|
|
|
89
|
-
- named recurring operator workflows
|
|
90
|
-
- shorter, explicit actions such as release or future migration helpers
|
|
87
|
+
Use the canonical repository policy for concise repo-wide operational guidance and durable constraints such as edition detection and CLI-first preference. Use canonical commands for named recurring operator workflows such as release.
|
|
91
88
|
|
|
92
89
|
These layers answer questions like:
|
|
93
90
|
|
|
94
|
-
- what should
|
|
91
|
+
- what should an agent check first in this repo?
|
|
95
92
|
- when should CLI be preferred over manual scaffolding?
|
|
96
93
|
- what recurring workflow deserves a named command?
|
|
97
94
|
|
|
98
95
|
### 5. Skills
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
Canonical location:
|
|
98
|
+
|
|
99
|
+
- `repo-agent-governance/skills/`
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
Generated adapter locations include `.claude/skills/`, `.agents/skills/`, and `.cursor/skills/`. The Codex and Cursor locations are configured output paths, not verified client-discovery claims; validate the active client version externally before relying on discovery.
|
|
103
102
|
|
|
104
103
|
Use skills for:
|
|
105
104
|
|
|
106
105
|
- procedural decision trees
|
|
107
106
|
- reusable workflows with branching logic
|
|
108
|
-
- tasks that benefit from bundled references, evals, or
|
|
107
|
+
- tasks that benefit from bundled references, evals, or deterministic helpers
|
|
109
108
|
- repo-specific orchestration over CLI and source inspection
|
|
110
109
|
|
|
111
110
|
Skills answer questions like:
|
|
112
111
|
|
|
113
|
-
- how should
|
|
112
|
+
- how should an agent choose the right Cabloy workflow?
|
|
114
113
|
- when should it branch between Basic and Start?
|
|
115
114
|
- what is the right verification path after generation or refactor work?
|
|
116
115
|
|
|
116
|
+
Do not treat provider hooks, permissions, local settings, or command discovery as portable skill capabilities. These remain platform-specific adapters.
|
|
117
|
+
|
|
117
118
|
## Decision rule for authors: where should a new piece of knowledge go?
|
|
118
119
|
|
|
119
120
|
Use this quick rule:
|
|
@@ -121,7 +122,7 @@ Use this quick rule:
|
|
|
121
122
|
- if people and agents both need to read and understand it, put it in **public docs**
|
|
122
123
|
- if it is product, contract, delivery, ATP, decision, or observed-evidence authority for one suite, use `repo-specs/<suite>/`
|
|
123
124
|
- if it is maintainer rationale or long-lived design history, use `repo-docs-internal/`; shared guidance remains complete without any particular internal record
|
|
124
|
-
- if it is short repo-wide behavioral guidance, put it in
|
|
125
|
+
- if it is short portable repo-wide behavioral guidance, put it in **`repo-agent-governance/policies/`** and render its adapters
|
|
125
126
|
- if it is a named repeatable operator action, put it in a **command**
|
|
126
127
|
- if it is a reusable procedural workflow with branching, put it in a **skill**
|
|
127
128
|
|
|
@@ -131,26 +132,26 @@ Use this quick rule:
|
|
|
131
132
|
|
|
132
133
|
- public explanation → [Cabloy Editions: For AI Development](/editions/overview#for-ai-development)
|
|
133
134
|
- consistency review surface → [Edition Consistency Checklist](/ai/edition-consistency-checklist)
|
|
134
|
-
- repo-wide behavior rule → `
|
|
135
|
+
- repo-wide behavior rule → `repo-agent-governance/policies/`, rendered to generated policy adapters
|
|
135
136
|
- procedural enforcement → `cabloy-workflow` skill
|
|
136
137
|
|
|
137
138
|
### Example: “Use Zova CLI refactors before hand-editing page params/query/component props”
|
|
138
139
|
|
|
139
140
|
- conceptual explanation → public docs in frontend and AI sections
|
|
140
|
-
- default agent behavior → `
|
|
141
|
+
- default agent behavior → `repo-agent-governance/policies/`, rendered to generated policy adapters
|
|
141
142
|
- step-by-step orchestration → `cabloy-workflow` skill or future specialized skills
|
|
142
143
|
|
|
143
144
|
### Example: “How should a backend base class be placed?”
|
|
144
145
|
|
|
145
146
|
- public operational explanation → [Class Placement Rule](/ai/class-placement-rule)
|
|
146
147
|
- maintainer rationale and invariants → `repo-docs-internal/`
|
|
147
|
-
- default repo-wide behavior → `
|
|
148
|
+
- default repo-wide behavior → `repo-agent-governance/policies/`, rendered to generated policy adapters
|
|
148
149
|
- procedural decision workflow → `cabloy-workflow` skill
|
|
149
150
|
|
|
150
151
|
### Example: “How should AI look up a backend global bean?”
|
|
151
152
|
|
|
152
153
|
- public lookup explanation → [Global Bean Lookup](/ai/global-bean-lookup)
|
|
153
|
-
- default repo-wide behavior → `
|
|
154
|
+
- default repo-wide behavior → `repo-agent-governance/policies/`, rendered to generated policy adapters
|
|
154
155
|
- procedural lookup sequence → `cabloy-workflow` skill
|
|
155
156
|
|
|
156
157
|
### Example: “How backend OpenAPI becomes frontend SDK”
|
|
@@ -161,7 +162,7 @@ Use this quick rule:
|
|
|
161
162
|
### Example: “How should one persisted resource serve Admin and Web users?”
|
|
162
163
|
|
|
163
164
|
- full architecture explanation → [Admin Resource and Web Self-Service](/fullstack/admin-resource-and-web-self-service)
|
|
164
|
-
- concise repo-wide default → `
|
|
165
|
+
- concise repo-wide default → `repo-agent-governance/policies/repository.md`, rendered to policy adapters
|
|
165
166
|
- contract regeneration, consumer-boundary choice, and verification routing → `cabloy-contract-loop`
|
|
166
167
|
- extend the existing contract-loop skill references and evals; do not create an Order-specific skill
|
|
167
168
|
|
|
@@ -169,7 +170,7 @@ Use this quick rule:
|
|
|
169
170
|
|
|
170
171
|
- public operational explanation → [Playbook: Module Removal](/ai/playbook-module-removal)
|
|
171
172
|
- maintainer rationale and pitfalls → `repo-docs-internal/`
|
|
172
|
-
- avoid putting the full workflow in
|
|
173
|
+
- avoid putting the full workflow in the concise canonical policy because the task needs branching, cleanup order, generated-runtime recovery, and verification
|
|
173
174
|
- procedural decision workflow → `cabloy-module-removal` skill
|
|
174
175
|
|
|
175
176
|
### Example: “How should AI plan a new business domain name and structure?”
|
|
@@ -177,7 +178,7 @@ Use this quick rule:
|
|
|
177
178
|
- public naming and suite-first explanation → [Suites and Modules](/fullstack/suites-and-modules)
|
|
178
179
|
- frontend-side naming companion → [Modules and Suites](/frontend/modules-and-suites)
|
|
179
180
|
- keep the durable naming rules in docs instead of duplicating them in repo rules
|
|
180
|
-
- avoid putting the full branching workflow in
|
|
181
|
+
- avoid putting the full branching workflow in the concise canonical policy because the task needs proposal, validation, confirmation, and CLI handoff
|
|
181
182
|
- procedural decision workflow → `cabloy-domain-planning` skill
|
|
182
183
|
|
|
183
184
|
### Example: “How should AI create or maintain a repository-native suite specification?”
|
|
@@ -202,13 +203,13 @@ Use this quick rule:
|
|
|
202
203
|
- full explanation → [Entity Guide](/backend/entity-guide) and [DTO Guide](/backend/dto-guide)
|
|
203
204
|
- AI workflow reminder → [Playbook: Add a Backend Module](/ai/playbook-backend-module)
|
|
204
205
|
- procedural checklist reminder → backend scaffold skill references
|
|
205
|
-
- avoid putting the full explanation only in
|
|
206
|
+
- avoid putting the full explanation only in the concise canonical policy because this is a framework-specific authoring rule, not a short global behavior rule
|
|
206
207
|
|
|
207
208
|
## Anti-patterns to avoid
|
|
208
209
|
|
|
209
210
|
Avoid these mistakes:
|
|
210
211
|
|
|
211
|
-
- putting large conceptual explanations in
|
|
212
|
+
- putting large conceptual explanations in the concise canonical policy
|
|
212
213
|
- using a skill as the only place where an important architectural rule is explained
|
|
213
214
|
- duplicating the same workflow prose across docs and skills without giving each a distinct role
|
|
214
215
|
- creating a command for something that actually needs a branching decision tree
|
|
@@ -5,9 +5,9 @@ This checklist helps maintainers keep docs, rules, commands, and skills aligned
|
|
|
5
5
|
Use it whenever you add or revise:
|
|
6
6
|
|
|
7
7
|
- edition-aware docs
|
|
8
|
-
- `
|
|
9
|
-
-
|
|
10
|
-
-
|
|
8
|
+
- `repo-agent-governance/` rules, commands, and skill bundles
|
|
9
|
+
- generated Claude, Codex, or Cursor adapter outputs
|
|
10
|
+
- platform-specific Claude commands, hooks, or settings when they are affected
|
|
11
11
|
- AI workflow playbooks
|
|
12
12
|
|
|
13
13
|
## The baseline story that should stay consistent
|
|
@@ -98,14 +98,15 @@ For scripts, flavors, paths, and examples, confirm that:
|
|
|
98
98
|
Confirm that the same guidance is distributed correctly:
|
|
99
99
|
|
|
100
100
|
- **docs** explain the workflow in durable prose
|
|
101
|
-
- **`
|
|
101
|
+
- **`repo-agent-governance/`** owns short portable repo-wide behavioral rules, commands, and root skills
|
|
102
|
+
- **generated adapters** expose that shared guidance to Claude Code, Codex, and Cursor without becoming a second authored source
|
|
102
103
|
- **skills** encode procedural branching and follow-up logic
|
|
103
104
|
- **commands** are used only for named operator workflows, not as the only home for conceptual guidance
|
|
104
105
|
|
|
105
106
|
Avoid these drifts:
|
|
106
107
|
|
|
107
108
|
- a skill contains the only explanation of an edition rule
|
|
108
|
-
-
|
|
109
|
+
- the concise canonical repository policy grows into a long architectural essay
|
|
109
110
|
- docs duplicate every procedural branch that belongs in a skill
|
|
110
111
|
|
|
111
112
|
## Checklist 7: verification guidance matches the edition model
|
|
@@ -138,7 +139,8 @@ Before you finish an edition-aware change, ask:
|
|
|
138
139
|
2. Did I preserve the correct Basic vs Start creation path?
|
|
139
140
|
3. Did I avoid turning UI difference into the whole story?
|
|
140
141
|
4. Did I point Start-specific operational truth back to the active Start repository where needed?
|
|
141
|
-
5. Do docs,
|
|
142
|
+
5. Do docs, canonical governance, generated adapters, and skills each play their proper role?
|
|
143
|
+
6. Did I regenerate and check every affected adapter without claiming platform-specific automation is portable?
|
|
142
144
|
|
|
143
145
|
## Read together with
|
|
144
146
|
|
|
@@ -92,9 +92,9 @@ The purpose of the roadmap is not to create many skills.
|
|
|
92
92
|
The purpose is to create a small number of high-leverage skills that directly reuse the knowledge system now being built in:
|
|
93
93
|
|
|
94
94
|
- `repo-docs/`
|
|
95
|
-
- `
|
|
95
|
+
- `repo-agent-governance/policies/`
|
|
96
96
|
- `repo-docs-internal/`
|
|
97
|
-
-
|
|
97
|
+
- `repo-agent-governance/skills/`
|
|
98
98
|
- the Vona and Zova CLIs
|
|
99
99
|
|
|
100
100
|
That is how Cabloy gets long-term value from the documentation work.
|
|
@@ -11,7 +11,7 @@ The Cabloy monorepo is a good fit for AI vibe coding because the source tree alr
|
|
|
11
11
|
- Zova CLI source and command groups
|
|
12
12
|
- archived docs that still capture valuable concepts
|
|
13
13
|
- `repo-docs-internal/` engineering docs for maintainers
|
|
14
|
-
-
|
|
14
|
+
- agent-neutral repository governance, generated adapters, and deterministic tools
|
|
15
15
|
|
|
16
16
|
## The main design goal
|
|
17
17
|
|
|
@@ -32,7 +32,7 @@ For contributor and automation workflows in this repository, prefer this order:
|
|
|
32
32
|
1. inspect the active edition and repo markers before making UI-sensitive or workflow-sensitive assumptions
|
|
33
33
|
2. inspect root scripts, Vona CLI, and Zova CLI before inventing manual scaffolding or custom workflow steps
|
|
34
34
|
3. use public docs for durable user-facing and agent-facing guidance; consult relevant `repo-docs-internal/` records for supporting maintainer rationale
|
|
35
|
-
4. encode repeatable behavior in
|
|
35
|
+
4. encode repeatable behavior in the canonical agent-governance rules, commands, or skills instead of relying on unstated habits
|
|
36
36
|
|
|
37
37
|
## The knowledge layers
|
|
38
38
|
|
|
@@ -46,13 +46,13 @@ For normal project usage, prefer the user-facing entry docs such as [Fullstack Q
|
|
|
46
46
|
|
|
47
47
|
Use `repo-docs-internal/` for architecture notes, ADRs, and maintainer rationale that should not be mixed into public how-to documentation. Relevant records support a shared workflow without being prerequisites; an unavailable or irrelevant individual record must not cause its rationale to be moved into public how-to documentation automatically.
|
|
48
48
|
|
|
49
|
-
###
|
|
49
|
+
### Agent governance and adapters
|
|
50
50
|
|
|
51
|
-
Use root
|
|
51
|
+
Use `repo-agent-governance/` as the authored source for portable repository rules, root workflow skills, bundled references, and deterministic tools. It generates committed adapter outputs for Claude Code, Codex, and Cursor. See [Agent Governance](/ai/agent-governance) for the ownership and capability boundary.
|
|
52
52
|
|
|
53
|
-
###
|
|
53
|
+
### Platform runtime integration
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
`CLAUDE.md`, `.claude/commands/`, `.claude/skills/`, `AGENTS.md`, `.agents/skills/`, and `.cursor/` are adapter/runtime surfaces. Hooks, permissions, local settings, credentials, and provider-specific command discovery stay platform-specific rather than becoming shared framework facts.
|
|
56
56
|
|
|
57
57
|
## AI reading paths
|
|
58
58
|
|
|
@@ -63,6 +63,7 @@ Use this page as the main AI-development hub, then choose the path that matches
|
|
|
63
63
|
Start here when the task is about choosing the right repo surface, docs location, or automation boundary:
|
|
64
64
|
|
|
65
65
|
- [Repo Guidance](/ai/repo-guidance)
|
|
66
|
+
- [Agent Governance](/ai/agent-governance)
|
|
66
67
|
- [Docs / Skills Mapping](/ai/docs-skills-rules-mapping)
|
|
67
68
|
- [CLI to Skill Map](/ai/cli-to-skill-map)
|
|
68
69
|
- [Skills](/ai/skills)
|
|
@@ -10,9 +10,10 @@ Check the root repository signals first:
|
|
|
10
10
|
- edition marker files such as `__CABLOY_BASIC__` or `__CABLOY_START__`
|
|
11
11
|
- `repo-docs-internal/`
|
|
12
12
|
- `repo-specs/` when the task concerns a suite plan, WBS increment, acceptance record, or evidence
|
|
13
|
-
-
|
|
13
|
+
- `repo-agent-governance/` canonical rules, skill bundles, and deterministic tools
|
|
14
|
+
- generated platform adapter assets such as `CLAUDE.md`, `AGENTS.md`, `.claude/`, `.agents/`, and `.cursor/`
|
|
14
15
|
|
|
15
|
-
These surfaces tell the agent which repo it is in
|
|
16
|
+
These surfaces tell the agent which repo it is in, which scripts are canonical, and where shared agent instructions are authored. Treat platform directories as generated adapters; regenerate them from `repo-agent-governance/` rather than hand-editing them. Inspect relevant `repo-docs-internal/` records as supporting context rather than as a gate to workflow guidance.
|
|
16
17
|
|
|
17
18
|
## 2. Prefer framework entrypoints over scattered examples
|
|
18
19
|
|
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
# Rules and Config
|
|
2
2
|
|
|
3
|
-
Cabloy’s AI behavior
|
|
3
|
+
Cabloy’s AI behavior is organized into authored governance, generated platform adapters, and platform-local runtime configuration. This prevents the same repository knowledge from drifting across agent-specific directories.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## `repo-agent-governance/`
|
|
6
6
|
|
|
7
|
-
Use the
|
|
7
|
+
Use `repo-agent-governance/` as the only authored source for portable repository rules, root procedural skill bundles, bundled references, deterministic tools, and adapter definitions.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- where public docs live
|
|
11
|
-
- where `repo-docs-internal/` holds supporting maintainer rationale
|
|
12
|
-
- which command entrypoints are preferred
|
|
13
|
-
- why edition detection is mandatory before UI-sensitive guidance or project-creation assumptions
|
|
9
|
+
It contains the concise repository policy that adapters render to `CLAUDE.md`, `AGENTS.md`, and Cursor MDC rules. It also owns the source bundles rendered to Claude, Codex, and Cursor skill locations.
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
Run these maintenance checks after changing governance assets:
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm run agent:governance:render
|
|
15
|
+
npm run agent:governance:check
|
|
16
|
+
npm run test:agent-governance
|
|
17
|
+
```
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Generated platform adapters
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
The following are committed generated outputs, not parallel authored knowledge sources:
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
- Claude Code: `CLAUDE.md`, `.claude/commands/`, `.claude/skills/`, `.claude/settings.json`, `.claude/hooks/`
|
|
24
|
+
- Codex: `AGENTS.md`, `.agents/skills/`
|
|
25
|
+
- Cursor: `.cursor/rules/cabloy-governance.mdc`, `.cursor/skills/`
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
The Codex and Cursor skill paths are configured generated adapter locations; verify client discovery with a version-pinned external smoke check before presenting it as supported behavior. The adapter model shares rules and procedures, not platform runtime behavior. Claude Code's contract-loop hook is a Claude-specific convenience integration; Codex and Cursor receive advisory guidance but do not claim the same automatic after-edit action.
|
|
28
|
+
|
|
29
|
+
## Local configuration and permissions
|
|
30
|
+
|
|
31
|
+
Keep local settings, credentials, worktree state, scheduled-task state, and user-owned agent configuration out of the generated ownership surface. In particular, do not overwrite or adopt `settings.local.json`, `CLAUDE.local.md`, or unregistered files merely because they are near an adapter directory.
|
|
32
|
+
|
|
33
|
+
Use agent settings for permissions and execution environment, not as the primary place to explain framework concepts.
|
|
26
34
|
|
|
27
35
|
## Documentation boundary
|
|
28
36
|
|
|
29
|
-
If a rule is important for people and agents to understand, it
|
|
37
|
+
If a rule is important for people and agents to understand, it belongs in public docs as well. `repo-docs-internal/` holds supporting maintainer rationale rather than user-facing workflow; individual records may vary by edition. See [Agent Governance](/ai/agent-governance) for the complete ownership, adoption, and package-distribution model.
|