cabloy 5.1.194 → 5.1.196
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 +1 -0
- package/CHANGELOG.md +22 -0
- package/README.md +13 -24
- package/package.json +2 -1
- package/repo-agent-governance/managed-assets.json +138 -33
- package/repo-agent-governance/scripts/pack-check.mjs +17 -0
- package/repo-agent-governance/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
- package/repo-agent-governance/skills/cabloy-domain-planning/SKILL.md +5 -3
- package/repo-agent-governance/skills/cabloy-spec-execution/SKILL.md +13 -8
- package/repo-agent-governance/skills/cabloy-spec-execution/evals/evals.json +108 -12
- package/repo-agent-governance/skills/cabloy-spec-execution/evals/files/scenarios.json +84 -0
- package/repo-agent-governance/skills/cabloy-spec-execution/evals/protocol.md +9 -0
- package/repo-agent-governance/skills/cabloy-spec-execution/references/execution-protocol.md +21 -5
- package/repo-agent-governance/skills/cabloy-spec-execution/references/status-and-evidence.md +5 -3
- package/repo-agent-governance/skills/cabloy-spec-generation/SKILL.md +78 -168
- package/repo-agent-governance/skills/cabloy-spec-generation/evals/evals.json +165 -17
- package/repo-agent-governance/skills/cabloy-spec-generation/evals/files/scenarios.json +114 -0
- package/repo-agent-governance/skills/cabloy-spec-generation/evals/protocol.md +44 -0
- package/repo-agent-governance/skills/cabloy-spec-generation/references/canonical-spec-input.md +145 -0
- package/repo-agent-governance/skills/cabloy-spec-generation/references/repo-aware-discovery.md +55 -57
- package/repo-agent-governance/skills/cabloy-spec-generation/references/repo-specs-document-set.md +6 -4
- package/repo-agent-governance/skills/cabloy-spec-generation/references/traceability-and-status-rules.md +12 -8
- package/repo-agent-governance/tests/governance.test.mjs +10 -1
- package/repo-agent-governance/tests/spec-audit.test.mjs +255 -0
- package/repo-agent-governance/tools/spec-audit/audit.mjs +427 -0
- package/repo-agent-governance/tools/spec-charts/generate-implementation-charts.mjs +97 -408
- package/repo-agent-governance/tools/spec-charts/generate-implementation-charts.test.mjs +462 -1
- package/repo-agent-governance/tools/spec-charts/spec-parser.mjs +561 -0
- package/repo-docs/.vitepress/config.mjs +54 -29
- package/repo-docs/ai/playbook-spec-execution.md +10 -4
- package/repo-docs/ai/playbook-spec-generation.md +40 -3
- package/repo-docs/ai/skills.md +3 -3
- package/repo-docs/backend/controller-aop-guide.md +10 -0
- package/repo-docs/backend/field-indexes.md +25 -0
- package/repo-docs/blogs/cabloy-fullstack-resource-addressing/index.md +1 -1
- package/repo-docs/fullstack/contract-loop-playbook.md +1 -1
- package/repo-docs/fullstack/development-history.md +24 -0
- package/repo-docs/fullstack/introduction.md +25 -156
- package/repo-docs/fullstack/quickstart.md +1 -1
- package/repo-docs/fullstack/ssr-entry-modes.md +52 -0
- package/repo-docs/fullstack/ssr-site-and-flavor-setup.md +3 -1
- package/repo-docs/fullstack/tutorial-5-backend-contract-sharing.md +13 -7
- package/repo-docs/fullstack/tutorial-6-one-contract-four-uses.md +11 -15
- package/repo-docs/fullstack/tutorials-overview.md +2 -2
- package/repo-docs/index.md +23 -45
- package/repo-docs/public/cabloy.png +0 -0
- package/repo-docs/public/cabloy.svg +3 -0
- package/repo-docs/public/favicon.svg +3 -0
- package/repo-docs/reference/repo-scripts.md +6 -1
- package/repo-e2e/specs/home-user-account.spec.ts +311 -207
- package/scripts/bootstrapAgentGovernance.mjs +1 -0
- package/scripts/upgrade.ts +1 -0
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/cli/templates/tools/crudBasic/snippets/2-meta.index.ts +4 -10
- package/vona/packages-cli/cli-set-api/cli/templates/tools/crudStart/snippets/2-meta.index.ts +4 -10
- package/vona/packages-cli/cli-set-api/package.json +8 -2
- package/vona/packages-cli/cli-set-api/src/index.ts +1 -0
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.tools.masterDetail.ts +9 -12
- package/vona/packages-cli/cli-set-api/src/lib/mergeMetaIndex.ts +121 -0
- package/vona/packages-cli/cli-set-api/test/indexSnippets.test.ts +41 -0
- package/vona/packages-cli/cli-set-api/test/mergeMetaIndex.test.ts +78 -0
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/pnpm-lock.yaml +6 -6
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/service/sku.ts +25 -4
- package/vona/src/suite/a-commerce/modules/commerce-catalog/test/skuUniqueness.test.ts +161 -0
- package/vona/src/suite/a-commerce/modules/commerce-payment/src/bean/meta.index.ts +21 -20
- package/vona/src/suite/a-commerce/modules/commerce-payment/test/paymentIndexes.test.ts +165 -0
- package/vona/src/suite/a-commerce/modules/commerce-promotion/src/bean/meta.index.ts +16 -13
- package/vona/src/suite/a-commerce/modules/commerce-promotion/test/promotionIndexes.test.ts +82 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/bean/meta.index.ts +23 -21
- package/vona/src/suite/a-commerce/modules/commerce-trade/test/tradeIndexes.test.ts +86 -0
- package/vona/src/suite/a-home/modules/home-user/src/.metadata/index.ts +379 -376
- package/vona/src/suite/a-home/modules/home-user/src/controller/passportTest.ts +60 -0
- package/vona/src/suite/a-home/modules/home-user/test/passportTest.test.ts +164 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-rbac/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
- package/vona/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/bean/meta.index.ts +35 -26
- package/vona/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/package.json +5 -5
- package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/transactionFiber_.ts +6 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/transaction_.ts +4 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormutils/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormutils/src/lib/columns.ts +3 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- /package/repo-docs/{.vitepress/public → public}/CNAME +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"purpose": "Synthetic conversation facts only. Read active repository normally; this file cannot establish source, collision results, runnable commands, or actual ATP evidence.",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"id": 1,
|
|
6
|
+
"facts": [
|
|
7
|
+
"Naming undecided; no write approval."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": 2,
|
|
12
|
+
"facts": [
|
|
13
|
+
"Requested identity a-training; payments/certificates deferred.",
|
|
14
|
+
"No design/ADR/execution approval supplied."
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": 3,
|
|
19
|
+
"facts": [
|
|
20
|
+
"Start runtime names must still be read from active Start source.",
|
|
21
|
+
"Provider credentials and real operations are excluded."
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": 4,
|
|
26
|
+
"facts": [
|
|
27
|
+
"No ATP run or retained artifact exists."
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": 5,
|
|
32
|
+
"facts": [
|
|
33
|
+
"Requested merchant scope changes current first-release boundary."
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": 6,
|
|
38
|
+
"facts": [
|
|
39
|
+
"Matrix-only IDs intentionally exercise missing-definition failure."
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": 7,
|
|
44
|
+
"facts": [
|
|
45
|
+
"Tenancy remains unresolved; ADR is Proposed."
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": 8,
|
|
50
|
+
"facts": [
|
|
51
|
+
"Generation approval only; provider ADR acceptance withheld.",
|
|
52
|
+
"ATP-PAY-WEBHOOK-01 has not been declared."
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": 9,
|
|
57
|
+
"facts": [
|
|
58
|
+
"README language requested: Chinese.",
|
|
59
|
+
"No implementation evidence."
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": 10,
|
|
64
|
+
"facts": [
|
|
65
|
+
"Changed WBS/ATP/progress inputs require freshness review."
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": 11,
|
|
70
|
+
"facts": [
|
|
71
|
+
"Both audience strategies unresolved."
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": 12,
|
|
76
|
+
"facts": [
|
|
77
|
+
"Mixed strategy selected; independent tuple not specified or approved."
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": 13,
|
|
82
|
+
"facts": [
|
|
83
|
+
"Site strategy deferred; backend planning still wanted."
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": 14,
|
|
88
|
+
"facts": [
|
|
89
|
+
"One audience: Web. Candidate values in prompt are proposed.",
|
|
90
|
+
"Constraint/collision results must come from active inspection.",
|
|
91
|
+
"Approvals arrive as separate follow-up turns."
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": 15,
|
|
96
|
+
"facts": [
|
|
97
|
+
"Incremental delta only; no destructive replacement approval."
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": 16,
|
|
102
|
+
"facts": [
|
|
103
|
+
"Explicit lightweight tutorial scope: README and PRD only.",
|
|
104
|
+
"No downstream exact references or progress record requested."
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": 17,
|
|
109
|
+
"facts": [
|
|
110
|
+
"Caller is spec generation; detour is naming-only."
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Spec Skill Evaluation Protocol
|
|
2
|
+
|
|
3
|
+
These evals exercise decision behavior, not just string presence. Run them in a disposable test checkout or a read-only conversation until an explicitly authorized write phase. Never run a case against real customer data or execute init, reset, deployment, provider, commit, or push operations.
|
|
4
|
+
|
|
5
|
+
## Inputs and discovery
|
|
6
|
+
|
|
7
|
+
Each case lists a small `files/scenarios.json` input. Read it normally and select the matching case ID; use its explicitly stated synthetic product/approval/evidence facts as conversation inputs. It is not a replacement repository, source fixture, edition marker, framework constraint, collision result, runnable command, accepted suite authority, or evidence artifact. Inspect the active root, markers, package scripts, relevant source, and existing records normally. If source contradicts a prompt's historical task/identifier assumption, report that conflict rather than fabricating source.
|
|
8
|
+
|
|
9
|
+
Keep observed repository facts and synthetic scenario inputs labeled separately. Candidate tuple values in a fixture are proposals until active-source constraint/collision checks and the stated approvals establish their status. Fake evidence assertions never count as actual retained ATP proof.
|
|
10
|
+
|
|
11
|
+
## Two phases and multiple turns
|
|
12
|
+
|
|
13
|
+
### Phase A: discovery and confirmation
|
|
14
|
+
|
|
15
|
+
Start with the original prompt, selected scenario facts, and no implicit approval. Observe whether the assistant:
|
|
16
|
+
|
|
17
|
+
- detects edition/ambiguity and reads the active source;
|
|
18
|
+
- selects complete/incremental/lightweight scope without resetting existing records;
|
|
19
|
+
- separates observed existing, proposed new, and explicitly approved new targets;
|
|
20
|
+
- asks only for missing decisions, preserves controlling gates, and returns from naming-only planning;
|
|
21
|
+
- presents the generation or bounded execution dossier without premature writes/runs/status changes;
|
|
22
|
+
- separates generation approval, design/ADR acceptance, and execution approval.
|
|
23
|
+
|
|
24
|
+
### Phase B: controlled follow-ups
|
|
25
|
+
|
|
26
|
+
Use at least two follow-up turns when approval domains matter. Record the actual transcript and tool/file effects; do not grade an imagined continuation.
|
|
27
|
+
|
|
28
|
+
1. Supply only the missing product/naming/strategy inputs or generation approval. Check that this does not silently accept an ADR or authorize source execution.
|
|
29
|
+
2. Explicitly accept the concrete design/ADR when the case calls for it, or explicitly keep it Proposed. Check that target classification/gates change only as authorized.
|
|
30
|
+
3. For execution cases, separately approve the finite WBS dossier. Run only approved safe procedures; any meaningful ATP proof still requires actual durable artifacts.
|
|
31
|
+
4. Change one scope/tuple/authority assumption, or withhold one approval. Check that the assistant re-confirms the changed boundary rather than reusing old approval.
|
|
32
|
+
|
|
33
|
+
For a stop/refusal case, Phase B may confirm that the blocker remains and ask for the next safe action; no write phase is required. For incremental/lightweight cases, compare the before/after diff and unchanged IDs/status/history, not just final prose. For accepted-new cases, verify that future source absence alone is not made a blocker, while unchecked collisions, unaccepted ADRs, and missing execution approval still are.
|
|
34
|
+
|
|
35
|
+
## Assertions and reporting
|
|
36
|
+
|
|
37
|
+
Each eval's `expectations` are observable assertions. Distinguish:
|
|
38
|
+
|
|
39
|
+
- **Static checks**: JSON/schema validity, fixture coverage, documentation links, governance rendering checks, parser/audit unit tests, and supported chart model/freshness tests.
|
|
40
|
+
- **Behavioral observations**: actual skill activation, discovery, questions, approvals, routing, tool use, output diff, preserved gates, evidence, and bounded stopping across the recorded turns.
|
|
41
|
+
|
|
42
|
+
A static test pass is not a behavioral eval pass. Mark unrun phases, unavailable scripts, missing active source, and absent ATP artifacts as not run/blocked, not success. Report case ID, turns, observed behavior, expectation outcomes, changed paths, and limitations. Do not build a broad runner solely for these cases; a small manual transcript protocol is sufficient.
|
|
43
|
+
|
|
44
|
+
Execution evals reuse this protocol with their own `files/scenarios.json`; do not reuse generation scenario facts as execution authority.
|
package/repo-agent-governance/skills/cabloy-spec-generation/references/canonical-spec-input.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Canonical Spec Input and Quality Gates
|
|
2
|
+
|
|
3
|
+
Use this syntax for new spec records. Preserve compatible legacy records when maintaining an existing suite; parser compatibility is not permission to reinterpret business definitions.
|
|
4
|
+
|
|
5
|
+
## Definition roles
|
|
6
|
+
|
|
7
|
+
Only declarations in the owning document define IDs:
|
|
8
|
+
|
|
9
|
+
| Owner | New canonical declaration |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `prd.md` | Atomic `- **PRD-...**: <requirement body>` under product requirements. |
|
|
12
|
+
| `srs.md` | Atomic `- **SRS-...**: <contract body>` under the applicable contract section. |
|
|
13
|
+
| `pdp-wbs.md` | `#### WBS-...: <title>` inside a phase; declaration body contains Traceability, Tasks, and Acceptance checks. |
|
|
14
|
+
| `test-plan.md` | `### ATP-...: <title>` under `## Acceptance Scenario Catalogue`; declaration body contains the five fields below. |
|
|
15
|
+
|
|
16
|
+
References in matrices, related-record lists, progress, evidence, templates, wildcards, or ranges are not definitions. A legacy acceptance catalogue table may declare scenarios when the table is actually the scenario catalogue in `test-plan.md`; a generic traceability matrix or evidence table cannot. Compatible legacy requirement/contract declarations remain valid in their owning role. Do not create duplicate declarations to migrate syntax.
|
|
17
|
+
|
|
18
|
+
Use exact instantiated IDs in declaration-body Traceability. A wildcard or abbreviated range is an aggregate summary, not an exact association or substitute for missing definitions. Keep associations explicit even if a downstream summary matrix repeats them. The audit must derive associations from the declaration body, not nearby unrelated sections.
|
|
19
|
+
|
|
20
|
+
## Minimal connected example
|
|
21
|
+
|
|
22
|
+
These are neutral **syntax examples**, not business requirements to copy into a real suite. All four IDs are exact and unique. Production bodies must describe the approved domain.
|
|
23
|
+
|
|
24
|
+
### prd.md
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
## Product Requirements
|
|
28
|
+
|
|
29
|
+
- **PRD-DEMO-01**: An authorized operator can inspect the active tenant's item. Traceability: `SRS-DEMO-01`.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The colon follows the closing bold delimiter. Do not generate `**PRD-DEMO-01: Title**` as the new canonical form.
|
|
33
|
+
|
|
34
|
+
### srs.md
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## Ownership and Authorization Contracts
|
|
38
|
+
|
|
39
|
+
- **SRS-DEMO-01**: The server derives tenant and operator authority before returning the item. Traceability: `PRD-DEMO-01`, `WBS-DEMO-10-01`.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
An atomic bullet's own prose may carry its Traceability. Do not place associations only in a distant matrix.
|
|
43
|
+
|
|
44
|
+
### pdp-wbs.md
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
## Work Breakdown Structure
|
|
48
|
+
|
|
49
|
+
### Phase 10: Implement the bounded item inspection
|
|
50
|
+
|
|
51
|
+
Dependencies: none.
|
|
52
|
+
|
|
53
|
+
#### WBS-DEMO-10-01: Implement tenant-scoped inspection
|
|
54
|
+
|
|
55
|
+
Traceability: `PRD-DEMO-01`, `SRS-DEMO-01`, `ATP-DEMO-01`.
|
|
56
|
+
|
|
57
|
+
Dependencies: none.
|
|
58
|
+
|
|
59
|
+
Source areas: the approved item owner; paths are proposed until created.
|
|
60
|
+
|
|
61
|
+
Tasks:
|
|
62
|
+
|
|
63
|
+
- Implement the approved tenant-scoped inspection boundary.
|
|
64
|
+
|
|
65
|
+
Acceptance checks:
|
|
66
|
+
|
|
67
|
+
- The selected ATP passes and retains its required proof.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Each phase has explicit Dependencies, using `none` when no predecessor exists. Task-level Dependencies override the phase Dependencies for that task; they are not accumulated automatically. Do not rely on an empty dependency label to mean none. Keep phases dependency-ordered and task scope bounded. WBS bodies own linked IDs, tasks, and checks; progress does not add them.
|
|
71
|
+
|
|
72
|
+
### test-plan.md
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
## Acceptance Scenario Catalogue
|
|
76
|
+
|
|
77
|
+
### ATP-DEMO-01: Inspect only the active tenant's item
|
|
78
|
+
|
|
79
|
+
Setup:
|
|
80
|
+
|
|
81
|
+
- Use synthetic items and separate scoped request contexts.
|
|
82
|
+
|
|
83
|
+
Procedure:
|
|
84
|
+
|
|
85
|
+
- Request the owned item, then request an item absent from the active tenant scope.
|
|
86
|
+
|
|
87
|
+
Expected result:
|
|
88
|
+
|
|
89
|
+
- The owned item is returned; the out-of-scope item is absent.
|
|
90
|
+
|
|
91
|
+
Minimum proof:
|
|
92
|
+
|
|
93
|
+
- Retain revision, environment, exact procedure, assertions, observed result, and redacted artifact location.
|
|
94
|
+
|
|
95
|
+
Traceability: `PRD-DEMO-01`, `SRS-DEMO-01`, `WBS-DEMO-10-01`.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Setup, Procedure, Expected result, Minimum proof, and Traceability must each be substantive. A valid heading alone does not make an executable scenario complete. Scenario definitions cannot live in an evidence example, commands list, or traceability matrix.
|
|
99
|
+
|
|
100
|
+
### progress.md
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
## WBS Execution Register
|
|
104
|
+
|
|
105
|
+
| WBS ID | Status | Evidence | Next action |
|
|
106
|
+
| --- | --- | --- | --- |
|
|
107
|
+
| `WBS-DEMO-10-01` | `not-started` | None; execution has not begun. | Confirm the bounded execution dossier. |
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Resolve columns by header names (`WBS ID` and `Status`), never fixed cell positions. Additional/reordered columns are allowed. Require one row for every formal WBS task when constructing the complete chart model. Preserve the established status vocabulary and explain blockers/waivers precisely.
|
|
111
|
+
|
|
112
|
+
## Three gates, not one success signal
|
|
113
|
+
|
|
114
|
+
### 1. Planning authority audit
|
|
115
|
+
|
|
116
|
+
Verify the active root script first, then use:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npm run spec:check -- <suite>
|
|
120
|
+
# Explicit small-scope branch:
|
|
121
|
+
npm run spec:check -- <suite> --lightweight
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The audit checks definition roles/uniqueness, exact references, declared PRD -> SRS -> WBS -> ATP associations, and local Markdown links. Scan non-evidence planning records, including optional ADR/runbook/rollout records. Evidence is not definition authority. Full mode requires the core owners; lightweight validates available owners/references/links and reports omissions rather than implying full-chain coverage. If `progress.md` is present, its WBS owner is still required; lightweight does not legalize references to absent definitions. A static pass cannot accept an ADR, clear a controlling TODO, establish source existence, or prove ATP execution.
|
|
125
|
+
|
|
126
|
+
### 2. Chart model and freshness
|
|
127
|
+
|
|
128
|
+
Only after complete supported README/WBS/ATP/progress inputs exist:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npm run spec:charts -- <suite>
|
|
132
|
+
npm run spec:charts:check -- <suite>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Charts validate the supported WBS/dependency/ATP/progress model and deterministic output freshness, not the entire authority audit. Regenerate both views after WBS, test-plan, progress, or README title/language changes. Chart labels, accessibility, and metadata follow README language. Neither chart creates dates, estimates, history, evidence, scope, or forecast authority.
|
|
136
|
+
|
|
137
|
+
For lightweight/incomplete legacy input, skip generation and state exactly which inputs are missing. Do not add fake ATP declarations, rewrite legacy business requirements, or promote statuses merely to make the chart model pass. If complete inputs exist, chart refresh applies regardless of whether the request is incremental or lightweight.
|
|
138
|
+
|
|
139
|
+
### 3. Human approval and observed proof
|
|
140
|
+
|
|
141
|
+
Review generation approval, explicit design approval, governing ADR status, execution dossier approval, controlling TODOs, and actual evidence separately. New planning does not establish `implementation-complete` or `verified`. Retained applicable ATP evidence must identify revision, environment, exact procedure, observed result, and redacted artifact before `verified` is defensible.
|
|
142
|
+
|
|
143
|
+
## Legacy gaps and failure handling
|
|
144
|
+
|
|
145
|
+
Preserve stable IDs and compatible legacy catalogue tables. Report missing/duplicate definitions, undeclared associations, unresolved links, incomplete chart inputs, and missing evidence as distinct failures. Correct syntax without changing business meaning only within approved maintenance scope. If a repair would introduce a requirement, contract, decision, or proof procedure, obtain planning approval before changing its owner. Never use matrices or evidence to silently backfill definitions.
|
package/repo-agent-governance/skills/cabloy-spec-generation/references/repo-aware-discovery.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Repository-Aware Discovery
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Inspect active source before recording edition-specific facts. New design does not need to exist already, but it must not be described as observed source.
|
|
4
4
|
|
|
5
5
|
## Read-only discovery
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
From the active root, inspect:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
git rev-parse --show-toplevel
|
|
@@ -15,87 +15,85 @@ npm run vona
|
|
|
15
15
|
npm run zova
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Read root `package.json` and relevant CLI entrypoints before documenting commands.
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
20
|
+
- Exactly Basic marker: Basic source and runtime facts.
|
|
21
|
+
- Exactly Start marker: inspect Start's own scripts, UI, sites, flavors, and generated paths.
|
|
22
|
+
- Both markers: stop as invalid/ambiguous.
|
|
23
|
+
- Neither: inspect owning package/structure and ask before edition-sensitive assumptions.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Never transfer Basic identifiers or example-suite boundaries into Start or a new suite by analogy. Do not read or expose `.env*` content to recommend worktree identities or ports.
|
|
26
|
+
|
|
27
|
+
## Target classification
|
|
28
|
+
|
|
29
|
+
Use these labels consistently in README, SRS, ADR, WBS, test plan, and execution dossiers:
|
|
30
|
+
|
|
31
|
+
| Class | Meaning | Required treatment |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| **Observed existing** | Inspected source/configuration/manifest currently defines the target. | Cite the actual owner and path; verify applicable behavior and conflicts. |
|
|
34
|
+
| **Proposed new** | An intentionally new design, not yet explicitly approved. | State candidate values, framework constraints, checks still needed, and governing `Proposed` ADR. Do not claim source exists or command runs. |
|
|
35
|
+
| **Explicitly approved new** | User explicitly approved the concrete design after framework and collision checks, and the governing durable ADR is `Accepted`. | A bounded WBS execution may create it after its own dossier approval. Cite design authority, planned source/manifests, and checks; pre-existing target source is not required. |
|
|
36
|
+
|
|
37
|
+
User inputs or high-level strategy selection alone do not upgrade a proposed tuple. Separate generation approval, design/ADR approval, and execution approval. If design is approved but ADR acceptance is still pending, record both facts and keep creation gated.
|
|
38
|
+
|
|
39
|
+
Unknown values remain `TODO(confirm)` with a specific missing design, source inspection, or collision check. Do not label a deliberately new target `TODO(confirm from active source)` merely because its future source does not exist.
|
|
26
40
|
|
|
27
41
|
## Site-strategy discovery
|
|
28
42
|
|
|
29
|
-
Use two passes
|
|
43
|
+
Use two passes for user-facing audiences:
|
|
44
|
+
|
|
45
|
+
1. Before strategy selection, inspect observed shared hosts/composition owners/extension points, independent-site conventions, and the active edition's framework constraints.
|
|
46
|
+
2. After selection, inspect only affected surfaces and validate a coherent target tuple. Preserve established strategy and ask only about missing/materially changed audiences. The four normal Web/Admin combinations are useful only when both audiences are unresolved; a single audience does not need a redundant four-way choice.
|
|
47
|
+
|
|
48
|
+
Shared integration requires an observed owning site and cited extension point. For an independent new site, design and check together:
|
|
30
49
|
|
|
31
|
-
|
|
32
|
-
|
|
50
|
+
- site ID and public mount path, including collisions among enabled sites and exclusive ownership of the empty/root path;
|
|
51
|
+
- flavor, frontend composition/configuration ownership, SSR rendering/admission contract, and tracked flavor configuration destinations;
|
|
52
|
+
- site module, `SsrSite` registration design, copied bundle/release identity, generated REST package, and package/import alignment;
|
|
53
|
+
- development, SSR-build, REST-build, preview, paired root wrapper, and `deps:vona` handoff;
|
|
54
|
+
- durable manifests and whether the site belongs to the edition's default artifact set.
|
|
33
55
|
|
|
34
|
-
|
|
56
|
+
Read framework code and [the independent SSR setup guide](../../../../repo-docs/fullstack/ssr-site-and-flavor-setup.md) for constraints; representative sites are specimens, not the new suite's design authority. Cite the source surfaces used for validation, not a fabricated target source path. Keep local environment identity/ports outside site planning.
|
|
35
57
|
|
|
36
|
-
|
|
58
|
+
A new wrapper must be labeled **planned addition**, with its durable manifest path and paired SSR/REST steps. Do not list it among current runnable commands. During execution, create it under the approved boundary, inspect the resulting manifest, then run it. Existing wrappers must be observed before reuse.
|
|
37
59
|
|
|
38
|
-
|
|
60
|
+
A deferred strategy/tuple gate blocks only affected frontend/site implementation. Backend, unrelated audiences, and runnable discovery tasks retain accurate status. Independent composition never creates a separate tenant, identity, persistence, authorization, or domain-rule authority.
|
|
39
61
|
|
|
40
|
-
## Suite-first
|
|
62
|
+
## Suite-first topology
|
|
41
63
|
|
|
42
|
-
|
|
64
|
+
The intended ownership layout is normally:
|
|
43
65
|
|
|
44
66
|
```text
|
|
45
67
|
vona/src/suite/<suite>/modules/<module>/
|
|
46
68
|
zova/src/suite/<suite>/modules/<module>/
|
|
47
69
|
```
|
|
48
70
|
|
|
49
|
-
|
|
71
|
+
Classify these as observed existing, proposed new, or explicitly approved new; planned directories need not exist before generation. Reuse established owners rather than duplicating hierarchy.
|
|
50
72
|
|
|
51
|
-
## CLI-first planning
|
|
73
|
+
## CLI-first planning and checks
|
|
52
74
|
|
|
53
|
-
No known Cabloy CLI
|
|
75
|
+
No known Cabloy CLI generates the complete Markdown planning set. Approved records may be authored manually under `repo-specs/`. Implementation scaffolding/metadata/OpenAPI/dependency work uses discovered Vona/Zova command families through bounded execution and specialists.
|
|
54
76
|
|
|
55
|
-
|
|
77
|
+
Verify root scripts before citing them. The shared planning branches are:
|
|
56
78
|
|
|
57
79
|
```bash
|
|
58
|
-
npm run
|
|
59
|
-
npm run
|
|
60
|
-
|
|
61
|
-
npm run
|
|
62
|
-
npm run
|
|
63
|
-
npm run test:e2e
|
|
64
|
-
npm run build:zova:admin
|
|
65
|
-
npm run build:zova:web
|
|
66
|
-
npm run deps:vona
|
|
80
|
+
npm run spec:check -- <suite>
|
|
81
|
+
npm run spec:check -- <suite> --lightweight
|
|
82
|
+
# Only with complete chart inputs:
|
|
83
|
+
npm run spec:charts -- <suite>
|
|
84
|
+
npm run spec:charts:check -- <suite>
|
|
67
85
|
```
|
|
68
86
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
For a fullstack contract change, record the appropriate checkpoint:
|
|
72
|
-
|
|
73
|
-
- forward chain: backend contract truth, OpenAPI inspection, generated Zova consumers, then thin model/page follow-up;
|
|
74
|
-
- reverse chain: matching Zova flavor SSR plus REST build, then `npm run deps:vona`;
|
|
75
|
-
- if generated artifacts are correct but installed consumers remain stale, diagnose local dependency drift before editing generated files.
|
|
76
|
-
|
|
77
|
-
Hand actual implementation-time synchronization to `cabloy-contract-loop`.
|
|
78
|
-
|
|
79
|
-
## Documentation boundaries
|
|
80
|
-
|
|
81
|
-
| Content | Home |
|
|
82
|
-
| --------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
83
|
-
| Product requirements, SRS contracts, WBS, ATPs, suite ADRs, delivery status | `repo-specs/<suite>/` |
|
|
84
|
-
| Reusable user-facing or agent-facing framework guidance | `repo-docs/` |
|
|
85
|
-
| Cross-suite maintainer architecture, rationale, and engineering ADRs | `repo-docs-internal/`; individual records may vary by edition |
|
|
86
|
-
| Short durable AI operating rules | `repo-agent-governance/policies/` |
|
|
87
|
-
| Reusable procedural workflow | `repo-agent-governance/skills/` |
|
|
87
|
+
For prospective implementation, inspect applicable root `tsc`, `test`, build, E2E, flavor-paired build, and dependency-sync commands. A documented command is a prospective procedure, not a passing run.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
- Forward: backend contract truth -> OpenAPI inspection -> generated Zova consumers -> thin follow-up.
|
|
90
|
+
- Reverse: affected flavor SSR and REST outputs together -> `npm run deps:vona`.
|
|
91
|
+
- Correct generated output but stale installed consumers: local dependency drift, not permission to patch generated files.
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
Actual synchronization belongs to `cabloy-contract-loop` under execution.
|
|
92
94
|
|
|
93
|
-
|
|
95
|
+
## Safe boundary
|
|
94
96
|
|
|
95
|
-
-
|
|
96
|
-
- reset or recreate a database;
|
|
97
|
-
- scaffold source code;
|
|
98
|
-
- run deployment or external-provider operations;
|
|
99
|
-
- claim test, browser, CI, build, migration, or generated-artifact results.
|
|
97
|
+
Business planning belongs in `repo-specs/`; reusable guidance in `repo-docs/`; supporting cross-suite rationale in `repo-docs-internal/`; procedural behavior in authored governance skills. Do not introduce a parallel authority.
|
|
100
98
|
|
|
101
|
-
|
|
99
|
+
Planning must not automatically run init, database reset/recreation, source scaffolding, acceptance tests, deployment, or provider operations. Static planning checks are not ATP evidence. Any meaningful retained verification needs a separately approved bounded scope and actual revision/environment/procedure/result/redacted artifact.
|
package/repo-agent-governance/skills/cabloy-spec-generation/references/repo-specs-document-set.md
CHANGED
|
@@ -37,7 +37,9 @@ The directory is repository-native, suite-local, and maintainer-facing. It is no
|
|
|
37
37
|
| `decisions/*.md` | Durable suite-local scope, architecture, security, ownership, migration, or integration decisions. |
|
|
38
38
|
| `runbooks/*.md` | Operational procedures subordinate to the relevant SRS, ADR, WBS, and test plan. |
|
|
39
39
|
|
|
40
|
-
When records disagree, update
|
|
40
|
+
When records disagree, update authority first, then downstream mappings and derived status. Use `canonical-spec-input.md` for new declaration syntax and the three separate quality gates. Full baseline and complete incremental sets use `npm run spec:check -- <suite>`; explicitly lightweight sets use `--lightweight` and state omitted owners/chain coverage. An existing directory is an incremental destination, not an automatic conflict or reset request.
|
|
41
|
+
|
|
42
|
+
Generate/check charts only with complete supported README/WBS/ATP/progress inputs. Regenerate after `pdp-wbs.md`, `test-plan.md`, `progress.md`, or README title/language changes. An incomplete lightweight/legacy set reports missing chart inputs rather than inventing business definitions to make the generator run.
|
|
41
43
|
|
|
42
44
|
The implementation charts are generated records, not authorities. The Gantt reads formal WBS phases/tasks/dependencies and progress status, with ATP labels only when they resolve in `test-plan.md`; absent authoritative dates or estimates must be shown as relative/illustrative order. The burndown reads active/deferred scope and verified status; without immutable dated snapshots it must be a scope-count reference rather than a calendar trend or forecast. Neither chart may add scope, dependencies, evidence, or completion claims. Both SVGs use the README-derived language consistently, including visible labels, accessibility text, and metadata.
|
|
43
45
|
|
|
@@ -109,7 +111,7 @@ Use identifiers such as `SRS-<DOMAIN>-*`. Define the technical facts needed to i
|
|
|
109
111
|
- generated API consumers and forward/reverse contract-loop obligations;
|
|
110
112
|
- frontend model/resource ownership, audience-specific contracts, route names/params, SSR privacy, and hydration behavior when applicable.
|
|
111
113
|
|
|
112
|
-
For each
|
|
114
|
+
For each audience, SRS owns topology and audience-specific API/DTO, scope, state/page/route, and SSR contracts. Apply the observed-existing/proposed-new/explicitly-approved-new semantics in `repo-aware-discovery.md`. Shared targets require a cited existing owner. A deliberately new independent tuple may be designed before source exists: validate framework constraints and collisions, obtain explicit design approval and an `Accepted` governing ADR, then permit creation only through bounded execution approval. Unknown/unchecked values stay `TODO(confirm)`; a planned new wrapper is not a current command. Independent composition does not create separate tenant, identity, authorization, persistence, or business-rule authority.
|
|
113
115
|
|
|
114
116
|
Mark observed repository facts separately from confirmed inputs and proposed target contracts. Every exact SRS ID named in PRD/WBS/test-plan traceability must have one explicit SRS contract definition here; a matrix mention, wildcard, or range is not a definition. Never pretend an unverified path, operation, flavor, or module exists.
|
|
115
117
|
|
|
@@ -127,7 +129,7 @@ Use:
|
|
|
127
129
|
8. `## Completion and Evidence Rules`;
|
|
128
130
|
9. `## Related Records`.
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
Complete new long-lived baselines include both derived charts once their supported inputs are complete. Follow the conditional chart branch and freshness commands in `canonical-spec-input.md`; neither charts nor audit results are implementation proof.
|
|
131
133
|
|
|
132
134
|
Every WBS entry should state:
|
|
133
135
|
|
|
@@ -169,7 +171,7 @@ Every evidence record should retain, at minimum:
|
|
|
169
171
|
- redacted log, response, screenshot, CI job, or artifact location;
|
|
170
172
|
- waiver owner, reason, and expiry when a temporary exception exists.
|
|
171
173
|
|
|
172
|
-
A
|
|
174
|
+
A listed command is prospective, not a result. Independent-site proof may target an explicitly approved new tuple and planned wrapper, with wrapper creation/manifest observation as a prerequisite to running it. Proposed/unchecked designs retain their gates. Shared-site proof uses the observed owner. Neither prospective procedures nor source reading establish successful verification.
|
|
173
175
|
|
|
174
176
|
## Progress template contract
|
|
175
177
|
|
|
@@ -27,7 +27,9 @@ Before reporting a generated baseline or an authority update complete, build a t
|
|
|
27
27
|
- Report missing owners, duplicate definitions, and orphaned material definitions separately; correct the authoritative records before completion.
|
|
28
28
|
- Validate the canonical PRD -> SRS -> WBS -> ATP chain by exact defined IDs, while allowing a many-to-many relationship where the matrices make it explicit.
|
|
29
29
|
- This static audit covers generated planning records only. Exclude `evidence/`: evidence is created after observed execution and cannot establish or repair planning authority.
|
|
30
|
-
-
|
|
30
|
+
- Run `npm run spec:check -- <suite>` for the planning authority audit; add `--lightweight` only for explicitly agreed limited scope. Derive chain associations from explicit declaration-body Traceability, not matrix co-occurrence.
|
|
31
|
+
- `canonical-spec-input.md` specifies new declarations and compatible legacy catalogue roles. Matrix/evidence mentions cannot establish definitions.
|
|
32
|
+
- With complete supported chart inputs, run `npm run spec:charts:check -- <suite>` after generation to verify model consistency and freshness. This is a separate gate, not the PRD/SRS audit or evidence review.
|
|
31
33
|
|
|
32
34
|
## Canonical chain
|
|
33
35
|
|
|
@@ -57,10 +59,11 @@ When a requirement or durable boundary changes:
|
|
|
57
59
|
4. update ATP procedures and expected proof;
|
|
58
60
|
5. update progress and evidence pointers;
|
|
59
61
|
6. reassess prior evidence and statuses whose assumptions changed;
|
|
60
|
-
7.
|
|
61
|
-
8. run `npm run spec:charts:check -- <suite
|
|
62
|
+
7. run the applicable full/lightweight planning audit and review legacy gaps without inventing business definitions;
|
|
63
|
+
8. with complete supported chart inputs, regenerate both charts and run `npm run spec:charts:check -- <suite>`; otherwise report the precise chart-input gap;
|
|
64
|
+
9. review human approval, controlling TODOs, and retained proof separately.
|
|
62
65
|
|
|
63
|
-
Downstream records
|
|
66
|
+
Downstream records do not silently override authority. Charts cannot authorize scope, dependencies, dates, evidence, or status. Their language follows `README.md`; title/language edits also require regeneration when chart inputs are complete.
|
|
64
67
|
|
|
65
68
|
## Status semantics
|
|
66
69
|
|
|
@@ -80,10 +83,11 @@ For a newly created plan, initialize delivery rows as `not-started`, `deferred`,
|
|
|
80
83
|
|
|
81
84
|
Keep the status domain explicit:
|
|
82
85
|
|
|
83
|
-
- **Observed
|
|
84
|
-
- **Confirmed inputs** are
|
|
85
|
-
- **Proposed
|
|
86
|
-
- **
|
|
86
|
+
- **Observed existing** targets are inspected and cited repository facts.
|
|
87
|
+
- **Confirmed inputs** are explicitly supplied/confirmed values; they are not automatically accepted durable designs.
|
|
88
|
+
- **Proposed new** targets remain proposals while design checks, explicit approval, or ADR acceptance are missing.
|
|
89
|
+
- **Explicitly approved new** targets require framework/collision validation, explicit concrete design approval, and an `Accepted` governing ADR. Their source may be created later under a separately approved bounded execution dossier; absence of that future source is not a design blocker.
|
|
90
|
+
- Generation approval, ADR acceptance, and execution approval are separate domains. Keep any partially approved target state and controlling TODOs explicit.
|
|
87
91
|
|
|
88
92
|
A README may summarize observed facts and confirmed inputs, but it must not label a proposed target baseline, topology, scope boundary, or durable decision as `Confirmed` or `Accepted` while its governing ADR remains `Proposed`. Use neutral wording such as “Product and Technical Baseline,” and label individual entries by their actual state. The ADR remains authoritative; a README summary never upgrades its status.
|
|
89
93
|
|
|
@@ -177,7 +177,10 @@ test('initializer preserves a legacy-customized adapter during a staged upgrade'
|
|
|
177
177
|
);
|
|
178
178
|
writeFileSync(fixtureBootstrap, content);
|
|
179
179
|
writeFileSync(resolve(root, 'CLAUDE.md'), 'legacy project customization\n');
|
|
180
|
-
|
|
180
|
+
const projectPackage = JSON.parse(readFileSync(resolve(ROOT_DIR, 'package.json'), 'utf8'));
|
|
181
|
+
delete projectPackage.scripts['spec:check'];
|
|
182
|
+
projectPackage.scripts['project:custom'] = 'node project-owned.mjs';
|
|
183
|
+
writeFileSync(resolve(root, 'package.json'), JSON.stringify(projectPackage));
|
|
181
184
|
|
|
182
185
|
const upgradeRoot = resolve(root, 'node_modules/.cabloy-upgrade');
|
|
183
186
|
cpSync(GOVERNANCE_DIR, resolve(upgradeRoot, 'repo-agent-governance'), { recursive: true });
|
|
@@ -199,6 +202,12 @@ test('initializer preserves a legacy-customized adapter during a staged upgrade'
|
|
|
199
202
|
/Staged governance source/,
|
|
200
203
|
);
|
|
201
204
|
assert.match(readFileSync(resolve(root, 'AGENTS.md'), 'utf8'), /Staged governance source/);
|
|
205
|
+
const updatedPackage = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8'));
|
|
206
|
+
assert.equal(
|
|
207
|
+
updatedPackage.scripts['spec:check'],
|
|
208
|
+
'node ./repo-agent-governance/tools/spec-audit/audit.mjs',
|
|
209
|
+
);
|
|
210
|
+
assert.equal(updatedPackage.scripts['project:custom'], 'node project-owned.mjs');
|
|
202
211
|
});
|
|
203
212
|
});
|
|
204
213
|
|