@ncoderz/awa 1.3.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ncoderz/awa",
3
- "version": "1.3.1",
3
+ "version": "1.5.0",
4
4
  "description": "awa is an Agent Workflow for AIs. It is also a CLI tool to powerfully manage agent workflow files using templates.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  "dev": "tsx src/cli/index.ts",
18
18
  "start": "node dist/index.js",
19
19
  "build": "npm run init && npm run check && npm run lint && npm run typecheck:all && tsup",
20
- "gen:example": "tsx src/cli/index.ts generate ./outputs/example --template ./templates/example",
21
- "gen:awa": "tsx src/cli/index.ts generate ./outputs/awa --template ./templates/awa",
22
- "gen:awa:this": "tsx src/cli/index.ts generate . --template ./templates/awa --features copilot",
23
- "diff:awa:this": "tsx src/cli/index.ts diff . --template ./templates/awa --features copilot",
20
+ "gen:example": "tsx src/cli/index.ts template generate ./outputs/example --template ./templates/example",
21
+ "gen:awa": "tsx src/cli/index.ts template generate ./outputs/awa --template ./templates/awa",
22
+ "gen:awa:this": "tsx src/cli/index.ts template generate . --template ./templates/awa --features copilot",
23
+ "diff:awa:this": "tsx src/cli/index.ts template diff . --template ./templates/awa --features copilot",
24
24
  "test": "vitest run",
25
25
  "test:watch": "vitest",
26
26
  "test:coverage": "vitest run --coverage",
@@ -82,7 +82,7 @@ example: |
82
82
  Enable specific features when generating.
83
83
 
84
84
  ```bash
85
- awa generate --features copilot,claude,cursor
85
+ awa template generate --features copilot,claude,cursor
86
86
  ```
87
87
 
88
88
  ## Example 3: Custom Template Source
@@ -90,7 +90,7 @@ example: |
90
90
  Use a Git repository as the template source.
91
91
 
92
92
  ```bash
93
- awa generate --template owner/repo --features copilot
93
+ awa template generate --template owner/repo --features copilot
94
94
  ```
95
95
 
96
96
  ## Change Log
@@ -113,18 +113,18 @@ example: |
113
113
  ### Scenario 1: First-time Setup
114
114
 
115
115
  A developer starts a new project and wants to add AI agent configuration
116
- for GitHub Copilot and Claude. They run `awa generate --features copilot,claude`
116
+ for GitHub Copilot and Claude. They run `awa template generate --features copilot,claude`
117
117
  and get a complete set of configuration files tailored to those two agents.
118
118
 
119
119
  ### Scenario 2: Adding a New Agent
120
120
 
121
121
  An existing project already has Copilot configuration. The developer adds
122
- Cursor support by running `awa generate --features copilot,cursor`. The engine
122
+ Cursor support by running `awa template generate --features copilot,cursor`. The engine
123
123
  merges the new feature without disrupting existing configuration.
124
124
 
125
125
  ### Scenario 3: Previewing Changes
126
126
 
127
- Before applying changes, the developer runs `awa diff` to see what files
127
+ Before applying changes, the developer runs `awa template diff` to see what files
128
128
  would be added, modified, or removed. This gives confidence before committing.
129
129
 
130
130
  ## Background
@@ -100,13 +100,13 @@ example: |
100
100
 
101
101
  ```bash
102
102
  # Generate configuration from default template
103
- awa generate
103
+ awa template generate
104
104
 
105
105
  # Generate with specific features enabled
106
- awa generate --features typescript,testing
106
+ awa template generate --features typescript,testing
107
107
 
108
108
  # Preview changes without writing files
109
- awa diff
109
+ awa template diff
110
110
  ```
111
111
 
112
112
  ### Examples
@@ -114,7 +114,7 @@ example: |
114
114
  #### Custom Template
115
115
 
116
116
  ```bash
117
- awa generate --template ./my-templates --output ./.ai
117
+ awa template generate --template ./my-templates --output ./.ai
118
118
  ```
119
119
 
120
120
  ## Documentation
@@ -6,18 +6,18 @@ This template set generates the awa agent files for all major AI coding tools.
6
6
 
7
7
  ```bash
8
8
  # Interactive tool selection (prompts when no tool flag provided)
9
- npx awa generate . --template ./templates/awa
9
+ npx awa template generate . --template ./templates/awa
10
10
 
11
11
  # Single tool
12
- npx awa generate . --template ./templates/awa --features copilot
13
- npx awa generate . --template ./templates/awa --features claude
14
- npx awa generate . --template ./templates/awa --features cursor
12
+ npx awa template generate . --template ./templates/awa --features copilot
13
+ npx awa template generate . --template ./templates/awa --features claude
14
+ npx awa template generate . --template ./templates/awa --features cursor
15
15
 
16
16
  # Multiple tools
17
- npx awa generate . --template ./templates/awa --features copilot claude cursor
17
+ npx awa template generate . --template ./templates/awa --features copilot claude cursor
18
18
 
19
19
  # Cross-tool AGENTS.md only
20
- npx awa generate . --template ./templates/awa --features agents-md
20
+ npx awa template generate . --template ./templates/awa --features agents-md
21
21
  ```
22
22
 
23
23
  ## Tool Feature Flags
@@ -84,4 +84,4 @@ Shared content is in `_partials/`:
84
84
  1. Copy `templates/awa/` to your project
85
85
  2. Modify `_partials/awa.core.md` for shared system instruction changes
86
86
  3. Modify individual `_partials/awa.*.md` for skill-specific changes
