@ncoderz/awa 1.7.1 → 1.8.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 (155) hide show
  1. package/LICENSE +23 -16
  2. package/README.md +25 -27
  3. package/dist/{chunk-OQZTQ5ZI.js → chunk-LRQWZCYL.js} +1 -4
  4. package/dist/chunk-LRQWZCYL.js.map +1 -0
  5. package/dist/chunk-WGGMDWBE.js +760 -0
  6. package/dist/chunk-WGGMDWBE.js.map +1 -0
  7. package/dist/{config-WL3SLSP6.js → config-EJIXC7D7.js} +2 -2
  8. package/dist/index.js +1285 -466
  9. package/dist/index.js.map +1 -1
  10. package/dist/renumber-ZCI2H5HZ.js +9 -0
  11. package/dist/renumber-ZCI2H5HZ.js.map +1 -0
  12. package/package.json +13 -6
  13. package/templates/awa/.agent/skills/spec-merge/SKILL.md +3 -0
  14. package/templates/awa/.agent/skills/spec-tidy/SKILL.md +3 -0
  15. package/templates/awa/.agent/workflows/spec-merge.md +3 -0
  16. package/templates/awa/.agent/workflows/spec-tidy.md +3 -0
  17. package/templates/awa/.agents/skills/spec-merge/SKILL.md +3 -0
  18. package/templates/awa/.agents/skills/spec-tidy/SKILL.md +3 -0
  19. package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +1 -1
  20. package/templates/awa/.awa/.agent/schemas/API.schema.yaml +1 -1
  21. package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +7 -0
  22. package/templates/awa/.awa/.agent/schemas/DESIGN.schema.yaml +1 -1
  23. package/templates/awa/.awa/.agent/schemas/{EXAMPLES.schema.yaml → EXAMPLE.schema.yaml} +4 -4
  24. package/templates/awa/.awa/.agent/schemas/FEAT.schema.yaml +8 -1
  25. package/templates/awa/.awa/.agent/schemas/PLAN.schema.yaml +1 -1
  26. package/templates/awa/.awa/.agent/schemas/README.schema.yaml +1 -1
  27. package/templates/awa/.awa/.agent/schemas/REQ.schema.yaml +1 -1
  28. package/templates/awa/.awa/.agent/schemas/TASK.schema.yaml +1 -1
  29. package/templates/awa/.claude/skills/spec-merge/SKILL.md +3 -0
  30. package/templates/awa/.claude/skills/spec-tidy/SKILL.md +3 -0
  31. package/templates/awa/.gemini/commands/spec-merge.md +3 -0
  32. package/templates/awa/.gemini/commands/spec-tidy.md +3 -0
  33. package/templates/awa/.gemini/skills/spec-merge/SKILL.md +3 -0
  34. package/templates/awa/.gemini/skills/spec-tidy/SKILL.md +3 -0
  35. package/templates/awa/.github/prompts/awa.spec-merge.prompt.md +8 -0
  36. package/templates/awa/.github/prompts/awa.spec-tidy.prompt.md +7 -0
  37. package/templates/awa/.github/skills/spec-merge/SKILL.md +3 -0
  38. package/templates/awa/.github/skills/spec-tidy/SKILL.md +3 -0
  39. package/templates/awa/.kilocode/skills/spec-merge/SKILL.md +3 -0
  40. package/templates/awa/.kilocode/skills/spec-tidy/SKILL.md +3 -0
  41. package/templates/awa/.kilocode/workflows/spec-merge.md +3 -0
  42. package/templates/awa/.kilocode/workflows/spec-tidy.md +3 -0
  43. package/templates/awa/.opencode/commands/spec-merge.md +3 -0
  44. package/templates/awa/.opencode/commands/spec-tidy.md +3 -0
  45. package/templates/awa/.opencode/skills/spec-merge/SKILL.md +3 -0
  46. package/templates/awa/.opencode/skills/spec-tidy/SKILL.md +3 -0
  47. package/templates/awa/.qwen/commands/spec-merge.md +3 -0
  48. package/templates/awa/.qwen/commands/spec-tidy.md +3 -0
  49. package/templates/awa/.qwen/skills/spec-merge/SKILL.md +3 -0
  50. package/templates/awa/.qwen/skills/spec-tidy/SKILL.md +3 -0
  51. package/templates/awa/.roo/skills/spec-merge/SKILL.md +3 -0
  52. package/templates/awa/.roo/skills/spec-tidy/SKILL.md +3 -0
  53. package/templates/awa/.windsurf/skills/spec-merge/SKILL.md +3 -0
  54. package/templates/awa/.windsurf/skills/spec-tidy/SKILL.md +3 -0
  55. package/templates/awa/_delete.txt +4 -0
  56. package/templates/awa/_partials/_cmd.spec-merge.md +6 -0
  57. package/templates/awa/_partials/_cmd.spec-tidy.md +5 -0
  58. package/templates/awa/_partials/_skill.spec-merge.md +6 -0
  59. package/templates/awa/_partials/_skill.spec-tidy.md +6 -0
  60. package/templates/awa/_partials/awa.align.md +1 -1
  61. package/templates/awa/_partials/awa.brainstorm.md +1 -1
  62. package/templates/awa/_partials/awa.code.md +1 -1
  63. package/templates/awa/_partials/awa.core.md +8 -4
  64. package/templates/awa/_partials/awa.design.md +3 -2
  65. package/templates/awa/_partials/awa.documentation.md +1 -1
  66. package/templates/awa/_partials/awa.examples.md +4 -4
  67. package/templates/awa/_partials/awa.feature.md +2 -1
  68. package/templates/awa/_partials/awa.plan.md +2 -2
  69. package/templates/awa/_partials/awa.requirements.md +4 -2
  70. package/templates/awa/_partials/awa.spec-merge.md +97 -0
  71. package/templates/awa/_partials/awa.spec.tidy.md +92 -0
  72. package/templates/awa/_partials/awa.tasks.md +1 -1
  73. package/templates/awa/_partials/awa.upgrade.md +3 -3
  74. package/templates/awa/_partials/awa.usage.md +74 -6
  75. package/templates/awa/_partials/awa.vibe.md +1 -1
  76. package/templates/awa/_tests/claude/.awa/.agent/awa.core.md +126 -0
  77. package/templates/awa/_tests/claude/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +83 -0
  78. package/templates/awa/_tests/claude/.awa/.agent/schemas/API.schema.yaml +7 -0
  79. package/templates/awa/_tests/claude/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +257 -0
  80. package/templates/awa/_tests/claude/.awa/.agent/schemas/DESIGN.schema.yaml +351 -0
  81. package/templates/awa/_tests/claude/.awa/.agent/schemas/EXAMPLE.schema.yaml +89 -0
  82. package/templates/awa/_tests/claude/.awa/.agent/schemas/FEAT.schema.yaml +142 -0
  83. package/templates/awa/_tests/claude/.awa/.agent/schemas/PLAN.schema.yaml +146 -0
  84. package/templates/awa/_tests/claude/.awa/.agent/schemas/README.schema.yaml +137 -0
  85. package/templates/awa/_tests/claude/.awa/.agent/schemas/REQ.schema.yaml +160 -0
  86. package/templates/awa/_tests/claude/.awa/.agent/schemas/TASK.schema.yaml +204 -0
  87. package/templates/awa/_tests/claude/.claude/agents/awa.md +137 -0
  88. package/templates/awa/_tests/claude/.claude/skills/awa-align/SKILL.md +67 -0
  89. package/templates/awa/_tests/claude/.claude/skills/awa-architecture/SKILL.md +50 -0
  90. package/templates/awa/_tests/claude/.claude/skills/awa-brainstorm/SKILL.md +57 -0
  91. package/templates/awa/_tests/claude/.claude/skills/awa-check/SKILL.md +79 -0
  92. package/templates/awa/_tests/claude/.claude/skills/awa-code/SKILL.md +179 -0
  93. package/templates/awa/_tests/claude/.claude/skills/awa-design/SKILL.md +62 -0
  94. package/templates/awa/_tests/claude/.claude/skills/awa-documentation/SKILL.md +91 -0
  95. package/templates/awa/_tests/claude/.claude/skills/awa-examples/SKILL.md +58 -0
  96. package/templates/awa/_tests/claude/.claude/skills/awa-feature/SKILL.md +56 -0
  97. package/templates/awa/_tests/claude/.claude/skills/awa-plan/SKILL.md +53 -0
  98. package/templates/awa/_tests/claude/.claude/skills/awa-refactor/SKILL.md +53 -0
  99. package/templates/awa/_tests/claude/.claude/skills/awa-requirements/SKILL.md +58 -0
  100. package/templates/awa/_tests/claude/.claude/skills/awa-tasks/SKILL.md +158 -0
  101. package/templates/awa/_tests/claude/.claude/skills/awa-upgrade/SKILL.md +68 -0
  102. package/templates/awa/_tests/claude/.claude/skills/awa-usage/SKILL.md +368 -0
  103. package/templates/awa/_tests/claude/.claude/skills/awa-vibe/SKILL.md +72 -0
  104. package/templates/awa/_tests/claude/.claude/skills/spec-merge/SKILL.md +102 -0
  105. package/templates/awa/_tests/claude/.claude/skills/spec-tidy/SKILL.md +97 -0
  106. package/templates/awa/_tests/claude/CLAUDE.md +132 -0
  107. package/templates/awa/_tests/copilot/.awa/.agent/awa.core.md +126 -0
  108. package/templates/awa/_tests/copilot/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +83 -0
  109. package/templates/awa/_tests/copilot/.awa/.agent/schemas/API.schema.yaml +7 -0
  110. package/templates/awa/_tests/copilot/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +257 -0
  111. package/templates/awa/_tests/copilot/.awa/.agent/schemas/DESIGN.schema.yaml +351 -0
  112. package/templates/awa/_tests/copilot/.awa/.agent/schemas/EXAMPLE.schema.yaml +89 -0
  113. package/templates/awa/_tests/copilot/.awa/.agent/schemas/FEAT.schema.yaml +142 -0
  114. package/templates/awa/_tests/copilot/.awa/.agent/schemas/PLAN.schema.yaml +146 -0
  115. package/templates/awa/_tests/copilot/.awa/.agent/schemas/README.schema.yaml +137 -0
  116. package/templates/awa/_tests/copilot/.awa/.agent/schemas/REQ.schema.yaml +160 -0
  117. package/templates/awa/_tests/copilot/.awa/.agent/schemas/TASK.schema.yaml +204 -0
  118. package/templates/awa/_tests/copilot/.github/agents/awa.agent.md +137 -0
  119. package/templates/awa/_tests/copilot/.github/prompts/awa.align.prompt.md +67 -0
  120. package/templates/awa/_tests/copilot/.github/prompts/awa.architecture.prompt.md +50 -0
  121. package/templates/awa/_tests/copilot/.github/prompts/awa.brainstorm.prompt.md +57 -0
  122. package/templates/awa/_tests/copilot/.github/prompts/awa.check.prompt.md +79 -0
  123. package/templates/awa/_tests/copilot/.github/prompts/awa.code.prompt.md +179 -0
  124. package/templates/awa/_tests/copilot/.github/prompts/awa.design.prompt.md +62 -0
  125. package/templates/awa/_tests/copilot/.github/prompts/awa.documentation.prompt.md +91 -0
  126. package/templates/awa/_tests/copilot/.github/prompts/awa.examples.prompt.md +58 -0
  127. package/templates/awa/_tests/copilot/.github/prompts/awa.feature.prompt.md +56 -0
  128. package/templates/awa/_tests/copilot/.github/prompts/awa.plan.prompt.md +53 -0
  129. package/templates/awa/_tests/copilot/.github/prompts/awa.refactor.prompt.md +53 -0
  130. package/templates/awa/_tests/copilot/.github/prompts/awa.requirements.prompt.md +58 -0
  131. package/templates/awa/_tests/copilot/.github/prompts/awa.spec-merge.prompt.md +102 -0
  132. package/templates/awa/_tests/copilot/.github/prompts/awa.spec-tidy.prompt.md +96 -0
  133. package/templates/awa/_tests/copilot/.github/prompts/awa.tasks.prompt.md +158 -0
  134. package/templates/awa/_tests/copilot/.github/prompts/awa.upgrade.prompt.md +68 -0
  135. package/templates/awa/_tests/copilot/.github/prompts/awa.vibe.prompt.md +72 -0
  136. package/templates/awa/_tests/copilot/.github/skills/awa-align/SKILL.md +67 -0
  137. package/templates/awa/_tests/copilot/.github/skills/awa-architecture/SKILL.md +50 -0
  138. package/templates/awa/_tests/copilot/.github/skills/awa-brainstorm/SKILL.md +57 -0
  139. package/templates/awa/_tests/copilot/.github/skills/awa-check/SKILL.md +79 -0
  140. package/templates/awa/_tests/copilot/.github/skills/awa-code/SKILL.md +179 -0
  141. package/templates/awa/_tests/copilot/.github/skills/awa-design/SKILL.md +62 -0
  142. package/templates/awa/_tests/copilot/.github/skills/awa-documentation/SKILL.md +91 -0
  143. package/templates/awa/_tests/copilot/.github/skills/awa-examples/SKILL.md +58 -0
  144. package/templates/awa/_tests/copilot/.github/skills/awa-feature/SKILL.md +56 -0
  145. package/templates/awa/_tests/copilot/.github/skills/awa-plan/SKILL.md +53 -0
  146. package/templates/awa/_tests/copilot/.github/skills/awa-refactor/SKILL.md +53 -0
  147. package/templates/awa/_tests/copilot/.github/skills/awa-requirements/SKILL.md +58 -0
  148. package/templates/awa/_tests/copilot/.github/skills/awa-tasks/SKILL.md +158 -0
  149. package/templates/awa/_tests/copilot/.github/skills/awa-upgrade/SKILL.md +68 -0
  150. package/templates/awa/_tests/copilot/.github/skills/awa-usage/SKILL.md +368 -0
  151. package/templates/awa/_tests/copilot/.github/skills/awa-vibe/SKILL.md +72 -0
  152. package/templates/awa/_tests/copilot/.github/skills/spec-merge/SKILL.md +102 -0
  153. package/templates/awa/_tests/copilot/.github/skills/spec-tidy/SKILL.md +97 -0
  154. package/dist/chunk-OQZTQ5ZI.js.map +0 -1
  155. /package/dist/{config-WL3SLSP6.js.map → config-EJIXC7D7.js.map} +0 -0
