@ncoderz/awa 1.0.0 → 1.2.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 (128) hide show
  1. package/README.md +96 -16
  2. package/dist/chunk-3SSUJFKN.js +625 -0
  3. package/dist/chunk-3SSUJFKN.js.map +1 -0
  4. package/dist/config-2TOQATI3.js +10 -0
  5. package/dist/config-2TOQATI3.js.map +1 -0
  6. package/dist/index.js +2190 -414
  7. package/dist/index.js.map +1 -1
  8. package/package.json +10 -4
  9. package/templates/awa/.agent/skills/awa-align/SKILL.md +3 -0
  10. package/templates/awa/.agent/skills/awa-check/SKILL.md +4 -0
  11. package/templates/awa/.agent/skills/awa-usage/SKILL.md +3 -0
  12. package/templates/awa/.agent/workflows/awa-align.md +3 -0
  13. package/templates/awa/.agent/workflows/awa-check.md +4 -0
  14. package/templates/awa/.agents/skills/awa-align/SKILL.md +3 -0
  15. package/templates/awa/.agents/skills/awa-check/SKILL.md +4 -0
  16. package/templates/awa/.agents/skills/awa-usage/SKILL.md +3 -0
  17. package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +83 -0
  18. package/templates/awa/.awa/.agent/schemas/API.schema.yaml +7 -0
  19. package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +260 -0
  20. package/templates/awa/.awa/.agent/schemas/DESIGN.schema.yaml +361 -0
  21. package/templates/awa/.awa/.agent/schemas/EXAMPLES.schema.yaml +98 -0
  22. package/templates/awa/.awa/.agent/schemas/FEAT.schema.yaml +143 -0
  23. package/templates/awa/.awa/.agent/schemas/PLAN.schema.yaml +151 -0
  24. package/templates/awa/.awa/.agent/schemas/README.schema.yaml +137 -0
  25. package/templates/awa/.awa/.agent/schemas/REQ.schema.yaml +169 -0
  26. package/templates/awa/.awa/.agent/schemas/TASK.schema.yaml +200 -0
  27. package/templates/awa/.claude/agents/awa.md +2 -2
  28. package/templates/awa/.claude/skills/awa-align/SKILL.md +3 -0
  29. package/templates/awa/.claude/skills/awa-check/SKILL.md +4 -0
  30. package/templates/awa/.claude/skills/awa-usage/SKILL.md +3 -0
  31. package/templates/awa/.codex/prompts/awa-align.md +3 -0
  32. package/templates/awa/.codex/prompts/awa-check.md +4 -0
  33. package/templates/awa/.cursor/rules/awa-agent.md +1 -1
  34. package/templates/awa/.cursor/rules/awa-align.md +8 -0
  35. package/templates/awa/.cursor/rules/awa-check.md +9 -0
  36. package/templates/awa/.gemini/commands/awa-align.md +3 -0
  37. package/templates/awa/.gemini/commands/awa-check.md +4 -0
  38. package/templates/awa/.gemini/skills/awa-align/SKILL.md +3 -0
  39. package/templates/awa/.gemini/skills/awa-check/SKILL.md +4 -0
  40. package/templates/awa/.gemini/skills/awa-usage/SKILL.md +3 -0
  41. package/templates/awa/.github/agents/awa.agent.md +2 -2
  42. package/templates/awa/.github/prompts/awa.align.prompt.md +8 -0
  43. package/templates/awa/.github/prompts/awa.check.prompt.md +9 -0
  44. package/templates/awa/.github/skills/awa-align/SKILL.md +8 -0
  45. package/templates/awa/.github/skills/awa-check/SKILL.md +9 -0
  46. package/templates/awa/.github/skills/awa-usage/SKILL.md +8 -0
  47. package/templates/awa/.kilocode/rules/awa-agent.md +1 -1
  48. package/templates/awa/.kilocode/skills/awa-align/SKILL.md +3 -0
  49. package/templates/awa/.kilocode/skills/awa-check/SKILL.md +4 -0
  50. package/templates/awa/.kilocode/skills/awa-usage/SKILL.md +3 -0
  51. package/templates/awa/.kilocode/workflows/awa-align.md +3 -0
  52. package/templates/awa/.kilocode/workflows/awa-check.md +4 -0
  53. package/templates/awa/.opencode/agents/awa.md +2 -2
  54. package/templates/awa/.opencode/commands/awa-align.md +3 -0
  55. package/templates/awa/.opencode/commands/awa-check.md +4 -0
  56. package/templates/awa/.opencode/skills/awa-align/SKILL.md +3 -0
  57. package/templates/awa/.opencode/skills/awa-check/SKILL.md +4 -0
  58. package/templates/awa/.opencode/skills/awa-usage/SKILL.md +3 -0
  59. package/templates/awa/.qwen/commands/awa-align.md +3 -0
  60. package/templates/awa/.qwen/commands/awa-check.md +4 -0
  61. package/templates/awa/.qwen/skills/awa-align/SKILL.md +3 -0
  62. package/templates/awa/.qwen/skills/awa-check/SKILL.md +4 -0
  63. package/templates/awa/.qwen/skills/awa-usage/SKILL.md +3 -0
  64. package/templates/awa/.roo/rules/awa-agent.md +1 -1
  65. package/templates/awa/.roo/skills/awa-align/SKILL.md +3 -0
  66. package/templates/awa/.roo/skills/awa-check/SKILL.md +4 -0
  67. package/templates/awa/.roo/skills/awa-usage/SKILL.md +3 -0
  68. package/templates/awa/.windsurf/rules/awa-agent.md +1 -1
  69. package/templates/awa/.windsurf/skills/awa-align/SKILL.md +3 -0
  70. package/templates/awa/.windsurf/skills/awa-check/SKILL.md +4 -0
  71. package/templates/awa/.windsurf/skills/awa-usage/SKILL.md +3 -0
  72. package/templates/awa/AGENTS.md +1 -1
  73. package/templates/awa/CLAUDE.md +1 -1
  74. package/templates/awa/GEMINI.md +1 -1
  75. package/templates/awa/QWEN.md +1 -1
  76. package/templates/awa/_README.md +3 -2
  77. package/templates/awa/_delete.txt +49 -0
  78. package/templates/awa/_partials/{_cmd.awa-validate-alignment.md → _cmd.awa-align.md} +1 -1
  79. package/templates/awa/_partials/_cmd.awa-check.md +6 -0
  80. package/templates/awa/_partials/_skill.awa-align.md +6 -0
  81. package/templates/awa/_partials/_skill.awa-check.md +6 -0
  82. package/templates/awa/_partials/_skill.awa-usage.md +6 -0
  83. package/templates/awa/_partials/{awa.validate-alignment.md → awa.align.md} +2 -2
  84. package/templates/awa/_partials/awa.architecture.md +1 -1
  85. package/templates/awa/_partials/awa.check.md +73 -0
  86. package/templates/awa/_partials/awa.code.md +1 -0
  87. package/templates/awa/_partials/awa.core.md +24 -10
  88. package/templates/awa/_partials/awa.design.md +3 -2
  89. package/templates/awa/_partials/awa.documentation.md +1 -1
  90. package/templates/awa/_partials/awa.examples.md +1 -1
  91. package/templates/awa/_partials/awa.feature.md +1 -1
  92. package/templates/awa/_partials/awa.plan.md +1 -1
  93. package/templates/awa/_partials/awa.refactor.md +1 -0
  94. package/templates/awa/_partials/awa.requirements.md +2 -1
  95. package/templates/awa/_partials/awa.tasks.md +3 -3
  96. package/templates/awa/_partials/awa.upgrade.md +13 -12
  97. package/templates/awa/_partials/awa.usage.md +265 -0
  98. package/templates/awa/_tests/claude.toml +7 -0
  99. package/templates/awa/_tests/copilot.toml +6 -0
  100. package/templates/awa/.agent/skills/awa-validate-alignment/SKILL.md +0 -3
  101. package/templates/awa/.agent/workflows/awa-validate-alignment.md +0 -3
  102. package/templates/awa/.agents/skills/awa-validate-alignment/SKILL.md +0 -3
  103. package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.md +0 -156
  104. package/templates/awa/.awa/.agent/schemas/API.schema.md +0 -4
  105. package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.md +0 -176
  106. package/templates/awa/.awa/.agent/schemas/DESIGN.schema.md +0 -253
  107. package/templates/awa/.awa/.agent/schemas/EXAMPLES.schema.md +0 -51
  108. package/templates/awa/.awa/.agent/schemas/FEAT.schema.md +0 -61
  109. package/templates/awa/.awa/.agent/schemas/PLAN.schema.md +0 -8
  110. package/templates/awa/.awa/.agent/schemas/README.schema.md +0 -133
  111. package/templates/awa/.awa/.agent/schemas/REQ.schema.md +0 -125
  112. package/templates/awa/.awa/.agent/schemas/TASK.schema.md +0 -137
  113. package/templates/awa/.claude/skills/awa-validate-alignment/SKILL.md +0 -3
  114. package/templates/awa/.codex/prompts/awa-validate-alignment.md +0 -3
  115. package/templates/awa/.cursor/rules/awa-validate-alignment.md +0 -8
  116. package/templates/awa/.gemini/commands/awa-validate-alignment.md +0 -3
  117. package/templates/awa/.gemini/skills/awa-validate-alignment/SKILL.md +0 -3
  118. package/templates/awa/.github/prompts/awa.validate-alignment.prompt.md +0 -8
  119. package/templates/awa/.github/skills/awa-validate-alignment/SKILL.md +0 -8
  120. package/templates/awa/.kilocode/skills/awa-validate-alignment/SKILL.md +0 -3
  121. package/templates/awa/.kilocode/workflows/awa-validate-alignment.md +0 -3
  122. package/templates/awa/.opencode/commands/awa-validate-alignment.md +0 -3
  123. package/templates/awa/.opencode/skills/awa-validate-alignment/SKILL.md +0 -3
  124. package/templates/awa/.qwen/commands/awa-validate-alignment.md +0 -3
  125. package/templates/awa/.qwen/skills/awa-validate-alignment/SKILL.md +0 -3
  126. package/templates/awa/.roo/skills/awa-validate-alignment/SKILL.md +0 -3
  127. package/templates/awa/.windsurf/skills/awa-validate-alignment/SKILL.md +0 -3
  128. package/templates/awa/_partials/_skill.awa-validate-alignment.md +0 -6