87
- 4. Run `npx awa generate . --features <tool>` to regenerate
87
+ 4. Run `npx awa template generate . --features <tool>` to regenerate
@@ -87,7 +87,7 @@ Markers create the trace, not file paths.
87
87
  </traceability_chain>
88
88
 
89
89
  <file_size_limits>
90
- Any file exceeding 500 lines MUST be split logically into multiple files unless impossible.
90
+ Any file exceeding schema defined line-limit, or otherwise 500 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.
91
91
  </file_size_limits>
92
92
 
93
93
  <core_principles>
@@ -111,4 +111,12 @@ All `awa` commands in these instructions assume this resolution.
111
111
  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.
112
112
  You SHALL run `awa check` (without --spec-only) after implementing code and tests to verify full traceability coverage.
113
113
  </validation>
114
+
115
+ <code_search>
116
+ 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.
117
+
118
+ When you need to understand a source file's spec connections before modifying it, you SHOULD run `awa trace --file <path> --content`.
119
+
120
+ 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.
121
+ </code_search>
114
122
  </awa>
@@ -103,9 +103,9 @@ awa may be installed locally. Detect the package manager and use the appropriate
103
103
  pnpm: pnpm exec awa <command>
104
104
  bun: bunx awa <command>
105
105
 
106
- ### awa init [output] / awa generate [output]
106
+ ### awa init [output] / awa template generate [output]
107
107
 
108
- Generate configuration files from templates. `init` and `generate` are aliases.
108
+ Generate configuration files from templates. `init` is a top-level convenience command equivalent to `awa template generate`.
109
109
 
110
110
  | Option | Description |
111
111
  |--------|-------------|
@@ -125,7 +125,7 @@ Generate configuration files from templates. `init` and `generate` are aliases.
125
125
  | `--json` | JSON output to stdout (implies --dry-run) |
126
126
  | `--summary` | Compact one-line counts summary |
127
127
 
128
- ### awa diff [target]
128
+ ### awa template diff [target]
129
129
 
130
130
  Compare generated template output against an existing target directory. Exit code 0 = match, 1 = differences.
131
131
 
@@ -160,7 +160,29 @@ Check traceability chain integrity and spec schema conformance. Exit code 0 = cl
160
160
 
161
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
162
 
163
- ### awa test
163
+ ### awa trace
164
+
165
+ Navigate the traceability chain and assemble context from specs, code, and tests. Use this to gather focused context before implementing, refactoring, or reviewing.
166
+
167
+ awa trace [ids...] [options]
168
+
169
+ | Option | Description |
170
+ |--------|-------------|
171
+ | `[ids...]` | Traceability ID(s) to trace (e.g. `FEAT-1`, `FEAT-1_AC-2`, `FEAT_P-3`) |
172
+ | `--all` | Trace all known IDs in the project |
173
+ | `--scope <code>` | Limit results to a feature code (e.g. `--scope FEAT`) |
174
+ | `--file <path>` | Resolve IDs from a source file's markers — useful to understand a file's spec connections before changing it |
175
+ | `--task <path>` | Resolve IDs from a task file |
176
+ | `--content` | Output actual file sections instead of locations |
177
+ | `--list` | Output file paths only |
178
+ | `--direction <dir>` | Traversal direction: `both` (default), `forward`, `reverse` |
179
+ | `--depth <n>` | Maximum traversal depth |
180
+ | `--no-code` | Exclude source code (spec-only context) |
181
+ | `--no-tests` | Exclude test files |
182
+ | `--json` | JSON output |
183
+ | `-A/-B/-C <n>` | Lines of context after/before/both around a code marker (`--content` only) |
184
+
185
+ ### awa template test
164
186
 
165
187
  Run template test fixtures. Exit code 0 = all pass, 1 = failures.
166
188
 
@@ -172,7 +194,7 @@ Run template test fixtures. Exit code 0 = all pass, 1 = failures.
172
194
 
173
195
  Discovers `*.toml` fixtures in `_tests/`, renders per fixture, verifies expected files, compares against snapshots.
174
196
 
175
- ### awa features
197
+ ### awa template features
176
198
 
177
199
  Discover feature flags available in a template.
178
200
 
@@ -237,9 +259,9 @@ Feature resolution order: start with `--features`, expand `--preset` (append, de
237
259
 
238
260
  Multi-target usage:
239
261
 
240
- awa generate --all # process all targets
241
- awa generate --target claude # process one target
242
- awa diff --all # diff all targets
262
+ awa template generate --all # process all targets
263
+ awa template generate --target claude # process one target
264
+ awa template diff --all # diff all targets
243
265
 
244
266
  ## Template Sources
245
267
 
@@ -258,8 +280,8 @@ Git templates are cached in `~/.cache/awa/templates/`. Use `--refresh` to re-fet
258
280
 
259
281
  | Command | 0 | 1 | 2 |
260
282
  |---------|---|---|---|
261
- | `awa init` / `awa generate` | Success | — | Internal error |
262
- | `awa diff` | All files match | Differences found | Internal error |
283
+ | `awa init` / `awa template generate` | Success | — | Internal error |
284
+ | `awa template diff` | All files match | Differences found | Internal error |
263
285
  | `awa check` | All checks pass | Errors found | Internal error |
264
- | `awa test` | All fixtures pass | Failures found | Internal error |
265
- | `awa features` | Success | Error | — |
286
+ | `awa template test` | All fixtures pass | Failures found | Internal error |
287
+ | `awa template features` | Success | Error | — |