@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/install-state.js
CHANGED
|
@@ -63,6 +63,17 @@ function dedupeTargets(targets) {
|
|
|
63
63
|
return Array.from(map.values()).sort((a, b) => a.targetId.localeCompare(b.targetId));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
function normalizeTemplateLocale(value) {
|
|
67
|
+
if (value == null || value === '') {
|
|
68
|
+
return 'zh';
|
|
69
|
+
}
|
|
70
|
+
const v = String(value).toLowerCase();
|
|
71
|
+
if (v === 'zh' || v === 'en') {
|
|
72
|
+
return v;
|
|
73
|
+
}
|
|
74
|
+
throw new Error('Invalid install-lock: templateLocale must be "zh" or "en"');
|
|
75
|
+
}
|
|
76
|
+
|
|
66
77
|
function normalizeInstallLock(input) {
|
|
67
78
|
const source = ensureObject(input, 'install-lock');
|
|
68
79
|
const schemaVersion = source.schemaVersion ?? source.lockVersion ?? INSTALL_LOCK_VERSION;
|
|
@@ -80,23 +91,26 @@ function normalizeInstallLock(input) {
|
|
|
80
91
|
failedTargets: Array.from(new Set(ensureArray(source.lastUpdateSummary.failedTargets || [], 'lastUpdateSummary.failedTargets'))),
|
|
81
92
|
updatedAt: ensureString(source.lastUpdateSummary.updatedAt, 'lastUpdateSummary.updatedAt')
|
|
82
93
|
};
|
|
94
|
+
const templateLocale = normalizeTemplateLocale(source.templateLocale);
|
|
83
95
|
|
|
84
96
|
return {
|
|
85
97
|
schemaVersion,
|
|
86
98
|
cliVersion,
|
|
87
99
|
generatedAt,
|
|
88
100
|
targets,
|
|
89
|
-
lastUpdateSummary
|
|
101
|
+
lastUpdateSummary,
|
|
102
|
+
templateLocale
|
|
90
103
|
};
|
|
91
104
|
}
|
|
92
105
|
|
|
93
|
-
function createInstallLock({ cliVersion, generatedAt, targets = [], lastUpdateSummary = null }) {
|
|
106
|
+
function createInstallLock({ cliVersion, generatedAt, targets = [], lastUpdateSummary = null, templateLocale }) {
|
|
94
107
|
return normalizeInstallLock({
|
|
95
108
|
schemaVersion: INSTALL_LOCK_VERSION,
|
|
96
109
|
cliVersion,
|
|
97
110
|
generatedAt,
|
|
98
111
|
targets,
|
|
99
|
-
lastUpdateSummary
|
|
112
|
+
lastUpdateSummary,
|
|
113
|
+
templateLocale
|
|
100
114
|
});
|
|
101
115
|
}
|
|
102
116
|
|
|
@@ -201,6 +215,7 @@ module.exports = {
|
|
|
201
215
|
getInstallLockPath,
|
|
202
216
|
normalizeInstallLock,
|
|
203
217
|
normalizeTargetInstallation,
|
|
218
|
+
normalizeTemplateLocale,
|
|
204
219
|
readInstallLock,
|
|
205
220
|
summarizeTargetState,
|
|
206
221
|
writeInstallLock
|