@@ -0,0 +1,73 @@
1
+ # Run Traceability and Schema Checks
2
+
3
+ ## Bootstrap
4
+
5
+ <tool name="read_file">
6
+ <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
+ <read path=".awa/rules/*.md" required="true" />
8
+ <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
+ </tool>
10
+
11
+ ## User Input
12
+
13
+ ```text
14
+ ${input}
15
+ ```
16
+
17
+ You **MUST** consider the user input before proceeding (if not empty).
18
+
19
+ ## Inputs
20
+
21
+ <file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
22
+ <file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" />
23
+ <file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if relevant" />
24
+ <file type="code_and_tests" path="various" required="if relevant" />
25
+
26
+ ## Action
27
+
28
+ Run `awa check` to validate traceability integrity and schema correctness across the project, then analyze and fix any reported errors.
29
+
30
+ ## Process
31
+
32
+ 1. RUN CHECK
33
+ - Execute `awa check` using the project's package manager
34
+ - Capture the full output (errors and warnings)
35
+
36
+ 2. ANALYZE FINDINGS
37
+ - Parse the output for errors (exit code 1) and warnings
38
+ - Group findings by type:
39
+ - **Orphaned markers**: `@awa-impl`, `@awa-test`, or `@awa-component` referencing IDs not found in specs
40
+ - **Broken cross-references**: IMPLEMENTS/VALIDATES pointing to invalid targets
41
+ - **Schema violations**: Missing sections, wrong heading levels, missing content
42
+ - **Uncovered ACs**: Acceptance criteria without corresponding `@awa-test`
43
+
44
+ 3. FIX ERRORS
45
+ - For orphaned markers: locate the marker in code and either fix the ID or add the missing spec entry
46
+ - For broken cross-references: update the DESIGN spec to reference valid REQ IDs
47
+ - For schema violations: update the spec file to match the expected structure
48
+ - For uncovered ACs: add missing `@awa-test` markers or note as intentionally deferred
49
+
50
+ 4. RE-RUN CHECK
51
+ - Execute `awa check` again to verify all errors are resolved
52
+ - Repeat fix cycle until exit code is 0
53
+
54
+ 5. REPORT
55
+ - Summarize what was found and what was fixed
56
+ - Note any remaining warnings that do not block (exit code 0)
57
+
58
+ ## Outputs
59
+
60
+ <cli>awa check output (text or JSON)</cli>
61
+ - Fixed source code files (corrected markers)
62
+ - Fixed spec files (corrected cross-references or structure)
63
+
64
+ ## Rules
65
+
66
+ You SHALL run `awa check` before making any fixes to establish a baseline.
67
+ You SHALL fix all errors (severity: error) before completing.
68
+ You SHALL re-run `awa check` after fixes to confirm resolution.
69
+ You SHALL NOT remove traceability markers to silence errors — fix the root cause instead.
70
+ You SHOULD address warnings when straightforward, but warnings do not block completion.
71
+ You MAY use `awa check --format json` for structured output when analyzing complex results.
72
+ You MAY use todos and tools as needed.
73
+
@@ -163,5 +163,6 @@ You SHALL use any tools you need to help write and test code (e.g. MCP tools for
163
163
  You MUST add traceability markers (`@awa-component`, `@awa-impl`, `@awa-test`) to all code and tests.
164
164
  You MUST ensure every feature implementation traces to at least one acceptance criterion.
165
165
  You MUST ensure every test file traces to at least one design property.
166
+ You MUST run `awa check` after implementation to verify all traceability markers resolve to spec IDs and no acceptance criteria are left uncovered.
166
167
  You SHALL clarify open points with user.
167
168
  You MAY use todos and tools as needed.
@@ -12,16 +12,16 @@ YOU follow the set of rules defined below, reminding yourself of the rules perio
12
12
  .awa/
13
13
  ├── .agent/
14
14
  │ └── schemas/
15
- │ ├── ARCHITECTURE.schema.md
16
- │ ├── FEAT.schema.md
17
- │ ├── EXAMPLES.schema.md
18
- │ ├── REQ.schema.md
19
- │ ├── DESIGN.schema.md
20
- │ ├── API.schema.md
21
- │ ├── TASK.schema.md
22
- │ ├── PLAN.schema.md
23
- │ ├── README.schema.md
24
- │ └── ALIGN_REPORT.schema.md
15
+ │ ├── ARCHITECTURE.schema.yaml
16
+ │ ├── FEAT.schema.yaml
17
+ │ ├── EXAMPLES.schema.yaml
18
+ │ ├── REQ.schema.yaml
19
+ │ ├── DESIGN.schema.yaml
20
+ │ ├── API.schema.yaml
21
+ │ ├── TASK.schema.yaml
22
+ │ ├── PLAN.schema.yaml
23
+ │ ├── README.schema.yaml
24
+ │ └── ALIGN_REPORT.schema.yaml
25
25
  ├── specs/
26
26
  │ ├── ARCHITECTURE.md
27
27
  │ ├── FEAT-{CODE}-{feature-name}.md
@@ -97,4 +97,18 @@ Any file exceeding 500 lines MUST be split logically into multiple files unless
97
97
  - Reference, Don't Duplicate: Use IDs (e.g., `DIFF-1.1_AC-1`) or other references. Never restate content
98
98
  - Trace Everything: Explicit links between artifacts
99
99
  </core_principles>
100
+
101
+ <awa_cli_invocation>
102
+ 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:
103
+ - npm/npx: `npx awa <command>`
104
+ - yarn: `yarn exec awa <command>`
105
+ - pnpm: `pnpm exec awa <command>`
106
+ - bun: `bunx awa <command>`
107
+ All `awa` commands in these instructions assume this resolution.
108
+ </awa_cli_invocation>
109
+
110
+ <validation>
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
+ You SHALL run `awa check` (without --spec-only) after implementing code and tests to verify full traceability coverage.
113
+ </validation>
100
114
  </awa>
@@ -6,8 +6,8 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
- <read path=".awa/.agent/schemas/DESIGN.schema.md" required="true" error="on not found" />
10
- <read path=".awa/.agent/schemas/REQ.schema.md" optional="true" />
9
+ <read path=".awa/.agent/schemas/DESIGN.schema.yaml" required="true" error="on not found" />
10
+ <read path=".awa/.agent/schemas/REQ.schema.yaml" optional="true" />
11
11
  </tool>
12
12
 
13
13
  ## User Input
@@ -50,6 +50,7 @@ You SHALL consider edge cases, UX, technical constraints, success criteria.
50
50
  You MUST identify areas where research is needed based on the feature requirements.
51
51
  You MUST conduct research and build up context in the conversation thread.
52
52
  You SHALL ensure the 3-letter {CODE} used in the filename is unique within the project.
53
+ You SHALL ensure IMPLEMENTS and VALIDATES cross-references in design components resolve to real requirement IDs and AC IDs.
53
54
  You SHALL support reverse workflow: deriving design from existing code when requested.
54
55
  You SHALL clarify open points with user.
55
56
  You MAY use todos and tools as needed.
@@ -6,7 +6,7 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
- <read path=".awa/.agent/schemas/README.schema.md" required="true" error="on not found" />
9
+ <read path=".awa/.agent/schemas/README.schema.yaml" required="true" error="on not found" />
10
10
  </tool>
11
11
 
12
12
  ## User Input
@@ -6,7 +6,7 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="if exists" />
9
- <read path=".awa/.agent/schemas/EXAMPLES.schema.md" required="true" error="on not found" />
9
+ <read path=".awa/.agent/schemas/EXAMPLES.schema.yaml" required="true" error="on not found" />
10
10
  </tool>
11
11
 
12
12
  ## User Input
@@ -6,7 +6,7 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
- <read path=".awa/.agent/schemas/FEAT.schema.md" required="true" error="on not found" />
9
+ <read path=".awa/.agent/schemas/FEAT.schema.yaml" required="true" error="on not found" />
10
10
  </tool>
11
11
 
12
12
  ## User Input
@@ -6,7 +6,7 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
- <read path=".awa/.agent/schemas/PLAN.schema.md" required="true" error="on not found" />
9
+ <read path=".awa/.agent/schemas/PLAN.schema.yaml" required="true" error="on not found" />
10
10
  </tool>
11
11
 
12
12
  ## User Input
@@ -39,6 +39,7 @@ Refactor the specified cod or docs as instructed, following awa conventions.
39
39
 
40
40
  You SHALL preserve existing behavior unless explicitly asked to change it.
41
41
  You SHALL maintain all traceability markers (@awa-component, @awa-impl, @awa-test).
42
+ You SHALL run `awa check` after refactoring to verify all traceability markers are preserved and still resolve correctly.
42
43
  You SHALL ensure tests pass before and after refactoring.
43
44
  You SHALL make incremental changes, not wholesale rewrites.
44
45
  You SHALL NOT change public interfaces without explicit approval.
@@ -6,7 +6,7 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
- <read path=".awa/.agent/schemas/REQ.schema.md" required="true" error="on not found" />
9
+ <read path=".awa/.agent/schemas/REQ.schema.yaml" required="true" error="on not found" />
10
10
  </tool>
11
11
 
12
12
  ## User Input
@@ -45,6 +45,7 @@ You SHALL consider edge cases, UX, technical constraints, success criteria.
45
45
  You SHALL ensure the 3-letter {CODE} used in the filename is unique within the project.
46
46
  You SHOULD focus on requirements which will later be turned into a design.
47
47
  You SHOULD keep requirements at a manageable level of detail.
48
+ You SHALL ensure requirement IDs and AC IDs follow the format defined in the traceability chain (e.g. `{CODE}-{n}`, `{CODE}-{n}_AC-{m}`, `{CODE}-{n}.{p}_AC-{m}`).
48
49
  You SHALL support reverse workflow: deriving requirements from existing code when requested.
49
50
  You SHALL clarify open points with user.
50
51
  You MAY use todos and tools as needed.
@@ -6,9 +6,9 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
- <read path=".awa/.agent/schemas/DESIGN.schema.md" optional="true" />
10
- <read path=".awa/.agent/schemas/REQ.schema.md" optional="true" />
11
- <read path=".awa/.agent/schemas/TASK.schema.md" required="true" error="on not found" />
9
+ <read path=".awa/.agent/schemas/DESIGN.schema.yaml" optional="true" />
10
+ <read path=".awa/.agent/schemas/REQ.schema.yaml" optional="true" />
11
+ <read path=".awa/.agent/schemas/TASK.schema.yaml" required="true" error="on not found" />
12
12
  </tool>
13
13
 
14
14
  ## User Input
@@ -6,13 +6,14 @@
6
6
  <read path=".awa/.agent/awa.core.md" required="true" error="on not found" />
7
7
  <read path=".awa/rules/*.md" required="true" />
8
8
  <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
9
- <read path=".awa/.agent/schemas/ARCHITECTURE.schema.md" required="true" error="on not found" />
10
- <read path=".awa/.agent/schemas/FEAT.schema.md" required="true" error="on not found" />
11
- <read path=".awa/.agent/schemas/EXAMPLES.schema.md" required="true" error="on not found" />
12
- <read path=".awa/.agent/schemas/REQ.schema.md" required="true" error="on not found" />
13
- <read path=".awa/.agent/schemas/DESIGN.schema.md" required="true" error="on not found" />
14
- <read path=".awa/.agent/schemas/TASK.schema.md" required="true" error="on not found" />
15
- <read path=".awa/.agent/schemas/PLAN.schema.md" required="true" error="on not found" />
9
+ <read path=".awa/.agent/schemas/ARCHITECTURE.schema.yaml" required="true" error="on not found" />
10
+ <read path=".awa/.agent/schemas/FEAT.schema.yaml" required="true" error="on not found" />
11
+ <read path=".awa/.agent/schemas/EXAMPLES.schema.yaml" required="true" error="on not found" />
12
+ <read path=".awa/.agent/schemas/REQ.schema.yaml" required="true" error="on not found" />
13
+ <read path=".awa/.agent/schemas/DESIGN.schema.yaml" required="true" error="on not found" />
14
+ <read path=".awa/.agent/schemas/TASK.schema.yaml" required="true" error="on not found" />
15
+ <read path=".awa/.agent/schemas/PLAN.schema.yaml" required="true" error="on not found" />
16
+ <read path=".awa/.agent/schemas/ALIGN_REPORT.schema.yaml" required="true" error="on not found" />
16
17
  </tool>
17
18
 
18
19
  ## User Input
@@ -33,6 +34,7 @@ You **MUST** consider the user input before proceeding (if not empty).
33
34
  <file type="api" path=".awa/specs/API-{CODE}-{feature-name}.md" required="if exists" />
34
35
  <file type="tasks" path=".awa/tasks/TASK-{CODE}-{feature-name}-{nnn}.md" required="if exists" />
35
36
  <file type="plan" path=".awa/plans/PLAN-{nnn}-{plan-name}.md" required="if exists" />
37
+ <file type="align_report" path=".awa/alignment/ALIGN-{x}-WITH-{y}-{nnn}.md" required="if exists" />
36
38
  <file type="code" required="if relevant" />
37
39
 
38
40
 
@@ -41,11 +43,10 @@ You **MUST** consider the user input before proceeding (if not empty).
41
43
  Upgrade the specified specs to conform to their schemas and traceability rules.
42
44
 
43
45
  1) ORIENT: Confirm which artifacts to upgrade; clarify missing targets.
