@ncoderz/awa 0.2.0 → 1.1.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 (112) hide show
  1. package/README.md +96 -16
  2. package/dist/index.js +2307 -128
  3. package/dist/index.js.map +1 -1
  4. package/package.json +14 -4
  5. package/templates/awa/.agent/skills/awa-align/SKILL.md +3 -0
  6. package/templates/awa/.agent/skills/awa-check/SKILL.md +4 -0
  7. package/templates/awa/.agent/workflows/awa-align.md +3 -0
  8. package/templates/awa/.agent/workflows/awa-check.md +4 -0
  9. package/templates/awa/.agents/skills/awa-align/SKILL.md +3 -0
  10. package/templates/awa/.agents/skills/awa-check/SKILL.md +4 -0
  11. package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +83 -0
  12. package/templates/awa/.awa/.agent/schemas/API.schema.yaml +7 -0
  13. package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +260 -0
  14. package/templates/awa/.awa/.agent/schemas/DESIGN.schema.yaml +361 -0
  15. package/templates/awa/.awa/.agent/schemas/EXAMPLES.schema.yaml +98 -0
  16. package/templates/awa/.awa/.agent/schemas/FEAT.schema.yaml +143 -0
  17. package/templates/awa/.awa/.agent/schemas/PLAN.schema.yaml +151 -0
  18. package/templates/awa/.awa/.agent/schemas/README.schema.yaml +137 -0
  19. package/templates/awa/.awa/.agent/schemas/REQ.schema.yaml +169 -0
  20. package/templates/awa/.awa/.agent/schemas/TASK.schema.yaml +200 -0
  21. package/templates/awa/.claude/agents/awa.md +2 -2
  22. package/templates/awa/.claude/skills/awa-align/SKILL.md +3 -0
  23. package/templates/awa/.claude/skills/awa-check/SKILL.md +4 -0
  24. package/templates/awa/.codex/prompts/awa-align.md +3 -0
  25. package/templates/awa/.codex/prompts/awa-check.md +4 -0
  26. package/templates/awa/.cursor/rules/awa-agent.md +1 -1
  27. package/templates/awa/.cursor/rules/awa-align.md +8 -0
  28. package/templates/awa/.cursor/rules/awa-check.md +9 -0
  29. package/templates/awa/.gemini/commands/awa-align.md +3 -0
  30. package/templates/awa/.gemini/commands/awa-check.md +4 -0
  31. package/templates/awa/.gemini/skills/awa-align/SKILL.md +3 -0
  32. package/templates/awa/.gemini/skills/awa-check/SKILL.md +4 -0
  33. package/templates/awa/.github/agents/awa.agent.md +2 -2
  34. package/templates/awa/.github/prompts/awa.align.prompt.md +8 -0
  35. package/templates/awa/.github/prompts/awa.check.prompt.md +9 -0
  36. package/templates/awa/.github/skills/awa-align/SKILL.md +8 -0
  37. package/templates/awa/.github/skills/awa-check/SKILL.md +9 -0
  38. package/templates/awa/.kilocode/rules/awa-agent.md +1 -1
  39. package/templates/awa/.kilocode/skills/awa-align/SKILL.md +3 -0
  40. package/templates/awa/.kilocode/skills/awa-check/SKILL.md +4 -0
  41. package/templates/awa/.kilocode/workflows/awa-align.md +3 -0
  42. package/templates/awa/.kilocode/workflows/awa-check.md +4 -0
  43. package/templates/awa/.opencode/agents/awa.md +2 -2
  44. package/templates/awa/.opencode/commands/awa-align.md +3 -0
  45. package/templates/awa/.opencode/commands/awa-check.md +4 -0
  46. package/templates/awa/.opencode/skills/awa-align/SKILL.md +3 -0
  47. package/templates/awa/.opencode/skills/awa-check/SKILL.md +4 -0
  48. package/templates/awa/.qwen/commands/awa-align.md +3 -0
  49. package/templates/awa/.qwen/commands/awa-check.md +4 -0
  50. package/templates/awa/.qwen/skills/awa-align/SKILL.md +3 -0
  51. package/templates/awa/.qwen/skills/awa-check/SKILL.md +4 -0
  52. package/templates/awa/.roo/rules/awa-agent.md +1 -1
  53. package/templates/awa/.roo/skills/awa-align/SKILL.md +3 -0
  54. package/templates/awa/.roo/skills/awa-check/SKILL.md +4 -0
  55. package/templates/awa/.windsurf/rules/awa-agent.md +1 -1
  56. package/templates/awa/.windsurf/skills/awa-align/SKILL.md +3 -0
  57. package/templates/awa/.windsurf/skills/awa-check/SKILL.md +4 -0
  58. package/templates/awa/AGENTS.md +1 -1
  59. package/templates/awa/CLAUDE.md +1 -1
  60. package/templates/awa/GEMINI.md +1 -1
  61. package/templates/awa/QWEN.md +1 -1
  62. package/templates/awa/_README.md +3 -2
  63. package/templates/awa/_delete.txt +49 -0
  64. package/templates/awa/_partials/{_cmd.awa-validate-alignment.md → _cmd.awa-align.md} +1 -1
  65. package/templates/awa/_partials/_cmd.awa-check.md +6 -0
  66. package/templates/awa/_partials/_skill.awa-align.md +6 -0
  67. package/templates/awa/_partials/_skill.awa-check.md +6 -0
  68. package/templates/awa/_partials/{awa.validate-alignment.md → awa.align.md} +2 -2
  69. package/templates/awa/_partials/awa.architecture.md +1 -1
  70. package/templates/awa/_partials/awa.check.md +73 -0
  71. package/templates/awa/_partials/awa.code.md +1 -0
  72. package/templates/awa/_partials/awa.core.md +24 -10
  73. package/templates/awa/_partials/awa.design.md +3 -2
  74. package/templates/awa/_partials/awa.documentation.md +1 -1
  75. package/templates/awa/_partials/awa.examples.md +1 -1
  76. package/templates/awa/_partials/awa.feature.md +1 -1
  77. package/templates/awa/_partials/awa.plan.md +1 -1
  78. package/templates/awa/_partials/awa.refactor.md +1 -0
  79. package/templates/awa/_partials/awa.requirements.md +2 -1
  80. package/templates/awa/_partials/awa.tasks.md +3 -3
  81. package/templates/awa/_partials/awa.upgrade.md +13 -12
  82. package/templates/awa/_tests/claude.toml +7 -0
  83. package/templates/awa/_tests/copilot.toml +6 -0
  84. package/templates/awa/.agent/skills/awa-validate-alignment/SKILL.md +0 -3
  85. package/templates/awa/.agent/workflows/awa-validate-alignment.md +0 -3
  86. package/templates/awa/.agents/skills/awa-validate-alignment/SKILL.md +0 -3
  87. package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.md +0 -156
  88. package/templates/awa/.awa/.agent/schemas/API.schema.md +0 -4
  89. package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.md +0 -176
  90. package/templates/awa/.awa/.agent/schemas/DESIGN.schema.md +0 -253
  91. package/templates/awa/.awa/.agent/schemas/EXAMPLES.schema.md +0 -51
  92. package/templates/awa/.awa/.agent/schemas/FEAT.schema.md +0 -61
  93. package/templates/awa/.awa/.agent/schemas/PLAN.schema.md +0 -8
  94. package/templates/awa/.awa/.agent/schemas/README.schema.md +0 -133
  95. package/templates/awa/.awa/.agent/schemas/REQ.schema.md +0 -125
  96. package/templates/awa/.awa/.agent/schemas/TASK.schema.md +0 -137
  97. package/templates/awa/.claude/skills/awa-validate-alignment/SKILL.md +0 -3
  98. package/templates/awa/.codex/prompts/awa-validate-alignment.md +0 -3
  99. package/templates/awa/.cursor/rules/awa-validate-alignment.md +0 -8
  100. package/templates/awa/.gemini/commands/awa-validate-alignment.md +0 -3
  101. package/templates/awa/.gemini/skills/awa-validate-alignment/SKILL.md +0 -3
  102. package/templates/awa/.github/prompts/awa.validate-alignment.prompt.md +0 -8
  103. package/templates/awa/.github/skills/awa-validate-alignment/SKILL.md +0 -8
  104. package/templates/awa/.kilocode/skills/awa-validate-alignment/SKILL.md +0 -3
  105. package/templates/awa/.kilocode/workflows/awa-validate-alignment.md +0 -3
  106. package/templates/awa/.opencode/commands/awa-validate-alignment.md +0 -3
  107. package/templates/awa/.opencode/skills/awa-validate-alignment/SKILL.md +0 -3
  108. package/templates/awa/.qwen/commands/awa-validate-alignment.md +0 -3
  109. package/templates/awa/.qwen/skills/awa-validate-alignment/SKILL.md +0 -3
  110. package/templates/awa/.roo/skills/awa-validate-alignment/SKILL.md +0 -3
  111. package/templates/awa/.windsurf/skills/awa-validate-alignment/SKILL.md +0 -3
  112. package/templates/awa/_partials/_skill.awa-validate-alignment.md +0 -6
