@haaaiawd/anws 2.3.0 → 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 +376 -79
- 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 -115
- package/templates/.agents/skills/concept-modeler/SKILL.md +230 -179
- package/templates/.agents/skills/craft-authoring/SKILL.md +186 -183
- package/templates/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +61 -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 +157 -69
- package/templates/.agents/workflows/challenge.md +331 -497
- package/templates/.agents/workflows/change.md +182 -339
- package/templates/.agents/workflows/craft.md +159 -197
- package/templates/.agents/workflows/design-system.md +202 -674
- package/templates/.agents/workflows/explore.md +187 -399
- package/templates/.agents/workflows/forge.md +650 -609
- 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/templates_en/.agents/skills/system-designer/references/system-design-detail-template.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# {System Name} — Implementation Details (L1)
|
|
2
|
+
|
|
3
|
+
> **File Type**: L1 implementation layer · **Mapped L0**: [`{system-id}.md`](./{system-id}.md)
|
|
4
|
+
> This file is loaded only when explicitly referenced by a `/forge` task. For daily reading and task planning, prioritize L0.
|
|
5
|
+
> ** Island Check**: Every section in this file must have a corresponding hyperlink entry in L0; isolated content is forbidden.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Version History
|
|
10
|
+
|
|
11
|
+
> All change records are centralized here and should no longer be scattered in code comments.
|
|
12
|
+
|
|
13
|
+
| Version | Date | Changelog |
|
|
14
|
+
| ---- | ------------ | --------- |
|
|
15
|
+
| v1.0 | {YYYY-MM-DD} | Initial version |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Section Index of This File
|
|
20
|
+
|
|
21
|
+
| § | Section | Mapped L0 Entry |
|
|
22
|
+
| :---: | -------------------------------------------------------------------- | :--------------: |
|
|
23
|
+
| §1 | [Config Constants](#1-config-constants) | L0 §6 Data Model |
|
|
24
|
+
| §2 | [Full Core Data Structures](#2-full-core-data-structures) | L0 §6 Data Model |
|
|
25
|
+
| §3 | [Core Algorithm Pseudocode](#3-core-algorithm-pseudocode-non-trivial-algorithm-pseudocode) | L0 §5 Operation Contracts |
|
|
26
|
+
| §4 | [Detailed Decision Tree Logic](#4-detailed-decision-tree-logic-decision-tree-details) | L0 §4 Architecture Diagram |
|
|
27
|
+
| §5 | [Edge Cases & Gotchas](#5-edge-cases--gotchas-edge-cases--gotchas) | L0 §5 / §9 |
|
|
28
|
+
| §6 | [Test Helpers](#6-test-helpers-test-helpers) *(Optional)* | L0 §11 Testing Strategy |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## §1 Config Constants
|
|
33
|
+
|
|
34
|
+
> Centralize all hardcoded configs, enum mappings, and lookup tables here.
|
|
35
|
+
> **Mapped L0 Entry**: anchor at end of L0 §6 → *For full config constant dictionaries, see [L1 §1]*
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
# -- Example: unit config table --
|
|
39
|
+
UNIT_CONFIG = {
|
|
40
|
+
# UnitType.WARRIOR: {atk, def, hp, mov, range, cost, tech, behavior, move_type}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# -- Example: terrain config table --
|
|
44
|
+
TERRAIN_CONFIG = {
|
|
45
|
+
# TerrainType.PLAIN: {move_cost: 1, passable: "land", buildings: [...]}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# -- Example: building config table --
|
|
49
|
+
BUILDING_CONFIG = {
|
|
50
|
+
# BuildingType.FARM: {cost: 5, tech: "farming", rp_bonus: 1}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## §2 Full Core Data Structures
|
|
57
|
+
|
|
58
|
+
> Contains full class definitions including method bodies. L0 should only include field declarations and method signatures (`def foo(): ...`).
|
|
59
|
+
> **Mapped L0 Entry**: anchor at end of L0 §6.1 → *For full method implementations, see [L1 §2]*
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
@dataclass
|
|
63
|
+
class ExampleEntity:
|
|
64
|
+
id: str
|
|
65
|
+
# ... fields
|
|
66
|
+
|
|
67
|
+
def some_method(self) -> bool:
|
|
68
|
+
"""Method notes"""
|
|
69
|
+
# Full implementation logic
|
|
70
|
+
pass
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## §3 Core Algorithm Pseudocode (Non-Trivial Algorithm Pseudocode)
|
|
76
|
+
|
|
77
|
+
> [!IMPORTANT]
|
|
78
|
+
> **Entry threshold — if none of the following is met, writing this section is forbidden**
|
|
79
|
+
>
|
|
80
|
+
> | Entry Condition | Notes |
|
|
81
|
+
> |---------|------|
|
|
82
|
+
> | Estimated function body **> 15 lines** | Short functions are already understandable from L0 operation contracts |
|
|
83
|
+
> | Includes **non-obvious business rules** | Damage formulas, state machine branches, complex validation |
|
|
84
|
+
> | Includes **multi-step side-effect chains** | A→check→B→update C→trigger D, order must not be changed |
|
|
85
|
+
> | **Teammates cannot infer implementation from signature** | If function name + params already clearly express intent, no need |
|
|
86
|
+
|
|
87
|
+
Each subsection maps to one row in the L0 §5 operation contracts table and provides a full function body.
|
|
88
|
+
|
|
89
|
+
### §3.1 {Operation Name}
|
|
90
|
+
|
|
91
|
+
**Mapped Contract**: L0 §5.1 — `{function_name}()`
|
|
92
|
+
**Entry Reason**: {which entry condition is met}
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
def function_name(param1: Type, param2: Type) -> ReturnType:
|
|
96
|
+
"""
|
|
97
|
+
Function description.
|
|
98
|
+
|
|
99
|
+
Preconditions:
|
|
100
|
+
1. ...
|
|
101
|
+
|
|
102
|
+
Side effects:
|
|
103
|
+
- ...
|
|
104
|
+
"""
|
|
105
|
+
# Full implementation logic
|
|
106
|
+
pass
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
> **Notes**: {critical traps like deep copy / race conditions / order dependencies}
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## §4 Detailed Decision Tree Logic (Decision Tree Details)
|
|
114
|
+
|
|
115
|
+
> Text expansion + complete pseudocode corresponding to the L0 Mermaid decision diagram.
|
|
116
|
+
> **Mapped L0 Entry**: comment under L0 §4 Architecture Diagram → *For full decision logic, see [L1 §4]*
|
|
117
|
+
|
|
118
|
+
### §4.1 {Decision Scenario Name}
|
|
119
|
+
|
|
120
|
+
**Mapped L0 Mermaid**: `{system-id}.md §{section}`
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
def plan_or_decide(...):
|
|
124
|
+
# Step 1: check high-priority conditions
|
|
125
|
+
# Step 2: branching logic
|
|
126
|
+
pass
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## §5 Edge Cases & Gotchas
|
|
132
|
+
|
|
133
|
+
> Non-obvious cases that must be handled during implementation.
|
|
134
|
+
> **Mapped L0 Entry**: anchor in L0 §5 or §9 Security
|
|
135
|
+
|
|
136
|
+
| Scenario | Risk | Handling |
|
|
137
|
+
| -------------- | ---------- | -------------- |
|
|
138
|
+
| {Edge case description} | {Potential bug} | {Correct handling} |
|
|
139
|
+
|
|
140
|
+
### §5.1 {Specific Case}
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
# Incorrect approach
|
|
144
|
+
# cloned_unit.embarked_unit = unit.embarked_unit # shallow copy -> state contamination!
|
|
145
|
+
|
|
146
|
+
# Correct approach
|
|
147
|
+
# cloned_unit.embarked_unit = deepcopy(unit.embarked_unit) if unit.embarked_unit else None
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## §6 Test Helpers
|
|
153
|
+
|
|
154
|
+
> Optional. Factory functions or fixtures reused in unit tests.
|
|
155
|
+
> **Mapped L0 Entry**: anchor in L0 §11 Testing Strategy
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
def make_test_unit(type=UnitType.WARRIOR, hp=10, pos=(0, 0)) -> Unit:
|
|
159
|
+
"""Create a test Unit"""
|
|
160
|
+
pass
|
|
161
|
+
|
|
162
|
+
def make_test_world(size=8) -> World:
|
|
163
|
+
"""Create a test World"""
|
|
164
|
+
pass
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
<!-- AGENT Usage Guide
|
|
170
|
+
|
|
171
|
+
When to create this file: when any L0 split rule R1-R5 is triggered.
|
|
172
|
+
R1 single code block > 30 lines
|
|
173
|
+
R2 total code block lines > 200 lines
|
|
174
|
+
R3 config constant dictionary entries > 5
|
|
175
|
+
R4 version inline comments > 5 occurrences
|
|
176
|
+
R5 total document lines > 500
|
|
177
|
+
|
|
178
|
+
Island check: every new section added here must also add a hyperlink anchor at corresponding position in L0.
|
|
179
|
+
|
|
180
|
+
§ numbering convention:
|
|
181
|
+
§1 config constants — always first section
|
|
182
|
+
§2 data structures — full classes with method bodies
|
|
183
|
+
§3 algorithm pseudocode — numbered by function order (§3.1, §3.2 ...)
|
|
184
|
+
§4 decision tree — expansion of L0 Mermaid diagrams
|
|
185
|
+
§5 edge cases — extracted from "# note" style code comments
|
|
186
|
+
§6 test helpers — optional
|
|
187
|
+
-->
|