@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.
Files changed (92) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +52 -22
  3. package/lib/diff.js +5 -2
  4. package/lib/init.js +217 -96
  5. package/lib/install-state.js +18 -3
  6. package/lib/manifest.js +376 -79
  7. package/lib/prompt.js +68 -0
  8. package/lib/resources/index.js +36 -2
  9. package/lib/update.js +12 -6
  10. package/package.json +48 -47
  11. package/templates/.agents/skills/anws-system/SKILL.md +108 -108
  12. package/templates/.agents/skills/code-reviewer/SKILL.md +170 -115
  13. package/templates/.agents/skills/concept-modeler/SKILL.md +230 -179
  14. package/templates/.agents/skills/craft-authoring/SKILL.md +186 -183
  15. package/templates/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +61 -0
  16. package/templates/.agents/skills/design-reviewer/SKILL.md +265 -190
  17. package/templates/.agents/skills/e2e-testing-guide/SKILL.md +246 -135
  18. package/templates/.agents/skills/nexus-mapper/SKILL.md +321 -321
  19. package/templates/.agents/skills/output-contract/SKILL.md +37 -0
  20. package/templates/.agents/skills/report-template/SKILL.md +92 -92
  21. package/templates/.agents/skills/sequential-thinking/SKILL.md +222 -225
  22. package/templates/.agents/skills/spec-writer/SKILL.md +75 -30
  23. package/templates/.agents/skills/system-architect/SKILL.md +538 -678
  24. package/templates/.agents/skills/system-designer/SKILL.md +601 -601
  25. package/templates/.agents/skills/task-planner/SKILL.md +1 -2
  26. package/templates/.agents/skills/task-reviewer/SKILL.md +428 -388
  27. package/templates/.agents/skills/tech-evaluator/SKILL.md +252 -144
  28. package/templates/.agents/workflows/blueprint.md +157 -69
  29. package/templates/.agents/workflows/challenge.md +331 -497
  30. package/templates/.agents/workflows/change.md +182 -339
  31. package/templates/.agents/workflows/craft.md +159 -197
  32. package/templates/.agents/workflows/design-system.md +202 -674
  33. package/templates/.agents/workflows/explore.md +187 -399
  34. package/templates/.agents/workflows/forge.md +650 -609
  35. package/templates/.agents/workflows/genesis.md +439 -351
  36. package/templates/.agents/workflows/probe.md +219 -241
  37. package/templates/.agents/workflows/quickstart.md +302 -123
  38. package/templates/.agents/workflows/upgrade.md +145 -182
  39. package/templates_en/.agents/skills/anws-system/SKILL.md +108 -0
  40. package/templates_en/.agents/skills/code-reviewer/SKILL.md +170 -0
  41. package/templates_en/.agents/skills/concept-modeler/SKILL.md +230 -0
  42. package/templates_en/.agents/skills/craft-authoring/SKILL.md +179 -0
  43. package/templates_en/.agents/skills/craft-authoring/references/BUNDLE_POLICY.md +60 -0
  44. package/templates_en/.agents/skills/craft-authoring/references/PROMPT_QUALITY_RUBRIC.md +92 -0
  45. package/templates_en/.agents/skills/craft-authoring/references/SCORECARD_TEMPLATE.md +52 -0
  46. package/templates_en/.agents/skills/design-reviewer/SKILL.md +265 -0
  47. package/templates_en/.agents/skills/e2e-testing-guide/SKILL.md +246 -0
  48. package/templates_en/.agents/skills/nexus-mapper/SKILL.md +306 -0
  49. package/templates_en/.agents/skills/nexus-mapper/references/language-customization.md +167 -0
  50. package/templates_en/.agents/skills/nexus-mapper/references/output-schema.md +311 -0
  51. package/templates_en/.agents/skills/nexus-mapper/references/probe-protocol.md +246 -0
  52. package/templates_en/.agents/skills/nexus-mapper/scripts/extract_ast.py +706 -0
  53. package/templates_en/.agents/skills/nexus-mapper/scripts/git_detective.py +194 -0
  54. package/templates_en/.agents/skills/nexus-mapper/scripts/languages.json +127 -0
  55. package/templates_en/.agents/skills/nexus-mapper/scripts/query_graph.py +556 -0
  56. package/templates_en/.agents/skills/nexus-mapper/scripts/requirements.txt +6 -0
  57. package/templates_en/.agents/skills/nexus-query/SKILL.md +114 -0
  58. package/templates_en/.agents/skills/nexus-query/scripts/extract_ast.py +706 -0
  59. package/templates_en/.agents/skills/nexus-query/scripts/git_detective.py +194 -0
  60. package/templates_en/.agents/skills/nexus-query/scripts/languages.json +127 -0
  61. package/templates_en/.agents/skills/nexus-query/scripts/query_graph.py +556 -0
  62. package/templates_en/.agents/skills/nexus-query/scripts/requirements.txt +6 -0
  63. package/templates_en/.agents/skills/output-contract/SKILL.md +37 -0
  64. package/templates_en/.agents/skills/report-template/SKILL.md +85 -0
  65. package/templates_en/.agents/skills/report-template/references/REPORT_TEMPLATE.md +100 -0
  66. package/templates_en/.agents/skills/runtime-inspector/SKILL.md +101 -0
  67. package/templates_en/.agents/skills/sequential-thinking/SKILL.md +214 -0
  68. package/templates_en/.agents/skills/spec-writer/SKILL.md +153 -0
  69. package/templates_en/.agents/skills/spec-writer/references/prd_template.md +177 -0
  70. package/templates_en/.agents/skills/system-architect/SKILL.md +538 -0
  71. package/templates_en/.agents/skills/system-architect/references/rfc_template.md +59 -0
  72. package/templates_en/.agents/skills/system-designer/SKILL.md +534 -0
  73. package/templates_en/.agents/skills/system-designer/references/system-design-detail-template.md +187 -0
  74. package/templates_en/.agents/skills/system-designer/references/system-design-template.md +605 -0
  75. package/templates_en/.agents/skills/task-planner/SKILL.md +251 -0
  76. package/templates_en/.agents/skills/task-planner/references/TASK_TEMPLATE_05A.md +109 -0
  77. package/templates_en/.agents/skills/task-planner/references/TASK_TEMPLATE_05B.md +176 -0
  78. package/templates_en/.agents/skills/task-reviewer/SKILL.md +428 -0
  79. package/templates_en/.agents/skills/tech-evaluator/SKILL.md +252 -0
  80. package/templates_en/.agents/skills/tech-evaluator/references/ADR_TEMPLATE.md +78 -0
  81. package/templates_en/.agents/workflows/blueprint.md +200 -0
  82. package/templates_en/.agents/workflows/challenge.md +331 -0
  83. package/templates_en/.agents/workflows/change.md +182 -0
  84. package/templates_en/.agents/workflows/craft.md +159 -0
  85. package/templates_en/.agents/workflows/design-system.md +202 -0
  86. package/templates_en/.agents/workflows/explore.md +187 -0
  87. package/templates_en/.agents/workflows/forge.md +651 -0
  88. package/templates_en/.agents/workflows/genesis.md +439 -0
  89. package/templates_en/.agents/workflows/probe.md +219 -0
  90. package/templates_en/.agents/workflows/quickstart.md +303 -0
  91. package/templates_en/.agents/workflows/upgrade.md +145 -0
  92. package/templates_en/AGENTS.md +149 -0