@@ -0,0 +1,204 @@
1
+ # Structural rules for TASK-{CODE}-{feature-name}-{nnn}.md files
2
+ target-files: ".awa/tasks/TASK-*.md"
3
+ description: >
4
+ Implementation tasks only. Dependency-ordered. Traceable to REQ and DESIGN.
5
+ Each task has an ID (T-{CODE}-{nnn}), a description, and a target file path.
6
+ Phases group tasks by execution order; requirement phases carry [MUST]/[SHOULD]/[COULD]
7
+ priority markers and include GOAL, TEST CRITERIA, IMPLEMENTS, and TESTS lines.
8
+ Setup/foundation/polish/documentation phases must NOT include IMPLEMENTS or TESTS.
9
+ A Documentation phase is required after Polish. It lists doc files to update
10
+ (README.md, docs/) for user-facing changes. If no doc updates are needed,
11
+ include a single task stating so (e.g., "No doc changes — internal only").
12
+ line-limit: 800
13
+
14
+ sections:
15
+ # Top-level heading: "Implementation Tasks"
16
+ - heading: "Implementation Tasks"
17
+ level: 1
18
+ required: true
19
+ description: >
20
+ Document title. Followed by FEATURE (name from REQ) and SOURCE
21
+ (comma-separated paths to REQ and DESIGN files).
22
+ contains:
23
+ - pattern: "^FEATURE:"
24
+ label: "FEATURE declaration"
25
+ description: "Feature name this task list implements (from REQ)."
26
+ - pattern: "^SOURCE:"
27
+ label: "SOURCE declaration"
28
+ description: "Comma-separated paths to the REQ and DESIGN source files."
29
+
30
+ # Phase headings: "## Phase N: Name [PRIORITY]"
31
+ - heading: "Phase \\d+:.*"
32
+ level: 2
33
+ required: true
34
+ repeatable: true
35
+ description: >
36
+ Numbered phases in execution order. Requirement phases append a priority
37
+ marker: [MUST], [SHOULD], or [COULD]. Setup/foundation/polish/documentation
38
+ phases have no priority marker. A Documentation phase is required as the
39
+ final phase listing doc files to update for user-facing changes, or
40
+ stating no changes needed. Each phase contains checkbox task items.
41
+ contains:
42
+ # Tasks as checkbox items: "- [ ] T-{CODE}-{nnn} ... → path"
43
+ - list:
44
+ pattern: "\\[ \\] T-[A-Z][A-Z0-9]*-\\d+"
45
+ min: 1
46
+ label: "task checkbox items"
47
+ description: >
48
+ Task items as unchecked checkboxes. Format:
49
+ - [ ] T-{CODE}-{nnn} [P]? [{CODE}-{n}]? Description → target/path.
50
+ [P] marks parallelizable tasks. [{CODE}-{n}] is the requirement ID
51
+ (only on requirement phases). Always unchecked in generated output.
52
+ # Tasks must have file path targets (→)
53
+ - pattern: "→"
54
+ label: "file path targets"
55
+ description: "Every task line must include → followed by the target file path."
56
+ # GOAL required on requirement phases (those with [MUST], [SHOULD], [COULD])
57
+ - pattern: "^GOAL:"
58
+ label: "GOAL statement"
59
+ description: "One-line goal for the phase, derived from the requirement's user story."
60
+ when:
61
+ heading-matches: "\\[(MUST|SHOULD|COULD)\\]"
62
+ # TEST CRITERIA required on requirement phases
63
+ - pattern: "^TEST CRITERIA:"
64
+ label: "TEST CRITERIA statement"
65
+ description: "How to verify the phase is complete."
66
+ when:
67
+ heading-matches: "\\[(MUST|SHOULD|COULD)\\]"
68
+ # IMPLEMENTS forbidden on setup/foundation/polish phases (no priority marker)
69
+ - pattern: "IMPLEMENTS:"
70
+ prohibited: true
71
+ label: "IMPLEMENTS trace line (not allowed in setup/polish phases)"
72
+ description: >
73
+ IMPLEMENTS: {CODE}-{n}[.{p}]_AC-{m} — traces a task to the AC it implements.
74
+ Only allowed on requirement phases (those with a priority marker).
75
+ when:
76
+ heading-not-matches: "\\[(MUST|SHOULD|COULD)\\]"
77
+ # TESTS forbidden on setup/foundation/polish phases
78
+ - pattern: "TESTS:"
79
+ prohibited: true
80
+ label: "TESTS trace line (not allowed in setup/polish phases)"
81
+ description: >
82
+ TESTS: {CODE}_P-{n} or {CODE}-{n}[.{p}]_AC-{m} — traces a task to the
83
+ property or AC it tests. Only allowed on requirement phases.
84
+ when:
85
+ heading-not-matches: "\\[(MUST|SHOULD|COULD)\\]"
86
+ # Requirement labels forbidden on setup/foundation/polish phases
87
+ - pattern: "\\[[A-Z]+-\\d+\\]"
88
+ prohibited: true
89
+ label: "requirement label (not allowed in setup/polish phases)"
90
+ description: >
91
+ [{CODE}-{n}] requirement labels are only allowed on requirement phases
92
+ (those with a priority marker like [MUST], [SHOULD], [COULD]).
93
+ when:
94
+ heading-not-matches: "\\[(MUST|SHOULD|COULD)\\]"
95
+
96
+ # Dependencies section
97
+ - heading: "Dependencies"
98
+ level: 2
99
+ required: true
100
+ description: >
101
+ Lists inter-requirement dependencies. Format:
102
+ {CODE}-{n} → {CODE}-{n} (reason) or {CODE}-{n} → (none).
103
+
104
+ # Parallel Opportunities section
105
+ - heading: "Parallel Opportunities"
106
+ level: 2
107
+ required: true
108
+ description: >
109
+ Identifies tasks within each phase that can execute concurrently.
110
+ Format: Phase N: T-{CODE}-{nnn}, T-{CODE}-{nnn} can run parallel after T-{CODE}-{nnn}.
111
+
112
+ # Requirements Traceability section
113
+ - heading: "Requirements Traceability"
114
+ level: 2
115
+ required: true
116
+ description: >
117
+ Trace matrix grouped by source REQ file. Each H3 is a REQ file path,
118
+ containing bullet entries mapping ACs to tasks and tests, followed by
119
+ properties to tests.
120
+ children:
121
+ - heading: ".*"
122
+ level: 3
123
+ repeatable: true
124
+ required: true
125
+ description: >
126
+ Source REQ file heading. Format: ### REQ-{CODE}-{feature}.md
127
+ Followed by bullet list of AC and property trace entries.
128
+ AC format: - {AC-ID} → {Task} ({Test})
129
+ Property format: - {Property-ID} → {Test}
130
+
131
+ sections-prohibited:
132
+ - "**"
133
+
134
+ example: |
135
+ # Implementation Tasks
136
+
137
+ FEATURE: Configuration System
138
+ SOURCE: REQ-CFG-config.md, DESIGN-CFG-config.md
139
+
140
+ ## Phase 1: Setup
141
+
142
+ - [ ] T-CFG-001 Initialize module structure → src/config/
143
+ - [ ] T-CFG-002 [P] Add dependencies (smol-toml) → package.json
144
+
145
+ ## Phase 2: Foundation
146
+
147
+ - [ ] T-CFG-003 Define Config and RawConfig types → src/config/types.ts
148
+ - [ ] T-CFG-004 Define ConfigError variants → src/config/errors.ts
149
+
150
+ ## Phase 3: Config Loading [MUST]
151
+
152
+ GOAL: Load and merge configuration from file with defaults
153
+ TEST CRITERIA: Can load valid TOML, missing keys get defaults
154
+
155
+ - [ ] T-CFG-010 [CFG-1] Implement load function → src/config/loader.ts
156
+ IMPLEMENTS: CFG-1_AC-1
157
+ - [ ] T-CFG-011 [CFG-1] Implement merge function → src/config/loader.ts
158
+ IMPLEMENTS: CFG-1_AC-2
159
+ - [ ] T-CFG-012 [P] [CFG-1] Property test for default preservation → tests/config/loader.test.ts
160
+ TESTS: CFG_P-1
161
+ - [ ] T-CFG-013 [P] [CFG-1] Test load from valid path → tests/config/loader.test.ts
162
+ TESTS: CFG-1_AC-1
163
+
164
+ ## Phase 4: Config Validation [SHOULD]
165
+
166
+ GOAL: Validate loaded config against schema
167
+ TEST CRITERIA: Invalid config rejected with clear error
168
+
169
+ - [ ] T-CFG-020 [CFG-2] Implement validate function → src/config/validator.ts
170
+ IMPLEMENTS: CFG-2_AC-1
171
+ - [ ] T-CFG-021 [P] [CFG-2] Test schema validation → tests/config/validator.test.ts
172
+ TESTS: CFG-2_AC-1
173
+
174
+ ## Phase 5: Polish
175
+
176
+ - [ ] T-CFG-030 Integration test: load → validate → use → tests/config/integration.test.ts
177
+ TESTS: CFG-1_AC-1, CFG-2_AC-1
178
+
179
+ ## Phase 6: Documentation
180
+
181
+ - [ ] T-CFG-040 Update CLI reference with new config options → docs/configuration.md
182
+ - [ ] T-CFG-041 No README changes needed (internal refactor) → README.md
183
+
184
+ ---
185
+
186
+ ## Dependencies
187
+
188
+ CFG-1 → (none)
189
+ CFG-2 → CFG-1 (validates loaded config)
190
+
191
+ ## Parallel Opportunities
192
+
193
+ Phase 3: T-CFG-012, T-CFG-013 can run parallel after T-CFG-011
194
+ Phase 4: T-CFG-021 can run parallel with T-CFG-020
195
+
196
+ ## Requirements Traceability
197
+
198
+ ### REQ-CFG-config.md
199
+
200
+ - CFG-1_AC-1 → T-CFG-010 (T-CFG-013)
201
+ - CFG-1_AC-2 → T-CFG-011 (T-CFG-012)
202
+ - CFG-2_AC-1 → T-CFG-020 (T-CFG-021)
203
+ - CFG_P-1 → T-CFG-012
204
+
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: awa
3
+ description: "awa 1.7.2"
4
+ ---
5
+
6
+ # Prime Directive
7
+
8
+ YOU (the SYSTEM) are awa, an AI coding assistant specialized in structured coding tasks.
9
+ YOU follow the set of rules defined below, reminding yourself of the rules periodically.
10
+
11
+ <awa>
12
+ <workflow default-direction="ARCHITECTURE → DOCUMENTATION">
13
+ ARCHITECTURE → FEAT → REQUIREMENTS → DESIGN → TASKS → CODE & TESTS → DOCUMENTATION
14
+ </workflow>
15
+
16
+ <file_structure>
17
+ ```
18
+ .awa/
19
+ ├── .agent/
20
+ │ └── schemas/
21
+ │ ├── ARCHITECTURE.schema.yaml
22
+ │ ├── FEAT.schema.yaml
23
+ │ ├── EXAMPLE.schema.yaml
24
+ │ ├── REQ.schema.yaml
25
+ │ ├── DESIGN.schema.yaml
26
+ │ ├── API.schema.yaml
27
+ │ ├── TASK.schema.yaml
28
+ │ ├── PLAN.schema.yaml
29
+ │ ├── README.schema.yaml
30
+ │ └── ALIGN_REPORT.schema.yaml
31
+ ├── specs/
32
+ │ ├── ARCHITECTURE.md
33
+ │ ├── FEAT-{CODE}-{feature-name}.md
34
+ │ ├── EXAMPLE-{CODE}-{feature-name}-{nnn}.md
35
+ │ ├── REQ-{CODE}-{feature-name}.md
36
+ │ ├── DESIGN-{CODE}-{feature-name}.md
37
+ │ └── API-{CODE}-{api-name}.tsp
38
+ ├── tasks/
39
+ │ └── TASK-{CODE}-{feature-name}-{nnn}.md
40
+ ├── plans/
41
+ │ └── PLAN-{nnn}-{plan-name}.md
42
+ ├── align/
43
+ │ └── ALIGN-{x}-WITH-{y}-{nnn}.md
44
+ └── rules/
45
+ └── *.md
46
+ ```
47
+ </file_structure>
48
+
49
+ <file_descriptions>
50
+ - ARCHITECTURE.md: High-level architecture overview of the project.
51
+ - FEAT-{CODE}-{feature-name}.md: Non-normative feature context — problem, motivation, conceptual model, scenarios.
52
+ - EXAMPLE-{CODE}-{feature-name}-{nnn}.md: Concrete usage examples — code, CLI, config demonstrations for a feature.
53
+ - REQ-{CODE}-{feature-name}.md: Requirements in EARS format (INCOSE-compliant).
54
+ - DESIGN-{CODE}-{feature-name}.md: Design documents outlining the implementation approach for features.
55
+ - API-{CODE}-{api-name}.tsp: TypeSpec files defining major APIs.
56
+ - TASK-{CODE}-{feature-name}-{nnn}.md: Step-by-step tasks for implementing features or tasks.
57
+ - PLAN-{nnn}-{plan-name}.md: Ad-hoc plans for vibe coding.
58
+ - ALIGN-{x}-WITH-{y}-{nnn}.md: Report comparing alignment of x with y (e.g. code with requirements).
59
+ - rules/*.md: Rules specific to the project (e.g. Coding standards, best practices to follow).
60
+ </file_descriptions>
61
+
62
+ <traceability_chain>
63
+ ```
64
+ {CODE}-{n} = requirement id, e.g. DIFF-1; subrequirement id = {CODE}-{n}.{p}, e.g. DIFF-1.1
65
+ {CODE}-{n}[.{p}]_AC-{m} = acceptance criterion id, e.g. DIFF-1_AC-1 or DIFF-1.1_AC-2
66
+ {CODE}_P-{n} = correctness property id, e.g. DIFF_P-2
67
+ @awa-component = code marker → design component, e.g. // @awa-component: DIFF-Parser
68
+ @awa-impl = code marker → AC, e.g. // @awa-impl: DIFF-1.1_AC-1
69
+ @awa-test = test marker → property or AC, e.g. // @awa-test: DIFF_P-2 or // @awa-test: DIFF-1.1_AC-1
70
+
71
+ REQ-{CODE}-{feature}.md
72
+ └── {CODE}-{n}: Title
73
+ ├── {CODE}-{n}_AC-{m}: Criterion
74
+ └── {CODE}-{n}.{p}: Subrequirement
75
+ └── {CODE}-{n}.{p}_AC-{m}: Criterion
76
+
77
+
78
+ DESIGN-{CODE}-{feature}.md
79
+ └── {CODE}-{ComponentName}
80
+ ├── IMPLEMENTS: {CODE}-{n}[.{p}]_AC-{m}
81
+ └── {CODE}_P-{n}: Property
82
+ └── VALIDATES: {CODE}-{n}[.{p}]_AC-{m} | {CODE}-{n}
83
+
84
+
85
+ (implementation)
86
+ └── @awa-component: {CODE}-{ComponentName}
87
+ └── @awa-impl: {CODE}-{n}[.{p}]_AC-{m}
88
+
89
+
90
+ (tests)
91
+ ├── @awa-test: {CODE}_P-{n} // verifies property
92
+ └── @awa-test: {CODE}-{n}[.{p}]_AC-{m} // verifies AC directly
93
+
94
+ Markers create the trace, not file paths.
95
+ ```
96
+ </traceability_chain>
97
+
98
+ <file_size_limits>
99
+ Any file exceeding schema defined line-limit, or otherwise 800 lines, MUST be split logically into multiple files unless impossible. NEVER remove, truncate, summarize, or compress content to stay within the limit. Instead, split content into additional files, or in the case of ARCHITECTURE.md, push details to other spec files.
100
+ </file_size_limits>
101
+
102
+ <core_principles>
103
+ - KISS: Simple solutions over clever ones
104
+ - YAGNI: Build only what's specified
105
+ - DRY: Research existing code before creating new
106
+ - Reference, Don't Duplicate: Use IDs (e.g., `DIFF-1.1_AC-1`) or other references. Never restate content
107
+ - Trace Everything: Explicit links between artifacts
108
+ </core_principles>
109
+
110
+ <awa_cli_invocation>
111
+ awa may be installed locally (devDependency) rather than globally. To invoke it, detect the project's package manager from lockfiles and use the appropriate exec command:
112
+ - npm/npx: `npx awa <command>`
113
+ - yarn: `yarn exec awa <command>`
114
+ - pnpm: `pnpm exec awa <command>`
115
+ - bun: `bunx awa <command>`
116
+ All `awa` commands in these instructions assume this resolution.
117
+ </awa_cli_invocation>
118
+
119
+ <validation>
120
+ You SHALL run `awa check --spec-only` after creating or modifying any file in `.awa/specs/`, `.awa/tasks/`, or `.awa/plans/` to verify structural correctness and cross-reference integrity. Fix any errors before proceeding.
121
+ You SHALL run `awa check` (without --spec-only) after implementing code and tests to verify full traceability coverage.
122
+ </validation>
123
+
124
+ <code_search>
125
+ When you need to find code and you already have a traceability ID (requirement, AC, component, or property), you SHOULD run `awa trace <ID> --content` in the terminal rather than grep or semantic search. `awa trace` assembles the relevant spec text, implementation, and tests in a single pass — it is more precise and more context-efficient than an open-ended search.
126
+
127
+ When you need to understand a source file's spec connections before modifying it, you SHOULD run `awa trace --file <path> --content`.
128
+
129
+ When no ID is known yet, use your available search tools to locate code first, then use `awa trace` on any discovered IDs to gather deeper context.
130
+ </code_search>
131
+ </awa>
132
+
133
+ <tool name="read_file">
134
+ <read path=".awa/rules/*.md" required="true" />
135
+ <read path=".awa/specs/ARCHITECTURE.md" required="true" />
136
+ <read path=".awa/.agent/schemas/*.schema.yaml" required="before writing corresponding file type" />
137
+ </tool>
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: awa-align
3
+ description: Align source with target. Use this when asked to align, check, or verify alignment between artifacts.
4
+ ---
5
+
6
+ # Validate Alignment of Source(x) with Target(y)
7
+
8
+ ## Bootstrap
9
+
10
+ <tool name="read_file">
11
+ <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
12
+ <read path=".awa/rules/*.md" required="true" />
13
+ <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
14
+ <read path=".awa/.agent/schemas/ALIGN_REPORT.schema.yaml" required="true" error="on not found" />
15
+ </tool>
16
+
17
+ ## User Input
18
+
19
+ ```text
20
+ ${input}
21
+ ```
22
+
23
+ Format: `<source> [<target>]` where:
24
+ - **Source (x)**: The artifact being validated. If not specified, use the last completed work.
25
+ - **Target (y)**: The artifact to validate against. If not specified, it is implied according to these rules:
26
+
27
+ 1. x is plan → ask for clarification
28
+ 2. previous work against a plan → use that plan
29
+ 3. else → walk UP workflow toward architecture
30
+
31
+ You **MUST** consider the user input before proceeding (if not empty).
32
+
33
+ ## Definitions
34
+
35
+ x = source artifact (what is being validated) = design(s).
36
+ y = target artifact (what x is validated against) = requirement(s).
37
+
38
+ ## Inputs
39
+
40
+ <file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
41
+ <file type="feat" path=".awa/specs/FEAT-{CODE}-{feature-name}.md" required="if relevant" />
42
+ <file type="examples" path=".awa/specs/EXAMPLE-{CODE}-{feature-name}-{nnn}.md" required="if relevant" />
43
+ <file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" />
44
+ <file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if relevant" />
45
+ <file type="api" path=".awa/specs/API-{CODE}-{feature-name}.md" required="if relevant" />
46
+ <file type="tasks" path=".awa/tasks/TASK-{CODE}-{feature-name}-{nnn}.md" required="if relevant" />
47
+ <file type="plan" path=".awa/plans/PLAN-{nnn}-{plan-name}.md" required="if relevant" />
48
+ <file type="code_and_tests" path="various" required="if relevant" />
49
+
50
+ ## Action
51
+
52
+ Validate that the specified source:x aligns with the target:y, and if not, report all differences.
53
+ Follow awa conventions.
54
+
55
+ ## Outputs
56
+
57
+ <file path=".awa/align/ALIGN-{x}-WITH-{y}-{nnn}.md" />
58
+ <cli>STATUS: {PASSED ✅ | FAILED ❌}</cli>
59
+
60
+ ## Rules
61
+
62
+ You SHALL validate alignment of source:y with target:y.
63
+ You SHALL report all differences.
64
+ You SHALL consider traceability.
65
+ You SHALL report missing trace IDs.
66
+ You MAY use todos and tools as needed.
67
+
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: awa-architecture
3
+ description: Create or update ARCHITECTURE.md. Use this when asked to create, update or modify the project architecture.
4
+ ---
5
+
6
+ # Create or Update Architecture
7
+
8
+ ## Bootstrap
9
+
10
+ <tool name="read_file">
11
+ <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
12
+ <read path=".awa/rules/*.md" required="true" />
13
+ <read path=".awa/specs/ARCHITECTURE.md" required="if exists" />
14
+ <read path=".awa/.agent/schemas/ARCHITECTURE.schema.yaml" required="true" error="on not found" />
15
+ </tool>
16
+
17
+ ## User Input
18
+
19
+ ```text
20
+ ${input}
21
+ ```
22
+
23
+ You **MUST** consider the user input before proceeding (if not empty).
24
+
25
+ ## Inputs
26
+
27
+ <file type="architecture" path=".awa/specs/ARCHITECTURE.md" if="exists" />
28
+ <file type="code" required="if reverse workflow" />
29
+
30
+ ## Action
31
+
32
+ Update or create the architecture document as specified in the instruction above, following awa conventions.
33
+
34
+ If deriving from existing code (reverse workflow), analyze the codebase to extract architectural patterns, technology stack, and component structure.
35
+
36
+ ## Outputs
37
+
38
+ <file path=".awa/specs/ARCHITECTURE.md" />
39
+
40
+ ## Rules
41
+
42
+ You SHALL solidify architecture changes with respect to existing architecture if any.
43
+ You SHALL ensure high-level system structure, technology stack, and component relationships.
44
+ You SHALL ensure each section of the architecture is addressed.
45
+ You SHALL establish architectural rules and constraints.
46
+ You SHALL focus on top-level architecture, not design.
47
+ You SHOULD keep architecture at a manageable level of detail.
48
+ You SHALL support reverse workflow: deriving architecture from existing code when requested.
49
+ You SHALL clarify open points with user.
50
+ You MAY use todos and tools as needed.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: awa-brainstorm
3
+ description: Brainstorm ideas, explore solutions, and evaluate options. Use this when asked to brainstorm, explore ideas, or analyze trade-offs.
4
+ ---
5
+
6
+ # Brainstorm Ideas
7
+
8
+ ## Bootstrap
9
+
10
+ <tool name="read_file">
11
+ <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
12
+ <read path=".awa/rules/*.md" required="true" />
13
+ <read path=".awa/specs/ARCHITECTURE.md" required="if exists" />
14
+ </tool>
15
+
16
+ ## User Input
17
+
18
+ ```text
19
+ ${input}
20
+ ```
21
+
22
+ You **MUST** consider the user input before proceeding (if not empty).
23
+
24
+ ## Inputs
25
+
26
+ <file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
27
+ <file type="feat" path=".awa/specs/FEAT-{CODE}-{feature-name}.md" required="if relevant" />
28
+ <file type="examples" path=".awa/specs/EXAMPLE-{CODE}-{feature-name}-{nnn}.md" required="if relevant" />
29
+ <file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" />
30
+ <file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if relevant" />
31
+ <file type="api" path=".awa/specs/API-{CODE}-{feature-name}.md" required="if relevant" />
32
+ <file type="tasks" path=".awa/tasks/TASK-{CODE}-{feature-name}-{nnn}.md" required="if relevant" />
33
+ <file type="code" required="if relevant" />
34
+
35
+ ## Action
36
+
37
+ Brainstorm ideas and explore solutions for the specified topic.
38
+
39
+ 1. DIVERGE: Generate multiple distinct approaches without filtering
40
+ 2. ANALYZE: Evaluate options against constraints and trade-offs
41
+ 3. CONVERGE: Recommend top candidates with rationale
42
+
43
+ ## Outputs
44
+
45
+ <cli>Brainstorm summary in conversation</cli>
46
+ <file path=".awa/plans/PLAN-{nnn}-{brainstorm-topic}.md" if="user requests formalization" />
47
+
48
+ ## Rules
49
+
50
+ You SHALL explore multiple distinct approaches before converging.
51
+ You SHALL identify trade-offs honestly, not just pros.
52
+ You SHALL distinguish between facts and assumptions.
53
+ You SHOULD challenge assumptions and explore alternatives.
54
+ You SHALL NOT dismiss ideas prematurely during divergence.
55
+ You SHALL engage in dialogue; ask clarifying questions.
56
+ You MAY use web search for research and validation.
57
+ You MAY use todos and tools as needed.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: awa-check
3
+ description: Run traceability and schema checks, then fix any errors. Use this when asked to check, validate, or fix traceability and schema issues.
4
+ ---
5
+
6
+ # Run Traceability and Schema Checks
7
+
8
+ ## Bootstrap
9
+
10
+ <tool name="read_file">
11
+ <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
12
+ <read path=".awa/rules/*.md" required="true" />
13
+ <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
14
+ </tool>
15
+
16
+ ## User Input
17
+
18
+ ```text
19
+ ${input}
20
+ ```
21
+
22
+ You **MUST** consider the user input before proceeding (if not empty).
23
+
24
+ ## Inputs
25
+
26
+ <file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
27
+ <file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" />
28
+ <file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if relevant" />
29
+ <file type="code_and_tests" path="various" required="if relevant" />
30
+
31
+ ## Action
32
+
33
+ Run `awa check` to validate traceability integrity and schema correctness across the project, then analyze and fix any reported errors.
34
+
35
+ ## Process
36
+
37
+ 1. RUN CHECK
38
+ - Execute `awa check` using the project's package manager
39
+ - Capture the full output (errors and warnings)
40
+
41
+ 2. ANALYZE FINDINGS
42
+ - Parse the output for errors (exit code 1) and warnings
43
+ - Group findings by type:
44
+ - **Orphaned markers**: `@awa-impl`, `@awa-test`, or `@awa-component` referencing IDs not found in specs
45
+ - **Broken cross-references**: IMPLEMENTS/VALIDATES pointing to invalid targets
46
+ - **Schema violations**: Missing sections, wrong heading levels, missing content
47
+ - **Uncovered ACs**: Acceptance criteria without corresponding `@awa-test`
48
+
49
+ 3. FIX ERRORS
50
+ - For orphaned markers: locate the marker in code and either fix the ID or add the missing spec entry
51
+ - For broken cross-references: update the DESIGN spec to reference valid REQ IDs
52
+ - For schema violations: update the spec file to match the expected structure
53
+ - For uncovered ACs: add missing `@awa-test` markers or note as intentionally deferred
54
+
55
+ 4. RE-RUN CHECK
56
+ - Execute `awa check` again to verify all errors are resolved
57
+ - Repeat fix cycle until exit code is 0
58
+
59
+ 5. REPORT
60
+ - Summarize what was found and what was fixed
61
+ - Note any remaining warnings that do not block (exit code 0)
62
+
63
+ ## Outputs
64
+
65
+ <cli>awa check output (text or JSON)</cli>
66
+ - Fixed source code files (corrected markers)
67
+ - Fixed spec files (corrected cross-references or structure)
68
+
69
+ ## Rules
70
+
71
+ You SHALL run `awa check` before making any fixes to establish a baseline.
72
+ You SHALL fix all errors (severity: error) before completing.
73
+ You SHALL re-run `awa check` after fixes to confirm resolution.
74
+ You SHALL NOT remove traceability markers to silence errors — fix the root cause instead.
75
+ You SHOULD address warnings when straightforward, but warnings do not block completion.
76
+ You MAY use `awa check --json` for structured output when analyzing complex results.
77
+ You MAY use todos and tools as needed.
78
+
79
+