@coordiation/agent 0.1.0 → 1.0.0-rc.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/README.md +200 -0
- package/approvals.schema.json +40 -0
- package/artifact.schema.json +28 -0
- package/capability-template.schema.json +49 -0
- package/development-contract.schema.json +72 -0
- package/evidence.schema.json +36 -0
- package/interview.schema.json +45 -0
- package/lifecycle-adapter.schema.json +18 -0
- package/lifecycle.schema.json +46 -0
- package/package.json +35 -3
- package/product-project.schema.json +31 -0
- package/production-record.schema.json +127 -0
- package/prototype-contract.schema.json +115 -0
- package/qa-report.schema.json +87 -0
- package/release-record.schema.json +141 -0
- package/schema-registry.json +29 -0
- package/src/hardening.js +69 -0
- package/src/index.js +46 -1
- package/src/lifecycle.js +1751 -0
- package/traceability.schema.json +42 -0
- package/ux-contract.schema.json +84 -0
package/README.md
CHANGED
|
@@ -12,3 +12,203 @@ const pricingContext = createContextPack("pricing", manifest);
|
|
|
12
12
|
The compact manifest reports the active framework, Coordiation packages, utility families, frequent literal classes, project rules, and trackable warnings without sending the entire source tree to an agent.
|
|
13
13
|
|
|
14
14
|
Available context packs: `page`, `navigation`, `form`, `dashboard`, `pricing`, `component`, and `theme`.
|
|
15
|
+
|
|
16
|
+
## Product lifecycle contracts
|
|
17
|
+
|
|
18
|
+
The same package can turn a bounded product request into versioned, traceable artifacts:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import {
|
|
22
|
+
approveLifecycleArtifact,
|
|
23
|
+
checkLifecycleGate,
|
|
24
|
+
initializeLifecycleProject,
|
|
25
|
+
runRequirementInterview,
|
|
26
|
+
} from "@coordiation/agent";
|
|
27
|
+
|
|
28
|
+
await initializeLifecycleProject({
|
|
29
|
+
cwd: process.cwd(),
|
|
30
|
+
name: "Customer Portal",
|
|
31
|
+
ownerName: "Product owner",
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const turn = await runRequirementInterview({
|
|
35
|
+
cwd: process.cwd(),
|
|
36
|
+
intent: "login",
|
|
37
|
+
answers: { audience: "customers" },
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Each interview turn returns at most three questions. Every question includes its reason, bounded examples, a recommended answer, and permission to use a custom answer. Passing `recommended` records an explicit user-confirmed recommendation rather than silently inventing a decision.
|
|
42
|
+
|
|
43
|
+
Completing an interview generates canonical JSON plus human-readable Markdown for a numbered Specification, PRD, and six acceptance criteria. Gate checks and named human approvals move the lifecycle forward without letting an agent approve its own work.
|
|
44
|
+
|
|
45
|
+
Built-in capability templates cover login, dashboard, landing page, checkout, profile, settings, search, upload, and notifications. Unknown intents automatically use an answerable generic feature template instead of being rejected:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import { listCapabilityTemplates, runRequirementInterview } from "@coordiation/agent";
|
|
49
|
+
|
|
50
|
+
console.log(listCapabilityTemplates());
|
|
51
|
+
|
|
52
|
+
const firstTurn = await runRequirementInterview({
|
|
53
|
+
cwd: process.cwd(),
|
|
54
|
+
intent: "inventory approval workflow",
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Multiple capability contracts can coexist in one project. Artifact identifiers are allocated safely (`SPEC-001`, `SPEC-002`, and so on), and gate checks can target one artifact explicitly.
|
|
59
|
+
|
|
60
|
+
An approved PRD can be derived into a complete UX contract:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
import { createUxContract } from "@coordiation/agent";
|
|
64
|
+
|
|
65
|
+
const result = await createUxContract({
|
|
66
|
+
cwd: process.cwd(),
|
|
67
|
+
prdId: "PRD-001",
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The generated `UX-001` links back to the PRD and its acceptance criteria. It contains the primary user flow, screen states, information architecture, interaction rules, responsive behavior from 320px, accessibility behavior, content rules, and a downstream evidence plan. Repeating the operation safely reuses the existing UX artifact.
|
|
72
|
+
|
|
73
|
+
After UX approval, derive an implementation-oriented prototype contract:
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
import { createPrototypeContract } from "@coordiation/agent";
|
|
77
|
+
|
|
78
|
+
const result = await createPrototypeContract({
|
|
79
|
+
cwd: process.cwd(),
|
|
80
|
+
uxId: "UX-001",
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`PROTO-001` selects owned `@coordiation/ui` components, requires `@coordiation/icons`, publishes literal `co-*` layout candidates, maps every UX state to a deterministic preview fixture, and defines viewport, motion, mock-adapter, keyboard, accessibility, screenshot, and acceptance-evidence contracts.
|
|
85
|
+
|
|
86
|
+
An approved prototype can become a framework-native development contract:
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
import { createDevelopmentContract, recordDevelopmentEvidence } from "@coordiation/agent";
|
|
90
|
+
|
|
91
|
+
const result = await createDevelopmentContract({ cwd: process.cwd(), prototypeId: "PROTO-001" });
|
|
92
|
+
|
|
93
|
+
await recordDevelopmentEvidence({
|
|
94
|
+
cwd: process.cwd(),
|
|
95
|
+
developmentId: "DEV-001",
|
|
96
|
+
type: "source",
|
|
97
|
+
path: "src/features/login-experience/login-experience.tsx",
|
|
98
|
+
});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Coordiation detects Next.js/React, Svelte, Astro, Laravel, WordPress, or standards-first HTML and produces native source ownership, file, state, adapter, work-item, utility, and acceptance-test plans. `GATE-DEVELOPMENT` remains blocked until source, test, build, and accessibility evidence reference real project files or reports with SHA-256 hashes.
|
|
102
|
+
|
|
103
|
+
After development approval, derive an executable QA report and attach evidence produced by real project checks:
|
|
104
|
+
|
|
105
|
+
```js
|
|
106
|
+
import { createQaReport, recordQaEvidence } from "@coordiation/agent";
|
|
107
|
+
|
|
108
|
+
await createQaReport({ cwd: process.cwd(), developmentId: "DEV-001" });
|
|
109
|
+
await recordQaEvidence({
|
|
110
|
+
cwd: process.cwd(),
|
|
111
|
+
qaId: "QA-001",
|
|
112
|
+
type: "functional",
|
|
113
|
+
path: "reports/qa-functional.log",
|
|
114
|
+
command: "npm run test:e2e",
|
|
115
|
+
exitCode: 0,
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`QA-001` maps every acceptance criterion and implemented state to a test case, covers 320px, 768px, and 1280px, and defines accessibility, security, and regression checks. `GATE-QA` requires the latest functional, visual, accessibility, security, and regression evidence to be verified and passing. Failed evidence remains a release blocker until a newer passing record is attached.
|
|
120
|
+
|
|
121
|
+
An approved QA report can become an immutable release candidate contract:
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
import { createReleaseRecord, recordReleaseEvidence } from "@coordiation/agent";
|
|
125
|
+
|
|
126
|
+
await createReleaseRecord({ cwd: process.cwd(), qaId: "QA-001", version: "1.0.0" });
|
|
127
|
+
await recordReleaseEvidence({
|
|
128
|
+
cwd: process.cwd(),
|
|
129
|
+
releaseId: "RELEASE-001",
|
|
130
|
+
type: "candidate",
|
|
131
|
+
path: "reports/release-candidate.log",
|
|
132
|
+
command: "npm run build",
|
|
133
|
+
exitCode: 0,
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The release snapshot binds its semantic version to the approved QA revision, Development revision, acceptance criteria, and verified QA evidence with SHA-256. It contains requirement-linked changelog entries, compatibility and migration behavior, secret-safe environment names, progressive rollout batches, health checks, and an executable rollback contract. `GATE-RELEASE` requires candidate, release-notes, and rollback-validation evidence before human approval can advance to Production.
|
|
138
|
+
|
|
139
|
+
An approved release can become a provider-agnostic Production record:
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
import { createProductionRecord, recordProductionEvidence } from "@coordiation/agent";
|
|
143
|
+
|
|
144
|
+
await createProductionRecord({
|
|
145
|
+
cwd: process.cwd(),
|
|
146
|
+
releaseId: "RELEASE-001",
|
|
147
|
+
environment: "production",
|
|
148
|
+
sourceRevision: "abc123def456",
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
await recordProductionEvidence({
|
|
152
|
+
cwd: process.cwd(),
|
|
153
|
+
productionId: "DEPLOY-001",
|
|
154
|
+
type: "health",
|
|
155
|
+
path: "reports/production-health.json",
|
|
156
|
+
command: "npm run healthcheck",
|
|
157
|
+
exitCode: 0,
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Deriving `DEPLOY-001` never deploys automatically. It binds an approved release to one environment and immutable source revision, copies the rollout and health contracts, defines monitoring and alert ownership, and preserves a validated rollback path. Evidence updates operational state: deployed or failed, healthy or unhealthy, active or degraded monitoring, and ready or not-ready rollback. `GATE-PRODUCTION` requires all four latest evidence records to pass before final human approval.
|
|
162
|
+
|
|
163
|
+
## Revision and compatibility safety
|
|
164
|
+
|
|
165
|
+
Evidence is revision-scoped. Revising an approved artifact archives its previous JSON, increments the stable artifact revision, clears active approvals and evidence, marks every dependent artifact as superseded, and resets lifecycle gates from that stage onward:
|
|
166
|
+
|
|
167
|
+
```js
|
|
168
|
+
import { assertSchemaCompatibility, reviseLifecycleArtifact } from "@coordiation/agent";
|
|
169
|
+
|
|
170
|
+
assertSchemaCompatibility("1.0");
|
|
171
|
+
await reviseLifecycleArtifact({
|
|
172
|
+
cwd: process.cwd(),
|
|
173
|
+
artifactId: "DEV-001",
|
|
174
|
+
reason: "The approved adapter contract changed.",
|
|
175
|
+
bodyPatch: { openDecisions: [] },
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Patches may only change existing body fields. Old evidence remains in the audit ledger with its original `artifactRevision`, but gates only accept evidence for the current revision. Unknown schema versions are rejected until an explicit migration exists.
|
|
180
|
+
|
|
181
|
+
## Lifecycle adapters and context budget
|
|
182
|
+
|
|
183
|
+
Adapters are explicit, in-process hooks. Registering an adapter never grants authority by itself and never triggers network access:
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
import { dispatchLifecycleAdapterHook, registerLifecycleAdapter } from "@coordiation/agent";
|
|
187
|
+
|
|
188
|
+
registerLifecycleAdapter(
|
|
189
|
+
{ id: "audit-export", version: "1.0.0", capabilities: ["audit"], hooks: ["artifact.approved"] },
|
|
190
|
+
{ "artifact.approved": async (payload) => ({ received: payload.artifactId }) },
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
await dispatchLifecycleAdapterHook("artifact.approved", { artifactId: "RELEASE-001", revision: 1 });
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Supported hooks are `artifact.created`, `artifact.revised`, `evidence.recorded`, `gate.checked`, and `artifact.approved`. Every task context pack reports its measured byte count, estimated token count, and whether it stays within the default 1,200-token target.
|
|
197
|
+
|
|
198
|
+
Published schemas:
|
|
199
|
+
|
|
200
|
+
- `product-project.schema.json`
|
|
201
|
+
- `lifecycle.schema.json`
|
|
202
|
+
- `artifact.schema.json`
|
|
203
|
+
- `traceability.schema.json`
|
|
204
|
+
- `approvals.schema.json`
|
|
205
|
+
- `interview.schema.json`
|
|
206
|
+
- `capability-template.schema.json`
|
|
207
|
+
- `ux-contract.schema.json`
|
|
208
|
+
- `prototype-contract.schema.json`
|
|
209
|
+
- `development-contract.schema.json`
|
|
210
|
+
- `qa-report.schema.json`
|
|
211
|
+
- `release-record.schema.json`
|
|
212
|
+
- `production-record.schema.json`
|
|
213
|
+
- `lifecycle-adapter.schema.json`
|
|
214
|
+
- `evidence.schema.json`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/approvals.schema.json",
|
|
4
|
+
"title": "Coordiation approvals ledger",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "kind", "approvals", "updatedAt"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"kind": { "const": "coordiation-approvals" },
|
|
10
|
+
"approvals": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["id", "artifactId", "revision", "gate", "decision", "approver", "comment", "createdAt"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": { "type": "string", "pattern": "^APPROVAL-[0-9]{3}$" },
|
|
17
|
+
"artifactId": { "type": "string" },
|
|
18
|
+
"revision": { "type": "integer", "minimum": 1 },
|
|
19
|
+
"gate": { "type": "string", "pattern": "^GATE-[A-Z-]+$" },
|
|
20
|
+
"decision": { "const": "approved" },
|
|
21
|
+
"approver": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": ["name", "email", "role"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"name": { "type": "string", "minLength": 1 },
|
|
26
|
+
"email": { "type": ["string", "null"] },
|
|
27
|
+
"role": { "const": "human-approver" }
|
|
28
|
+
},
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
},
|
|
31
|
+
"comment": { "type": "string" },
|
|
32
|
+
"createdAt": { "type": "string", "format": "date-time" }
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/artifact.schema.json",
|
|
4
|
+
"title": "Coordiation lifecycle artifact",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "id", "kind", "title", "stage", "status", "revision", "owners", "derivedFrom", "acceptanceCriteria", "dependencies", "risks", "evidence", "approvals", "body", "createdAt", "updatedAt"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"id": { "type": "string", "pattern": "^[A-Z]+-[0-9]{3}$" },
|
|
10
|
+
"kind": { "enum": ["product-specification", "product-requirement-document", "acceptance-criterion", "ux-contract", "prototype-contract", "development-contract", "qa-report", "release-record", "production-record"] },
|
|
11
|
+
"title": { "type": "string", "minLength": 1 },
|
|
12
|
+
"stage": { "enum": ["specification", "prd", "ux", "prototype", "development", "qa", "release", "production"] },
|
|
13
|
+
"status": { "enum": ["draft", "approved", "superseded"] },
|
|
14
|
+
"revision": { "type": "integer", "minimum": 1 },
|
|
15
|
+
"owners": { "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
16
|
+
"derivedFrom": { "$ref": "#/$defs/ids" },
|
|
17
|
+
"acceptanceCriteria": { "$ref": "#/$defs/ids" },
|
|
18
|
+
"dependencies": { "type": "array" },
|
|
19
|
+
"risks": { "type": "array" },
|
|
20
|
+
"evidence": { "type": "array" },
|
|
21
|
+
"approvals": { "$ref": "#/$defs/ids" },
|
|
22
|
+
"body": { "type": "object" },
|
|
23
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
24
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
25
|
+
},
|
|
26
|
+
"$defs": { "ids": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } },
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/capability-template.schema.json",
|
|
4
|
+
"title": "Coordiation capability interview template",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "intent", "capability", "artifactStrategy", "questions", "maxQuestionsPerTurn"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
9
|
+
"intent": { "type": "string", "minLength": 1 },
|
|
10
|
+
"capability": { "type": "string", "minLength": 1 },
|
|
11
|
+
"aliases": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
12
|
+
"artifactStrategy": { "enum": ["login", "generic-feature"] },
|
|
13
|
+
"maxQuestionsPerTurn": { "type": "integer", "minimum": 1, "maximum": 3 },
|
|
14
|
+
"questions": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["id", "priority", "question", "why", "choices", "recommendedValue", "example"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
22
|
+
"priority": { "enum": ["blocking", "recommended", "optional"] },
|
|
23
|
+
"question": { "type": "string", "minLength": 1 },
|
|
24
|
+
"why": { "type": "string", "minLength": 1 },
|
|
25
|
+
"recommendedValue": { "type": "string", "minLength": 1 },
|
|
26
|
+
"example": { "type": "string", "minLength": 1 },
|
|
27
|
+
"choices": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"minItems": 2,
|
|
30
|
+
"maxItems": 4,
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["value", "label", "effect"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"value": { "type": "string", "minLength": 1 },
|
|
36
|
+
"label": { "type": "string", "minLength": 1 },
|
|
37
|
+
"effect": { "type": "string", "minLength": 1 },
|
|
38
|
+
"recommended": { "type": "boolean" }
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/development-contract.schema.json",
|
|
4
|
+
"title": "Coordiation development contract",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "id", "kind", "stage", "status", "derivedFrom", "acceptanceCriteria", "evidence", "body"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"id": { "type": "string", "pattern": "^DEV-[0-9]{3}$" },
|
|
10
|
+
"kind": { "const": "development-contract" },
|
|
11
|
+
"stage": { "const": "development" },
|
|
12
|
+
"status": { "enum": ["draft", "approved", "superseded"] },
|
|
13
|
+
"derivedFrom": { "type": "array", "minItems": 1, "items": { "type": "string", "pattern": "^PROTO-[0-9]{3}$" } },
|
|
14
|
+
"acceptanceCriteria": { "type": "array", "minItems": 4, "items": { "type": "string", "pattern": "^AC-[0-9]{3}$" }, "uniqueItems": true },
|
|
15
|
+
"evidence": { "type": "array", "items": { "type": "string", "pattern": "^EVIDENCE-[0-9]{3}$" }, "uniqueItems": true },
|
|
16
|
+
"body": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["capability", "target", "sourcePlan", "dependencies", "utilityCandidates", "stateImplementation", "interactionImplementation", "workItems", "dataBoundary", "testPlan", "qualityCommands", "definitionOfDone", "requiredEvidence", "openDecisions"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"capability": { "type": "string", "minLength": 1 },
|
|
21
|
+
"target": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": ["framework", "language", "extension", "sourceRoot", "nativeComponentModel"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"framework": { "enum": ["Next.js", "React", "Svelte", "Astro", "Laravel/PHP", "WordPress", "HTML"] },
|
|
26
|
+
"language": { "type": "string" },
|
|
27
|
+
"extension": { "type": "string" },
|
|
28
|
+
"sourceRoot": { "type": "string" },
|
|
29
|
+
"nativeComponentModel": { "type": "string" }
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
},
|
|
33
|
+
"sourcePlan": { "type": "object", "required": ["root", "files", "ownership"] },
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["components", "icons", "css", "external"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"components": { "type": "array", "minItems": 5, "items": { "type": "string" } },
|
|
39
|
+
"icons": { "const": "@coordiation/icons only" },
|
|
40
|
+
"css": { "const": "@coordiation/css" },
|
|
41
|
+
"external": { "type": "string" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"utilityCandidates": { "type": "array", "minItems": 6, "items": { "type": "string", "pattern": "(^|:)co-" }, "uniqueItems": true },
|
|
45
|
+
"stateImplementation": { "type": "array", "minItems": 5 },
|
|
46
|
+
"interactionImplementation": { "type": "array", "minItems": 4 },
|
|
47
|
+
"workItems": { "type": "array", "minItems": 5 },
|
|
48
|
+
"dataBoundary": { "type": "object", "required": ["adapter", "rule", "secrets", "failures"] },
|
|
49
|
+
"testPlan": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"minItems": 4,
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"required": ["id", "criterionId", "levels", "requiredEvidence"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"id": { "type": "string" },
|
|
57
|
+
"criterionId": { "type": "string", "pattern": "^AC-[0-9]{3}$" },
|
|
58
|
+
"levels": { "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
59
|
+
"requiredEvidence": { "type": "string" }
|
|
60
|
+
},
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"qualityCommands": { "type": "object", "required": ["test", "build", "accessibility", "note"] },
|
|
65
|
+
"definitionOfDone": { "type": "array", "minItems": 5, "items": { "type": "string" } },
|
|
66
|
+
"requiredEvidence": { "type": "array", "const": ["source", "test", "build", "accessibility"] },
|
|
67
|
+
"openDecisions": { "type": "array" }
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/evidence.schema.json",
|
|
4
|
+
"title": "Coordiation evidence ledger",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "kind", "records", "updatedAt"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"kind": { "const": "coordiation-evidence" },
|
|
10
|
+
"records": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["id", "artifactId", "artifactRevision", "type", "status", "path", "sha256", "command", "exitCode", "verified", "summary", "recordedBy", "createdAt"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": { "type": "string", "pattern": "^EVIDENCE-[0-9]{3}$" },
|
|
17
|
+
"artifactId": { "type": "string", "pattern": "^(DEV|QA|RELEASE|DEPLOY)-[0-9]{3}$" },
|
|
18
|
+
"artifactRevision": { "type": "integer", "minimum": 1 },
|
|
19
|
+
"type": { "enum": ["source", "test", "build", "functional", "visual", "accessibility", "security", "regression", "candidate", "release-notes", "rollback-validation", "deployment", "health", "monitoring", "rollback-readiness"] },
|
|
20
|
+
"status": { "enum": ["passed", "failed"] },
|
|
21
|
+
"path": { "type": "string", "minLength": 1 },
|
|
22
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
23
|
+
"command": { "type": ["string", "null"] },
|
|
24
|
+
"exitCode": { "type": ["integer", "null"] },
|
|
25
|
+
"verified": { "type": "boolean" },
|
|
26
|
+
"summary": { "type": "string" },
|
|
27
|
+
"recordedBy": { "type": "string" },
|
|
28
|
+
"createdAt": { "type": "string", "format": "date-time" }
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/interview.schema.json",
|
|
4
|
+
"title": "Coordiation requirement interview",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "kind", "id", "intent", "status", "maxQuestionsPerTurn", "answers", "generatedArtifacts", "createdAt", "updatedAt"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"kind": { "const": "coordiation-requirement-interview" },
|
|
10
|
+
"id": { "type": "string" },
|
|
11
|
+
"intent": { "type": "string" },
|
|
12
|
+
"status": { "enum": ["active", "completed"] },
|
|
13
|
+
"maxQuestionsPerTurn": { "type": "integer", "minimum": 1, "maximum": 3 },
|
|
14
|
+
"answers": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["value", "source", "answeredAt"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"value": { "type": "string", "minLength": 1 },
|
|
21
|
+
"source": { "enum": ["user", "user-confirmed-recommendation"] },
|
|
22
|
+
"answeredAt": { "type": "string", "format": "date-time" }
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"generatedArtifacts": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["id", "json", "markdown"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "type": "string" },
|
|
34
|
+
"json": { "type": "string" },
|
|
35
|
+
"markdown": { "type": "string" }
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
41
|
+
"updatedAt": { "type": "string", "format": "date-time" },
|
|
42
|
+
"completedAt": { "type": "string", "format": "date-time" }
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/lifecycle-adapter.schema.json",
|
|
4
|
+
"title": "Coordiation lifecycle adapter manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "version", "capabilities", "hooks"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
9
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?$" },
|
|
10
|
+
"capabilities": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
11
|
+
"hooks": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": { "enum": ["artifact.created", "artifact.revised", "evidence.recorded", "gate.checked", "artifact.approved"] },
|
|
14
|
+
"uniqueItems": true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/lifecycle.schema.json",
|
|
4
|
+
"title": "Coordiation product lifecycle",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "kind", "currentStage", "stages", "gates", "updatedAt"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"kind": { "const": "coordiation-lifecycle" },
|
|
10
|
+
"currentStage": { "$ref": "#/$defs/stage" },
|
|
11
|
+
"stages": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 8,
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": ["id", "order", "status", "gate"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"id": { "$ref": "#/$defs/stage" },
|
|
19
|
+
"order": { "type": "integer", "minimum": 1 },
|
|
20
|
+
"status": { "enum": ["pending", "active", "approved"] },
|
|
21
|
+
"gate": { "type": "string", "pattern": "^GATE-[A-Z-]+$" }
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"gates": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["id", "stage", "status", "approvalId"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"id": { "type": "string", "pattern": "^GATE-[A-Z-]+$" },
|
|
33
|
+
"stage": { "$ref": "#/$defs/stage" },
|
|
34
|
+
"status": { "enum": ["pending", "approved"] },
|
|
35
|
+
"approvalId": { "type": ["string", "null"] }
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
41
|
+
},
|
|
42
|
+
"$defs": {
|
|
43
|
+
"stage": { "enum": ["specification", "prd", "ux", "prototype", "development", "qa", "release", "production"] }
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coordiation/agent",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
|
+
"description": "AI-readable project context, product lifecycle contracts, interviews, gates, approvals, and traceability for Coordiation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.js",
|
|
9
9
|
"./context-packs.json": "./context-packs.json",
|
|
10
|
-
"./
|
|
10
|
+
"./schema-registry.json": "./schema-registry.json",
|
|
11
|
+
"./agent-manifest.schema.json": "./agent-manifest.schema.json",
|
|
12
|
+
"./product-project.schema.json": "./product-project.schema.json",
|
|
13
|
+
"./lifecycle.schema.json": "./lifecycle.schema.json",
|
|
14
|
+
"./artifact.schema.json": "./artifact.schema.json",
|
|
15
|
+
"./traceability.schema.json": "./traceability.schema.json",
|
|
16
|
+
"./approvals.schema.json": "./approvals.schema.json",
|
|
17
|
+
"./interview.schema.json": "./interview.schema.json",
|
|
18
|
+
"./capability-template.schema.json": "./capability-template.schema.json",
|
|
19
|
+
"./ux-contract.schema.json": "./ux-contract.schema.json",
|
|
20
|
+
"./prototype-contract.schema.json": "./prototype-contract.schema.json",
|
|
21
|
+
"./development-contract.schema.json": "./development-contract.schema.json",
|
|
22
|
+
"./qa-report.schema.json": "./qa-report.schema.json",
|
|
23
|
+
"./release-record.schema.json": "./release-record.schema.json",
|
|
24
|
+
"./production-record.schema.json": "./production-record.schema.json",
|
|
25
|
+
"./lifecycle-adapter.schema.json": "./lifecycle-adapter.schema.json",
|
|
26
|
+
"./evidence.schema.json": "./evidence.schema.json"
|
|
11
27
|
},
|
|
12
28
|
"files": [
|
|
13
29
|
"src",
|
|
14
30
|
"context-packs.json",
|
|
31
|
+
"schema-registry.json",
|
|
15
32
|
"agent-manifest.schema.json",
|
|
33
|
+
"product-project.schema.json",
|
|
34
|
+
"lifecycle.schema.json",
|
|
35
|
+
"artifact.schema.json",
|
|
36
|
+
"traceability.schema.json",
|
|
37
|
+
"approvals.schema.json",
|
|
38
|
+
"interview.schema.json",
|
|
39
|
+
"capability-template.schema.json",
|
|
40
|
+
"ux-contract.schema.json",
|
|
41
|
+
"prototype-contract.schema.json",
|
|
42
|
+
"development-contract.schema.json",
|
|
43
|
+
"qa-report.schema.json",
|
|
44
|
+
"release-record.schema.json",
|
|
45
|
+
"production-record.schema.json",
|
|
46
|
+
"lifecycle-adapter.schema.json",
|
|
47
|
+
"evidence.schema.json",
|
|
16
48
|
"README.md",
|
|
17
49
|
"LICENSE"
|
|
18
50
|
],
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://coordiation.com/schemas/product-project.schema.json",
|
|
4
|
+
"title": "Coordiation product project",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "kind", "id", "name", "artifactFormat", "owners", "createdAt", "updatedAt"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "1.0" },
|
|
9
|
+
"kind": { "const": "coordiation-product-project" },
|
|
10
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
|
|
11
|
+
"name": { "type": "string", "minLength": 1 },
|
|
12
|
+
"artifactFormat": { "const": "canonical-json-with-generated-markdown" },
|
|
13
|
+
"owners": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"minItems": 1,
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["name", "role"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": { "type": "string", "minLength": 1 },
|
|
21
|
+
"email": { "type": ["string", "null"], "format": "email" },
|
|
22
|
+
"role": { "type": "string", "minLength": 1 }
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
28
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|