@haaaiawd/anws 2.2.6 → 2.4.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.md +1 -1
- package/bin/cli.js +52 -22
- package/lib/diff.js +5 -2
- package/lib/init.js +217 -96
- package/lib/install-state.js +18 -3
- package/lib/manifest.js +510 -213
- package/lib/prompt.js +68 -0
- package/lib/resources/index.js +36 -2
- package/lib/update.js +12 -6
- package/package.json +48 -47
- package/templates/.agents/skills/anws-system/SKILL.md +108 -108
- package/templates/.agents/skills/code-reviewer/SKILL.md +170 -103
- package/templates/.agents/skills/concept-modeler/SKILL.md +230 -179
- package/templates/.agents/skills/craft-authoring/SKILL.md +112 -49
- package/templates/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +61 -0
- package/templates/.agents/skills/craft-authoring/references/PROMPT_QUALITY_RUBRIC.md +99 -0
- package/templates/.agents/skills/craft-authoring/references/SCORECARD_TEMPLATE.md +64 -0
- package/templates/.agents/skills/design-reviewer/SKILL.md +265 -190
- package/templates/.agents/skills/e2e-testing-guide/SKILL.md +246 -135
- package/templates/.agents/skills/nexus-mapper/SKILL.md +321 -321
- package/templates/.agents/skills/output-contract/SKILL.md +37 -0
- package/templates/.agents/skills/report-template/SKILL.md +92 -92
- package/templates/.agents/skills/sequential-thinking/SKILL.md +222 -225
- package/templates/.agents/skills/spec-writer/SKILL.md +75 -30
- package/templates/.agents/skills/system-architect/SKILL.md +538 -678
- package/templates/.agents/skills/system-designer/SKILL.md +601 -601
- package/templates/.agents/skills/task-planner/SKILL.md +1 -2
- package/templates/.agents/skills/task-reviewer/SKILL.md +428 -388
- package/templates/.agents/skills/tech-evaluator/SKILL.md +252 -144
- package/templates/.agents/workflows/blueprint.md +166 -43
- package/templates/.agents/workflows/challenge.md +331 -497
- package/templates/.agents/workflows/change.md +182 -339
- package/templates/.agents/workflows/craft.md +159 -236
- package/templates/.agents/workflows/design-system.md +202 -674
- package/templates/.agents/workflows/explore.md +187 -399
- package/templates/.agents/workflows/forge.md +650 -550
- package/templates/.agents/workflows/genesis.md +439 -351
- package/templates/.agents/workflows/probe.md +219 -241
- package/templates/.agents/workflows/quickstart.md +302 -123
- package/templates/.agents/workflows/upgrade.md +145 -182
- package/templates_en/.agents/skills/anws-system/SKILL.md +108 -0
- package/templates_en/.agents/skills/code-reviewer/SKILL.md +170 -0
- package/templates_en/.agents/skills/concept-modeler/SKILL.md +230 -0
- package/templates_en/.agents/skills/craft-authoring/SKILL.md +179 -0
- package/templates_en/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +60 -0
- package/templates_en/.agents/skills/craft-authoring/references/PROMPT_QUALITY_RUBRIC.md +92 -0
- package/templates_en/.agents/skills/craft-authoring/references/SCORECARD_TEMPLATE.md +52 -0
- package/templates_en/.agents/skills/design-reviewer/SKILL.md +265 -0
- package/templates_en/.agents/skills/e2e-testing-guide/SKILL.md +246 -0
- package/templates_en/.agents/skills/nexus-mapper/SKILL.md +306 -0
- package/templates_en/.agents/skills/nexus-mapper/references/language-customization.md +167 -0
- package/templates_en/.agents/skills/nexus-mapper/references/output-schema.md +311 -0
- package/templates_en/.agents/skills/nexus-mapper/references/probe-protocol.md +246 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/extract_ast.py +706 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/git_detective.py +194 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/languages.json +127 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/query_graph.py +556 -0
- package/templates_en/.agents/skills/nexus-mapper/scripts/requirements.txt +6 -0
- package/templates_en/.agents/skills/nexus-query/SKILL.md +114 -0
- package/templates_en/.agents/skills/nexus-query/scripts/extract_ast.py +706 -0
- package/templates_en/.agents/skills/nexus-query/scripts/git_detective.py +194 -0
- package/templates_en/.agents/skills/nexus-query/scripts/languages.json +127 -0
- package/templates_en/.agents/skills/nexus-query/scripts/query_graph.py +556 -0
- package/templates_en/.agents/skills/nexus-query/scripts/requirements.txt +6 -0
- package/templates_en/.agents/skills/output-contract/SKILL.md +37 -0
- package/templates_en/.agents/skills/report-template/SKILL.md +85 -0
- package/templates_en/.agents/skills/report-template/references/REPORT_TEMPLATE.md +100 -0
- package/templates_en/.agents/skills/runtime-inspector/SKILL.md +101 -0
- package/templates_en/.agents/skills/sequential-thinking/SKILL.md +214 -0
- package/templates_en/.agents/skills/spec-writer/SKILL.md +153 -0
- package/templates_en/.agents/skills/spec-writer/references/prd_template.md +177 -0
- package/templates_en/.agents/skills/system-architect/SKILL.md +538 -0
- package/templates_en/.agents/skills/system-architect/references/rfc_template.md +59 -0
- package/templates_en/.agents/skills/system-designer/SKILL.md +534 -0
- package/templates_en/.agents/skills/system-designer/references/system-design-detail-template.md +187 -0
- package/templates_en/.agents/skills/system-designer/references/system-design-template.md +605 -0
- package/templates_en/.agents/skills/task-planner/SKILL.md +251 -0
- package/templates_en/.agents/skills/task-planner/references/TASK_TEMPLATE_05A.md +109 -0
- package/templates_en/.agents/skills/task-planner/references/TASK_TEMPLATE_05B.md +176 -0
- package/templates_en/.agents/skills/task-reviewer/SKILL.md +428 -0
- package/templates_en/.agents/skills/tech-evaluator/SKILL.md +252 -0
- package/templates_en/.agents/skills/tech-evaluator/references/ADR_TEMPLATE.md +78 -0
- package/templates_en/.agents/workflows/blueprint.md +200 -0
- package/templates_en/.agents/workflows/challenge.md +331 -0
- package/templates_en/.agents/workflows/change.md +182 -0
- package/templates_en/.agents/workflows/craft.md +159 -0
- package/templates_en/.agents/workflows/design-system.md +202 -0
- package/templates_en/.agents/workflows/explore.md +187 -0
- package/templates_en/.agents/workflows/forge.md +651 -0
- package/templates_en/.agents/workflows/genesis.md +439 -0
- package/templates_en/.agents/workflows/probe.md +219 -0
- package/templates_en/.agents/workflows/quickstart.md +303 -0
- package/templates_en/.agents/workflows/upgrade.md +145 -0
- package/templates_en/AGENTS.md +149 -0
package/lib/prompt.js
CHANGED
|
@@ -125,6 +125,72 @@ async function confirm({ message, messageLines = [], contextLines = [], confirmL
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
async function selectRadio({ message, options, initialIndex = 0 }) {
|
|
129
|
+
const normalizedInitial = Math.min(Math.max(0, initialIndex), options.length - 1);
|
|
130
|
+
|
|
131
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
132
|
+
return options[normalizedInitial].value;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let cursorIndex = normalizedInitial;
|
|
136
|
+
|
|
137
|
+
blank();
|
|
138
|
+
|
|
139
|
+
return runPrompt({
|
|
140
|
+
render() {
|
|
141
|
+
return renderRadioSelect({ message, options, cursorIndex });
|
|
142
|
+
},
|
|
143
|
+
onKey(key) {
|
|
144
|
+
if (key === KEY.CTRL_C) {
|
|
145
|
+
return 'abort';
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (key === KEY.ARROW_UP || key === KEY.ARROW_LEFT) {
|
|
149
|
+
cursorIndex = (cursorIndex - 1 + options.length) % options.length;
|
|
150
|
+
return 'render';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (key === KEY.ARROW_DOWN || key === KEY.ARROW_RIGHT) {
|
|
154
|
+
cursorIndex = (cursorIndex + 1) % options.length;
|
|
155
|
+
return 'render';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (key === KEY.ENTER || key === KEY.NEWLINE) {
|
|
159
|
+
return options[cursorIndex].value;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function renderRadioSelect({ message, options, cursorIndex }) {
|
|
168
|
+
const optionLines = options.map((option, index) => {
|
|
169
|
+
const isActive = index === cursorIndex;
|
|
170
|
+
const cursor = isActive ? colorize('❯', PALETTE.brand) : ' ';
|
|
171
|
+
const mark = isActive ? colorize('●', PALETTE.brand) : colorize('○', PALETTE.muted);
|
|
172
|
+
const label = isActive ? colorize(option.label, PALETTE.ink) : option.label;
|
|
173
|
+
return `${cursor} ${mark} ${label}`;
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
return centerFrame([
|
|
177
|
+
drawBox({
|
|
178
|
+
title: 'Select option',
|
|
179
|
+
lines: [
|
|
180
|
+
message,
|
|
181
|
+
'',
|
|
182
|
+
...optionLines,
|
|
183
|
+
'',
|
|
184
|
+
colorize('↑/↓ Move Enter Confirm', PALETTE.muted)
|
|
185
|
+
],
|
|
186
|
+
accent: PALETTE.brand,
|
|
187
|
+
borderTone: PALETTE.muted,
|
|
188
|
+
minWidth: 60
|
|
189
|
+
}),
|
|
190
|
+
colorize(' ←/→ Move Enter Confirm', PALETTE.muted)
|
|
191
|
+
].join('\n'));
|
|
192
|
+
}
|
|
193
|
+
|
|
128
194
|
function renderMultiSelect({ message, options, selected, cursorIndex, errorMessage = '' }) {
|
|
129
195
|
const optionLines = options.map((option, index) => {
|
|
130
196
|
const isActive = index === cursorIndex;
|
|
@@ -287,8 +353,10 @@ function centerFrame(frame) {
|
|
|
287
353
|
|
|
288
354
|
module.exports = {
|
|
289
355
|
selectMultiple,
|
|
356
|
+
selectRadio,
|
|
290
357
|
confirm,
|
|
291
358
|
renderMultiSelect,
|
|
359
|
+
renderRadioSelect,
|
|
292
360
|
renderConfirm
|
|
293
361
|
};
|
|
294
362
|
|
package/lib/resources/index.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const fs = require('node:fs');
|
|
3
4
|
const path = require('node:path');
|
|
4
5
|
const { findByType } = require('../manifest');
|
|
5
6
|
|
|
6
7
|
const TEMPLATE_ROOT = path.join(__dirname, '..', '..', 'templates');
|
|
8
|
+
const TEMPLATE_ROOT_EN = path.join(__dirname, '..', '..', 'templates_en');
|
|
7
9
|
const AGENTS_ROOT = path.join(TEMPLATE_ROOT, '.agents');
|
|
8
10
|
const ROOT_AGENTS_FILE = path.join(TEMPLATE_ROOT, 'AGENTS.md');
|
|
11
|
+
const ROOT_AGENTS_FILE_EN = path.join(TEMPLATE_ROOT_EN, 'AGENTS.md');
|
|
12
|
+
|
|
13
|
+
const VALID_TEMPLATE_LOCALES = new Set(['zh', 'en']);
|
|
9
14
|
|
|
10
15
|
function listCanonicalResources() {
|
|
11
16
|
return [
|
|
@@ -14,14 +19,43 @@ function listCanonicalResources() {
|
|
|
14
19
|
];
|
|
15
20
|
}
|
|
16
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} relPath path relative to templates/ (manifest `source`)
|
|
24
|
+
* @param {'zh'|'en'} [templateLocale='zh'] en uses templates_en/ when the file exists, else falls back to templates/
|
|
25
|
+
*/
|
|
26
|
+
function resolveCanonicalPath(relPath, templateLocale = 'zh') {
|
|
27
|
+
const zhPath = path.join(TEMPLATE_ROOT, relPath);
|
|
28
|
+
if (templateLocale !== 'en') {
|
|
29
|
+
return zhPath;
|
|
30
|
+
}
|
|
31
|
+
const enPath = path.join(TEMPLATE_ROOT_EN, relPath);
|
|
32
|
+
return fs.existsSync(enPath) ? enPath : zhPath;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** @deprecated Prefer `resolveCanonicalPath(relPath, 'zh')` — kept for call sites that assume Chinese tree only */
|
|
17
36
|
function resolveCanonicalSource(relPath) {
|
|
18
|
-
return
|
|
37
|
+
return resolveCanonicalPath(relPath, 'zh');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @param {'zh'|'en'} [templateLocale='zh']
|
|
42
|
+
*/
|
|
43
|
+
function resolveRootAgentsPath(templateLocale = 'zh') {
|
|
44
|
+
if (templateLocale !== 'en') {
|
|
45
|
+
return ROOT_AGENTS_FILE;
|
|
46
|
+
}
|
|
47
|
+
return fs.existsSync(ROOT_AGENTS_FILE_EN) ? ROOT_AGENTS_FILE_EN : ROOT_AGENTS_FILE;
|
|
19
48
|
}
|
|
20
49
|
|
|
21
50
|
module.exports = {
|
|
22
51
|
TEMPLATE_ROOT,
|
|
52
|
+
TEMPLATE_ROOT_EN,
|
|
23
53
|
AGENTS_ROOT,
|
|
24
54
|
ROOT_AGENTS_FILE,
|
|
55
|
+
ROOT_AGENTS_FILE_EN,
|
|
56
|
+
VALID_TEMPLATE_LOCALES,
|
|
25
57
|
listCanonicalResources,
|
|
26
|
-
|
|
58
|
+
resolveCanonicalPath,
|
|
59
|
+
resolveCanonicalSource,
|
|
60
|
+
resolveRootAgentsPath
|
|
27
61
|
};
|
package/lib/update.js
CHANGED
|
@@ -10,7 +10,7 @@ const { detectUpgrade, generateChangelog } = require('./changelog');
|
|
|
10
10
|
const { writeTargetFiles } = require('./copy');
|
|
11
11
|
const { createInstallLock, dedupeTargets, detectInstallState, summarizeTargetState, writeInstallLock } = require('./install-state');
|
|
12
12
|
const { confirm } = require('./prompt');
|
|
13
|
-
const {
|
|
13
|
+
const { resolveCanonicalPath, resolveRootAgentsPath } = require('./resources');
|
|
14
14
|
const { warn, error, info, fileLine, skippedLine, blank, logo, section } = require('./output');
|
|
15
15
|
|
|
16
16
|
async function update() {
|
|
@@ -32,7 +32,9 @@ async function update() {
|
|
|
32
32
|
const targetPlans = buildProjectionPlan(detectedTargetIds);
|
|
33
33
|
const detectedTargetPlans = buildProjectionPlan(detectedTargetIds);
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const templateLocale = installState.lockResult.lock?.templateLocale ?? 'zh';
|
|
36
|
+
const srcAgents = resolveRootAgentsPath(templateLocale);
|
|
37
|
+
const resolveCanonicalSource = (relPath) => resolveCanonicalPath(relPath, templateLocale);
|
|
36
38
|
|
|
37
39
|
if (isLegacyMigration) {
|
|
38
40
|
logo();
|
|
@@ -82,7 +84,8 @@ async function update() {
|
|
|
82
84
|
projectionPlan: [targetPlan],
|
|
83
85
|
srcAgents,
|
|
84
86
|
shouldWriteRootAgents: agentsDecision.shouldWriteRootAgents,
|
|
85
|
-
agentsUpdatePlan
|
|
87
|
+
agentsUpdatePlan,
|
|
88
|
+
resolveCanonicalPath: resolveCanonicalSource
|
|
86
89
|
});
|
|
87
90
|
const changes = rawChanges.filter((item) => {
|
|
88
91
|
if (item.file !== 'AGENTS.md') return true;
|
|
@@ -106,12 +109,13 @@ async function update() {
|
|
|
106
109
|
logo();
|
|
107
110
|
blank();
|
|
108
111
|
}
|
|
109
|
-
printTargetSelection(installState, targetContexts.map((context) => context.target));
|
|
112
|
+
printTargetSelection(installState, targetContexts.map((context) => context.target), templateLocale);
|
|
110
113
|
if (installState.canRebuildLock && detectedTargetIds.length > 0) {
|
|
111
114
|
const generatedAt = new Date().toISOString();
|
|
112
115
|
await writeInstallLock(cwd, createInstallLock({
|
|
113
116
|
cliVersion: version,
|
|
114
117
|
generatedAt,
|
|
118
|
+
templateLocale,
|
|
115
119
|
targets: dedupeTargets(detectedTargetPlans.map((targetPlan) => summarizeTargetState(targetPlan, version))),
|
|
116
120
|
lastUpdateSummary: {
|
|
117
121
|
successfulTargets: [],
|
|
@@ -130,7 +134,7 @@ async function update() {
|
|
|
130
134
|
blank();
|
|
131
135
|
}
|
|
132
136
|
|
|
133
|
-
printTargetSelection(installState, targetContexts.map((context) => context.target));
|
|
137
|
+
printTargetSelection(installState, targetContexts.map((context) => context.target), templateLocale);
|
|
134
138
|
|
|
135
139
|
const updated = [];
|
|
136
140
|
const skipped = [];
|
|
@@ -199,6 +203,7 @@ async function update() {
|
|
|
199
203
|
await writeInstallLock(cwd, createInstallLock({
|
|
200
204
|
cliVersion: version,
|
|
201
205
|
generatedAt,
|
|
206
|
+
templateLocale,
|
|
202
207
|
targets: dedupeTargets([
|
|
203
208
|
...existingLockTargets,
|
|
204
209
|
...retainedDetectedTargets,
|
|
@@ -280,10 +285,11 @@ function printLegacyMigrationNotice() {
|
|
|
280
285
|
], { minWidth: 60 });
|
|
281
286
|
}
|
|
282
287
|
|
|
283
|
-
function printTargetSelection(installState, targets) {
|
|
288
|
+
function printTargetSelection(installState, targets, templateLocale = 'zh') {
|
|
284
289
|
blank();
|
|
285
290
|
section('Target selection', [
|
|
286
291
|
buildSelectionModeLine(),
|
|
292
|
+
`Template locale: ${templateLocale} (${templateLocale === 'en' ? 'templates_en/' : 'templates/'})`,
|
|
287
293
|
`Matched targets: ${targets.map((target) => `${target.label} (${target.id})`).join(', ') || 'none'}`,
|
|
288
294
|
installState.needsFallback ? 'State source: directory scan fallback' : 'State source: install-lock + directory scan',
|
|
289
295
|
...(installState.drift.hasDrift
|
package/package.json
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@haaaiawd/anws",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Anws — A spec-driven workflow framework for AI-assisted development. Empowers prompt engineers to build production-ready software through structured PRD → Architecture → Task decomposition. Works with Claude Code, GitHub Copilot, Cursor, Windsurf, and any tool that reads AGENTS.md.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"anws",
|
|
7
|
-
"agentic-ai",
|
|
8
|
-
"workflow-orchestration",
|
|
9
|
-
"spec-driven",
|
|
10
|
-
"system-architecture",
|
|
11
|
-
"vibe-coding",
|
|
12
|
-
"prompt-engineering",
|
|
13
|
-
"devops-for-ai",
|
|
14
|
-
"skills-framework",
|
|
15
|
-
"craft-authoring",
|
|
16
|
-
"claude-code",
|
|
17
|
-
"github-copilot",
|
|
18
|
-
"cursor",
|
|
19
|
-
"windsurf"
|
|
20
|
-
],
|
|
21
|
-
"homepage": "https://github.com/Haaaiawd/ANWS",
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/Haaaiawd/ANWS.git"
|
|
25
|
-
},
|
|
26
|
-
"author": "haaaiawd <1134180104@qq.com>",
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">=18"
|
|
30
|
-
},
|
|
31
|
-
"bin": {
|
|
32
|
-
"anws": "bin/cli.js"
|
|
33
|
-
},
|
|
34
|
-
"files": [
|
|
35
|
-
"bin/",
|
|
36
|
-
"lib/",
|
|
37
|
-
"templates/",
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@haaaiawd/anws",
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Anws — A spec-driven workflow framework for AI-assisted development. Empowers prompt engineers to build production-ready software through structured PRD → Architecture → Task decomposition. Works with Claude Code, GitHub Copilot, Cursor, Windsurf, and any tool that reads AGENTS.md.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"anws",
|
|
7
|
+
"agentic-ai",
|
|
8
|
+
"workflow-orchestration",
|
|
9
|
+
"spec-driven",
|
|
10
|
+
"system-architecture",
|
|
11
|
+
"vibe-coding",
|
|
12
|
+
"prompt-engineering",
|
|
13
|
+
"devops-for-ai",
|
|
14
|
+
"skills-framework",
|
|
15
|
+
"craft-authoring",
|
|
16
|
+
"claude-code",
|
|
17
|
+
"github-copilot",
|
|
18
|
+
"cursor",
|
|
19
|
+
"windsurf"
|
|
20
|
+
],
|
|
21
|
+
"homepage": "https://github.com/Haaaiawd/ANWS",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/Haaaiawd/ANWS.git"
|
|
25
|
+
},
|
|
26
|
+
"author": "haaaiawd <1134180104@qq.com>",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18"
|
|
30
|
+
},
|
|
31
|
+
"bin": {
|
|
32
|
+
"anws": "bin/cli.js"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"bin/",
|
|
36
|
+
"lib/",
|
|
37
|
+
"templates/",
|
|
38
|
+
"templates_en/",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"main": "./lib/index.js",
|
|
42
|
+
"scripts": {
|
|
43
|
+
"sync": "node scripts/sync-assets.js",
|
|
44
|
+
"prepublishOnly": "npm run sync",
|
|
45
|
+
"test": "node --test test/**/*.test.js && node scripts/check-canonical-templates.js"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {}
|
|
48
|
+
}
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: anws-system
|
|
3
|
-
description: 当用户在 skills-only 环境中需要判断应该从哪个 anws 工作流开始,或需要在 forge / change / genesis / probe / blueprint / challenge / upgrade 之间路由时使用。它是 anws 工作流集合的导航入口。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# ANWS System Router Manual
|
|
7
|
-
|
|
8
|
-
你是 **ANWS Router**。
|
|
9
|
-
|
|
10
|
-
你的职责不是直接替代所有工作流,而是作为 **skills-only 模式** 下的统一导航入口:
|
|
11
|
-
|
|
12
|
-
- 判断当前请求应路由到哪个工作流
|
|
13
|
-
- 告诉模型还需要读取哪个 `references/*.md`
|
|
14
|
-
- 在开始执行前明确权限边界,避免把 `/forge`、`/change`、`/genesis` 混用
|
|
15
|
-
|
|
16
|
-
## 激活规则
|
|
17
|
-
|
|
18
|
-
出现以下任一情况时使用本 Skill:
|
|
19
|
-
|
|
20
|
-
1. 用户不知道该从哪个工作流开始
|
|
21
|
-
2. 用户明确提到 `/quickstart`、`/forge`、`/change`、`/genesis` 等工作流,但当前环境只有 skills
|
|
22
|
-
3. 用户请求涉及“下一步该走哪个流程”
|
|
23
|
-
4. 用户请求跨越设计、任务、实现多个阶段,需要先判断阶段边界
|
|
24
|
-
|
|
25
|
-
## 首次激活的强制步骤
|
|
26
|
-
|
|
27
|
-
1. 先读取 `references/quickstart.md`
|
|
28
|
-
2. 判断当前请求更接近哪一种场景
|
|
29
|
-
3. 再按需读取对应 workflow reference
|
|
30
|
-
4. 没有读完对应 reference 前,不得直接执行该 workflow 的写操作
|
|
31
|
-
|
|
32
|
-
## Workflow Map
|
|
33
|
-
|
|
34
|
-
- `references/quickstart.md`
|
|
35
|
-
- 用途:总入口。用于判断项目目前处于哪一阶段,以及应先调用哪个工作流
|
|
36
|
-
- `references/probe.md`
|
|
37
|
-
- 用途:接手遗留项目、重大改动前做系统风险探测
|
|
38
|
-
- `references/genesis.md`
|
|
39
|
-
- 用途:新项目、重大重构、架构升级、需要新版本时使用
|
|
40
|
-
- `references/design-system.md`
|
|
41
|
-
- 用途:为单个系统补详细设计文档
|
|
42
|
-
- `references/blueprint.md`
|
|
43
|
-
- 用途:将架构设计拆成可执行的 `05A_TASKS.md`(任务)与 `05B_VERIFICATION_PLAN.md`(验证)
|
|
44
|
-
- `references/challenge.md`
|
|
45
|
-
- 用途:在编码前(或需要时含 `src/`)对抗式审查;可组合 design-reviewer、task-reviewer、**code-reviewer**(`CODE` / `FULL` 或自适应升级)
|
|
46
|
-
- `references/forge.md`
|
|
47
|
-
- 用途:按 `05A_TASKS.md` 执行编码,并读取 `05B_VERIFICATION_PLAN.md` 落实验证;在验证与提交之间调用 **code-reviewer**(静态忠实度)及按需 **`e2e-testing-guide`**(浏览器/E2E 指南或实测)
|
|
48
|
-
- `references/change.md`
|
|
49
|
-
- 用途:在当前版本前提不变时微调任务/契约/验证承接;允许 **受控扩展** 下与用户原话或 `/forge` 回流对应的 **少量新任务**;**禁止**回填 `- [x]`、**禁止**运行或替代 **`code-reviewer`**
|
|
50
|
-
- `references/explore.md`
|
|
51
|
-
- 用途:做调研、探索、方案发散与收敛
|
|
52
|
-
- `references/craft.md`
|
|
53
|
-
- 用途:创建 workflow / skill / prompt;长模板、防护写法与自检清单在 **`craft-authoring`** skill(与 `/craft` 配套,路径随 target 投影到 `skills/craft-authoring/SKILL.md
|
|
54
|
-
- `references/upgrade.md`
|
|
55
|
-
- 用途:处理 `anws update` 之后的升级编排
|
|
56
|
-
|
|
57
|
-
## 路由规则
|
|
58
|
-
|
|
59
|
-
### Route 1: 不确定起点
|
|
60
|
-
|
|
61
|
-
如果用户不知道从哪里开始,或你对当前阶段没有把握:
|
|
62
|
-
|
|
63
|
-
1. 读取 `references/quickstart.md`
|
|
64
|
-
2. 根据项目状态判断入口
|
|
65
|
-
3. 给出建议 workflow,并说明理由
|
|
66
|
-
4. 等待用户确认
|
|
67
|
-
|
|
68
|
-
### Route 2: 请求是“开始编码 / 继续实现 / 做当前波次”
|
|
69
|
-
|
|
70
|
-
1. 读取 `references/forge.md`
|
|
71
|
-
2. 检查 `.anws/v{N}/05A_TASKS.md` 与 `.anws/v{N}/05B_VERIFICATION_PLAN.md` 是否存在且已定义
|
|
72
|
-
3. 若缺任务清单,不得直接实现,先回到 `blueprint` 或 `genesis`
|
|
73
|
-
4. 若任务含 **E2E / 浏览器手动验证**:在执行路径上读取 **`e2e-testing-guide`** skill(同目录 `skills/e2e-testing-guide/SKILL.md`);投影环境下路径以目标 IDE 的 `skills/` 为准
|
|
74
|
-
5. 在提交前需要静态契约核对时:读取 **`code-reviewer`** skill
|
|
75
|
-
|
|
76
|
-
### Route 3: 请求是“微调现有任务 / 修正文案 / 调整验收标准 / 受控补任务”
|
|
77
|
-
|
|
78
|
-
1. 读取 `references/change.md`
|
|
79
|
-
2. 判断变更是否仍属 `/change` 权限(含 **Q8 少量新任务**、契约/验证补全);若已改动需求/架构/ADR **前提** → `genesis`
|
|
80
|
-
3. **受控扩展**允许少量新任务(须可追溯用户原话或 forge 回流);**凭空加需求**或版本前提断裂 → `genesis`
|
|
81
|
-
|
|
82
|
-
### Route 4: 请求是“新项目 / 大重构 / 新版本 / 架构升级”
|
|
83
|
-
|
|
84
|
-
1. 读取 `references/genesis.md`
|
|
85
|
-
2. 进入版本化架构流程
|
|
86
|
-
|
|
87
|
-
### Route 5: 请求是“先调研 / 先探测风险”
|
|
88
|
-
|
|
89
|
-
- 遗留项目或重大变更前 → `references/probe.md`
|
|
90
|
-
- 技术调研或方案发散 → `references/explore.md`
|
|
91
|
-
|
|
92
|
-
## 边界守则
|
|
93
|
-
|
|
94
|
-
1. 你是导航层,不是所有 workflow 的替身
|
|
95
|
-
2. 每次只路由到一个主 workflow;如需串联,必须说明顺序
|
|
96
|
-
3. 未读取目标 workflow reference 前,不得假装已经遵循该流程
|
|
97
|
-
4. 若用户请求同时跨越设计与实现,先收敛边界,再决定 `/change` 或 `/genesis`
|
|
98
|
-
5. skills-only 模式下,workflow 详情全部位于 `references/`
|
|
99
|
-
|
|
100
|
-
## 输出格式
|
|
101
|
-
|
|
102
|
-
当你完成路由判断时,输出应包含:
|
|
103
|
-
|
|
104
|
-
- 当前判断的阶段
|
|
105
|
-
- 建议读取的 reference
|
|
106
|
-
- 建议进入的 workflow
|
|
107
|
-
- 为什么不是其他 workflow
|
|
108
|
-
- 是否需要等待用户确认
|
|
1
|
+
---
|
|
2
|
+
name: anws-system
|
|
3
|
+
description: 当用户在 skills-only 环境中需要判断应该从哪个 anws 工作流开始,或需要在 forge / change / genesis / probe / blueprint / challenge / upgrade 之间路由时使用。它是 anws 工作流集合的导航入口。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ANWS System Router Manual
|
|
7
|
+
|
|
8
|
+
你是 **ANWS Router**。
|
|
9
|
+
|
|
10
|
+
你的职责不是直接替代所有工作流,而是作为 **skills-only 模式** 下的统一导航入口:
|
|
11
|
+
|
|
12
|
+
- 判断当前请求应路由到哪个工作流
|
|
13
|
+
- 告诉模型还需要读取哪个 `references/*.md`
|
|
14
|
+
- 在开始执行前明确权限边界,避免把 `/forge`、`/change`、`/genesis` 混用
|
|
15
|
+
|
|
16
|
+
## 激活规则
|
|
17
|
+
|
|
18
|
+
出现以下任一情况时使用本 Skill:
|
|
19
|
+
|
|
20
|
+
1. 用户不知道该从哪个工作流开始
|
|
21
|
+
2. 用户明确提到 `/quickstart`、`/forge`、`/change`、`/genesis` 等工作流,但当前环境只有 skills
|
|
22
|
+
3. 用户请求涉及“下一步该走哪个流程”
|
|
23
|
+
4. 用户请求跨越设计、任务、实现多个阶段,需要先判断阶段边界
|
|
24
|
+
|
|
25
|
+
## 首次激活的强制步骤
|
|
26
|
+
|
|
27
|
+
1. 先读取 `references/quickstart.md`
|
|
28
|
+
2. 判断当前请求更接近哪一种场景
|
|
29
|
+
3. 再按需读取对应 workflow reference
|
|
30
|
+
4. 没有读完对应 reference 前,不得直接执行该 workflow 的写操作
|
|
31
|
+
|
|
32
|
+
## Workflow Map
|
|
33
|
+
|
|
34
|
+
- `references/quickstart.md`
|
|
35
|
+
- 用途:总入口。用于判断项目目前处于哪一阶段,以及应先调用哪个工作流
|
|
36
|
+
- `references/probe.md`
|
|
37
|
+
- 用途:接手遗留项目、重大改动前做系统风险探测
|
|
38
|
+
- `references/genesis.md`
|
|
39
|
+
- 用途:新项目、重大重构、架构升级、需要新版本时使用
|
|
40
|
+
- `references/design-system.md`
|
|
41
|
+
- 用途:为单个系统补详细设计文档
|
|
42
|
+
- `references/blueprint.md`
|
|
43
|
+
- 用途:将架构设计拆成可执行的 `05A_TASKS.md`(任务)与 `05B_VERIFICATION_PLAN.md`(验证)
|
|
44
|
+
- `references/challenge.md`
|
|
45
|
+
- 用途:在编码前(或需要时含 `src/`)对抗式审查;可组合 design-reviewer、task-reviewer、**code-reviewer**(`CODE` / `FULL` 或自适应升级)
|
|
46
|
+
- `references/forge.md`
|
|
47
|
+
- 用途:按 `05A_TASKS.md` 执行编码,并读取 `05B_VERIFICATION_PLAN.md` 落实验证;在验证与提交之间调用 **code-reviewer**(静态忠实度)及按需 **`e2e-testing-guide`**(浏览器/E2E 指南或实测)
|
|
48
|
+
- `references/change.md`
|
|
49
|
+
- 用途:在当前版本前提不变时微调任务/契约/验证承接;允许 **受控扩展** 下与用户原话或 `/forge` 回流对应的 **少量新任务**;**禁止**回填 `- [x]`、**禁止**运行或替代 **`code-reviewer`**
|
|
50
|
+
- `references/explore.md`
|
|
51
|
+
- 用途:做调研、探索、方案发散与收敛
|
|
52
|
+
- `references/craft.md`
|
|
53
|
+
- 用途:创建 workflow / skill / prompt;长模板、防护写法与自检清单在 **`craft-authoring`** skill(与 `/craft` 配套,路径随 target 投影到 `skills/craft-authoring/SKILL.md`)。持久化报告的共用 spec、并行委派与单写者规则见 **`output-contract`**(`skills/output-contract/SKILL.md`)。
|
|
54
|
+
- `references/upgrade.md`
|
|
55
|
+
- 用途:处理 `anws update` 之后的升级编排
|
|
56
|
+
|
|
57
|
+
## 路由规则
|
|
58
|
+
|
|
59
|
+
### Route 1: 不确定起点
|
|
60
|
+
|
|
61
|
+
如果用户不知道从哪里开始,或你对当前阶段没有把握:
|
|
62
|
+
|
|
63
|
+
1. 读取 `references/quickstart.md`
|
|
64
|
+
2. 根据项目状态判断入口
|
|
65
|
+
3. 给出建议 workflow,并说明理由
|
|
66
|
+
4. 等待用户确认
|
|
67
|
+
|
|
68
|
+
### Route 2: 请求是“开始编码 / 继续实现 / 做当前波次”
|
|
69
|
+
|
|
70
|
+
1. 读取 `references/forge.md`
|
|
71
|
+
2. 检查 `.anws/v{N}/05A_TASKS.md` 与 `.anws/v{N}/05B_VERIFICATION_PLAN.md` 是否存在且已定义
|
|
72
|
+
3. 若缺任务清单,不得直接实现,先回到 `blueprint` 或 `genesis`
|
|
73
|
+
4. 若任务含 **E2E / 浏览器手动验证**:在执行路径上读取 **`e2e-testing-guide`** skill(同目录 `skills/e2e-testing-guide/SKILL.md`);投影环境下路径以目标 IDE 的 `skills/` 为准
|
|
74
|
+
5. 在提交前需要静态契约核对时:读取 **`code-reviewer`** skill。**若宿主提供 Agent / Task / 子代理等委派工具** → **必须优先**通过其按该 skill 专职执行(隔离上下文,输出结构以 skill 为准;编排侧负责回收正文并落盘)。**若无委派工具** → 由**当前会话**按同一 skill 完整执行(检查清单、证据与输出要求不得缩水)。
|
|
75
|
+
|
|
76
|
+
### Route 3: 请求是“微调现有任务 / 修正文案 / 调整验收标准 / 受控补任务”
|
|
77
|
+
|
|
78
|
+
1. 读取 `references/change.md`
|
|
79
|
+
2. 判断变更是否仍属 `/change` 权限(含 **Q8 少量新任务**、契约/验证补全);若已改动需求/架构/ADR **前提** → `genesis`
|
|
80
|
+
3. **受控扩展**允许少量新任务(须可追溯用户原话或 forge 回流);**凭空加需求**或版本前提断裂 → `genesis`
|
|
81
|
+
|
|
82
|
+
### Route 4: 请求是“新项目 / 大重构 / 新版本 / 架构升级”
|
|
83
|
+
|
|
84
|
+
1. 读取 `references/genesis.md`
|
|
85
|
+
2. 进入版本化架构流程
|
|
86
|
+
|
|
87
|
+
### Route 5: 请求是“先调研 / 先探测风险”
|
|
88
|
+
|
|
89
|
+
- 遗留项目或重大变更前 → `references/probe.md`
|
|
90
|
+
- 技术调研或方案发散 → `references/explore.md`
|
|
91
|
+
|
|
92
|
+
## 边界守则
|
|
93
|
+
|
|
94
|
+
1. 你是导航层,不是所有 workflow 的替身
|
|
95
|
+
2. 每次只路由到一个主 workflow;如需串联,必须说明顺序
|
|
96
|
+
3. 未读取目标 workflow reference 前,不得假装已经遵循该流程
|
|
97
|
+
4. 若用户请求同时跨越设计与实现,先收敛边界,再决定 `/change` 或 `/genesis`
|
|
98
|
+
5. skills-only 模式下,workflow 详情全部位于 `references/`
|
|
99
|
+
|
|
100
|
+
## 输出格式
|
|
101
|
+
|
|
102
|
+
当你完成路由判断时,输出应包含:
|
|
103
|
+
|
|
104
|
+
- 当前判断的阶段
|
|
105
|
+
- 建议读取的 reference
|
|
106
|
+
- 建议进入的 workflow
|
|
107
|
+
- 为什么不是其他 workflow
|
|
108
|
+
- 是否需要等待用户确认
|