@@ -0,0 +1,177 @@
1
+ # Product Requirements Document (PRD) v2.0
2
+
3
+ **Project Name**: [Project Name]
4
+ **Feature Name**: [Feature/Requirement Name]
5
+ **Document Status**: Draft | Review | Approved
6
+ **Version**: 1.0
7
+ **Owner**: [Author Name or Agent]
8
+ **Created On**: [YYYY-MM-DD]
9
+
10
+ ---
11
+
12
+ ## 1. Executive Summary
13
+ <!-- Context compression: explain "why" and "what" in under 50 words. -->
14
+ <!-- CRITICAL: This is the elevator pitch and must stay within 50 words. -->
15
+
16
+ [Briefly describe the problem being solved and the proposed solution, focusing on core value.]
17
+
18
+ ---
19
+
20
+ ## 2. Background & Context
21
+ <!-- Provide sufficient business and background knowledge to support architecture and system design stages. -->
22
+
23
+ ### 2.1 Problem Statement
24
+ - **Current Pain Points**: [Specific user problems today]
25
+ - **Impact Scope**: [Affected user groups/business scope]
26
+ - **Business Impact**: [Actual business impact, e.g., revenue loss, churn, low efficiency]
27
+
28
+ ### 2.2 Core Opportunity
29
+ [What positive value can be created if this problem is solved? Quantify when possible.]
30
+
31
+ ### 2.3 Reference & Competitors — Optional
32
+ <!-- Understand existing market solutions to avoid reinventing in mature domains. -->
33
+ - **Competitor A**: [Characteristics, pros/cons]
34
+ - **Competitor B**: [Characteristics, pros/cons]
35
+ - **Our Moat**: [Differentiation/unique value vs competitors]
36
+
37
+ ---
38
+
39
+ ## 3. Goals & Non-Goals
40
+
41
+ ### 3.1 Goals
42
+ <!-- CRITICAL: Must follow SMART principles (Specific, Measurable, Achievable, Relevant, Time-bound) -->
43
+
44
+ - **[G1]**: [Measurable business goal, e.g., raise login conversion rate above 95%]
45
+ - **[G2]**: [Measurable technical goal, e.g., list page P95 load time < 1.5s]
46
+
47
+ ### 3.2 Non-Goals
48
+ <!-- Explicitly define what will NOT be done; this is key to preventing scope creep. -->
49
+
50
+ - **[NG1]**: [Out-of-scope feature due to current constraints, e.g., third-party OAuth quick login]
51
+ - **[NG2]**: [Item planned for future versions, e.g., mandatory multi-factor authentication (MFA)]
52
+
53
+ ---
54
+
55
+ ## 4. User Stories and Requirement List
56
+ <!-- Required format: As a [role], I want [action], so that [value/benefit]. -->
57
+ <!-- CRITICAL: Every User Story must have a unique ID [REQ-XXX]; this is the foundation of anti-corruption and traceability. -->
58
+ <!-- CRITICAL: Must be ordered by user value priority (P0 core path → P1 important experience → P2 nice-to-have). -->
59
+ <!-- CRITICAL: Each User Story must be independently testable—after completion it should be demonstrable without depending on other stories. -->
60
+
61
+ ### US-001: [Task Title] [REQ-001] (Priority: P0)
62
+
63
+ * **Story**: As a [role], I want [feature/action], so that [benefit gained].
64
+ * **User Value**: [One sentence on this story's core value toward the final goal]
65
+ * **Independent Testability**: [After this task is done, how can QA/product validate it without other features?]
66
+ * **Systems Involved**: [List system IDs involved, e.g., `frontend-system`, `backend-api` — must align with names in `02_ARCHITECTURE`]
67
+ * **Acceptance Criteria**:
68
+ * [ ] **Given** [initial context], **When** [trigger action], **Then** [expected result].
69
+ * [ ] **Exception Handling**: When [specific exception occurs], the system must [specific fallback or prompt behavior].
70
+ * **Boundaries and Extreme Cases**:
71
+ * [Boundary case 1 — e.g., very large data volume, reconnect after network loss, sudden permission changes]
72
+ * [Boundary case 2]
73
+
74
+ ### US-002: [Task Title] [REQ-002] (Priority: P1)
75
+
76
+ * **Story**: ...
77
+ * **User Value**: ...
78
+ * **Independent Testability**: ...
79
+ * **Systems Involved**: ...
80
+ * **Acceptance Criteria**:
81
+ * [ ] ...
82
+ * **Boundaries and Extreme Cases**:
83
+ * ...
84
+
85
+ <!-- Continue adding User Stories based on requirement scale... -->
86
+
87
+ ---
88
+
89
+ ## 5. User Experience and Design — Optional
90
+ <!-- Provide key UX guidance to define boundaries for frontend/client design systems. -->
91
+
92
+ ### 5.1 Key User Flows
93
+ <!-- [Recommended] Use Mermaid flowcharts to express core business flows clearly. -->
94
+
95
+ ```mermaid
96
+ flowchart TD
97
+ A[User visits login page] --> B[Enter email and password]
98
+ B --> C{Backend authentication}
99
+ C -->|Success| D[Redirect to Dashboard home]
100
+ C -->|Failure| E[Show error guidance below input field]
101
+ E --> B
102
+ ```
103
+
104
+ ### 5.2 Design Guidelines
105
+ - **Visual Style**: [Modern, minimal, serious/professional, etc.]
106
+ - **Response Patterns**: [Requirements for loading skeletons, button loading states, etc.]
107
+ - **Platform Compatibility**: [Web only? Need mobile/tablet responsiveness?]
108
+
109
+ ---
110
+
111
+ ## 6. Constraints and Limits (Constraint Analysis)
112
+ <!-- Constraints define the upper bound of technical choices. Derived from /probe reports or unavoidable project constraints. -->
113
+
114
+ ### 6.1 Technical Constraints
115
+ * **Legacy Systems**: [e.g., must stay compatible with old MySQL 5.7 schema]
116
+ * **Performance Floor**: [e.g., API P95 response time < 200ms]
117
+ * **Scalability Expectation**: [e.g., design must support 100k concurrent online users]
118
+
119
+ ### 6.2 Security & Compliance
120
+ * **Data Security**: [e.g., logs must never include plaintext PII]
121
+ * **Network Requirements**: [e.g., enforce site-wide HTTPS / API accessible only on intranet]
122
+ * **Compliance Review**: [e.g., satisfy local cross-border data regulations / pass specific compliance audit]
123
+
124
+ ### 6.3 Time & Resources
125
+ * **Delivery Deadline**: [Hard deadline, e.g., full launch by 2026-03-01]
126
+ * **Other Limits**: [e.g., integration timeline dependencies on external vendor APIs]
127
+
128
+ ---
129
+
130
+ ## 7. Success Metrics — Optional
131
+ <!-- How will success be measured after launch? -->
132
+
133
+ | Core Metric | Target | Measurement Method |
134
+ | ----------------- | --------------- | ----------------------------- |
135
+ | Business: Registration conversion | > 45% | Dashboard/Funnel analysis |
136
+ | Performance: API success rate | > 99.9% | APM monitoring alerts |
137
+
138
+ ---
139
+
140
+ ## 8. Definition of Done
141
+ <!-- Checklist that must be 100% checked before tasks are merged to main and released. -->
142
+
143
+ * [ ] All acceptance criteria (AC) are fully tested and passed.
144
+ * [ ] Sufficient automated unit tests are included (line coverage > 80%) and CI is green.
145
+ * [ ] Integration tests/E2E critical paths are smooth.
146
+ * [ ] Code linting and formatting checks have no warnings.
147
+ * [ ] Relevant technical docs are updated (e.g., OpenAPI docs, Wiki knowledge base).
148
+ * [ ] Performance and security risks have been reviewed (when related constraints apply).
149
+ * [ ] UAT (User Acceptance Testing) has passed.
150
+
151
+ ---
152
+
153
+ ## 9. Appendix — Optional
154
+
155
+ ### 9.1 Glossary
156
+ - **[Abbreviation/Term 1]**: [Clear definition to avoid cross-team ambiguity]
157
+ - **[Term 2]**: [Definition]
158
+
159
+ ### 9.2 References
160
+ - [URL 1]
161
+ - [URL 2]
162
+
163
+ ---
164
+
165
+ <!-- CRITICAL usage guide -->
166
+ <!--
167
+ **PRD Writing Principles (Lean Spec Requirements)**:
168
+ 1. **Cut the noise**: Resist long essays; target under 10 minutes reading time.
169
+ 2. **Executive summary < 50 words**: Explain core value with minimum words.
170
+ 3. **Independence**: User story granularity must be "independently deliverable and verifiable."
171
+ 4. **Traceability**: [REQ-XXX] IDs are sacred and must flow through architecture, tasks, and code.
172
+
173
+ **Section Usage Guide**:
174
+ - **Required sections**: 1, 2.1, 3, 4, 6, 8
175
+ - **Optional sections**: 2.3 (competitor analysis), 5 (UX design), 7 (success metrics), 9 (appendix)
176
+ - **Small features/iterations**: You can remove 2.3, 5, 7, 9 aggressively and keep only the skeleton.
177
+ -->