@@ -1,253 +0,0 @@
1
- <schema target-files=".awa/specs/DESIGN-{feature-name}.md">
2
-
3
- ```json
4
- {
5
- "description": "Design only. Succinct language. Do not overspecify. Omit irrelevant information.",
6
- "required": ["overview", "architecture", "componentsAndInterfaces", "dataModels", "correctnessProperties", "errorHandling", "testingStrategy", "requirementsTraceability"],
7
- "properties": {
8
- "overview": { "type": "technical approach and rationale; reference REQ, do not restate" },
9
- "architecture": {
10
- "required": ["highLevelArchitecture", "moduleOrganization"],
11
- "properties": {
12
- "affectedLayers": { "type": "array of layer names" },
13
- "highLevelArchitecture": { "properties": { "description": {}, "diagram": { "type": "mermaid" } } },
14
- "moduleOrganization": { "properties": { "structure": { "type": "directory tree" }, "description": {} } },
15
- "architecturalDecisions": { "type": "array", "items": { "$ref": "#/$defs/decision" } }
16
- }
17
- },
18
- "componentsAndInterfaces": { "type": "array", "items": { "$ref": "#/$defs/component" } },
19
- "dataModels": {
20
- "required": ["coreTypes"],
21
- "properties": {
22
- "coreTypes": { "type": "array", "items": { "$ref": "#/$defs/dataType" } },
23
- "entities": { "type": "array", "items": { "$ref": "#/$defs/entity" } }
24
- }
25
- },
26
- "correctnessProperties": { "type": "array of formal invariants for property-based testing", "items": { "$ref": "#/$defs/property" } },
27
- "errorHandling": {
28
- "required": ["errorTypes", "strategy"],
29
- "properties": {
30
- "errorTypes": { "type": "array", "items": { "$ref": "#/$defs/errorType" } },
31
- "strategy": { "properties": { "principles": { "type": "array of strings" } } }
32
- }
33
- },
34
- "testingStrategy": {
35
- "required": ["propertyBasedTesting"],
36
- "properties": {
37
- "propertyBasedTesting": {
38
- "required": ["framework", "minimumIterations"],
39
- "properties": {
40
- "framework": {},
41
- "minimumIterations": { "type": "integer" },
42
- "tagFormat": {},
43
- "exampleTests": { "type": "array", "items": { "properties": { "propertyId": {}, "code": {} } } }
44
- }
45
- },
46
- "unitTesting": { "properties": { "description": {}, "areas": { "type": "array" } } },
47
- "integrationTesting": { "properties": { "description": {}, "scenarios": { "type": "array" } } }
48
- }
49
- },
50
- "requirementsTraceability": {
51
- "required": ["source", "matrix"],
52
- "properties": {
53
- "source": { "type": "path to requirements file" },
54
- "matrix": { "type": "array", "items": { "$ref": "#/$defs/traceEntry" } }
55
- }
56
- },
57
- "libraryUsage": {
58
- "properties": {
59
- "frameworkFeatures": { "type": "array", "items": { "properties": { "feature": {}, "usage": {} } } },
60
- "externalLibraries": { "type": "array", "items": { "properties": { "name": {}, "version": {}, "purpose": {} } } }
61
- }
62
- },
63
- "metadata": { "properties": { "changeLog": { "type": "array", "items": { "properties": { "version": {}, "date": {}, "changes": {} } } } } }
64
- },
65
- "$defs": {
66
- "decision": { "required": ["decision", "rationale"], "properties": { "decision": {}, "rationale": {}, "alternatives": { "type": "array" } } },
67
- "component": {
68
- "required": ["name", "description", "interface"],
69
- "properties": {
70
- "name": { "type": "pattern: {CODE}-{ComponentName} (e.g., CLI-Parser, CFG-ConfigLoader)" },
71
- "description": { "type": "HOW it works, not WHAT (WHAT is in ACs)" },
72
- "implements": { "type": "array of AC IDs (e.g., CFG-1_AC-1, CFG-1_AC-2)" },
73
- "interface": { "type": "code block" }
74
- }
75
- },
76
- "dataType": { "required": ["name"], "properties": { "name": {}, "description": {}, "definition": { "type": "code block" } } },
77
- "entity": { "required": ["name", "fields"], "properties": { "name": {}, "description": {}, "fields": { "type": "array", "items": { "properties": { "name": {}, "type": {}, "required": {}, "description": {} } } } } },
78
- "property": {
79
- "required": ["id", "name", "description", "validates"],
80
- "properties": {
81
- "id": { "type": "pattern: {CODE}_P-{n} (e.g., CFG_P-1, GEN_P-2)" },
82
- "name": {},
83
- "description": {},
84
- "validates": { "type": "array of AC or REQ IDs (e.g., CFG-4_AC-1, GEN-6)" }
85
- }
86
- },
87
- "errorType": { "required": ["name", "variants"], "properties": { "name": {}, "description": {}, "variants": { "type": "array", "items": { "properties": { "name": {}, "description": {} } } } } },
88
- "traceEntry": {
89
- "required": ["criterionId", "componentName"],
90
- "properties": {
91
- "criterionId": { "type": "{CODE}-{n}[.{p}]_AC-{m}" },
92
- "componentName": { "type": "{CODE}-{ComponentName}" },
93
- "propertyId": { "type": "{CODE}_P-{n}" },
94
- "status": { "enum": ["implemented", "partial", "deferred", "n/a"] },
95
- "notes": {}
96
- }
97
- }
98
- },
99
- "$render": {
100
- "template": "# Design Specification\n\n## Overview\n{overview}\n\n## Architecture\n\nAFFECTED LAYERS: {affectedLayers?}\n\n### High-Level Architecture\n{architecture.highLevelArchitecture.description}\n\n```mermaid\n{architecture.highLevelArchitecture.diagram}\n```\n\n### Module Organization\n```\n{architecture.moduleOrganization.structure}\n```\n\n### Architectural Decisions\n{architecturalDecisions→'- {DECISION}: {rationale}. Alternatives: {alternatives?}'}\n\n## Components and Interfaces\n{componentsAndInterfaces→'### {name}\n\n{description}\n\nIMPLEMENTS: {implements?}\n\n```typescript\n{interface}\n```'}\n\n## Data Models\n\n### Core Types\n{dataModels.coreTypes→'- {NAME}: {description}\n```typescript\n{definition}\n```'}\n\n### Entities\n{dataModels.entities→'### {name}\n{description}\n{fields→\"- {NAME} ({type}, {required?}): {description}\"}'}\n\n## Correctness Properties\n{correctnessProperties→'- {id} [{name}]: {description}\n VALIDATES: {validates}'}\n\n## Error Handling\n{errorHandling.errorTypes→'### {name}\n{description}\n{variants→\"- {NAME}: {description}\"}'}\n\n### Strategy\nPRINCIPLES:\n{errorHandling.strategy.principles→'- {}'}\n\n## Testing Strategy\n\n### Property-Based Testing\n- FRAMEWORK: {testingStrategy.propertyBasedTesting.framework}\n- MINIMUM_ITERATIONS: {testingStrategy.propertyBasedTesting.minimumIterations}\n- TAG_FORMAT: {testingStrategy.propertyBasedTesting.tagFormat?}\n{testingStrategy.propertyBasedTesting.exampleTests→'```typescript\n// @awa-test: {propertyId}\n{CODE}\n```'}\n\n### Unit Testing\n{testingStrategy.unitTesting.description?}\n- AREAS: {testingStrategy.unitTesting.areas?}\n\n### Integration Testing\n{testingStrategy.integrationTesting.description?}\n- SCENARIOS: {testingStrategy.integrationTesting.scenarios?}\n\n## Requirements Traceability\nSOURCE: {requirementsTraceability.source}\n{requirementsTraceability.matrix→'- {criterionId} → {componentName} ({propertyId?}) [{status?|omit if implemented}] {notes?}'}\n\n## Library Usage\n\n### Framework Features\n{libraryUsage.frameworkFeatures→'- {FEATURE}: {usage}'}\n\n### External Libraries\n{libraryUsage.externalLibraries→'- {name} ({version}): {purpose}'}\n\n## Change Log\n{metadata.changeLog→'- {version} ({date}): {changes}'}",
101
- "omit": ["section if empty", "AFFECTED LAYERS if absent", "IMPLEMENTS if empty", "(propertyId) if absent", "[status] if implemented", "notes/alternatives if empty"],
102
- "prohibited": ["**bold** — use CAPITALS", "*italic*", "tables — use lists", "ASCII diagrams — use mermaid", "FieldName: value patterns", "restating WHAT (requirements) — describe HOW (design)"]
103
- }
104
- }
105
- ```
106
-
107
- <example>
108
- # Design Specification
109
-
110
- ## Overview
111
-
112
- This design implements a CLI pipeline architecture for template-based code generation. The pipeline flows through argument parsing, configuration loading, template resolution, rendering, and file output with conflict resolution.
113
-
114
- ## Architecture
115
-
116
- AFFECTED LAYERS: CLI Layer, Core Engine, I/O Layer
117
-
118
- ### High-Level Architecture
119
-
120
- Sequential pipeline for predictable flow and error handling.
121
-
122
- ```mermaid
123
- flowchart LR
124
- Args[CLI Args] --> Parser
125
- Config[.awa.toml] --> ConfigLoader
126
- Parser --> ConfigLoader
127
- ConfigLoader --> Engine[TemplateEngine]
128
- Engine --> Generator[FileGenerator]
129
- Generator --> Files[Output]
130
- ```
131
-
132
- ### Module Organization
133
-
134
- ```
135
- src/
136
- ├── cli/
137
- │ └── index.ts
138
- ├── core/
139
- │ ├── config.ts
140
- │ ├── template.ts
141
- │ └── generator.ts
142
- └── utils/
143
- └── fs.ts
144
- ```
145
-
146
- ### Architectural Decisions
147
-
148
- - PIPELINE OVER EVENT: Sequential pipeline for predictable flow and error handling. Alternatives: event-driven, middleware chain
149
-
150
- ## Components and Interfaces
151
-
152
- ### CFG-ConfigLoader
153
-
154
- Loads TOML configuration from file, merges with CLI arguments (CLI wins), and produces resolved options with defaults applied.
155
-
156
- IMPLEMENTS: CFG-1_AC-1, CFG-1_AC-2, CFG-4_AC-1
157
-
158
- ```typescript
159
- interface ConfigLoader {
160
- load(configPath: string | null): Promise<FileConfig | null>;
161
- merge(cli: RawCliOptions, file: FileConfig | null): ResolvedOptions;
162
- }
163
- ```
164
-
165
- ## Data Models
166
-
167
- ### Core Types
168
-
169
- - RESOLVED_OPTIONS: Fully resolved configuration with all defaults applied
170
-
171
- ```typescript
172
- interface ResolvedOptions {
173
- readonly output: string;
174
- readonly template: string | null;
175
- readonly features: readonly string[];
176
- readonly force: boolean;
177
- }
178
- ```
179
-
180
- ## Correctness Properties
181
-
182
- - CFG_P-1 [CLI Override]: CLI arguments always override config file values for the same option
183
- VALIDATES: CFG-4_AC-1, CFG-4_AC-2
184
-
185
- - GEN_P-2 [Dry Run Immutable]: Dry-run mode never modifies the file system
186
- VALIDATES: GEN-6_AC-1, GEN-6_AC-2
187
-
188
- ## Error Handling
189
-
190
- ### ConfigError
191
-
192
- Configuration loading and parsing errors
193
-
194
- - FILE_NOT_FOUND: Config file does not exist when --config provided
195
- - PARSE_ERROR: TOML syntax error with line number
196
-
197
- ### Strategy
198
-
199
- PRINCIPLES:
200
-
201
- - Fail fast on first error
202
- - Provide actionable error messages with file paths
203
- - Exit with non-zero code on any error
204
-
205
- ## Testing Strategy
206
-
207
- ### Property-Based Testing
208
-
209
- - FRAMEWORK: fast-check
210
- - MINIMUM_ITERATIONS: 100
211
- - TAG_FORMAT: @awa-test: {CODE}_P-{n}
212
-
213
- ```typescript
214
- // @awa-test: CFG_P-1
215
- test.prop([fc.string(), fc.string()])('CLI overrides config', (cliValue, configValue) => {
216
- const cli = { output: cliValue };
217
- const config = { output: configValue };
218
- const result = configLoader.merge(cli, config);
219
- expect(result.output).toBe(cliValue);
220
- });
221
- ```
222
-
223
- ### Unit Testing
224
-
225
- Test individual components in isolation
226
-
227
- - AREAS: CFG-ConfigLoader merge logic, TPL-TemplateResolver type detection
228
-
229
- ## Requirements Traceability
230
-
231
- SOURCE: .awa/specs/REQ-CLI.md, .awa/specs/REQ-CFG.md
232
-
233
- - CFG-1_AC-1 → CFG-ConfigLoader (CFG_P-1)
234
- - CFG-4_AC-1 → CFG-ConfigLoader (CFG_P-1)
235
- - GEN-6_AC-1 → GEN-FileGenerator (GEN_P-2) [partial] pending review
236
-
237
- ## Library Usage
238
-
239
- ### Framework Features
240
-
241
- - CITTY: Command definition, argument parsing, help generation
242
-
243
- ### External Libraries
244
-
245
- - citty (latest): CLI framework
246
- - smol-toml (1.x): TOML parser
247
-
248
- ## Change Log
249
-
250
- - 1.0.0 (2025-01-10): Initial design
251
- </example>
252
-
253
- </schema>
@@ -1,51 +0,0 @@
1
- <schema target-files=".awa/specs/EXAMPLES-{CODE}-{feature-name}-{nnn}.md">
2
-
3
- - Concrete usage examples for a feature. Detailed, hands-on, reproducible.
4
- - Use the same {CODE} as the corresponding FEAT/REQ for the feature.
5
- - Number files sequentially (-001, -002, ...) when splitting at the 500-line limit.
6
- - Each example must have a title and context explaining what it demonstrates.
7
- - Required: at least one example with title, context, and code/demonstration block.
8
- - Optional: prerequisites, expected output, notes.
9
- - Prohibited: normative language (SHALL/SHOULD/MAY), acceptance criteria, traceability IDs, design decisions.
10
- - Mark the document as INFORMATIVE (not normative).
11
-
12
- Example structure:
13
-
14
- ```
15
- # Usage Examples: {Feature Name} [INFORMATIVE]
16
-
17
- ## Prerequisites
18
-
19
- - Required tools, setup, or prior knowledge
20
-
21
- ## Example 1: {Title}
22
-
23
- {Context — when to use this, what it demonstrates}
24
-
25
- ```bash
26
- {CLI invocation or code}
27
- ```
28
-
29
- EXPECTED OUTPUT:
30
-
31
- ```
32
- {expected result}
33
- ```
34
-
35
- ## Example 2: {Title}
36
-
37
- {Context}
38
-
39
- ```typescript
40
- {code example}
41
- ```
42
-
43
- NOTES:
44
- - Additional observations or caveats
45
-
46
- ## Change Log
47
-
48
- - {version} ({date}): {changes}
49
- ```
50
-
51
- </schema>
@@ -1,61 +0,0 @@
1
- <schema target-files=".awa/specs/FEAT-{CODE}-{feature-name}.md">
2
-
3
- - Non-normative feature context. Explain what and why, not how.
4
- - Use clear, accessible language. Avoid jargon unless defined in glossary.
5
- - Required sections: problem, conceptual model, scenarios.
6
- - Optional sections: background, glossary, stakeholders, diagrams, non-normative notes.
7
- - Prohibited: normative language (SHALL/SHOULD/MAY), acceptance criteria, traceability IDs, design decisions.
8
- - Mark the document as INFORMATIVE (not normative).
9
- - Add metadata with change log.
10
-
11
- Example structure:
12
-
13
- ```
14
- # Feature Context [INFORMATIVE]
15
-
16
- ## Problem
17
-
18
- Why this feature exists. What pain point or gap it addresses.
19
-
20
- ## Conceptual Model
21
-
22
- How users should think about this feature. Mental model, key abstractions.
23
-
24
- ## Scenarios
25
-
26
- Concrete usage examples illustrating the feature in action.
27
-
28
- ### Scenario 1: {title}
29
- {narrative}
30
-
31
- ### Scenario 2: {title}
32
- {narrative}
33
-
34
- ## Background
35
-
36
- Additional context: history, prior art, references.
37
-
38
- ## Glossary
39
-
40
- - TERM: Definition
41
-
42
- ## Stakeholders
43
-
44
- - ROLE: How they relate to this feature
45
-
46
- ## Diagrams
47
-
48
- ```mermaid
49
- {diagram}
50
- ```
51
-
52
- ## Non-Normative Notes
53
-
54
- Recommendations, best practices, or explanatory content that is not testable.
55
-
56
- ## Change Log
57
-
58
- - {version} ({date}): {changes}
59
- ```
60
-
61
- </schema>
@@ -1,8 +0,0 @@
1
- <schema target-files=".awa/plans/PLAN-{nnn}-{plan-name}.md">
2
- - Plan as already instructed, and:
3
- - Use as succinct language as possible
4
- - Add metadata:
5
- - Status: "in-progress", "completed", "blocked"
6
- - Workflow direction: "top-down", "bottom-up", "lateral"
7
- - Traceability links to requirements/design/code/tests
8
- </schema>
@@ -1,133 +0,0 @@
1
- <schema target-file="README.md">
2
-
3
- ```json
4
- {
5
- "description": "Project README. Succinct language. User-facing. Link to detailed docs in /docs folder.",
6
- "required": ["title", "description", "installation", "usage"],
7
- "properties": {
8
- "title": { "type": "project name" },
9
- "badges": { "type": "array of badge markdown" },
10
- "description": { "type": "one paragraph: what the project does and why" },
11
- "features": { "type": "array of key features" },
12
- "installation": {
13
- "required": ["steps"],
14
- "properties": {
15
- "prerequisites": { "type": "array of requirements" },
16
- "steps": { "type": "array of commands or instructions" }
17
- }
18
- },
19
- "usage": {
20
- "required": ["quickStart"],
21
- "properties": {
22
- "quickStart": { "type": "minimal example to get started" },
23
- "examples": { "type": "array", "items": { "$ref": "#/$defs/example" } }
24
- }
25
- },
26
- "documentation": { "type": "array of links to /docs files", "items": { "$ref": "#/$defs/docLink" } },
27
- "contributing": { "type": "brief instructions or link to CONTRIBUTING.md" },
28
- "license": { "type": "license name and link" },
29
- "acknowledgments": { "type": "array of credits" }
30
- },
31
- "$defs": {
32
- "example": {
33
- "properties": {
34
- "title": {},
35
- "description": {},
36
- "code": { "type": "code block" }
37
- }
38
- },
39
- "docLink": {
40
- "required": ["title", "path"],
41
- "properties": {
42
- "title": {},
43
- "path": { "type": "relative path to /docs file" },
44
- "description": {}
45
- }
46
- }
47
- },
48
- "$render": {
49
- "template": "# {title}\\n\\n{badges?}\\n\\n{description}\\n\\n## Features\\n{features→'- {}'}\\n\\n## Installation\\n\\n### Prerequisites\\n{installation.prerequisites→'- {}'}\\n\\n### Install\\n{installation.steps→'```bash\\n{}\\n```'}\\n\\n## Usage\\n\\n{usage.quickStart}\\n\\n### Examples\\n{usage.examples→'#### {title}\\n{description?}\\n```\\n{CODE}\\n```'}\\n\\n## Documentation\\n{documentation→'- [{title}]({path}) — {description?}'}\\n\\n## Contributing\\n{contributing}\\n\\n## License\\n{license}\\n\\n## Acknowledgments\\n{acknowledgments→'- {}'}",
50
- "omit": ["section if empty", "badges if absent", "Prerequisites if empty", "description in examples if absent", "Acknowledgments if empty"],
51
- "prohibited": ["**bold** in section headers", "implementation details", "internal architecture", "excessive length — link to /docs instead"]
52
- }
53
- }
54
- ```
55
-
56
- <example>
57
- # awa CLI
58
-
59
- [![npm version](https://img.shields.io/npm/v/awa-cli.svg)](https://www.npmjs.com/package/awa-cli)
60
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
61
-
62
- awa CLI generates AI coding agent configuration files from templates, enabling developers to quickly scaffold consistent agent setups across projects.
63
-
64
- ## Features
65
-
66
- - Template-based configuration generation
67
- - Feature flag support for conditional content
68
- - Multiple output formats (Markdown, YAML, JSON)
69
- - Diff mode to preview changes before applying
70
- - Local and remote template sources
71
-
72
- ## Installation
73
-
74
- ### Prerequisites
75
-
76
- - Node.js 20 or higher
77
- - npm or pnpm
78
-
79
- ### Install
80
-
81
- ```bash
82
- npm install -g awa-cli
83
- ```
84
-
85
- ## Usage
86
-
87
- ```bash
88
- # Generate configuration from default template
89
- awa generate
90
-
91
- # Generate with specific features enabled
92
- awa generate --features typescript,testing
93
-
94
- # Preview changes without writing files
95
- awa diff
96
- ```
97
-
98
- ### Examples
99
-
100
- #### Custom Template
101
-
102
- ```bash
103
- awa generate --template ./my-templates --output ./.ai
104
- ```
105
-
106
- #### Feature Flags
107
-
108
- ```bash
109
- awa generate --features strict,verbose --remove-features legacy
110
- ```
111
-
112
- ## Documentation
113
-
114
- - [Configuration Guide](docs/configuration.md) — Configure templates and options
115
- - [Template Authoring](docs/templates.md) — Create custom templates
116
- - [CLI Reference](docs/cli-reference.md) — Complete command documentation
117
- - [API Reference](docs/api.md) — Programmatic usage
118
-
119
- ## Contributing
120
-
121
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
122
-
123
- ## License
124
-
125
- [MIT](LICENSE)
126
-
127
- ## Acknowledgments
128
-
129
- - Eta templating engine
130
- - Citty CLI framework
131
- </example>
132
-
133
- </schema>
@@ -1,125 +0,0 @@
1
- <schema target-files=".awa/specs/REQ-{CODE}-{feature-name}.md">
2
-
3
- ```json
4
- {
5
- "description": "Requirements only. Succinct language. Do not overspecify. Omit irrelevant information.",
6
- "required": ["introduction", "requirements"],
7
- "properties": {
8
- "metadata": { "properties": { "changeLog": { "type": "array", "items": { "properties": { "version": {}, "date": {}, "changes": {} } } } } },
9
- "introduction": { "type": "brief context for the requirements" },
10
- "stakeholders": { "type": "array", "items": { "properties": { "role": {}, "description": {} } } },
11
- "glossary": { "type": "object of term→definition" },
12
- "requirements": { "type": "array", "items": { "$ref": "#/$defs/requirement" } },
13
- "assumptions": { "type": "array of strings" },
14
- "constraints": { "type": "array of strings" },
15
- "outOfScope": { "type": "array of strings" }
16
- },
17
- "$defs": {
18
- "requirement": {
19
- "required": ["id", "title", "story", "criteria"],
20
- "properties": {
21
- "id": { "type": "pattern: {CODE}-{n} or {CODE}-{n}.{p} for subrequirements (e.g., CLI-3, ENG-1.1)" },
22
- "title": { "type": "short title" },
23
- "story": { "required": ["role", "want", "benefit"], "properties": { "role": {}, "want": {}, "benefit": {} } },
24
- "criteria": { "type": "array", "items": { "$ref": "#/$defs/criterion" } },
25
- "priority": { "enum": ["must", "should", "could", "wont"] },
26
- "rationale": { "type": "why this requirement exists" },
27
- "dependencies": { "type": "array of requirement IDs" },
28
- "subrequirements": { "type": "array", "items": { "$ref": "#/$defs/requirement" } }
29
- }
30
- },
31
- "criterion": {
32
- "required": ["id", "type", "statement"],
33
- "properties": {
34
- "id": { "type": "pattern: {CODE}-{n}[.{p}]_AC-{m} for subrequirements (e.g., CLI-3_AC-1, ENG-1.1_AC-2)" },
35
- "type": { "enum": ["ubiquitous", "event", "state", "conditional", "optional", "complex"] },
36
- "statement": { "type": "testable statement using SHALL/SHOULD/MAY" },
37
- "notes": { "type": "additional context" },
38
- "testable": { "type": "boolean, default true" },
39
- "verified": { "type": "boolean; true when validated as implemented and tested" }
40
- }
41
- }
42
- },
43
- "$render": {
44
- "template": "# Requirements Specification\n\n## Introduction\n{introduction}\n\n## Glossary\n{glossary→'- {TERM}: {definition}'}\n\n## Stakeholders\n{stakeholders→'- {ROLE}: {description}'}\n\n## Requirements\n{requirements→'### {id}: {title} [{PRIORITY?}]\n\nAS A {story.role}, I WANT {story.want}, SO THAT {story.benefit}.\n\n> {rationale?}\n\nACCEPTANCE CRITERIA\n\n{criteria→\"- [{verified?x: }] {id} [{type}]: {statement} — {notes?} [untestable?]\"}\n\nDEPENDS ON: {dependencies?}'}\n\n## Assumptions\n{assumptions→'- {}'}\n\n## Constraints\n{constraints→'- {}'}\n\n## Out of Scope\n{outOfScope→'- {}'}\n\n## Change Log\n{metadata.changeLog→'- {version} ({date}): {changes}'}",
45
- "omit": ["section if empty", "[PRIORITY] if absent", "rationale blockquote if absent", "— {notes} if absent", "[untestable] if testable true/absent", "DEPENDS ON if empty"],
46
- "checkbox": "[x] if verified true, [ ] otherwise",
47
- "prohibited": ["**bold** — use CAPITALS", "FieldName: value patterns", "nested bullets for story/criterion", "showing 'testable: true'", "headers for individual criteria"]
48
- }
49
- }
50
- ```
51
-
52
- <example>
53
- # Requirements Specification
54
-
55
- ## Introduction
56
-
57
- Core engine requirements for game framework.
58
-
59
- ## Glossary
60
-
61
- - GAME LOOP: Core cycle of update-render that drives the engine
62
- - CONTEXT: Runtime state container for engine subsystems
63
-
64
- ## Stakeholders
65
-
66
- - GAME DEVELOPER: Builds games using the engine API
67
- - ENGINE MAINTAINER: Maintains and extends engine internals
68
-
69
- ## Requirements
70
-
71
- ### ENG-1: Core Engine Framework [MUST]
72
-
73
- AS A game developer, I WANT a game loop, SO THAT predictable execution.
74
-
75
- > Foundation for all games.
76
-
77
- ACCEPTANCE CRITERIA
78
-
79
- - [x] ENG-1_AC-1 [event]: WHEN engine initializes THEN system SHALL create context
80
- - [ ] ENG-1_AC-2 [event]: WHEN `--verbose` flag is provided THEN system SHALL enable debug logging — CLI flag
81
- - [ ] ENG-1_AC-3 [ubiquitous]: The system SHALL maintain 60fps minimum frame rate
82
- - [ ] ENG-1_AC-4 [event]: WHEN multiple `--preset` options are provided THEN system SHALL collect all values
83
- - [ ] ENG-1_AC-5 [conditional]: IF config contains a `[presets]` table THEN system SHALL parse it as a dictionary
84
-
85
- ### ENG-1.1: Subsystem Registration [SHOULD]
86
-
87
- AS A engine maintainer, I WANT subsystems to self-register, SO THAT modular architecture.
88
-
89
- ACCEPTANCE CRITERIA
90
-
91
- - [ ] ENG-1.1_AC-1 [event]: WHEN subsystem loads THEN it SHALL register with context
92
-
93
- ### ENG-2: Resource Management [MUST]
94
-
95
- AS A game developer, I WANT automatic resource loading, SO THAT simplified asset management.
96
-
97
- ACCEPTANCE CRITERIA
98
-
99
- - [ ] ENG-2_AC-1 [event]: WHEN resource requested THEN system SHALL load asynchronously
100
- - [ ] ENG-2_AC-2 [ubiquitous]: The system SHALL cache loaded resources
101
-
102
- DEPENDS ON: ENG-1
103
-
104
- ## Assumptions
105
-
106
- - Target platform supports OpenGL 3.3 or higher
107
- - Config file uses TOML format with `[section]` syntax
108
-
109
- ## Constraints
110
-
111
- - Must run on Windows, macOS, and Linux
112
- - CLI options like `--features` and `--remove-features` follow POSIX conventions
113
-
114
- ## Out of Scope
115
-
116
- - Mobile platform support
117
- - Console platform support
118
-
119
- ## Change Log
120
-
121
- - 1.0.0 (2025-01-10): Initial requirements
122
- - 1.1.0 (2025-01-15): Added `--preset` CLI option
123
- </example>
124
-
125
- </schema>