@ncoderz/awa 1.1.0 → 1.3.1
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/dist/chunk-ALEGCDAZ.js +625 -0
- package/dist/chunk-ALEGCDAZ.js.map +1 -0
- package/dist/config-LWUO5EXL.js +10 -0
- package/dist/config-LWUO5EXL.js.map +1 -0
- package/dist/index.js +295 -666
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/awa/.agent/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.agents/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.awa/.agent/schemas/REQ.schema.yaml +2 -2
- package/templates/awa/.claude/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.gemini/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.github/skills/awa-usage/SKILL.md +8 -0
- package/templates/awa/.kilocode/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.opencode/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.qwen/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.roo/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/.windsurf/skills/awa-usage/SKILL.md +3 -0
- package/templates/awa/_partials/_skill.awa-usage.md +6 -0
- package/templates/awa/_partials/awa.usage.md +265 -0
package/package.json
CHANGED
|
@@ -54,10 +54,10 @@ sections:
|
|
|
54
54
|
heading, AC items, and optional DEPENDS ON line.
|
|
55
55
|
contains:
|
|
56
56
|
# User story format
|
|
57
|
-
- pattern: "AS
|
|
57
|
+
- pattern: "AS AN? .*, I WANT .*, SO THAT"
|
|
58
58
|
label: "user story"
|
|
59
59
|
description: >
|
|
60
|
-
User story in AS A {role}, I WANT {want}, SO THAT {benefit} format.
|
|
60
|
+
User story in AS A(N) {role}, I WANT {want}, SO THAT {benefit} format.
|
|
61
61
|
One sentence. Role, want, and benefit are all required.
|
|
62
62
|
# Acceptance criteria heading
|
|
63
63
|
- pattern: "ACCEPTANCE CRITERIA"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<% if (it.features.includes('copilot')) { %>
|
|
2
|
+
---
|
|
3
|
+
name: awa-usage
|
|
4
|
+
description: Understand awa, its CLI, and configuration. Use this when asked about awa itself, how to use it, or how to configure it.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<%~ include('_partials/awa.usage.md', it) %>
|
|
8
|
+
<% } %>
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# awa — Agent Workflow for AIs
|
|
2
|
+
|
|
3
|
+
## What awa Is
|
|
4
|
+
|
|
5
|
+
awa is a CLI tool and structured development workflow for AI-assisted coding. It generates agent configuration files from templates and defines a spec-driven development process with full traceability from requirements through code and tests.
|
|
6
|
+
|
|
7
|
+
Key concepts:
|
|
8
|
+
|
|
9
|
+
- **Templates**: Eta-based templates that produce agent config files (`.github/agents/`, `.claude/`, etc.) with conditional output via feature flags
|
|
10
|
+
- **Workflow**: A structured pipeline from architecture through implementation, where every artifact traces to its origin
|
|
11
|
+
- **Traceability**: Code markers (`@awa-impl`, `@awa-test`, `@awa-component`) link source code and tests back to requirements and design
|
|
12
|
+
- **Validation**: `awa check` verifies that all markers resolve to spec IDs and that spec files conform to YAML schemas
|
|
13
|
+
|
|
14
|
+
## The `.awa/` Directory
|
|
15
|
+
|
|
16
|
+
All spec artifacts live in `.awa/`:
|
|
17
|
+
|
|
18
|
+
.awa/
|
|
19
|
+
├── .agent/
|
|
20
|
+
│ ├── awa.core.md # Core system prompt (always read first)
|
|
21
|
+
│ └── schemas/
|
|
22
|
+
│ ├── ARCHITECTURE.schema.yaml
|
|
23
|
+
│ ├── FEAT.schema.yaml
|
|
24
|
+
│ ├── EXAMPLES.schema.yaml
|
|
25
|
+
│ ├── REQ.schema.yaml
|
|
26
|
+
│ ├── DESIGN.schema.yaml
|
|
27
|
+
│ ├── API.schema.yaml
|
|
28
|
+
│ ├── TASK.schema.yaml
|
|
29
|
+
│ ├── PLAN.schema.yaml
|
|
30
|
+
│ ├── README.schema.yaml
|
|
31
|
+
│ └── ALIGN_REPORT.schema.yaml
|
|
32
|
+
├── specs/
|
|
33
|
+
│ ├── ARCHITECTURE.md # System overview
|
|
34
|
+
│ ├── FEAT-{CODE}-*.md # Feature context and motivation
|
|
35
|
+
│ ├── EXAMPLES-{CODE}-*-{nnn}.md # Usage examples per feature
|
|
36
|
+
│ ├── REQ-{CODE}-*.md # Requirements (EARS format)
|
|
37
|
+
│ ├── DESIGN-{CODE}-*.md # Design and components
|
|
38
|
+
│ └── API-{CODE}-*.tsp # TypeSpec API definitions
|
|
39
|
+
├── tasks/
|
|
40
|
+
│ └── TASK-{CODE}-*-{nnn}.md # Implementation steps
|
|
41
|
+
├── plans/
|
|
42
|
+
│ └── PLAN-{nnn}-*.md # Ad-hoc plans
|
|
43
|
+
├── align/
|
|
44
|
+
│ └── ALIGN-{x}-WITH-{y}-{nnn}.md # Alignment reports
|
|
45
|
+
└── rules/
|
|
46
|
+
└── *.md # Project-specific rules
|
|
47
|
+
|
|
48
|
+
## Workflow Stages
|
|
49
|
+
|
|
50
|
+
ARCHITECTURE → FEAT → REQUIREMENTS → DESIGN → TASKS → CODE & TESTS → DOCUMENTATION
|
|
51
|
+
|
|
52
|
+
| Stage | Artifact | Purpose |
|
|
53
|
+
|-------|----------|---------|
|
|
54
|
+
| Architecture | `ARCHITECTURE.md` | System overview, components, constraints |
|
|
55
|
+
| Feature | `FEAT-{CODE}-*.md` | Context, motivation, scenarios |
|
|
56
|
+
| Requirements | `REQ-{CODE}-*.md` | What must be built (EARS/INCOSE format) |
|
|
57
|
+
| Design | `DESIGN-{CODE}-*.md` | How it gets built — components, interfaces, properties |
|
|
58
|
+
| Tasks | `TASK-{CODE}-*-{nnn}.md` | Step-by-step implementation work items |
|
|
59
|
+
| Code & Tests | Source files | Implementation with traceability markers |
|
|
60
|
+
| Documentation | `README.md`, `docs/` | User-facing docs |
|
|
61
|
+
|
|
62
|
+
Lateral artifacts (produced at any stage): EXAMPLES, PLAN, ALIGN reports.
|
|
63
|
+
|
|
64
|
+
The workflow is flexible. Start top-down (architecture → code), bottom-up (code → extract requirements), or lateral (docs, refactors, ad-hoc plans).
|
|
65
|
+
|
|
66
|
+
## Traceability Chain
|
|
67
|
+
|
|
68
|
+
IDs and markers create explicit links between artifacts:
|
|
69
|
+
|
|
70
|
+
REQ-{CODE}-*.md
|
|
71
|
+
└── {CODE}-{n}: Requirement title
|
|
72
|
+
└── {CODE}-{n}_AC-{m}: Acceptance criterion
|
|
73
|
+
│
|
|
74
|
+
▼
|
|
75
|
+
DESIGN-{CODE}-*.md
|
|
76
|
+
└── {CODE}-ComponentName
|
|
77
|
+
├── IMPLEMENTS: {CODE}-{n}_AC-{m}
|
|
78
|
+
└── {CODE}_P-{n}: Correctness property
|
|
79
|
+
│
|
|
80
|
+
▼
|
|
81
|
+
Source code
|
|
82
|
+
└── // @awa-component: {CODE}-ComponentName
|
|
83
|
+
└── // @awa-impl: {CODE}-{n}_AC-{m}
|
|
84
|
+
│
|
|
85
|
+
▼
|
|
86
|
+
Tests
|
|
87
|
+
├── // @awa-test: {CODE}_P-{n} ← verifies property
|
|
88
|
+
└── // @awa-test: {CODE}-{n}_AC-{m} ← verifies AC
|
|
89
|
+
|
|
90
|
+
ID formats:
|
|
91
|
+
|
|
92
|
+
- `{CODE}-{n}` — requirement (e.g. `DIFF-1`)
|
|
93
|
+
- `{CODE}-{n}.{p}` — subrequirement (e.g. `DIFF-1.1`)
|
|
94
|
+
- `{CODE}-{n}[.{p}]_AC-{m}` — acceptance criterion (e.g. `DIFF-1_AC-1`)
|
|
95
|
+
- `{CODE}_P-{n}` — correctness property (e.g. `DIFF_P-2`)
|
|
96
|
+
|
|
97
|
+
## CLI Commands
|
|
98
|
+
|
|
99
|
+
awa may be installed locally. Detect the package manager and use the appropriate exec command:
|
|
100
|
+
|
|
101
|
+
npm/npx: npx awa <command>
|
|
102
|
+
yarn: yarn exec awa <command>
|
|
103
|
+
pnpm: pnpm exec awa <command>
|
|
104
|
+
bun: bunx awa <command>
|
|
105
|
+
|
|
106
|
+
### awa init [output] / awa generate [output]
|
|
107
|
+
|
|
108
|
+
Generate configuration files from templates. `init` and `generate` are aliases.
|
|
109
|
+
|
|
110
|
+
| Option | Description |
|
|
111
|
+
|--------|-------------|
|
|
112
|
+
| `[output]` | Output directory (positional, optional if set in config) |
|
|
113
|
+
| `-t, --template <source>` | Template source — local path or Git repo |
|
|
114
|
+
| `-f, --features <flag...>` | Feature flags (repeatable) |
|
|
115
|
+
| `--preset <name...>` | Preset names to enable (repeatable) |
|
|
116
|
+
| `--remove-features <flag...>` | Feature flags to remove (repeatable) |
|
|
117
|
+
| `--force` | Overwrite existing files without prompting |
|
|
118
|
+
| `--dry-run` | Preview changes without modifying files |
|
|
119
|
+
| `--delete` | Enable deletion of files listed in template |
|
|
120
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
121
|
+
| `--refresh` | Force re-fetch of cached Git templates |
|
|
122
|
+
| `--all` | Process all named targets from config |
|
|
123
|
+
| `--target <name>` | Process a specific named target |
|
|
124
|
+
| `--overlay <path...>` | Overlay directory paths (repeatable) |
|
|
125
|
+
| `--json` | JSON output to stdout (implies --dry-run) |
|
|
126
|
+
| `--summary` | Compact one-line counts summary |
|
|
127
|
+
|
|
128
|
+
### awa diff [target]
|
|
129
|
+
|
|
130
|
+
Compare generated template output against an existing target directory. Exit code 0 = match, 1 = differences.
|
|
131
|
+
|
|
132
|
+
| Option | Description |
|
|
133
|
+
|--------|-------------|
|
|
134
|
+
| `[target]` | Target directory (positional, optional if set in config) |
|
|
135
|
+
| `-t, --template <source>` | Template source — local path or Git repo |
|
|
136
|
+
| `-f, --features <flag...>` | Feature flags (repeatable) |
|
|
137
|
+
| `--preset <name...>` | Preset names to enable (repeatable) |
|
|
138
|
+
| `--remove-features <flag...>` | Feature flags to remove (repeatable) |
|
|
139
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
140
|
+
| `--refresh` | Force re-fetch of cached Git templates |
|
|
141
|
+
| `--list-unknown` | Include files in target not present in templates |
|
|
142
|
+
| `--all` | Process all named targets from config |
|
|
143
|
+
| `--target <name>` | Process a specific named target |
|
|
144
|
+
| `-w, --watch` | Watch template directory and re-diff on change |
|
|
145
|
+
| `--overlay <path...>` | Overlay directory paths (repeatable) |
|
|
146
|
+
| `--json` | JSON output to stdout |
|
|
147
|
+
| `--summary` | Compact one-line counts summary |
|
|
148
|
+
|
|
149
|
+
### awa check
|
|
150
|
+
|
|
151
|
+
Check traceability chain integrity and spec schema conformance. Exit code 0 = clean, 1 = errors.
|
|
152
|
+
|
|
153
|
+
| Option | Description |
|
|
154
|
+
|--------|-------------|
|
|
155
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
156
|
+
| `--ignore <pattern...>` | Glob patterns to exclude (repeatable, appends to config) |
|
|
157
|
+
| `--format <format>` | Output format: `text` (default) or `json` |
|
|
158
|
+
| `--allow-warnings` | Allow warnings without failing |
|
|
159
|
+
| `--spec-only` | Run only spec-level checks; skip code-to-spec traceability |
|
|
160
|
+
|
|
161
|
+
Checks performed: orphaned markers, uncovered ACs, broken cross-refs, invalid ID format, orphaned specs, schema validation. Config-only options: `schema-dir`, `schema-enabled`, `ignore-markers`, `spec-only`.
|
|
162
|
+
|
|
163
|
+
### awa test
|
|
164
|
+
|
|
165
|
+
Run template test fixtures. Exit code 0 = all pass, 1 = failures.
|
|
166
|
+
|
|
167
|
+
| Option | Description |
|
|
168
|
+
|--------|-------------|
|
|
169
|
+
| `-t, --template <source>` | Template source — local path or Git repo |
|
|
170
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
171
|
+
| `--update-snapshots` | Update stored snapshots with current output |
|
|
172
|
+
|
|
173
|
+
Discovers `*.toml` fixtures in `_tests/`, renders per fixture, verifies expected files, compares against snapshots.
|
|
174
|
+
|
|
175
|
+
### awa features
|
|
176
|
+
|
|
177
|
+
Discover feature flags available in a template.
|
|
178
|
+
|
|
179
|
+
| Option | Description |
|
|
180
|
+
|--------|-------------|
|
|
181
|
+
| `-t, --template <source>` | Template source — local path or Git repo |
|
|
182
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
183
|
+
| `--refresh` | Force re-fetch of cached Git templates |
|
|
184
|
+
| `--json` | JSON output |
|
|
185
|
+
|
|
186
|
+
### Global Options
|
|
187
|
+
|
|
188
|
+
`-v, --version` — display version. `-h, --help` — display help.
|
|
189
|
+
|
|
190
|
+
## Configuration — `.awa.toml`
|
|
191
|
+
|
|
192
|
+
Create `.awa.toml` in the project root. CLI arguments always override config values.
|
|
193
|
+
|
|
194
|
+
# Root options
|
|
195
|
+
output = ".github/agents"
|
|
196
|
+
template = "owner/repo"
|
|
197
|
+
features = ["copilot", "claude"]
|
|
198
|
+
overlay = ["./overlays/company", "./overlays/project"]
|
|
199
|
+
refresh = false
|
|
200
|
+
delete = false
|
|
201
|
+
|
|
202
|
+
# Named presets — expand into feature flags
|
|
203
|
+
[presets]
|
|
204
|
+
full = ["copilot", "claude", "cursor", "windsurf", "kilocode", "opencode", "gemini", "roo", "qwen", "codex", "agy", "agents-md"]
|
|
205
|
+
lite = ["copilot", "claude"]
|
|
206
|
+
|
|
207
|
+
# Per-agent targets — generate different configs in one command
|
|
208
|
+
[targets.claude]
|
|
209
|
+
output = "."
|
|
210
|
+
features = ["claude", "architect", "code"]
|
|
211
|
+
|
|
212
|
+
[targets.copilot]
|
|
213
|
+
output = "."
|
|
214
|
+
features = ["copilot", "code", "vibe"]
|
|
215
|
+
|
|
216
|
+
# Traceability check configuration
|
|
217
|
+
[check]
|
|
218
|
+
spec-globs = [".awa/specs/**/*.md"]
|
|
219
|
+
code-globs = ["src/**/*.{ts,js,tsx,jsx}"]
|
|
220
|
+
markers = ["@awa-impl", "@awa-test", "@awa-component"]
|
|
221
|
+
ignore = ["node_modules/**", "dist/**"]
|
|
222
|
+
ignore-markers = []
|
|
223
|
+
format = "text"
|
|
224
|
+
schema-dir = ".awa/.agent/schemas"
|
|
225
|
+
schema-enabled = true
|
|
226
|
+
allow-warnings = false
|
|
227
|
+
spec-only = false
|
|
228
|
+
|
|
229
|
+
# Update check configuration
|
|
230
|
+
[update-check]
|
|
231
|
+
enabled = true # set to false to disable update checks
|
|
232
|
+
interval = 86400 # seconds between checks (default: 1 day)
|
|
233
|
+
|
|
234
|
+
Target fields: `output`, `template`, `features`, `preset`, `remove-features`. Boolean flags (`force`, `dry-run`, `delete`, `refresh`) apply globally. Target features replace root features entirely.
|
|
235
|
+
|
|
236
|
+
Feature resolution order: start with `--features`, expand `--preset` (append, deduplicate), remove `--remove-features`.
|
|
237
|
+
|
|
238
|
+
Multi-target usage:
|
|
239
|
+
|
|
240
|
+
awa generate --all # process all targets
|
|
241
|
+
awa generate --target claude # process one target
|
|
242
|
+
awa diff --all # diff all targets
|
|
243
|
+
|
|
244
|
+
## Template Sources
|
|
245
|
+
|
|
246
|
+
Templates can be a local path or a Git repository:
|
|
247
|
+
|
|
248
|
+
- Local path: `./templates/awa`
|
|
249
|
+
- GitHub shorthand: `owner/repo`
|
|
250
|
+
- Full URL: `https://github.com/owner/repo`
|
|
251
|
+
- SSH: `git@github.com:owner/repo`
|
|
252
|
+
- With subdirectory: `owner/repo/path/to/templates`
|
|
253
|
+
- With ref: `owner/repo#branch`, `owner/repo#v1.0.0`
|
|
254
|
+
|
|
255
|
+
Git templates are cached in `~/.cache/awa/templates/`. Use `--refresh` to re-fetch.
|
|
256
|
+
|
|
257
|
+
## Exit Codes
|
|
258
|
+
|
|
259
|
+
| Command | 0 | 1 | 2 |
|
|
260
|
+
|---------|---|---|---|
|
|
261
|
+
| `awa init` / `awa generate` | Success | — | Internal error |
|
|
262
|
+
| `awa diff` | All files match | Differences found | Internal error |
|
|
263
|
+
| `awa check` | All checks pass | Errors found | Internal error |
|
|
264
|
+
| `awa test` | All fixtures pass | Failures found | Internal error |
|
|
265
|
+
| `awa features` | Success | Error | — |
|