@hiroshi.inoue/agent-spectrum-kernel 1.0.0 → 1.1.0
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.ja.md +160 -0
- package/README.md +11 -154
- package/dist/AGENTS.md +1 -1
- package/dist/CUSTOM_INSTRUCTIONS.md +3 -2
- package/dist/README.md +11 -154
- package/dist/adapters/claude-code/plugin/skills/handoff/SKILL.md +1 -1
- package/dist/adapters/claude-code/plugin/skills/implement/SKILL.md +1 -1
- package/dist/adapters/claude-code/plugin/skills/investigate/SKILL.md +1 -1
- package/dist/adapters/claude-code/plugin/skills/review-pr/SKILL.md +1 -1
- package/dist/adapters/claude-code/plugin/skills/verify/SKILL.md +1 -1
- package/dist/docs/README.md +1 -0
- package/dist/docs/architecture/README.md +54 -0
- package/dist/docs/architecture/model.json +318 -0
- package/dist/docs/architecture/views/skill-assets.md +109 -0
- package/dist/docs/fixtures/adapter-runtime-bundle.json +85 -69
- package/dist/docs/fixtures/adapter-runtime-evidence.json +4 -4
- package/dist/docs/fixtures/adapter-runtime-profiles.json +97 -61
- package/dist/docs/fixtures/verification-proof-policy-cases.json +1 -1
- package/dist/docs/npm-distribution-ja.md +8 -6
- package/dist/docs/npm-distribution.md +6 -7
- package/dist/docs/routing-model.md +15 -0
- package/dist/docs/skill-matrix.md +4 -0
- package/dist/docs/validation-report.md +36 -30
- package/dist/manifest.json +36 -1
- package/dist/npm-runtime-inventory.json +214 -119
- package/dist/package.json +2 -2
- package/dist/schemas/adoption-plan.schema.json +5 -1
- package/dist/schemas/architecture-model.schema.json +619 -0
- package/dist/scripts/ask-primary-runtime-lineage.mjs +2 -1
- package/dist/scripts/ask-setup-apply-state.mjs +2 -2
- package/dist/scripts/ask-setup-apply.mjs +3 -3
- package/dist/scripts/ask-setup.mjs +37 -18
- package/dist/scripts/codex-exec-runner.mjs +7 -2
- package/dist/scripts/install-claude-adapter.mjs +14 -1
- package/dist/scripts/install-codex-adapter.mjs +17 -1
- package/dist/scripts/install-kernel.mjs +8 -4
- package/dist/scripts/installer-lifecycle.mjs +41 -0
- package/dist/scripts/kernel-principles.mjs +4 -2
- package/dist/skills/adr-review/SKILL.md +1 -0
- package/dist/skills/application-boundary-architecture/SKILL.md +1 -0
- package/dist/skills/architecture-decision-memory/SKILL.md +1 -0
- package/dist/skills/architecture-modeling/SKILL.md +22 -0
- package/dist/skills/architecture-modeling/references/architecture-model.mjs +441 -0
- package/dist/skills/architecture-modeling/references/last-seat.json +37 -0
- package/dist/skills/architecture-modeling/references/model.md +42 -0
- package/dist/skills/architecture-modeling/references/views.md +18 -0
- package/dist/skills/architecture-modeling/references/views.mjs +370 -0
- package/dist/skills/code-visualization/SKILL.md +8 -4
- package/dist/skills/code-visualization/references/design-preview.mjs +74 -0
- package/dist/skills/code-visualization/references/examples/last-seat.json +42 -0
- package/dist/skills/code-visualization/references/guide-input.md +30 -0
- package/dist/skills/code-visualization/references/render-guide.mjs +53 -11
- package/dist/skills/code-visualization/references/structure-index.mjs +41 -0
- package/dist/skills/code-visualization/references/visual-player.js +34 -3
- package/dist/skills/code-visualization/references/visual-surface.css +3 -0
- package/dist/skills/controlled-implementation/SKILL.md +4 -0
- package/dist/skills/documentation-knowledge-compiler/SKILL.md +2 -1
- package/dist/skills/doubt-driven-development/SKILL.md +2 -0
- package/dist/skills/engineering-documentation-generation/SKILL.md +27 -0
- package/dist/skills/engineering-documentation-generation/references/diagram-selection.md +25 -0
- package/dist/skills/engineering-documentation-generation/references/document-types.md +16 -0
- package/dist/skills/engineering-documentation-generation/references/reservation.md +61 -0
- package/dist/skills/engineering-documentation-generation/references/update-and-check.md +24 -0
- package/dist/skills/grill-design/SKILL.md +6 -2
- package/dist/skills/grill-with-docs/SKILL.md +4 -2
- package/dist/skills/handoff-generation/SKILL.md +1 -0
- package/dist/skills/implementation-context-generation/SKILL.md +1 -0
- package/dist/skills/mr-readme-generation/SKILL.md +2 -0
- package/dist/skills/operating-mode-router/SKILL.md +1 -0
- package/dist/skills/project-adoption-pack-generation/SKILL.md +1 -0
- package/dist/skills/refactor-implementation/SKILL.md +1 -0
- package/dist/skills/repository-orientation/SKILL.md +2 -0
- package/dist/skills/requirement-grill/SKILL.md +2 -0
- package/dist/skills/review-architecture-impact/SKILL.md +2 -0
- package/dist/skills/review-context-generation/SKILL.md +1 -0
- package/dist/skills/review-domain-impact/SKILL.md +2 -0
- package/dist/skills/skill-router/SKILL.md +5 -1
- package/dist/skills/spec-driven-development/SKILL.md +4 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/candidate-preview.mjs +44 -0
- package/dist/skills/spec-driven-development/references/examples/javascript/scenario-review.mjs +10 -1
- package/dist/skills/spec-driven-development/references/scenario-visual-review.md +16 -0
- package/dist/skills/spec-driven-development/references/spec-index.md +8 -0
- package/dist/skills/test-first-verification/SKILL.md +2 -0
- package/dist/skills/work-package-compiler/SKILL.md +2 -0
- package/package.json +2 -2
|
@@ -2,6 +2,8 @@ import { createHash } from 'node:crypto';
|
|
|
2
2
|
import { spawnSync } from 'node:child_process';
|
|
3
3
|
import { existsSync, readFileSync, realpathSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { compileProposals } from './design-preview.mjs';
|
|
6
|
+
import { structureIndex } from './structure-index.mjs';
|
|
5
7
|
import { compileScene } from './scene-model.mjs';
|
|
6
8
|
|
|
7
9
|
const surface = readFileSync(new URL('./visual-surface.css', import.meta.url),'utf8');
|
|
@@ -163,11 +165,11 @@ function compileFlow(flow, index, pr, context) {
|
|
|
163
165
|
|
|
164
166
|
function legend(strings,pr){
|
|
165
167
|
const line = (cls, mark, value) => `<span><i class="symbol ${cls}" aria-hidden="true">${mark}</i>${value}</span>`;
|
|
166
|
-
return (pr?line('','',strings.target)+line('base','',strings.base)+line('delta','●',strings.changed):line('',''
|
|
168
|
+
return (pr?line('','',strings.target)+line('base','',strings.base)+line('delta','●',strings.changed):line('','',`<span id="visual-path">${strings.path}</span>`))
|
|
167
169
|
+line('stop','×',strings.halt)+line('unknown','?',strings.unknown);
|
|
168
170
|
}
|
|
169
171
|
|
|
170
|
-
|
|
172
|
+
function compileCode(guide,repositoryRoot) {
|
|
171
173
|
requireValue(guide && ['catch-up', 'pr'].includes(guide.mode), 'mode');
|
|
172
174
|
const pr=guide.mode==='pr',language=guide.language??'en';
|
|
173
175
|
requireValue(['en','ja'].includes(language),'language');
|
|
@@ -186,23 +188,63 @@ export function renderGuide(guide, { repositoryRoot = process.cwd() } = {}) {
|
|
|
186
188
|
const unknowns=list(guide.unknowns??[],'unknowns',true);
|
|
187
189
|
requireValue(unknowns.every(nonEmpty),'unknown text');
|
|
188
190
|
const compiled=flows.map((flow,index)=>compileFlow(flow,index,pr,context));
|
|
191
|
+
const intro=structureIndex(guide.structure,guide.revision,compiled.map(item=>item.scene),guide.language,escape,
|
|
192
|
+
item=>evidenceItem(item,context,'target'));
|
|
193
|
+
return {compiled,intro};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function renderGuide(guide, { repositoryRoot = process.cwd() } = {}) {
|
|
197
|
+
const design=guide?.mode==='design-preview', pr=guide?.mode==='pr', language=guide?.language??'en';
|
|
198
|
+
requireValue(['en','ja'].includes(language),'language');
|
|
199
|
+
const strings={...i18n[language]};
|
|
200
|
+
let compiled, intro='', purpose, metadata='';
|
|
201
|
+
if (design) {
|
|
202
|
+
let current;
|
|
203
|
+
if (guide.current!==undefined) {
|
|
204
|
+
const source=guide.current;
|
|
205
|
+
requireValue(source && Object.keys(source).every(k=>['revision','flow'].includes(k)), 'current source');
|
|
206
|
+
requireValue(source.flow?.visual?.cases?.length===1 && source.flow.visual.cases[0]?.label===guide.input, 'same input for current path');
|
|
207
|
+
({compiled:[current]}=compileCode({mode:'catch-up',language,title:guide.title,purpose:guide.question,scope:guide.premise,
|
|
208
|
+
revision:source.revision,flows:[source.flow]},repositoryRoot));
|
|
209
|
+
requireValue(current.scene.nodes.some(n=>n.refs.some(r=>r.status==='code')),'current path needs source');
|
|
210
|
+
}
|
|
211
|
+
const proposals=compileProposals(guide,language,escape);
|
|
212
|
+
Object.assign(strings,proposals.labels);
|
|
213
|
+
if (!current) { delete strings.executed; delete strings.code; }
|
|
214
|
+
compiled=proposals.compiled;
|
|
215
|
+
if (current) {
|
|
216
|
+
current.scene.title=strings.current+' · '+current.scene.title;
|
|
217
|
+
compiled.push(current);
|
|
218
|
+
}
|
|
219
|
+
intro=proposals.summary;
|
|
220
|
+
purpose=guide.question;
|
|
221
|
+
} else {
|
|
222
|
+
({compiled,intro}=compileCode(guide,repositoryRoot));
|
|
223
|
+
purpose=guide.purpose;
|
|
224
|
+
metadata=`<details class="metadata"><summary>${strings.metadata}</summary><dl><dt>${strings.scope}</dt><dd>${escape(guide.scope)}</dd>
|
|
225
|
+
${pr?`<dt>${strings.base}</dt><dd><code>${guide.baseRevision}</code></dd>`:''}
|
|
226
|
+
<dt>${pr?strings.target:strings.revision}</dt><dd><code>${guide.revision}</code></dd></dl></details>`;
|
|
227
|
+
}
|
|
189
228
|
const scenes=compiled.map(item=>item.scene);
|
|
190
|
-
const
|
|
191
|
-
const
|
|
229
|
+
const unknowns=guide.unknowns??[];
|
|
230
|
+
const heading=design?strings.design:pr?strings.pr:strings.catch;
|
|
231
|
+
const structure=guide.structure?.elements.map(({id,label,links,spec,gap})=>({
|
|
232
|
+
id,label,spec,gap,links:links.map(({flow,node})=>({flow,node})),
|
|
233
|
+
}));
|
|
234
|
+
const data=encode({scenes,labels:strings,pr,structure});
|
|
235
|
+
const choices=scenes.length>1 && (!design || guide.current)
|
|
192
236
|
? `<label class="scene-pick">${strings.scene}<select id="visual-scene">${scenes.map((scene,i)=>`<option value="${i}">${escape(scene.title)}</option>`).join('')}</select></label>` : '';
|
|
193
237
|
return `<!doctype html><html lang="${language}"><head><meta charset="utf-8">
|
|
194
238
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
195
239
|
<meta name="color-scheme" content="dark">
|
|
196
240
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'sha256-${playerHash}'; style-src 'unsafe-inline'; connect-src 'none'; base-uri 'none'; form-action 'none'">
|
|
197
241
|
<title>${escape(guide.title)}</title><style>${surface}</style></head><body><main class="shell">
|
|
198
|
-
<header class="top"><div><div class="signature">ASK · ${
|
|
199
|
-
<h1>${escape(guide.title)}</h1><p>${escape(
|
|
200
|
-
|
|
201
|
-
${pr?`<dt>${strings.base}</dt><dd><code>${guide.baseRevision}</code></dd>`:''}
|
|
202
|
-
<dt>${pr?strings.target:strings.revision}</dt><dd><code>${guide.revision}</code></dd></dl></details></div>${choices}</header>
|
|
242
|
+
<header class="top"><div><div class="signature">ASK · ${heading}${design?' · '+strings.status:''}</div>
|
|
243
|
+
<h1>${escape(guide.title)}</h1><p>${escape(purpose)}</p>${metadata}</div>${choices}</header>
|
|
244
|
+
${intro}
|
|
203
245
|
<div class="workspace">
|
|
204
|
-
<section class="board" aria-label="${strings.overview}"><header><div class="case-wrap"><span class="eyebrow">${strings.case}</span>
|
|
205
|
-
<div class="cases" id="visual-cases" role="group" aria-label="${strings.case}"></div></div></header>
|
|
246
|
+
<section class="board" aria-label="${strings.overview}"><header><div class="case-wrap"><span class="eyebrow">${design?strings.scene:strings.case}</span>
|
|
247
|
+
<div class="cases" id="visual-cases" role="group" aria-label="${design?strings.scene:strings.case}"></div></div></header>
|
|
206
248
|
<div class="control-row"><div class="transport" role="group" aria-label="${strings.position}">
|
|
207
249
|
<button type="button" id="visual-play" aria-pressed="false">${strings.play}</button>
|
|
208
250
|
<button type="button" id="visual-step">${strings.step}</button><button type="button" id="visual-reset">${strings.reset}</button></div>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Project a bounded reading index. Element links select already-validated source objects.
|
|
2
|
+
export function structureIndex(structure, revision, scenes, language, escape, renderEvidence) {
|
|
3
|
+
if (structure === undefined) return '';
|
|
4
|
+
const requireIndex = ok => { if (!ok) throw new Error('Invalid guide structure or unresolved link'); };
|
|
5
|
+
const text = value => typeof value==='string' && value.trim();
|
|
6
|
+
requireIndex(structure && structure.revision===revision && Array.isArray(structure.elements));
|
|
7
|
+
const levels=language==='ja' ? {C1:'全体像',C2:'実行単位',C3:'内部の役割'}
|
|
8
|
+
: {C1:'Context',C2:'Runtime boundary',C3:'Component'};
|
|
9
|
+
const elements=structure.elements;
|
|
10
|
+
const ids=new Map();
|
|
11
|
+
for (const [i,element] of elements.entries()) {
|
|
12
|
+
requireIndex(element && text(element.id) && /^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$/.test(element.id) && !ids.has(element.id) && text(element.label)
|
|
13
|
+
&& text(element.responsibility) && Object.hasOwn(levels,element.level)
|
|
14
|
+
&& Array.isArray(element.links) && ['spec','gap','parent'].every(k=>element[k]===undefined || text(element[k])));
|
|
15
|
+
ids.set(element.id,i);
|
|
16
|
+
}
|
|
17
|
+
requireIndex(elements.some(e=>e.links.length));
|
|
18
|
+
const rows=elements.map(element=>{
|
|
19
|
+
const parent=elements[ids.get(element.parent)];
|
|
20
|
+
requireIndex(element.parent===undefined || (parent && parent.level<element.level));
|
|
21
|
+
const links=element.links.map(link=>{
|
|
22
|
+
requireIndex(link && Number.isSafeInteger(link.flow));
|
|
23
|
+
const scene=scenes[link.flow];
|
|
24
|
+
const node=scene?.nodes.find(n=>n.id===link.node);
|
|
25
|
+
requireIndex(node && node.refs.some(ref=>ref.side==='target') && scene.cases.some(c=>c.target.includes(node.id)));
|
|
26
|
+
return `<button type="button" data-flow="${link.flow}" data-node="${node.id}" aria-label="${escape(scene.title+' · '+node.label)}">${escape(node.label)} →</button>`;
|
|
27
|
+
});
|
|
28
|
+
const sources=element.evidence??[];
|
|
29
|
+
requireIndex(Array.isArray(sources) && sources.every(s=>s && s.run===undefined && (s.at??'target')==='target'));
|
|
30
|
+
return `<div id="structure-${element.id}" tabindex="-1"><small>${levels[element.level]}
|
|
31
|
+
${parent?` · <a href="#structure-${parent.id}">${escape(parent.label)}</a>`:''}</small>
|
|
32
|
+
<h3>${escape(element.label)}</h3><p>${escape(element.responsibility)}</p>
|
|
33
|
+
${element.spec?`<p>${language==='ja'?'仕様':'Spec'} · ${escape(element.spec)}</p>`:''}
|
|
34
|
+
${element.gap?`<p class="unknowns">${language==='ja'?'差分・未確認':'Gap'} · ${escape(element.gap)}</p>`:''}
|
|
35
|
+
${sources.length?`<details><summary>${language==='ja'?'根拠':'Evidence'}</summary><ul>${sources.map(renderEvidence).join('')}</ul></details>`:''}
|
|
36
|
+
${links.join(' ')}
|
|
37
|
+
</div>`;
|
|
38
|
+
});
|
|
39
|
+
return `<details id="structure" open><summary>${language==='ja'?'役割から処理と根拠を辿る':'Trace responsibilities to source'}</summary>
|
|
40
|
+
<div class="structure-grid">${rows.join('')}</div></details>`;
|
|
41
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const d = document;
|
|
4
4
|
const get = id => d.getElementById(id);
|
|
5
|
-
const { scenes, labels, pr } = JSON.parse(get('visual-data').textContent);
|
|
5
|
+
const { scenes, labels, pr, structure } = JSON.parse(get('visual-data').textContent);
|
|
6
6
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
7
7
|
const state = { scene:0, caseIndex:0, position:0, timer:0, animation:0, narrow:false, selected:'', lastFocus:null };
|
|
8
8
|
const motion = matchMedia('(prefers-reduced-motion: reduce)');
|
|
@@ -143,7 +143,7 @@ function drawSymbol(nodeGroup,node,active) {
|
|
|
143
143
|
|
|
144
144
|
function labelObject(nodeGroup,node) {
|
|
145
145
|
let y=50;
|
|
146
|
-
wrap(node.label,state.narrow?10.5:14,2).forEach(line=>{add(nodeGroup,'text',{y,class:'object-label'},line);y+=16;});
|
|
146
|
+
wrap(node.label,state.narrow || current().proposed?10.5:14,2).forEach(line=>{add(nodeGroup,'text',{y,class:'object-label'},line);y+=16;});
|
|
147
147
|
wrap(node.caption,state.narrow?12:15,2).forEach(line=>{add(nodeGroup,'text',{y,class:'object-caption'},line);y+=13;});
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -258,6 +258,14 @@ function showDetail(node,source) {
|
|
|
258
258
|
get('detail-default').hidden=true;
|
|
259
259
|
get('detail-close').hidden=false;
|
|
260
260
|
const body=get('visual-evidence');body.replaceChildren();
|
|
261
|
+
structure?.forEach(element=>{
|
|
262
|
+
if (element.links.some(link=>link.flow===state.scene && link.node===node.id)) {
|
|
263
|
+
const back=add(body,'a',{href:'#structure-'+element.id},'↑ '+element.label);
|
|
264
|
+
back.addEventListener('click',()=>{ get('structure').open=true; });
|
|
265
|
+
if (element.spec) add(body,'p',{},element.spec);
|
|
266
|
+
if (element.gap) add(body,'p',{class:'unknowns'},element.gap);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
261
269
|
for(const ref of node.refs) {
|
|
262
270
|
const section=add(body,'section',{class:'evidence-entry'});
|
|
263
271
|
if(pr)add(section,'h3',{},ref.side==='target'?labels.target:labels.base);
|
|
@@ -299,6 +307,14 @@ function advance() {
|
|
|
299
307
|
|
|
300
308
|
function selectScene(index) {
|
|
301
309
|
stop();state.scene=index;state.caseIndex=0;state.position=0;
|
|
310
|
+
if (sceneSelect) sceneSelect.value=String(index);
|
|
311
|
+
d.querySelectorAll('[data-proposal]').forEach(button=>{
|
|
312
|
+
button.setAttribute('aria-pressed',String(Number(button.dataset.proposal)===index));
|
|
313
|
+
});
|
|
314
|
+
if (labels.proposed) {
|
|
315
|
+
get('visual-path').textContent=current().proposed?labels.path:labels.current;
|
|
316
|
+
get('visual-stage').classList.toggle('proposal',!!current().proposed);
|
|
317
|
+
}
|
|
302
318
|
selectCase(0,true);
|
|
303
319
|
}
|
|
304
320
|
|
|
@@ -306,7 +322,8 @@ function selectCase(index,newScene=false) {
|
|
|
306
322
|
stop();
|
|
307
323
|
state.caseIndex=index;state.position=0;clearDetail(false);
|
|
308
324
|
const filters=get('visual-cases');filters.replaceChildren();
|
|
309
|
-
|
|
325
|
+
if (labels.proposed) add(filters,'strong',{},current().title);
|
|
326
|
+
else current().cases.forEach((item,i)=>{
|
|
310
327
|
const button=add(filters,'button',{type:'button','aria-pressed':String(i===index),'data-case':i},item.label);
|
|
311
328
|
button.addEventListener('click',()=>{selectCase(i);get('visual-cases').children[i].focus();});
|
|
312
329
|
});
|
|
@@ -335,6 +352,20 @@ get('visual-step').addEventListener('click',()=>{stop();advance();});
|
|
|
335
352
|
get('visual-reset').addEventListener('click',()=>{stop();state.position=0;paint(false);});
|
|
336
353
|
const sceneSelect=get('visual-scene');
|
|
337
354
|
if(sceneSelect)sceneSelect.addEventListener('change',event=>selectScene(Number(event.target.value)));
|
|
355
|
+
d.querySelectorAll('[data-proposal]').forEach(button=>{
|
|
356
|
+
button.addEventListener('click',()=>selectScene(Number(button.dataset.proposal)));
|
|
357
|
+
});
|
|
358
|
+
d.querySelectorAll('[data-flow]').forEach(button=>{
|
|
359
|
+
button.addEventListener('click',()=>{
|
|
360
|
+
selectScene(Number(button.dataset.flow));
|
|
361
|
+
const id=button.dataset.node;
|
|
362
|
+
const index=current().cases.findIndex(item=>item.target.includes(id));
|
|
363
|
+
if (index>0) selectCase(index);
|
|
364
|
+
const node=current().nodes.find(item=>item.id===id);
|
|
365
|
+
showDetail(currentNode(node),graph.querySelector('[data-object="'+id+'"]'));
|
|
366
|
+
state.lastFocus=button;
|
|
367
|
+
});
|
|
368
|
+
});
|
|
338
369
|
state.narrow=stage.clientWidth<625;
|
|
339
370
|
selectScene(0);
|
|
340
371
|
new ResizeObserver(([entry])=>{
|
|
@@ -13,3 +13,6 @@
|
|
|
13
13
|
@media(max-width:980px){.workspace{grid-template-columns:minmax(0,1fr)}.detail{max-height:none}}
|
|
14
14
|
@media(max-width:620px){.shell{padding:.8rem .6rem 1.15rem}.board header,.board .control-row{padding:.52rem}.workspace{gap:.63rem}.legend{padding-inline:.54rem}.board .control-row{position:sticky;top:0;z-index:1;background:var(--panel)}.detail header{padding:.55rem}.detail-content{padding:0 .55rem .55rem}}
|
|
15
15
|
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
|
|
16
|
+
.comparison,.structure-grid{font-size:.925rem;margin:.9rem 0;color:var(--muted)}.comparison p{margin:.25rem 0}.comparison p strong{margin-right:.3rem;color:var(--ink)}.comparison summary,#structure summary{cursor:pointer;color:var(--new);font-size:.92rem}
|
|
17
|
+
.outcomes,.comparison-grid,.structure-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(15rem,100%),1fr));gap:.75rem;margin:.7rem 0}.outcomes button,.structure-grid>div{min-width:0;border:1px solid var(--edge);border-radius:.65rem;background:var(--panel);text-align:left;color:var(--ink);padding:.8rem 1rem}.outcomes button{display:grid;align-content:start;gap:.12rem;font-size:1.1rem}.outcomes button strong{font-size:.9rem;color:var(--new)}.outcomes button span,.structure-grid small{font-size:.8rem;color:var(--muted)}.outcomes button[aria-pressed=true]{background:#143d40;border-color:var(--new)}.outcomes button[aria-pressed=true] strong::before{content:'▶ ';color:var(--ink)}.comparison-grid>section{border-inline-start:2px solid var(--edge);padding-inline:1rem}.comparison h3,.structure-grid h3{margin:.3em 0;font-size:1rem;color:var(--ink)}.comparison dl{margin:.5rem 0}.comparison dt{margin-top:.4rem;color:var(--ink);font-weight:700}.comparison dd{margin:0}.comparison code{font-size:.8rem}.structure-grid{grid-template-columns:repeat(auto-fit,minmax(min(13rem,100%),1fr))}.structure-grid button{background:transparent;color:var(--new);border:0;text-decoration:underline;min-height:44px;padding:0 .5rem 0 0}.structure-grid a{color:var(--new)}.structure-grid>div:target{outline:2px solid var(--amber)}.structure-grid p{color:var(--muted)}.structure-grid .unknowns,.badge.proposed{color:var(--amber)}.badge.proposed{background:#3d3322}.proposal .edge.current{stroke-dasharray:5 5}.scene-pick,#visual-scene,.top>div{min-width:0;max-width:100%}
|
|
18
|
+
.structure-grid ul{padding-inline-start:1em;overflow-wrap:anywhere}.structure-grid pre{overflow:auto}.structure-grid details{min-width:0}
|
|
@@ -75,6 +75,8 @@ Re-plan necessary work within existing authorization without asking again; an ex
|
|
|
75
75
|
|
|
76
76
|
2. Inspect nearby patterns.
|
|
77
77
|
|
|
78
|
+
For a material change, trace the applicable specification through its owner, actual implementation and affected consumers to the checks that matter. Follow current architecture references if useful. Inspect sources directly where understanding could change the decision. Hold unsupported claims and continue independent work. A local fix needs no new diagram or report.
|
|
79
|
+
|
|
78
80
|
Before editing, inspect:
|
|
79
81
|
|
|
80
82
|
- nearest equivalent implementation,
|
|
@@ -113,6 +115,8 @@ Run the narrowest relevant check first. Then run broader checks proportional to
|
|
|
113
115
|
|
|
114
116
|
6. Complete the Implementation Contract with implementation-only facts, then inspect the final diff.
|
|
115
117
|
|
|
118
|
+
Compare the resulting path with the agreed behavior and design. When meaning or ownership changes, update the affected explanation or model within authorization, otherwise propose a targeted edit. Return unresolved intent to its owner instead of editing a specification to fit the code.
|
|
119
|
+
|
|
116
120
|
For structural changes only, use the existing implementation-decision and actual-boundary fields to record a concise before/after, current structural need, and expected maintenance/investigation effect. Reference applicable upstream decisions and record obsolete structures retired or retained with their reason and retirement condition. Do not add a mandatory report, lifecycle field, or full architecture review.
|
|
117
121
|
|
|
118
122
|
Check for:
|
|
@@ -34,6 +34,7 @@ This skill does not create a document management system. It routes durable knowl
|
|
|
34
34
|
- Source document and location.
|
|
35
35
|
- Evidence status and freshness status.
|
|
36
36
|
- Conflicts with code, tests, ADRs, project overlay, ledgers, or current user input.
|
|
37
|
+
- Distinguish an outdated model or guide from disputed intent, implementation drift and missing verification. Link affected element IDs to the governing source and propose correction there. A generated view alone cannot authorize promotion.
|
|
37
38
|
|
|
38
39
|
3. Choose the durable target.
|
|
39
40
|
- Review knowledge -> `review-context-generation` or review rule ledger.
|
|
@@ -42,7 +43,7 @@ This skill does not create a document management system. It routes durable knowl
|
|
|
42
43
|
- Business/domain rule -> `domain-rule-ledger`.
|
|
43
44
|
- Architecture decision -> `architecture-decision-memory` or `adr-review`.
|
|
44
45
|
- Task progress -> `planning-with-files` or handoff, not durable docs memory.
|
|
45
|
-
- Docs correction ->
|
|
46
|
+
- Docs correction -> existing document owner or issue. Writing or updating a technical guide belongs to `engineering-documentation-generation` when selected, with separate edit authorization.
|
|
46
47
|
|
|
47
48
|
4. Classify evidence and freshness.
|
|
48
49
|
- Evidence: `Verified`, `Supported`, `Hypothesis`, `Unknown`, or `Falsified` under `ask.claim-evidence-status@1.0.0`.
|
|
@@ -35,6 +35,8 @@ Unknowns:
|
|
|
35
35
|
|
|
36
36
|
2. Generate falsification checks.
|
|
37
37
|
|
|
38
|
+
Use a relevant architecture view, when available, to locate the suspected dependency path, an observation point and any unmapped links. Check the path in code and test the hypothesis against an independent observation. The map cannot establish causation.
|
|
39
|
+
|
|
38
40
|
Ask:
|
|
39
41
|
- What would make this false?
|
|
40
42
|
- What input breaks it?
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: engineering-documentation-generation
|
|
3
|
+
description: Write or update technical documentation for a reader's task, including architecture guides, feature specifications, design documents, API references, operational guides and onboarding. 技術文書、機能仕様書、設計書、運用手順の作成・更新や図表の選択に使う。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Engineering documentation generation
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Help someone make a change, explain a result or operate a system. Start from their question and leave a route back to the evidence. An explicit request works for a library, a small tool or a project without an architecture model or ASK adoption. A local fix alone never requires a new guide.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Identify the reader, the decision or action, the system and the version. Read the relevant existing guide, terms, conventions and source material. Prefer updating the section readers already use. Choose only the [document parts](references/document-types.md) needed for this question.
|
|
15
|
+
2. Explain the purpose and user-visible outcome first. Follow one representative input through the responsible boundaries to a result, including a consequential alternative. Link to the governing spec, decision, contract, implementation, tests and run evidence where each matters. Distinguish agreed intent, proposed design, static observations and observed execution. Identify any disagreement, who can resolve it and what to check.
|
|
16
|
+
3. Use the [diagram and table guide](references/diagram-selection.md) when a relationship or comparison is hard to explain in prose. During design discussion a temporary table may be the whole deliverable. See the [reservation example](references/reservation.md) for a decision, a correction and a partial update.
|
|
17
|
+
4. Follow the [update and verification procedure](references/update-and-check.md). Write tracked files only within an explicit request or authorized project policy. Otherwise return the draft or a local preview. Do not publish, send source to a renderer, promote knowledge or change product behavior as a side effect.
|
|
18
|
+
|
|
19
|
+
## Ownership
|
|
20
|
+
|
|
21
|
+
Check the active adapter’s `selected_skills` before delegation. Use `architecture-modeling` for a reusable structural view, `code-visualization` for an interactive behavior guide or design preview, and `spec-driven-development` for specification scenarios and measured comparisons. If an optional capability is unavailable, inspect authoritative sources directly and use ordinary text or a table. Keep unsupported claims open.
|
|
22
|
+
|
|
23
|
+
Return unsettled business choices to their owner through `requirement-grill`, design choices to `grill-design` and decision records to `adr-review` when selected. A guide cannot settle those questions. Keep PR-specific rationale and rollback in `mr-readme-generation`. Extraction of reusable knowledge from existing documents belongs to `documentation-knowledge-compiler` under its own write policy.
|
|
24
|
+
|
|
25
|
+
## Output
|
|
26
|
+
|
|
27
|
+
Deliver the requested document or bounded edit in the reader's language, with its scope, source version, material unknowns and verification limits. Use the existing response or handoff for links and outstanding decisions. Avoid an extra report.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# 図や表で何を比較するか
|
|
2
|
+
|
|
3
|
+
読み手の疑問が文章で解ければ図は省く。構造、時系列、状態を一枚に重ねず、関係する要素名を揃えて相互に辿れるようにする。C4の階層とUMLの図種に固定の対応はない。
|
|
4
|
+
|
|
5
|
+
| 問い | 図・表の候補 | 読み取れるようにすること |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| 誰の何を解決するか | C4のシステムコンテキスト、複数システムの全体図、UMLユースケース図 | 利用者、提供機能、外部の責任 |
|
|
8
|
+
| どこで処理し、何に依存するか | C4のコンテナ図、選択したコンポーネント図、UMLパッケージ図 | 実行境界、責務、契約、依存方向。静的依存と実行時の通信を区別する |
|
|
9
|
+
| どの順に処理するか | C4の動的図、UMLシーケンス図 | 同じ入力に対する要求、応答、分岐、非同期処理、取消、失敗 |
|
|
10
|
+
| 誰がいつ状態を変えられるか | UML状態機械図、状態遷移表 | 所有者、変更前後、イベント、条件、副作用、禁止遷移 |
|
|
11
|
+
| 業務がどこで分かれるか | UMLアクティビティ図、フローチャート、採用済みならBPMN | 行動主体、判断条件、並行処理、待機、結果 |
|
|
12
|
+
| どの型をどう使うか | UMLクラス図、C4のコード図、型・契約表 | 公開操作、意味のある関連や多重度、実際の型へのリンク |
|
|
13
|
+
| データはどう結び付き、移動するか | ER図、データフロー図 | 所有者、関連と制約、入力元、変換、保存先、信頼境界 |
|
|
14
|
+
| 障害はどこまで広がるか | C4の配置図、UMLデプロイメント図 | 対象環境、ノード、配置、通信、観測の範囲 |
|
|
15
|
+
| 複数の条件で結果がどう変わるか | 決定表、具体例、受入シナリオ | 条件の組み合わせ、期待結果、禁止事項、根拠となる仕様項目とテスト |
|
|
16
|
+
|
|
17
|
+
## 対話中に使うとき
|
|
18
|
+
|
|
19
|
+
まず現行資料で解ける疑問を除く。同じ利用者・初期状態・入力について、現状と各案で変わる責任、処理、結果、変えない条件、未確認点を並べる。現状がなければ「新規設計」と書く。推奨と代償を示し、判断が変わる質問を一つ添える。[同時予約の比較](reservation.md)のように、回答が変わったら該当する分岐だけを更新する。合意前の比較を仕様や実測として保存しない。
|
|
20
|
+
|
|
21
|
+
## 表示と確認
|
|
22
|
+
|
|
23
|
+
- 図の近くにタイトル、対象範囲、版、状態、凡例を置く。矢印には「どちらが何をするか」を書く。重要な要素から既存の仕様、コード、ADR、証拠を辿れるようにする。
|
|
24
|
+
- Markdownとプロジェクトで表示できる記法を優先する。Mermaidの図を使う場合は対応する図種の構文を確かめ、UMLへの完全準拠をうたわない。必要な場合に限りローカルHTMLや静的SVGを添える。画像は同じソースから再生成する。
|
|
25
|
+
- 読者が図を表示できなくても、本文や表で代表経路と結果が分かるようにする。色だけに頼らず、狭い画面でラベルや線の重なりを確認する。アニメーションの再生時間から処理時間を推測しない。
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 読者が次にすることから構成を決める
|
|
2
|
+
|
|
3
|
+
最初に「誰が、どの場面で、何を判断するか」を一文で書く。既存の入口からその答えに辿れるなら、必要な箇所だけを直す。次の行は組み合わせて使える。すべての章やファイルを作る必要はない。
|
|
4
|
+
|
|
5
|
+
| 読者の目的 | 文書に含める内容 | 確認先 |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| システムを把握する | 概要・アーキテクチャガイドに、利用者の目的、提供範囲、外部の責任、主な実行単位と代表経路を示す | 現行の構造図、入口、設定、公開契約 |
|
|
8
|
+
| 機能の変更を判断する | 機能仕様書・機能設計書に、操作、条件、入力、結果、状態変化、失敗時に禁止する副作用、既存利用者への影響を書く | 要件、受入項目、テスト定義と実行結果 |
|
|
9
|
+
| 複雑な処理を修正する | 詳細設計・実装ガイドでは、変更点に絞って型、状態の所有者、依存、処理順、アルゴリズム、非同期処理と失敗時の扱いを説明する | 対象の関数・型、呼び出し元、境界テスト |
|
|
10
|
+
| APIやデータを使う | 連携仕様に、要求と応答の例、認可、エラー、互換性、項目の意味、所有者、制約を示す | OpenAPI、型、スキーマ、DDL、実際の利用箇所 |
|
|
11
|
+
| 配置や障害対応を行う | 運用ガイドで環境、通信、障害範囲、検知方法、復旧手順と復旧確認を区別する | 設定、運用手順、対象環境の観測記録。設定から稼働状況を推測しない |
|
|
12
|
+
| 設計を再検討する | 採用理由、見送った代替案、品質上の条件、残るリスク、判断を変える観測を書く | 承認済みADR、Issue、既存の制約や判断記録 |
|
|
13
|
+
| 初めて変更を任される | 読解ガイドに、具体的な変更例を一つ置き、仕様から担当箇所、コード、検証へ案内する | 既存の概要、変更対象、最小の確認手順 |
|
|
14
|
+
| 差分をレビューする | 同じ入力で変更前後を比べ、影響先、確認済みの範囲、未検証の条件を説明する | PR、差分、対象版の証拠。長期文書には今後も必要な説明だけを残す |
|
|
15
|
+
|
|
16
|
+
例えば、小さな変換ライブラリの利用者が「空の入力を渡せるか」を知りたいなら、公開関数の説明に入力例と戻り値、例外条件、該当テストを添える。利用先が分からなければその範囲を明記し、架空の実行プロセスやシステム全体図を作らない。
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# 最後の1枠を誰が確定するか
|
|
2
|
+
|
|
3
|
+
架空の新規設計を使った対話例。現行実装はなく、両案とも未承認・未実装・未実行。ここで示す結果は各案の前提から予想したもの。
|
|
4
|
+
|
|
5
|
+
## 判断前の比較
|
|
6
|
+
|
|
7
|
+
利用者の甲と乙が別々の端末で同じ残り1枠を表示し、ほぼ同時に1枠ずつ申し込む。どちらの案でも、利用者は同じ予約ボタンを押す。
|
|
8
|
+
|
|
9
|
+
| 比較する点 | 案A 画面で確定 | 案B 予約サービスで確定 |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| 残数の所有者 | 各端末が自分の表示値を使う | サービスが共有在庫を管理する |
|
|
12
|
+
| 処理順 | 両端末とも残数1を読み、自分の値を0にして確定を表示する | 両要求が到着し、残数の確認と予約の記録を一つの不可分な操作で行う |
|
|
13
|
+
| 期待する結果 | 2人とも確定と表示され得る。後から片方を取り消す必要が生じる | 先に確保した1人だけが確定し、後の1人には満席を伝える。拒否した予約は保存しない |
|
|
14
|
+
| 残る課題 | 端末をまたぐ競合を判定できない | 通信結果が不明なときの照会と再送を設計する必要がある |
|
|
15
|
+
|
|
16
|
+
**推奨** 重複確定を防ぐなら案Bを選ぶ。通信の完了を待つ必要がある一方、別の端末で先に確保された枠を誤って確定と表示せずに済む。
|
|
17
|
+
|
|
18
|
+
**業務担当者への質問** 残り1枠に同時に申し込んだ2人のうち、予約確定と表示してよいのは1人だけですか。
|
|
19
|
+
|
|
20
|
+
## 回答を受けて変更する箇所
|
|
21
|
+
|
|
22
|
+
ここからは「確定は1人だけ。もう1人には満席と伝えて終了する」という回答を受け、設計担当者が案Bを選んだと仮定する。その後、業務担当者が「満席ならキャンセル待ちも案内する。本人が希望するまで登録しない」と訂正した。
|
|
23
|
+
|
|
24
|
+
受入項目「満席時の処理」を業務担当者が改訂した後で、該当する分岐と機能ガイドを直す。予約サービスが残数を管理するという設計判断は変わらない。実際の作業では仕様と設計判断の出典と版を確認する。
|
|
25
|
+
|
|
26
|
+
### 改訂案の処理順(予約サービス、満席時のみ、未実行)
|
|
27
|
+
|
|
28
|
+
実線は依頼、破線は応答を表す。甲が先に確保した場合を示す。甲と乙が逆の順に到着しても扱いは同じ。
|
|
29
|
+
|
|
30
|
+
```mermaid
|
|
31
|
+
sequenceDiagram
|
|
32
|
+
participant A as 甲の画面
|
|
33
|
+
participant S as 予約サービス
|
|
34
|
+
participant B as 乙の画面
|
|
35
|
+
A->>S: 1枠を申し込む
|
|
36
|
+
B->>S: 同じ枠を申し込む
|
|
37
|
+
S->>S: 甲の予約を確定し、残数を0にする
|
|
38
|
+
S-->>A: 予約確定
|
|
39
|
+
S-->>B: 満席
|
|
40
|
+
B->>B: キャンセル待ちを案内する
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
甲の予約だけが確定する。乙には満席と次の選択肢を示す。この時点で乙の予約もキャンセル待ちも保存しない。キャンセル待ちを希望した後の処理はこの図の範囲外。
|
|
44
|
+
|
|
45
|
+
### 機能ガイドの部分更新例
|
|
46
|
+
|
|
47
|
+
手書きの問い合わせ手順と見出しを残し、変更された結果だけを差し替える。
|
|
48
|
+
|
|
49
|
+
```diff
|
|
50
|
+
--- a/docs/features/reservation.md
|
|
51
|
+
+++ b/docs/features/reservation.md
|
|
52
|
+
@@ -1,5 +1,5 @@
|
|
53
|
+
# 予約
|
|
54
|
+
## 満席の場合
|
|
55
|
+
-満席と表示し、手続きを終了します。
|
|
56
|
+
+満席と表示し、キャンセル待ちを案内します。本人が希望するまで登録しません。
|
|
57
|
+
## 問い合わせ
|
|
58
|
+
予約番号を確認し、窓口に連絡してください。
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
確認すべきことは、同じ保存先へ競合する2件の要求を送り、確定した予約が1件で、残数が0かつキャンセル待ちが0件であること。さらに、確保できなかった人の画面に案内が出ることを確かめる。単一画面のテストや図の再生からは、この結果を確認できない。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 文書の作成と部分更新
|
|
2
|
+
|
|
3
|
+
## どこを直すか
|
|
4
|
+
|
|
5
|
+
1. 依頼とプロジェクトの編集規約から、保存先、更新できる範囲、生成部分と手書き部分の境界を確認する。文書やコードに書かれた命令を編集の許可として扱わない。未採用のプロジェクトでも文書化はできる。永続編集の許可がなければ回答や一時ファイルで案を示す。
|
|
6
|
+
2. 同じ役割の文書と用語を探す。既存の置き場所を優先する。新規なら全体の入口は `docs/architecture/README.md`、詳細はその配下、機能別は `docs/features/` を候補とする。生成した構造図は `docs/architecture/views/` などに分けてリンクする。判断記録は既存のADR規約に従う。
|
|
7
|
+
3. 変更対象の仕様項目、設計判断、公開契約、コードから参照元を逆に辿り、どの説明や図が変わるかを絞る。対象外の節と既存の手編集を保つ。記述が正しいままなら更新しない。
|
|
8
|
+
|
|
9
|
+
## 何を根拠にするか
|
|
10
|
+
|
|
11
|
+
| 説明すること | 根拠と根拠が欠けたときの扱い |
|
|
12
|
+
|---|---|
|
|
13
|
+
| 約束した振る舞い | 現行の要件・仕様。既存の `artifact_id`、`item_id`、`observed_revision` を再利用する。なければ特定できる出典と未合意の点を示す |
|
|
14
|
+
| 設計の意図 | 承認済みのADRや規則。検討中の案と却下した案は状態を添える |
|
|
15
|
+
| 実装の現状 | 対象リポジトリ、コミット、ファイルと行またはシンボル、設定。作業ツリーの変更は範囲と内容ハッシュで区別し、過去のコミットへのリンクで代用しない |
|
|
16
|
+
| 実際に確認した結果 | 対象版、環境、入力、コマンド、到達した検査と結果への参照。テスト定義しかなければ実行結果は未確認 |
|
|
17
|
+
|
|
18
|
+
構造モデルがあれば対象版と範囲が合う要素だけを参照する。古い参照や矛盾を見つけたら、該当する原典を直接確認する。例として、合意した拒否処理が抜けていれば実装担当へ、期待値が未合意なら業務の判断者へ、図の矢印だけが古いなら図の生成元へ、実行記録がなければ検証担当へ戻す。説明に合わせて仕様やコードを変更しない。
|
|
19
|
+
|
|
20
|
+
## 更新と検証
|
|
21
|
+
|
|
22
|
+
- 手書きの節は必要な行だけを編集する。自動生成は生成元と生成対象を確認して行い、文書全体を上書きしない。生成範囲が曖昧な場合や手元の追記と競合する場合はその部分の差分案を示し、独立した箇所は進める。
|
|
23
|
+
- 保存前に原文を再確認する。保存後は差分で対象外の節、手書きメモ、既存のアンカーとリンクが保たれたことを確認する。自動生成部分は同じ入力で再生成できるか確かめる。参照先だけでなく、参照先の主張と版が一致するかも読む。
|
|
24
|
+
- 代表的な正常系と重要な代替経路を本文から原典まで辿る。図の代替説明、表示、用語と読みやすさを確認する。図の表示やテストが未確認ならその範囲を明示する。秘密情報、顧客データ、生のプロンプト、長いコードを含めず、資料を外部に送らない。
|
|
@@ -47,7 +47,11 @@ Check only branches relevant to the task:
|
|
|
47
47
|
- testability,
|
|
48
48
|
- rollout/rollback.
|
|
49
49
|
|
|
50
|
-
3. For
|
|
50
|
+
3. Before asking, check the sources. For a consequential boundary decision, compare the current design (if any), the smallest adequate change and any material alternative under the same input and constraints. Show who owns state, what happens in order, the result and side effects, the quality requirement at stake, operating costs and uncertainty.
|
|
51
|
+
|
|
52
|
+
Use only selected capabilities for comparisons that help the decision. Choose `architecture-modeling` for current and proposed responsibilities, `spec-driven-development` for candidate promises, `code-visualization` for a source-backed path or a separate `design-preview` of unbuilt options, or `engineering-documentation-generation`’s `references/diagram-selection.md` for contracts and state. Without an optional capability, use ordinary prose or a small table. Keep proposals explicitly unapproved and unexecuted. Do not require HTML or a saved diagram.
|
|
53
|
+
|
|
54
|
+
When a comparison helps, present it with the recommendation and one material question.
|
|
51
55
|
- ask one question at a time,
|
|
52
56
|
- explain why it matters,
|
|
53
57
|
- provide the recommended answer,
|
|
@@ -56,7 +60,7 @@ Check only branches relevant to the task:
|
|
|
56
60
|
|
|
57
61
|
When an adopted project has competing state owners, compatibility contracts or deployable slices that users can distinguish, or the user explicitly requests this strategy, compare the proposed owners and their consumers at the same distinguishing scenario. Pick the least costly adequate mechanism, including keeping the current structure; a mock-friendly class or a new service alone is not a reason to split. State which observation would rule out the chosen design and which work should wait for it. Use the selected `spec-driven-development` capability’s `references/decision-led-test-strategy.md` before choosing the boundary, even when the user did not name the method.
|
|
58
62
|
|
|
59
|
-
4.
|
|
63
|
+
4. After a correction, revisit only the affected differences. Refer the decision to its existing design record, Requirement, Spec or ADR owner, then connect authorized guide changes, implementation and checks to that decision. A preview is never a decision record.
|
|
60
64
|
|
|
61
65
|
5. Stop when the implementation boundary and acceptance criteria are clear.
|
|
62
66
|
|
|
@@ -49,7 +49,9 @@ Stale or conflicting docs:
|
|
|
49
49
|
- Which docs or ADRs constrain the decision?
|
|
50
50
|
- Which docs would need to change if this plan is accepted?
|
|
51
51
|
|
|
52
|
-
4.
|
|
52
|
+
4. Check disputed terms against the relevant model elements, Spec revision, ADR and actual code. When the difference is hard to read, compare current and proposed ownership, steps, state and outcomes for the same input. Choose only selected capabilities. Use `architecture-modeling` for structure, `spec-driven-development` for expected behavior, `code-visualization` for a sourced path or `design-preview`, and `engineering-documentation-generation`’s `references/diagram-selection.md` for contracts or transitions. Plain text or a table suffices if unavailable.
|
|
53
|
+
|
|
54
|
+
Keep unapproved alternatives and unobserved outcomes explicit. Present the comparison, recommendation, tradeoff and one question together only when user judgment is required. Redraw affected differences after a correction.
|
|
53
55
|
|
|
54
56
|
5. Recommend the smallest doc action.
|
|
55
57
|
- no doc change,
|
|
@@ -57,7 +59,7 @@ Stale or conflicting docs:
|
|
|
57
59
|
- add short CONTEXT note,
|
|
58
60
|
- add/update/supersede ADR.
|
|
59
61
|
|
|
60
|
-
Do not create documentation just to look thorough.
|
|
62
|
+
Return the decision to the existing Requirement, Spec or ADR owner. For authorized guide updates, hand the changed sections and decision references to `engineering-documentation-generation` if selected. Do not create documentation just to look thorough.
|
|
61
63
|
|
|
62
64
|
## Output
|
|
63
65
|
|
|
@@ -32,6 +32,7 @@ Status: complete | partial | blocked | needs review | needs verification
|
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
3. List changed or relevant files and why.
|
|
35
|
+
- For material boundaries, link the relevant model elements and revision, governing Spec and actual implementation. Note which relationship remains uncertain beside the corresponding evidence gap. Avoid a second architecture summary.
|
|
35
36
|
|
|
36
37
|
4. List verified evidence.
|
|
37
38
|
|
|
@@ -103,6 +103,7 @@ Use `ask.claim-evidence-status@1.0.0`; record human confirmation in source/owner
|
|
|
103
103
|
- implementation patterns by area,
|
|
104
104
|
- test patterns by change type,
|
|
105
105
|
- architecture boundaries and public contracts,
|
|
106
|
+
- where a model helps, its location, relevant element IDs, source revision, freshness and links to the governing ADR, contract, Spec and code. Keep commands and conventions here, and leave diagrams and relationship tables at their source. Mark unverified mappings `Unknown`.
|
|
106
107
|
- links to engineering patterns, verification patterns, and architecture decision memory,
|
|
107
108
|
- error handling, logging, and observability conventions,
|
|
108
109
|
- state and data-flow conventions,
|
|
@@ -48,6 +48,8 @@ The output explains what changed, why it matters, how to review it, how to roll
|
|
|
48
48
|
- relevant ADRs or architecture notes,
|
|
49
49
|
- validation evidence or missing validation.
|
|
50
50
|
|
|
51
|
+
For a changed boundary, link the affected model elements, Spec and evidence directly from the explanation of impact. State what remains unknown. Route lasting guide changes to `engineering-documentation-generation` when selected and authorized. Keep the change, review and rollback narrative here.
|
|
52
|
+
|
|
51
53
|
3. Separate evidence status for important claims.
|
|
52
54
|
- `Verified`: directly observed in code, docs, tests, logs, CI, or user input.
|
|
53
55
|
- `Supported`: indirectly backed but not fully proven.
|
|
@@ -71,6 +71,7 @@ This skill prevents ordinary delivery work from being polluted by adoption, metr
|
|
|
71
71
|
User-facing route text should explain the work path in these terms. Skill names belong in `Internal route` for review and debugging.
|
|
72
72
|
|
|
73
73
|
4. Distinguish close signals.
|
|
74
|
+
- A system walkthrough, architecture model, technical document or design comparison for a concrete project is `delivery_quality`, including on an unadopted project. Route by the requested result through `skill-router`. An explicit ASK rollout remains `adoption_bootstrap`. During rollout, delegate only requested, selected capabilities. An existing diagram alone triggers no workflow.
|
|
74
75
|
- A test strategy meant to decide a project’s promises, responsibilities, work order or release scope is concrete `delivery_quality` design work: use `skill-router`, not adoption reporting or model-effectiveness evaluation.
|
|
75
76
|
- Executable-spec method setup for a concrete project (test writing conventions, specification index, AI context retrieval, or verification selection): classify as `delivery_quality`, then route through `skill-router` to `spec-driven-development`, including for a new project. A method setup request alone does not request rollout of the ASK skill set or an adoption pack. If ASK rollout is also requested, keep that rollout in `adoption_bootstrap` and delegate only the requested method setup after checking its capability.
|
|
76
77
|
- One completed task effectiveness question: route to `skill-effectiveness-evaluation`.
|
|
@@ -50,6 +50,7 @@ This skill separates generic workflow rules from project-specific overlay rules.
|
|
|
50
50
|
3. Draft the project overlay.
|
|
51
51
|
- Include local commands, forbidden zones, generated-file policy, risk gate triggers, branch/PR policy if known, deployment approval policy if known, domain terms, invariants, and ownership if known.
|
|
52
52
|
- Keep generic workflow behavior in skills; put only project-specific rules in the overlay.
|
|
53
|
+
- Only for requested architecture or documentation adoption, reuse existing guides and agree on readers, scope, model and view locations, update triggers and owners. Check `selected_skills` before delegating to `architecture-modeling` or `engineering-documentation-generation`. If unavailable, record the optional gap and continue ordinary adoption without a migration or new required files.
|
|
53
54
|
|
|
54
55
|
4. Draft reusable contexts.
|
|
55
56
|
- Implementation context draft: stack, commands, implementation patterns, test patterns, architecture boundaries, generated/manual-edit boundaries, stop conditions, and update triggers.
|
|
@@ -39,6 +39,7 @@ This skill is for safe refactor execution after a candidate exists. It does not
|
|
|
39
39
|
- Boundary movement is implied: route to `application-boundary-architecture` first.
|
|
40
40
|
|
|
41
41
|
2. Define the behavior-preservation contract.
|
|
42
|
+
- For a structural move, compare ownership, dependencies and consumers before and after. Use existing model references where current, and bind preserved Spec items and public contracts to regression checks at the affected boundary.
|
|
42
43
|
- On projects that explicitly adopt the executable-spec method, read the project profile and the relevant `spec-driven-development` writing/context references. Preserve business and compatibility items; reassess architecture constraints against current ADRs and replace implementation-specific tests only with a reason and retained behavior evidence. Do not activate a new project-wide migration.
|
|
43
44
|
- Must not change public API, UI behavior, schema, snapshots, runtime behavior, errors, logs, data shape, permissions, notifications, or external I/O unless explicitly authorized.
|
|
44
45
|
- Record any authorized exception before editing.
|
|
@@ -49,6 +49,8 @@ Understand enough of the repository to avoid random edits, invented conventions,
|
|
|
49
49
|
- run/dev server
|
|
50
50
|
|
|
51
51
|
4. Map target area.
|
|
52
|
+
- Follow a representative input from the entry point through the responsible code to the consumer and result. Identify the purpose, upstream contract, downstream effect and relevant tests.
|
|
53
|
+
- If a current architecture model covers this question, use only the matching elements to find the sources. Check the actual contracts, code and tests directly. For missing, stale, partial or conflicting coverage, explore the affected paths normally without requiring a model.
|
|
52
54
|
- target files/modules
|
|
53
55
|
- nearby tests
|
|
54
56
|
- public interfaces
|
|
@@ -49,6 +49,8 @@ This is decision support. It may recommend a decision, but unresolved value, pri
|
|
|
49
49
|
- Do not ask broad question dumps.
|
|
50
50
|
- Do not ask for facts that the repo or docs can answer.
|
|
51
51
|
- If progress is possible, state the reversible assumption and keep it out of durable contracts.
|
|
52
|
+
- Connect the user, purpose, external responsibilities and decision owner to the existing Requirement and relevant system context (C1) if available. For complex alternatives, show the same actor, initial state and input side by side before the question. Explain which outcomes and side effects change, what remains unknown, and the recommendation and tradeoff.
|
|
53
|
+
- If helpful and selected, use the `spec-driven-development` candidate preview for promises, `architecture-modeling` for responsibility, `code-visualization` for a `design-preview` or `engineering-documentation-generation`’s `references/diagram-selection.md` for a decision table. Otherwise compare in plain language. Keep unapproved and unexecuted options explicit. Revise only affected cases after corrections, then return the actual decision to its owner.
|
|
52
54
|
|
|
53
55
|
When an adopted project has competing promises that would assign a different owner, compatibility promise or rollout scope, or the user explicitly requests a strategy, present one situation in which plausible promises yield different results for the affected user. The business owner decides which result is acceptable; a passing prototype is not an approval. Preserve the rejected alternative or unresolved branch in the existing decision context. If the selected `spec-driven-development` capability is available, its `references/decision-led-test-strategy.md` connects that decision to design and delivery.
|
|
54
56
|
|
|
@@ -59,6 +59,8 @@ Review architecture impact from repository evidence, not preference. A finding n
|
|
|
59
59
|
- persistence and infrastructure access patterns,
|
|
60
60
|
- relevant docs or ADRs when structural intent is documented.
|
|
61
61
|
- `docs/ai/architecture-decision-memory.md` when active architecture memory exists for the affected boundary; treat template or stale memory as insufficient evidence, and route contradictions to `adr-review` or `application-boundary-architecture`.
|
|
62
|
+
- Trace the same input through base and head code, contracts and callers. Where available, compare each side's model at its own revision. Check for unexpected moves in responsibility, dependencies, state ownership, public behavior or failure paths against explicit constraints. An omitted edge is not a prohibition.
|
|
63
|
+
- Distinguish a violated requirement or decision from a stale guide or model. In the existing finding show the evidence, effect and correct repair target. Missing diagrams alone do not fail review, add a gate or replace direct inspection.
|
|
62
64
|
|
|
63
65
|
2. Classify architecture impact.
|
|
64
66
|
- no architecture impact,
|
|
@@ -98,6 +98,7 @@ Use `ask.claim-evidence-status@1.0.0`; record human confirmation in source/owner
|
|
|
98
98
|
- output quality standards,
|
|
99
99
|
- domain review context,
|
|
100
100
|
- architecture review context,
|
|
101
|
+
- relevant model elements and revisions linked to current Spec items and governing rules when useful. Flag stale references and retain the existing review triggers.
|
|
101
102
|
- adversarial review context,
|
|
102
103
|
- assets to protect,
|
|
103
104
|
- threat / misuse model,
|
|
@@ -47,6 +47,8 @@ Domain input sources:
|
|
|
47
47
|
|
|
48
48
|
Treat missing, template, stale, or contradicted inputs as evidence limitations. Do not infer confirmed business truth from placeholders.
|
|
49
49
|
|
|
50
|
+
Where an architecture view identifies affected actors or owners, follow its references to the current Spec and applicable domain rules. Check the behavior in the diff and its consumers. Structural ownership alone cannot decide a business promise or waive a risk gate.
|
|
51
|
+
|
|
50
52
|
When a scenario animation is supplied or requested, compare its source acceptance revision, test expectations and observed execution, using `spec-driven-development/references/scenario-visual-review.md` only when that optional capability is selected. Read the underlying tests and mock boundaries. Keep unasserted values, changed inputs and unobserved behavior visible; replay success is not human approval or proof of application-wide behavior. The visual aid does not add or waive review gates.
|
|
51
53
|
|
|
52
54
|
For a decision-led strategy, follow the agreed Requirement decision to the exact Spec item, chosen owner, Work Package/Verification obligation and executed Evidence used by this change. Compare supported and excluded populations. Green evidence for a draft, a different record, a mock or a previous revision cannot authorize confirmed output for the affected record. If the evidence contradicts the chosen boundary, identify the design or task that must be reopened; if the business promise changed, return that specific decision to its owner. Do not grant release approval here.
|