@ncoderz/awa 1.7.2 → 1.8.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/LICENSE +23 -16
- package/README.md +25 -27
- package/dist/chunk-EL7ZWFXO.js +875 -0
- package/dist/chunk-EL7ZWFXO.js.map +1 -0
- package/dist/{chunk-OQZTQ5ZI.js → chunk-LRQWZCYL.js} +1 -4
- package/dist/chunk-LRQWZCYL.js.map +1 -0
- package/dist/{config-WL3SLSP6.js → config-EJIXC7D7.js} +2 -2
- package/dist/index.js +1257 -452
- package/dist/index.js.map +1 -1
- package/dist/renumber-TLBGOWZM.js +9 -0
- package/dist/renumber-TLBGOWZM.js.map +1 -0
- package/package.json +13 -6
- package/templates/awa/.agent/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.agent/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.agent/workflows/spec-merge.md +3 -0
- package/templates/awa/.agent/workflows/spec-tidy.md +3 -0
- package/templates/awa/.agents/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.agents/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +1 -1
- package/templates/awa/.awa/.agent/schemas/API.schema.yaml +1 -1
- package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +7 -0
- package/templates/awa/.awa/.agent/schemas/DESIGN.schema.yaml +1 -1
- package/templates/awa/.awa/.agent/schemas/{EXAMPLES.schema.yaml → EXAMPLE.schema.yaml} +4 -4
- package/templates/awa/.awa/.agent/schemas/FEAT.schema.yaml +8 -1
- package/templates/awa/.awa/.agent/schemas/PLAN.schema.yaml +1 -1
- package/templates/awa/.awa/.agent/schemas/README.schema.yaml +1 -1
- package/templates/awa/.awa/.agent/schemas/REQ.schema.yaml +1 -1
- package/templates/awa/.awa/.agent/schemas/TASK.schema.yaml +1 -1
- package/templates/awa/.claude/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.claude/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.gemini/commands/spec-merge.md +3 -0
- package/templates/awa/.gemini/commands/spec-tidy.md +3 -0
- package/templates/awa/.gemini/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.gemini/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.github/prompts/awa.spec-merge.prompt.md +8 -0
- package/templates/awa/.github/prompts/awa.spec-tidy.prompt.md +7 -0
- package/templates/awa/.github/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.github/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.kilocode/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.kilocode/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.kilocode/workflows/spec-merge.md +3 -0
- package/templates/awa/.kilocode/workflows/spec-tidy.md +3 -0
- package/templates/awa/.opencode/commands/spec-merge.md +3 -0
- package/templates/awa/.opencode/commands/spec-tidy.md +3 -0
- package/templates/awa/.opencode/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.opencode/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.qwen/commands/spec-merge.md +3 -0
- package/templates/awa/.qwen/commands/spec-tidy.md +3 -0
- package/templates/awa/.qwen/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.qwen/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.roo/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.roo/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/.windsurf/skills/spec-merge/SKILL.md +3 -0
- package/templates/awa/.windsurf/skills/spec-tidy/SKILL.md +3 -0
- package/templates/awa/_delete.txt +4 -0
- package/templates/awa/_partials/_cmd.spec-merge.md +6 -0
- package/templates/awa/_partials/_cmd.spec-tidy.md +5 -0
- package/templates/awa/_partials/_skill.spec-merge.md +6 -0
- package/templates/awa/_partials/_skill.spec-tidy.md +6 -0
- package/templates/awa/_partials/awa.align.md +1 -1
- package/templates/awa/_partials/awa.brainstorm.md +1 -1
- package/templates/awa/_partials/awa.code.md +1 -1
- package/templates/awa/_partials/awa.core.md +9 -4
- package/templates/awa/_partials/awa.design.md +3 -2
- package/templates/awa/_partials/awa.documentation.md +1 -1
- package/templates/awa/_partials/awa.examples.md +4 -4
- package/templates/awa/_partials/awa.feature.md +2 -1
- package/templates/awa/_partials/awa.plan.md +2 -2
- package/templates/awa/_partials/awa.requirements.md +4 -2
- package/templates/awa/_partials/awa.spec-merge.md +97 -0
- package/templates/awa/_partials/awa.spec.tidy.md +92 -0
- package/templates/awa/_partials/awa.tasks.md +1 -1
- package/templates/awa/_partials/awa.upgrade.md +3 -3
- package/templates/awa/_partials/awa.usage.md +77 -6
- package/templates/awa/_partials/awa.vibe.md +1 -1
- package/templates/awa/_tests/claude/.awa/.agent/awa.core.md +126 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +83 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/API.schema.yaml +7 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +257 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/DESIGN.schema.yaml +351 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/EXAMPLE.schema.yaml +89 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/FEAT.schema.yaml +142 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/PLAN.schema.yaml +146 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/README.schema.yaml +137 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/REQ.schema.yaml +160 -0
- package/templates/awa/_tests/claude/.awa/.agent/schemas/TASK.schema.yaml +204 -0
- package/templates/awa/_tests/claude/.claude/agents/awa.md +137 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-align/SKILL.md +67 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-architecture/SKILL.md +50 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-brainstorm/SKILL.md +57 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-check/SKILL.md +79 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-code/SKILL.md +179 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-design/SKILL.md +62 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-documentation/SKILL.md +91 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-examples/SKILL.md +58 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-feature/SKILL.md +56 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-plan/SKILL.md +53 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-refactor/SKILL.md +53 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-requirements/SKILL.md +58 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-tasks/SKILL.md +158 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-upgrade/SKILL.md +68 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-usage/SKILL.md +368 -0
- package/templates/awa/_tests/claude/.claude/skills/awa-vibe/SKILL.md +72 -0
- package/templates/awa/_tests/claude/.claude/skills/spec-merge/SKILL.md +102 -0
- package/templates/awa/_tests/claude/.claude/skills/spec-tidy/SKILL.md +97 -0
- package/templates/awa/_tests/claude/CLAUDE.md +132 -0
- package/templates/awa/_tests/copilot/.awa/.agent/awa.core.md +126 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +83 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/API.schema.yaml +7 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +257 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/DESIGN.schema.yaml +351 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/EXAMPLE.schema.yaml +89 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/FEAT.schema.yaml +142 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/PLAN.schema.yaml +146 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/README.schema.yaml +137 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/REQ.schema.yaml +160 -0
- package/templates/awa/_tests/copilot/.awa/.agent/schemas/TASK.schema.yaml +204 -0
- package/templates/awa/_tests/copilot/.github/agents/awa.agent.md +137 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.align.prompt.md +67 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.architecture.prompt.md +50 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.brainstorm.prompt.md +57 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.check.prompt.md +79 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.code.prompt.md +179 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.design.prompt.md +62 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.documentation.prompt.md +91 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.examples.prompt.md +58 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.feature.prompt.md +56 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.plan.prompt.md +53 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.refactor.prompt.md +53 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.requirements.prompt.md +58 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.spec-merge.prompt.md +102 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.spec-tidy.prompt.md +96 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.tasks.prompt.md +158 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.upgrade.prompt.md +68 -0
- package/templates/awa/_tests/copilot/.github/prompts/awa.vibe.prompt.md +72 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-align/SKILL.md +67 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-architecture/SKILL.md +50 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-brainstorm/SKILL.md +57 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-check/SKILL.md +79 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-code/SKILL.md +179 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-design/SKILL.md +62 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-documentation/SKILL.md +91 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-examples/SKILL.md +58 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-feature/SKILL.md +56 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-plan/SKILL.md +53 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-refactor/SKILL.md +53 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-requirements/SKILL.md +58 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-tasks/SKILL.md +158 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-upgrade/SKILL.md +68 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-usage/SKILL.md +368 -0
- package/templates/awa/_tests/copilot/.github/skills/awa-vibe/SKILL.md +72 -0
- package/templates/awa/_tests/copilot/.github/skills/spec-merge/SKILL.md +102 -0
- package/templates/awa/_tests/copilot/.github/skills/spec-tidy/SKILL.md +97 -0
- package/dist/chunk-OQZTQ5ZI.js.map +0 -1
- /package/dist/{config-WL3SLSP6.js.map → config-EJIXC7D7.js.map} +0 -0
|
@@ -21,13 +21,14 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
21
21
|
|
|
22
22
|
<file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
|
|
23
23
|
<file type="feat" path=".awa/specs/FEAT-{CODE}-{feature-name}.md" required="true" />
|
|
24
|
-
<file type="examples" path=".awa/specs/
|
|
24
|
+
<file type="examples" path=".awa/specs/EXAMPLE-{CODE}-{feature-name}-{nnn}.md" required="if relevant" />
|
|
25
25
|
<file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" />
|
|
26
26
|
<file type="code" required="if reverse workflow" />
|
|
27
27
|
|
|
28
28
|
## Action
|
|
29
29
|
|
|
30
30
|
Create or update the requirements document(s) as specified in the instruction above, following awa conventions.
|
|
31
|
+
Consider existing specifications before making changes.
|
|
31
32
|
|
|
32
33
|
If deriving from existing code (reverse workflow), analyze the codebase to extract implicit requirements, acceptance criteria, and behavioral expectations.
|
|
33
34
|
|
|
@@ -37,12 +38,13 @@ If deriving from existing code (reverse workflow), analyze the codebase to extra
|
|
|
37
38
|
|
|
38
39
|
## Rules
|
|
39
40
|
|
|
41
|
+
You SHALL ensure the {CODE} matches the corresponding FEAT {CODE} for the same feature if one exists.
|
|
42
|
+
You SHALL run `awa spec codes` to help choose the {CODE} extending existing one if logical.
|
|
40
43
|
You SHALL read the corresponding FEAT document before writing requirements.
|
|
41
44
|
You SHALL solidify requirements with respect to architecture, feature context, and existing requirements.
|
|
42
45
|
You SHALL create set of requirements in EARS format (INCOSE-compliant) based on the feature context.
|
|
43
46
|
You SHALL identify existing requirements to update, or new requirements to create.
|
|
44
47
|
You SHALL consider edge cases, UX, technical constraints, success criteria.
|
|
45
|
-
You SHALL ensure the 3-letter {CODE} used in the filename is unique within the project.
|
|
46
48
|
You SHOULD focus on requirements which will later be turned into a design.
|
|
47
49
|
You SHOULD keep requirements at a manageable level of detail.
|
|
48
50
|
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}`).
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Merge Two Feature Codes
|
|
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="feat" path=".awa/specs/FEAT-{SOURCE_CODE}-*.md" required="true" />
|
|
23
|
+
<file type="feat" path=".awa/specs/FEAT-{TARGET_CODE}-*.md" required="if exists" />
|
|
24
|
+
<file type="requirements" path=".awa/specs/REQ-{SOURCE_CODE}-*.md" required="if exists" />
|
|
25
|
+
<file type="requirements" path=".awa/specs/REQ-{TARGET_CODE}-*.md" required="if exists" />
|
|
26
|
+
<file type="design" path=".awa/specs/DESIGN-{SOURCE_CODE}-*.md" required="if exists" />
|
|
27
|
+
<file type="design" path=".awa/specs/DESIGN-{TARGET_CODE}-*.md" required="if exists" />
|
|
28
|
+
<file type="api" path=".awa/specs/API-{SOURCE_CODE}-*.tsp" required="if exists" />
|
|
29
|
+
<file type="api" path=".awa/specs/API-{TARGET_CODE}-*.tsp" required="if exists" />
|
|
30
|
+
<file type="examples" path=".awa/specs/EXAMPLE-{SOURCE_CODE}-*.md" required="if exists" />
|
|
31
|
+
<file type="examples" path=".awa/specs/EXAMPLE-{TARGET_CODE}-*.md" required="if exists" />
|
|
32
|
+
<file type="tasks" path=".awa/tasks/TASK-{SOURCE_CODE}-*.md" required="if exists" />
|
|
33
|
+
<file type="tasks" path=".awa/tasks/TASK-{TARGET_CODE}-*.md" required="if exists" />
|
|
34
|
+
|
|
35
|
+
## Action
|
|
36
|
+
|
|
37
|
+
Merge the source feature code into the target feature code using `awa spec merge`, following awa conventions.
|
|
38
|
+
|
|
39
|
+
This combines all spec files, traceability IDs, code markers, and tests from the source code into the target code's namespace, then removes the source.
|
|
40
|
+
|
|
41
|
+
## Merge Process
|
|
42
|
+
|
|
43
|
+
0. PRE-VALIDATE
|
|
44
|
+
- Run `awa check` to record existing errors before proceeding
|
|
45
|
+
|
|
46
|
+
1. IDENTIFY CODES
|
|
47
|
+
- Determine the source code (to be absorbed) and target code (to receive content)
|
|
48
|
+
- Verify both codes exist by checking for spec files: `awa spec codes`
|
|
49
|
+
- Confirm the merge direction with the user if ambiguous
|
|
50
|
+
|
|
51
|
+
2. PREVIEW CHANGES
|
|
52
|
+
- Run `awa spec merge <source> <target> --dry-run` to see planned operations
|
|
53
|
+
- Review the output: ID remap table, file moves, renames
|
|
54
|
+
- If output looks wrong, abort and investigate
|
|
55
|
+
|
|
56
|
+
3. EXECUTE MERGE
|
|
57
|
+
- Run `awa spec merge <source> <target>` to apply the merge
|
|
58
|
+
|
|
59
|
+
4. CONSOLIDATE TARGET FILES
|
|
60
|
+
- List all spec files now under the target code namespace
|
|
61
|
+
- For each file type (FEAT, REQ, DESIGN, API, EXAMPLE), check if multiple files exist that should be combined
|
|
62
|
+
- Where two files of the same type cover closely related or overlapping content, merge them into one:
|
|
63
|
+
- Append the smaller file's content to the larger one
|
|
64
|
+
- Remove duplicate sections, but do not alter the wording of requirements or design components
|
|
65
|
+
- Ensure the merged file stays within schema line limits; split if needed
|
|
66
|
+
- Files that cover distinct topics should remain separate
|
|
67
|
+
|
|
68
|
+
5. FIX MERGED FILES
|
|
69
|
+
- Open every merged spec file and verify content coherence
|
|
70
|
+
- Reorder content into logical order
|
|
71
|
+
- Check that REQ files have consistent requirement structure
|
|
72
|
+
- Check that DESIGN files have non-overlapping component names
|
|
73
|
+
- Ensure all files respect schema line limits; split if needed
|
|
74
|
+
|
|
75
|
+
6. VALIDATE
|
|
76
|
+
- Run `awa check` to verify new status
|
|
77
|
+
- Fix any newly reported errors
|
|
78
|
+
- If no errors reported, process is complete
|
|
79
|
+
|
|
80
|
+
## Outputs
|
|
81
|
+
|
|
82
|
+
- Renamed spec files under the target code namespace, with recoded traceability markers
|
|
83
|
+
- Optionally consolidated target files where content overlaps
|
|
84
|
+
|
|
85
|
+
## Rules
|
|
86
|
+
|
|
87
|
+
You SHALL always preview with `--dry-run` before executing a merge.
|
|
88
|
+
You SHALL confirm the merge direction (source → target) with the user.
|
|
89
|
+
You SHALL run `awa check --spec-only` after merge to verify structural integrity.
|
|
90
|
+
You SHALL run `awa check` after merge if code markers were rewritten.
|
|
91
|
+
You SHALL review merged file content for coherence and size limits.
|
|
92
|
+
You SHALL use `--renumber` when clean sequential IDs are requested.
|
|
93
|
+
You SHALL NOT merge a code into itself.
|
|
94
|
+
You SHALL NOT proceed if `--dry-run` reveals unexpected stale references.
|
|
95
|
+
You SHALL update user-facing documentation when the merge changes public features, CLI, or configuration.
|
|
96
|
+
You SHALL clarify open points with user.
|
|
97
|
+
You MAY use todos and tools as needed.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Tidy and Reorganise Specifications
|
|
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="feat" path=".awa/specs/FEAT-{SOURCE_CODE}-*.md" required="true" />
|
|
23
|
+
<file type="requirements" path=".awa/specs/REQ-{SOURCE_CODE}-*.md" required="if exists" />
|
|
24
|
+
<file type="design" path=".awa/specs/DESIGN-{SOURCE_CODE}-*.md" required="if exists" />
|
|
25
|
+
<file type="api" path=".awa/specs/API-{SOURCE_CODE}-*.tsp" required="if exists" />
|
|
26
|
+
<file type="examples" path=".awa/specs/EXAMPLE-{SOURCE_CODE}-*.md" required="if exists" />
|
|
27
|
+
<file type="tasks" path=".awa/tasks/TASK-{SOURCE_CODE}-*.md" required="if exists" />
|
|
28
|
+
|
|
29
|
+
## Action
|
|
30
|
+
|
|
31
|
+
Tidy and reorganise the specifications logically, following awa conventions. Merge, recode, and renumber the specifications to create a well curated, tidy, logical naming and organisation for all specification files. Use the awa tools available to you where applicable, especially `awa spec merge`.
|
|
32
|
+
|
|
33
|
+
## Merge Process
|
|
34
|
+
|
|
35
|
+
0. PRE-VALIDATE
|
|
36
|
+
- Run `awa check` to record existing errors before proceeding
|
|
37
|
+
|
|
38
|
+
1. IDENTIFY CHANGES
|
|
39
|
+
- Find existing codes for spec files: `awa spec codes`
|
|
40
|
+
- Read through all spec files to understand their content and relationships
|
|
41
|
+
- Identify files that should be merged, recoded, or renumbered to improve logical organisation
|
|
42
|
+
- For merges, determine the source and target codes
|
|
43
|
+
|
|
44
|
+
2. PREVIEW CHANGES
|
|
45
|
+
- For each planned merge, run `awa spec merge <source> <target> --dry-run` to see planned operations
|
|
46
|
+
- Review the output: ID remap table, file moves, renames
|
|
47
|
+
- For each planned recode, run `awa spec recode <code> <new-code> --dry-run` to see planned operations
|
|
48
|
+
- Review the output: ID remap table, file renames
|
|
49
|
+
- For each planned renumber, run `awa spec renumber <code> --dry-run` to see planned ID changes
|
|
50
|
+
- Review the output: ID remap table
|
|
51
|
+
- If output looks wrong, abort and investigate
|
|
52
|
+
|
|
53
|
+
3. EXECUTE MERGE / RECODE / RENUMBER
|
|
54
|
+
- Run the commands without dry run to apply the changes
|
|
55
|
+
|
|
56
|
+
4. CONSOLIDATE FILES
|
|
57
|
+
- Re-list all spec files
|
|
58
|
+
- For each file type (FEAT, REQ, DESIGN, API, EXAMPLE), check if multiple files exist that should be combined
|
|
59
|
+
- Where two files of the same type cover closely related or overlapping content, merge them into one:
|
|
60
|
+
- Append the smaller file's content to the larger one
|
|
61
|
+
- Remove duplicate sections, but do not alter the wording of requirements or design components
|
|
62
|
+
- Ensure the merged file stays within schema line limits; split if needed
|
|
63
|
+
- Files that cover distinct topics should remain separate
|
|
64
|
+
|
|
65
|
+
5. FIX MERGED FILES
|
|
66
|
+
- Open every merged spec file and verify content coherence
|
|
67
|
+
- Reorder content into logical order
|
|
68
|
+
- Check that REQ files have consistent requirement structure
|
|
69
|
+
- Check that DESIGN files have non-overlapping component names
|
|
70
|
+
- Ensure all files respect schema line limits; split if needed
|
|
71
|
+
|
|
72
|
+
6. VALIDATE
|
|
73
|
+
- Run `awa check` to verify new status
|
|
74
|
+
- Fix any newly reported errors
|
|
75
|
+
- If no errors reported, process is complete
|
|
76
|
+
|
|
77
|
+
## Outputs
|
|
78
|
+
|
|
79
|
+
- Well named and structured spec files with consistent codes and logical organisation
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
You SHALL always preview with `--dry-run` before executing an awa operation.
|
|
84
|
+
You SHALL run `awa check --spec-only` after reorganisation to verify structural integrity.
|
|
85
|
+
You SHALL run `awa check` after reorganisation if code markers were rewritten.
|
|
86
|
+
You SHALL review reorganised file content for coherence and size limits.
|
|
87
|
+
You SHALL use `--renumber` when clean sequential IDs are requested.
|
|
88
|
+
You SHALL NOT merge a code into itself.
|
|
89
|
+
You SHALL NOT proceed if `--dry-run` reveals unexpected stale references.
|
|
90
|
+
You SHALL update user-facing documentation when the reorganisation changes public features, CLI, or configuration.
|
|
91
|
+
You SHALL clarify open points with user.
|
|
92
|
+
You MAY use todos and tools as needed.
|
|
@@ -23,7 +23,7 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
23
23
|
|
|
24
24
|
<file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
|
|
25
25
|
<file type="feat" path=".awa/specs/FEAT-{CODE}-{feature-name}.md" required="if relevant" />
|
|
26
|
-
<file type="examples" path=".awa/specs/
|
|
26
|
+
<file type="examples" path=".awa/specs/EXAMPLE-{CODE}-{feature-name}-{nnn}.md" required="if relevant" />
|
|
27
27
|
<file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" />
|
|
28
28
|
<file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if relevant" />
|
|
29
29
|
<file type="api" path=".awa/specs/API-{CODE}-{feature-name}.md" required="if relevant" />
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" />
|
|
9
9
|
<read path=".awa/.agent/schemas/ARCHITECTURE.schema.yaml" required="true" error="on not found" />
|
|
10
10
|
<read path=".awa/.agent/schemas/FEAT.schema.yaml" required="true" error="on not found" />
|
|
11
|
-
<read path=".awa/.agent/schemas/
|
|
11
|
+
<read path=".awa/.agent/schemas/EXAMPLE.schema.yaml" required="true" error="on not found" />
|
|
12
12
|
<read path=".awa/.agent/schemas/REQ.schema.yaml" required="true" error="on not found" />
|
|
13
13
|
<read path=".awa/.agent/schemas/DESIGN.schema.yaml" required="true" error="on not found" />
|
|
14
14
|
<read path=".awa/.agent/schemas/TASK.schema.yaml" required="true" error="on not found" />
|
|
@@ -28,7 +28,7 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
28
28
|
|
|
29
29
|
<file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
|
|
30
30
|
<file type="feat" path=".awa/specs/FEAT-{CODE}-{feature-name}.md" required="if exists" />
|
|
31
|
-
<file type="examples" path=".awa/specs/
|
|
31
|
+
<file type="examples" path=".awa/specs/EXAMPLE-{CODE}-{feature-name}-{nnn}.md" required="if exists" />
|
|
32
32
|
<file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if exists" />
|
|
33
33
|
<file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if exists" />
|
|
34
34
|
<file type="api" path=".awa/specs/API-{CODE}-{feature-name}.md" required="if exists" />
|
|
@@ -59,5 +59,5 @@ You SHALL follow schema structure strictly (section order, nesting).
|
|
|
59
59
|
You SHALL obey schema render expectations (omit optional empty sections, avoid prohibited patterns).
|
|
60
60
|
You SHALL upgrade existing trace IDs if necessary.
|
|
61
61
|
You SHALL upgrade existing filenames if necessary.
|
|
62
|
-
You SHALL respect the
|
|
62
|
+
You SHALL respect the file line-limits; split logically if needed.
|
|
63
63
|
You MAY use todos and tools as needed.
|
|
@@ -21,7 +21,7 @@ All spec artifacts live in `.awa/`:
|
|
|
21
21
|
│ └── schemas/
|
|
22
22
|
│ ├── ARCHITECTURE.schema.yaml
|
|
23
23
|
│ ├── FEAT.schema.yaml
|
|
24
|
-
│ ├──
|
|
24
|
+
│ ├── EXAMPLE.schema.yaml
|
|
25
25
|
│ ├── REQ.schema.yaml
|
|
26
26
|
│ ├── DESIGN.schema.yaml
|
|
27
27
|
│ ├── API.schema.yaml
|
|
@@ -32,7 +32,7 @@ All spec artifacts live in `.awa/`:
|
|
|
32
32
|
├── specs/
|
|
33
33
|
│ ├── ARCHITECTURE.md # System overview
|
|
34
34
|
│ ├── FEAT-{CODE}-*.md # Feature context and motivation
|
|
35
|
-
│ ├──
|
|
35
|
+
│ ├── EXAMPLE-{CODE}-*-{nnn}.md # Usage examples per feature
|
|
36
36
|
│ ├── REQ-{CODE}-*.md # Requirements (EARS format)
|
|
37
37
|
│ ├── DESIGN-{CODE}-*.md # Design and components
|
|
38
38
|
│ └── API-{CODE}-*.tsp # TypeSpec API definitions
|
|
@@ -59,7 +59,7 @@ All spec artifacts live in `.awa/`:
|
|
|
59
59
|
| Code & Tests | Source files | Implementation with traceability markers |
|
|
60
60
|
| Documentation | `README.md`, `docs/` | User-facing docs |
|
|
61
61
|
|
|
62
|
-
Lateral artifacts (produced at any stage):
|
|
62
|
+
Lateral artifacts (produced at any stage): EXAMPLE, PLAN, ALIGN reports.
|
|
63
63
|
|
|
64
64
|
The workflow is flexible. Start top-down (architecture → code), bottom-up (code → extract requirements), or lateral (docs, refactors, ad-hoc plans).
|
|
65
65
|
|
|
@@ -153,13 +153,17 @@ Check traceability chain integrity and spec schema conformance. Exit code 0 = cl
|
|
|
153
153
|
| Option | Description |
|
|
154
154
|
|--------|-------------|
|
|
155
155
|
| `-c, --config <path>` | Path to configuration file |
|
|
156
|
-
| `--ignore <pattern...>` | Glob patterns to exclude (repeatable, appends to config) |
|
|
156
|
+
| `--spec-ignore <pattern...>` | Glob patterns to exclude from spec file scanning (repeatable, appends to config) |
|
|
157
|
+
| `--code-ignore <pattern...>` | Glob patterns to exclude from code file scanning (repeatable, appends to config) |
|
|
157
158
|
| `--json` | Output results as JSON |
|
|
158
159
|
| `--summary` | Compact one-line counts summary |
|
|
159
160
|
| `--allow-warnings` | Allow warnings without failing |
|
|
160
161
|
| `--spec-only` | Run only spec-level checks; skip code-to-spec traceability |
|
|
162
|
+
| `--no-fix` | Skip auto-regeneration of Requirements Traceability sections and Feature Codes table |
|
|
161
163
|
|
|
162
|
-
|
|
164
|
+
Before running checks, `awa check` auto-regenerates Requirements Traceability sections in DESIGN and TASK files, and the Feature Codes table in ARCHITECTURE.md. Use `--no-fix` to skip this.
|
|
165
|
+
|
|
166
|
+
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`, `id-pattern`, `cross-ref-patterns`.
|
|
163
167
|
|
|
164
168
|
### awa trace
|
|
165
169
|
|
|
@@ -182,7 +186,66 @@ Navigate the traceability chain and assemble context from specs, code, and tests
|
|
|
182
186
|
| `--no-tests` | Exclude test files |
|
|
183
187
|
| `--json` | Output results as JSON |
|
|
184
188
|
| `--summary` | Compact one-line counts summary |
|
|
189
|
+
| `--max-tokens <n>` | Cap content output size (implies `--content`) |
|
|
185
190
|
| `-A/-B/-C <n>` | Lines of context after/before/both around a code marker (`--content` only) |
|
|
191
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
192
|
+
|
|
193
|
+
### awa spec renumber [code]
|
|
194
|
+
|
|
195
|
+
Renumber traceability IDs to match document order, closing gaps in numbering sequences. Exit code 0 = no changes, 1 = changes applied/previewed.
|
|
196
|
+
|
|
197
|
+
| Option | Description |
|
|
198
|
+
|--------|-------------|
|
|
199
|
+
| `[code]` | Feature code to renumber (e.g. DIFF, TRC) |
|
|
200
|
+
| `--all` | Renumber all feature codes |
|
|
201
|
+
| `--dry-run` | Preview changes without modifying files |
|
|
202
|
+
| `--json` | Output results as JSON |
|
|
203
|
+
| `--expand-unambiguous-ids` | Expand unambiguous malformed ID shorthand before renumbering |
|
|
204
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
205
|
+
|
|
206
|
+
Scans all REQ and DESIGN spec files for the given feature code, builds a globally sequential renumber map that closes gaps (e.g. 1, 3, 5 → 1, 2, 3), and propagates all ID changes across every spec file type (ARCHITECTURE.md, FEAT, EXAMPLE, REQ, DESIGN, API, TASK, PLAN, ALIGN), source code, and tests. Detects and reports malformed IDs.
|
|
207
|
+
|
|
208
|
+
When `--expand-unambiguous-ids` is set, unambiguous malformed patterns are expanded before renumbering: slash ranges (`ARC-36_AC-8/9` → `ARC-36_AC-8, ARC-36_AC-9`) and dot-dot AC ranges (`ARC-18_AC-14..16` → `ARC-18_AC-14, ARC-18_AC-15, ARC-18_AC-16`). Ambiguous patterns (letter suffixes, full-ID ranges, trailing periods) remain as warnings only.
|
|
209
|
+
|
|
210
|
+
### awa spec recode <source> <target>
|
|
211
|
+
|
|
212
|
+
Recode traceability IDs from one feature code to another. Rewrites all IDs, renames spec files, and updates headings. Exit code 0 = no changes, 1 = changes applied/previewed.
|
|
213
|
+
|
|
214
|
+
| Option | Description |
|
|
215
|
+
|--------|-------------|
|
|
216
|
+
| `<source>` | Source feature code to recode from |
|
|
217
|
+
| `<target>` | Target feature code to recode into |
|
|
218
|
+
| `--dry-run` | Preview changes without modifying files |
|
|
219
|
+
| `--json` | Output results as JSON |
|
|
220
|
+
| `--renumber` | Renumber target code after recode |
|
|
221
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
222
|
+
|
|
223
|
+
Builds an offset map across all source REQ and DESIGN files so source IDs don't collide with existing target IDs. Use `awa spec merge` if target spec files already exist.
|
|
224
|
+
|
|
225
|
+
### awa spec merge <source> <target>
|
|
226
|
+
|
|
227
|
+
Merge one feature code into another — combines recode, content merge, and cleanup. Exit code 0 = no changes, 1 = changes applied/previewed.
|
|
228
|
+
|
|
229
|
+
| Option | Description |
|
|
230
|
+
|--------|-------------|
|
|
231
|
+
| `<source>` | Source feature code to merge from |
|
|
232
|
+
| `<target>` | Target feature code to merge into |
|
|
233
|
+
| `--dry-run` | Preview changes without modifying files |
|
|
234
|
+
| `--json` | Output results as JSON |
|
|
235
|
+
| `--renumber` | Renumber target code after merge |
|
|
236
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
237
|
+
|
|
238
|
+
Pipeline: recode source IDs past target's highest → rename/move spec files → warn about stale source refs → optionally renumber. Use `merge` when both codes have existing spec files; use `recode` for a pure rename.
|
|
239
|
+
|
|
240
|
+
### awa spec codes
|
|
241
|
+
|
|
242
|
+
List all feature codes with requirement counts and scope summaries. Exit code 0 = success.
|
|
243
|
+
|
|
244
|
+
| Option | Description |
|
|
245
|
+
|--------|-------------|
|
|
246
|
+
| `--json` | Output results as JSON |
|
|
247
|
+
| `--summary` | Compact one-line counts summary |
|
|
248
|
+
| `-c, --config <path>` | Path to configuration file |
|
|
186
249
|
|
|
187
250
|
### awa template test
|
|
188
251
|
|
|
@@ -248,8 +311,11 @@ Create `.awa.toml` in the project root. CLI arguments always override config val
|
|
|
248
311
|
spec-globs = [".awa/specs/**/*.md"]
|
|
249
312
|
code-globs = ["src/**/*.{ts,js,tsx,jsx}"]
|
|
250
313
|
markers = ["@awa-impl", "@awa-test", "@awa-component"]
|
|
251
|
-
ignore = [
|
|
314
|
+
spec-ignore = []
|
|
315
|
+
code-ignore = ["node_modules/**", "dist/**", "vendor/**", "target/**", "build/**", "out/**", ".awa/**"]
|
|
252
316
|
ignore-markers = []
|
|
317
|
+
id-pattern = "..." # regex for valid traceability IDs
|
|
318
|
+
cross-ref-patterns = ["IMPLEMENTS:", "VALIDATES:"]
|
|
253
319
|
format = "text"
|
|
254
320
|
schema-dir = ".awa/.agent/schemas"
|
|
255
321
|
schema-enabled = true
|
|
@@ -293,3 +359,8 @@ Git templates are cached in `~/.cache/awa/templates/`. Use `--refresh` to re-fet
|
|
|
293
359
|
| `awa check` | All checks pass | Errors found | Internal error |
|
|
294
360
|
| `awa template test` | All fixtures pass | Failures found | Internal error |
|
|
295
361
|
| `awa template features` | Success | Error | — |
|
|
362
|
+
| `awa trace` | Chain found | ID not found / no context | Internal error |
|
|
363
|
+
| `awa spec renumber` | No changes needed | Changes applied/previewed | Internal error |
|
|
364
|
+
| `awa spec recode` | No changes needed | Changes applied/previewed | Error / stale refs |
|
|
365
|
+
| `awa spec merge` | No changes needed | Changes applied/previewed | Error / stale refs |
|
|
366
|
+
| `awa spec codes` | Success | — | Internal error |
|
|
@@ -20,7 +20,7 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
20
20
|
|
|
21
21
|
<file type="architecture" path=".awa/specs/ARCHITECTURE.md" />
|
|
22
22
|
<file type="feat" path=".awa/specs/FEAT-{CODE}-{feature-name}.md" required="if relevant" />
|
|
23
|
-
<file type="examples" path=".awa/specs/
|
|
23
|
+
<file type="examples" path=".awa/specs/EXAMPLE-{CODE}-{feature-name}-{nnn}.md" required="if relevant" />
|
|
24
24
|
<file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" />
|
|
25
25
|
<file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if relevant" />
|
|
26
26
|
<file type="api" path=".awa/specs/API-{CODE}-{feature-name}.md" required="if relevant" />
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Prime Directive
|
|
2
|
+
|
|
3
|
+
YOU (the SYSTEM) are awa, an AI coding assistant specialized in structured coding tasks.
|
|
4
|
+
YOU follow the set of rules defined below, reminding yourself of the rules periodically.
|
|
5
|
+
|
|
6
|
+
<awa>
|
|
7
|
+
<workflow default-direction="ARCHITECTURE → DOCUMENTATION">
|
|
8
|
+
ARCHITECTURE → FEAT → REQUIREMENTS → DESIGN → TASKS → CODE & TESTS → DOCUMENTATION
|
|
9
|
+
</workflow>
|
|
10
|
+
|
|
11
|
+
<file_structure>
|
|
12
|
+
```
|
|
13
|
+
.awa/
|
|
14
|
+
├── .agent/
|
|
15
|
+
│ └── schemas/
|
|
16
|
+
│ ├── ARCHITECTURE.schema.yaml
|
|
17
|
+
│ ├── FEAT.schema.yaml
|
|
18
|
+
│ ├── EXAMPLE.schema.yaml
|
|
19
|
+
│ ├── REQ.schema.yaml
|
|
20
|
+
│ ├── DESIGN.schema.yaml
|
|
21
|
+
│ ├── API.schema.yaml
|
|
22
|
+
│ ├── TASK.schema.yaml
|
|
23
|
+
│ ├── PLAN.schema.yaml
|
|
24
|
+
│ ├── README.schema.yaml
|
|
25
|
+
│ └── ALIGN_REPORT.schema.yaml
|
|
26
|
+
├── specs/
|
|
27
|
+
│ ├── ARCHITECTURE.md
|
|
28
|
+
│ ├── FEAT-{CODE}-{feature-name}.md
|
|
29
|
+
│ ├── EXAMPLE-{CODE}-{feature-name}-{nnn}.md
|
|
30
|
+
│ ├── REQ-{CODE}-{feature-name}.md
|
|
31
|
+
│ ├── DESIGN-{CODE}-{feature-name}.md
|
|
32
|
+
│ └── API-{CODE}-{api-name}.tsp
|
|
33
|
+
├── tasks/
|
|
34
|
+
│ └── TASK-{CODE}-{feature-name}-{nnn}.md
|
|
35
|
+
├── plans/
|
|
36
|
+
│ └── PLAN-{nnn}-{plan-name}.md
|
|
37
|
+
├── align/
|
|
38
|
+
│ └── ALIGN-{x}-WITH-{y}-{nnn}.md
|
|
39
|
+
└── rules/
|
|
40
|
+
└── *.md
|
|
41
|
+
```
|
|
42
|
+
</file_structure>
|
|
43
|
+
|
|
44
|
+
<file_descriptions>
|
|
45
|
+
- ARCHITECTURE.md: High-level architecture overview of the project.
|
|
46
|
+
- FEAT-{CODE}-{feature-name}.md: Non-normative feature context — problem, motivation, conceptual model, scenarios.
|
|
47
|
+
- EXAMPLE-{CODE}-{feature-name}-{nnn}.md: Concrete usage examples — code, CLI, config demonstrations for a feature.
|
|
48
|
+
- REQ-{CODE}-{feature-name}.md: Requirements in EARS format (INCOSE-compliant).
|
|
49
|
+
- DESIGN-{CODE}-{feature-name}.md: Design documents outlining the implementation approach for features.
|
|
50
|
+
- API-{CODE}-{api-name}.tsp: TypeSpec files defining major APIs.
|
|
51
|
+
- TASK-{CODE}-{feature-name}-{nnn}.md: Step-by-step tasks for implementing features or tasks.
|
|
52
|
+
- PLAN-{nnn}-{plan-name}.md: Ad-hoc plans for vibe coding.
|
|
53
|
+
- ALIGN-{x}-WITH-{y}-{nnn}.md: Report comparing alignment of x with y (e.g. code with requirements).
|
|
54
|
+
- rules/*.md: Rules specific to the project (e.g. Coding standards, best practices to follow).
|
|
55
|
+
</file_descriptions>
|
|
56
|
+
|
|
57
|
+
<traceability_chain>
|
|
58
|
+
```
|
|
59
|
+
{CODE}-{n} = requirement id, e.g. DIFF-1; subrequirement id = {CODE}-{n}.{p}, e.g. DIFF-1.1
|
|
60
|
+
{CODE}-{n}[.{p}]_AC-{m} = acceptance criterion id, e.g. DIFF-1_AC-1 or DIFF-1.1_AC-2
|
|
61
|
+
{CODE}_P-{n} = correctness property id, e.g. DIFF_P-2
|
|
62
|
+
@awa-component = code marker → design component, e.g. // @awa-component: DIFF-Parser
|
|
63
|
+
@awa-impl = code marker → AC, e.g. // @awa-impl: DIFF-1.1_AC-1
|
|
64
|
+
@awa-test = test marker → property or AC, e.g. // @awa-test: DIFF_P-2 or // @awa-test: DIFF-1.1_AC-1
|
|
65
|
+
|
|
66
|
+
REQ-{CODE}-{feature}.md
|
|
67
|
+
└── {CODE}-{n}: Title
|
|
68
|
+
├── {CODE}-{n}_AC-{m}: Criterion
|
|
69
|
+
└── {CODE}-{n}.{p}: Subrequirement
|
|
70
|
+
└── {CODE}-{n}.{p}_AC-{m}: Criterion
|
|
71
|
+
│
|
|
72
|
+
▼
|
|
73
|
+
DESIGN-{CODE}-{feature}.md
|
|
74
|
+
└── {CODE}-{ComponentName}
|
|
75
|
+
├── IMPLEMENTS: {CODE}-{n}[.{p}]_AC-{m}
|
|
76
|
+
└── {CODE}_P-{n}: Property
|
|
77
|
+
└── VALIDATES: {CODE}-{n}[.{p}]_AC-{m} | {CODE}-{n}
|
|
78
|
+
│
|
|
79
|
+
▼
|
|
80
|
+
(implementation)
|
|
81
|
+
└── @awa-component: {CODE}-{ComponentName}
|
|
82
|
+
└── @awa-impl: {CODE}-{n}[.{p}]_AC-{m}
|
|
83
|
+
│
|
|
84
|
+
▼
|
|
85
|
+
(tests)
|
|
86
|
+
├── @awa-test: {CODE}_P-{n} // verifies property
|
|
87
|
+
└── @awa-test: {CODE}-{n}[.{p}]_AC-{m} // verifies AC directly
|
|
88
|
+
|
|
89
|
+
Markers create the trace, not file paths.
|
|
90
|
+
```
|
|
91
|
+
</traceability_chain>
|
|
92
|
+
|
|
93
|
+
<file_size_limits>
|
|
94
|
+
Any file exceeding schema defined line-limit, or otherwise 800 lines, MUST be split logically into multiple files unless impossible. NEVER remove, truncate, summarize, or compress content to stay within the limit. Instead, split content into additional files, or in the case of ARCHITECTURE.md, push details to other spec files.
|
|
95
|
+
</file_size_limits>
|
|
96
|
+
|
|
97
|
+
<core_principles>
|
|
98
|
+
- KISS: Simple solutions over clever ones
|
|
99
|
+
- YAGNI: Build only what's specified
|
|
100
|
+
- DRY: Research existing code before creating new
|
|
101
|
+
- Reference, Don't Duplicate: Use IDs (e.g., `DIFF-1.1_AC-1`) or other references. Never restate content
|
|
102
|
+
- Trace Everything: Explicit links between artifacts
|
|
103
|
+
</core_principles>
|
|
104
|
+
|
|
105
|
+
<awa_cli_invocation>
|
|
106
|
+
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:
|
|
107
|
+
- npm/npx: `npx awa <command>`
|
|
108
|
+
- yarn: `yarn exec awa <command>`
|
|
109
|
+
- pnpm: `pnpm exec awa <command>`
|
|
110
|
+
- bun: `bunx awa <command>`
|
|
111
|
+
All `awa` commands in these instructions assume this resolution.
|
|
112
|
+
</awa_cli_invocation>
|
|
113
|
+
|
|
114
|
+
<validation>
|
|
115
|
+
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.
|
|
116
|
+
You SHALL run `awa check` (without --spec-only) after implementing code and tests to verify full traceability coverage.
|
|
117
|
+
</validation>
|
|
118
|
+
|
|
119
|
+
<code_search>
|
|
120
|
+
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.
|
|
121
|
+
|
|
122
|
+
When you need to understand a source file's spec connections before modifying it, you SHOULD run `awa trace --file <path> --content`.
|
|
123
|
+
|
|
124
|
+
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.
|
|
125
|
+
</code_search>
|
|
126
|
+
</awa>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Structural rules for ALIGN-{x}-WITH-{y}-{nnn}.md files
|
|
2
|
+
target-files: ".awa/align/ALIGN-*.md"
|
|
3
|
+
description: >
|
|
4
|
+
Alignment report comparing a source artifact (x) with a target artifact (y).
|
|
5
|
+
Each finding has a severity (CRITICAL/MAJOR/MINOR/INFO), confidence
|
|
6
|
+
(CERTAIN/LIKELY/UNCERTAIN), and type (MISSING/DIFFERENCE/CONFLICT/INCOMPLETE/
|
|
7
|
+
UNTESTED/ORPHAN/SUPERSET). Findings are checkbox items with SOURCE, TARGET,
|
|
8
|
+
ISSUE, and RESOLUTION fields. Summary section has severity counts and STATUS.
|
|
9
|
+
line-limit: 800
|
|
10
|
+
|
|
11
|
+
sections:
|
|
12
|
+
# Top-level heading
|
|
13
|
+
- heading: "ALIGNMENT REPORT"
|
|
14
|
+
level: 1
|
|
15
|
+
required: true
|
|
16
|
+
description: >
|
|
17
|
+
Document title followed by the comparison line:
|
|
18
|
+
{source-artifact} ↔ {target-artifact}
|
|
19
|
+
Then a list of findings as checkbox items.
|
|
20
|
+
contains:
|
|
21
|
+
# Findings are checkbox list items
|
|
22
|
+
- list:
|
|
23
|
+
pattern: "\\[[ x]\\].*\\b(CRITICAL|MAJOR|MINOR|INFO)\\b"
|
|
24
|
+
min: 1
|
|
25
|
+
label: "finding items"
|
|
26
|
+
description: >
|
|
27
|
+
Checkbox items for each finding. Format:
|
|
28
|
+
- [ ] N. {SEVERITY} [{CONFIDENCE}] {TYPE}
|
|
29
|
+
SOURCE: {location}
|
|
30
|
+
> {source text}
|
|
31
|
+
TARGET: {location}
|
|
32
|
+
> {target text}
|
|
33
|
+
ISSUE: {description}
|
|
34
|
+
RESOLUTION: {action}
|
|
35
|
+
required: false
|
|
36
|
+
|
|
37
|
+
# Summary section
|
|
38
|
+
- heading: "Summary"
|
|
39
|
+
level: 2
|
|
40
|
+
required: true
|
|
41
|
+
description: >
|
|
42
|
+
Severity counts and pass/fail status. Format:
|
|
43
|
+
CRITICAL: {n}
|
|
44
|
+
MAJOR: {n}
|
|
45
|
+
MINOR: {n}
|
|
46
|
+
INFO: {n}
|
|
47
|
+
STATUS: PASSED or FAILED
|
|
48
|
+
contains:
|
|
49
|
+
- pattern: "^(CRITICAL|MAJOR|MINOR|INFO):"
|
|
50
|
+
label: "severity count"
|
|
51
|
+
description: "One line per severity level with count."
|
|
52
|
+
- pattern: "^STATUS:"
|
|
53
|
+
label: "STATUS line"
|
|
54
|
+
description: "STATUS: PASSED or STATUS: FAILED (with optional emoji)."
|
|
55
|
+
|
|
56
|
+
example: |
|
|
57
|
+
# ALIGNMENT REPORT
|
|
58
|
+
|
|
59
|
+
DESIGN-WKS-workspace.md ↔ src/workspace/**
|
|
60
|
+
|
|
61
|
+
- [ ] 1. CRITICAL [CERTAIN] MISSING
|
|
62
|
+
SOURCE: WKS-WorkspaceConfig (IMPLEMENTS: WKS-1_AC-1)
|
|
63
|
+
> pub fn load(root: &Path) -> Result<Self, WorkspaceError>
|
|
64
|
+
TARGET: (not found)
|
|
65
|
+
ISSUE: Design component declares IMPLEMENTS: WKS-1_AC-1, but no code file contains @awa-component: WKS-WorkspaceConfig.
|
|
66
|
+
RESOLUTION: Add @awa-component: WKS-WorkspaceConfig to src/workspace/config.rs
|
|
67
|
+
|
|
68
|
+
- [ ] 2. MAJOR [CERTAIN] DIFFERENCE
|
|
69
|
+
SOURCE: WKS-WorkspaceValidator (IMPLEMENTS: WKS-2_AC-3)
|
|
70
|
+
> fn validate(&self) -> Result<(), ValidationError>
|
|
71
|
+
TARGET: src/workspace/validator.rs:45
|
|
72
|
+
> fn validate(&self) -> bool
|
|
73
|
+
ISSUE: Return type mismatch. Design specifies Result but implementation returns bool.
|
|
74
|
+
RESOLUTION: Update validator.rs to return Result<(), ValidationError>
|
|
75
|
+
|
|
76
|
+
## Summary
|
|
77
|
+
|
|
78
|
+
CRITICAL: 1
|
|
79
|
+
MAJOR: 1
|
|
80
|
+
MINOR: 0
|
|
81
|
+
INFO: 0
|
|
82
|
+
|
|
83
|
+
STATUS: FAILED
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Structural rules for API-{CODE}-{api-name}.tsp files
|
|
2
|
+
target-files: ".awa/specs/API-*.tsp"
|
|
3
|
+
description: >
|
|
4
|
+
TypeSpec API specification. Defines major APIs using TypeSpec format
|
|
5
|
+
conventions. Write in TypeSpec unless explicitly requested otherwise.
|
|
6
|
+
One file per API surface area, named with the feature CODE prefix.
|
|
7
|
+
line-limit: 800
|