44
- 2) AUDIT: Compare each document to its schema; rely on the schema for section structure, required/optional fields, and prohibited patterns.
45
- 3) ALIGN: Update IDs and code refs to match schema patterns and current agent/code context (requirements, criteria, properties, tasks, components, trace markers). Adjust content to satisfy schema expectations.
46
- 4) TRACEABILITY: Preserve and update code ref markers and any trace matrices when IDs change.
47
- 5) VALIDATE: Re-scan against schemas; avoid empty placeholders; keep files under 500 lines.
48
- 6) REPORT: Summarize changes and remaining questions before finalizing.
46
+ 2) CHECK: Run `awa check` in the terminal to identify schema violations and traceability errors across all target files. Parse the output to build a list of findings to fix.
47
+ 3) FIX: For each reported error, edit the file to resolve the violation fix section structure, heading levels, missing required content, prohibited patterns, and broken trace IDs.
48
+ 4) RECHECK: Run `awa check` again to verify all errors are resolved. Repeat FIX → RECHECK until the check passes cleanly (warnings and info findings are acceptable).
49
+ 5) REPORT: Summarize changes and remaining questions before finalizing.
49
50
 
50
51
  ## Outputs
51
52
 
@@ -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 | — |
@@ -0,0 +1,7 @@
1
+ features = ["claude"]
2
+ expected-files = [
3
+ "CLAUDE.md",
4
+ ".claude/agents/awa.md",
5
+ ".claude/skills/awa-code/SKILL.md",
6
+ ".awa/.agent/awa.core.md",
7
+ ]
@@ -0,0 +1,6 @@
1
+ features = ["copilot"]
2
+ expected-files = [
3
+ ".github/agents/awa.agent.md",
4
+ ".github/skills/awa-code/SKILL.md",
5
+ ".awa/.agent/awa.core.md",
6
+ ]
@@ -1,3 +0,0 @@
1
- <% if (it.features.includes('agy')) { %>
2
- <%~ include('_partials/_skill.awa-validate-alignment.md', it) %>
3
- <% } %>
@@ -1,3 +0,0 @@
1
- <% if (it.features.includes('agy')) { %>
2
- <%~ include('_partials/_cmd.awa-validate-alignment.md', it) %>
3
- <% } %>
@@ -1,3 +0,0 @@
1
- <% if (it.features.includes('codex')) { %>
2
- <%~ include('_partials/_skill.awa-validate-alignment.md', it) %>
3
- <% } %>