Merge branch 'next' into kimi-runtime-support
This commit is contained in:
241
gsd-core/bin/lib/capability-registry.cjs
Normal file
241
gsd-core/bin/lib/capability-registry.cjs
Normal file
@@ -0,0 +1,241 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* capability-registry.cjs — generated by scripts/gen-capability-registry.cjs
|
||||
* DO NOT EDIT BY HAND. Run: node scripts/gen-capability-registry.cjs --write
|
||||
* ADR-894 §5 — role-partitioned Capability Registry.
|
||||
*/
|
||||
|
||||
const capabilities = {
|
||||
"ui": {
|
||||
"id": "ui",
|
||||
"role": "feature",
|
||||
"title": "UI design contracts",
|
||||
"description": "UI-SPEC design contract + retrospective UI audit for frontend phases.",
|
||||
"tier": "standard",
|
||||
"requires": [],
|
||||
"skills": [
|
||||
"ui-phase",
|
||||
"ui-review"
|
||||
],
|
||||
"agents": [
|
||||
"gsd-ui-checker",
|
||||
"gsd-ui-auditor"
|
||||
],
|
||||
"hooks": [],
|
||||
"config": {
|
||||
"workflow.ui_phase": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable the UI design-contract gate during planning."
|
||||
},
|
||||
"workflow.ui_review": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable the retrospective UI audit."
|
||||
},
|
||||
"workflow.ui_safety_gate": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Block execution on unmet UI-SPEC contracts."
|
||||
}
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"point": "plan:pre",
|
||||
"ref": {
|
||||
"skill": "ui-phase"
|
||||
},
|
||||
"produces": [
|
||||
"UI-SPEC.md"
|
||||
],
|
||||
"consumes": [
|
||||
"CONTEXT.md"
|
||||
],
|
||||
"when": "workflow.ui_phase",
|
||||
"onError": "skip"
|
||||
},
|
||||
{
|
||||
"point": "verify:post",
|
||||
"ref": {
|
||||
"skill": "ui-review"
|
||||
},
|
||||
"produces": [
|
||||
"UI-REVIEW.md"
|
||||
],
|
||||
"consumes": [
|
||||
"UI-SPEC.md"
|
||||
],
|
||||
"when": "workflow.ui_review",
|
||||
"onError": "skip"
|
||||
}
|
||||
],
|
||||
"contributions": [],
|
||||
"gates": [
|
||||
{
|
||||
"point": "execute:wave:post",
|
||||
"check": {
|
||||
"query": "ui.safety-gate"
|
||||
},
|
||||
"when": "workflow.ui_safety_gate",
|
||||
"blocking": true,
|
||||
"onError": "halt"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
const bySkill = {
|
||||
"ui-phase": "ui",
|
||||
"ui-review": "ui"
|
||||
};
|
||||
|
||||
const byAgent = {
|
||||
"gsd-ui-checker": "ui",
|
||||
"gsd-ui-auditor": "ui"
|
||||
};
|
||||
|
||||
const byLoopPoint = {
|
||||
"discuss:pre": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"discuss:post": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"plan:pre": {
|
||||
"steps": [
|
||||
{
|
||||
"capId": "ui",
|
||||
"point": "plan:pre",
|
||||
"ref": {
|
||||
"skill": "ui-phase"
|
||||
},
|
||||
"produces": [
|
||||
"UI-SPEC.md"
|
||||
],
|
||||
"consumes": [
|
||||
"CONTEXT.md"
|
||||
],
|
||||
"when": "workflow.ui_phase",
|
||||
"onError": "skip"
|
||||
}
|
||||
],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"plan:post": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"execute:pre": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"execute:wave:pre": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"execute:wave:post": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": [
|
||||
{
|
||||
"capId": "ui",
|
||||
"point": "execute:wave:post",
|
||||
"check": {
|
||||
"query": "ui.safety-gate"
|
||||
},
|
||||
"when": "workflow.ui_safety_gate",
|
||||
"blocking": true,
|
||||
"onError": "halt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"execute:post": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"verify:pre": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"verify:post": {
|
||||
"steps": [
|
||||
{
|
||||
"capId": "ui",
|
||||
"point": "verify:post",
|
||||
"ref": {
|
||||
"skill": "ui-review"
|
||||
},
|
||||
"produces": [
|
||||
"UI-REVIEW.md"
|
||||
],
|
||||
"consumes": [
|
||||
"UI-SPEC.md"
|
||||
],
|
||||
"when": "workflow.ui_review",
|
||||
"onError": "skip"
|
||||
}
|
||||
],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"ship:pre": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
},
|
||||
"ship:post": {
|
||||
"steps": [],
|
||||
"contributions": [],
|
||||
"gates": []
|
||||
}
|
||||
};
|
||||
|
||||
const configKeys = {
|
||||
"workflow.ui_phase": "ui",
|
||||
"workflow.ui_review": "ui",
|
||||
"workflow.ui_safety_gate": "ui"
|
||||
};
|
||||
|
||||
const runtimes = {};
|
||||
|
||||
const _requiresGraph = {
|
||||
"ui": []
|
||||
};
|
||||
|
||||
function requiresClosure(id) {
|
||||
const visited = new Set();
|
||||
const queue = [id];
|
||||
while (queue.length > 0) {
|
||||
const current = queue.shift();
|
||||
const reqs = _requiresGraph[current] || [];
|
||||
for (const req of reqs) {
|
||||
if (!visited.has(req)) {
|
||||
visited.add(req);
|
||||
queue.push(req);
|
||||
}
|
||||
}
|
||||
}
|
||||
return visited;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
version: '1',
|
||||
capabilities,
|
||||
bySkill,
|
||||
byAgent,
|
||||
byLoopPoint,
|
||||
configKeys,
|
||||
runtimes,
|
||||
requiresClosure,
|
||||
};
|
||||
105
gsd-core/bin/lib/loop-host-contract.cjs
Normal file
105
gsd-core/bin/lib/loop-host-contract.cjs
Normal file
@@ -0,0 +1,105 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* loop-host-contract.cjs — generated by scripts/gen-loop-host-contract.cjs
|
||||
* DO NOT EDIT BY HAND. Run: node scripts/gen-loop-host-contract.cjs --write
|
||||
* ADR-894 §3 — Loop Host Contract, generated from workflow markers.
|
||||
* 12 points: discuss:pre/post, plan:pre/post, execute:pre/wave:pre/wave:post/post,
|
||||
* verify:pre/post, ship:pre/post. Per-step agentRoles and coreArtifacts.
|
||||
*/
|
||||
|
||||
const LOOP_HOST_CONTRACT = [
|
||||
{
|
||||
"step": "discuss",
|
||||
"points": [
|
||||
"discuss:pre",
|
||||
"discuss:post"
|
||||
],
|
||||
"agentRoles": [
|
||||
"orchestrator"
|
||||
],
|
||||
"coreArtifacts": {
|
||||
"produces": [
|
||||
"CONTEXT.md"
|
||||
],
|
||||
"consumes": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "plan",
|
||||
"points": [
|
||||
"plan:pre",
|
||||
"plan:post"
|
||||
],
|
||||
"agentRoles": [
|
||||
"researcher",
|
||||
"planner",
|
||||
"checker"
|
||||
],
|
||||
"coreArtifacts": {
|
||||
"produces": [
|
||||
"PLAN.md"
|
||||
],
|
||||
"consumes": [
|
||||
"CONTEXT.md"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "execute",
|
||||
"points": [
|
||||
"execute:pre",
|
||||
"execute:wave:pre",
|
||||
"execute:wave:post",
|
||||
"execute:post"
|
||||
],
|
||||
"agentRoles": [
|
||||
"executor",
|
||||
"verifier"
|
||||
],
|
||||
"coreArtifacts": {
|
||||
"produces": [
|
||||
"SUMMARY.md"
|
||||
],
|
||||
"consumes": [
|
||||
"PLAN.md"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "verify",
|
||||
"points": [
|
||||
"verify:pre",
|
||||
"verify:post"
|
||||
],
|
||||
"agentRoles": [
|
||||
"orchestrator"
|
||||
],
|
||||
"coreArtifacts": {
|
||||
"produces": [
|
||||
"UAT.md"
|
||||
],
|
||||
"consumes": [
|
||||
"SUMMARY.md"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "ship",
|
||||
"points": [
|
||||
"ship:pre",
|
||||
"ship:post"
|
||||
],
|
||||
"agentRoles": [
|
||||
"orchestrator"
|
||||
],
|
||||
"coreArtifacts": {
|
||||
"produces": [],
|
||||
"consumes": [
|
||||
"UAT.md"
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
module.exports = { LOOP_HOST_CONTRACT };
|
||||
Reference in New Issue
Block a user