@ncoderz/awa 0.2.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -16
- package/dist/index.js +2307 -128
- package/dist/index.js.map +1 -1
- package/package.json +14 -4
- package/templates/awa/.agent/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.agent/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.agent/workflows/awa-align.md +3 -0
- package/templates/awa/.agent/workflows/awa-check.md +4 -0
- package/templates/awa/.agents/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.agents/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.yaml +83 -0
- package/templates/awa/.awa/.agent/schemas/API.schema.yaml +7 -0
- package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.yaml +260 -0
- package/templates/awa/.awa/.agent/schemas/DESIGN.schema.yaml +361 -0
- package/templates/awa/.awa/.agent/schemas/EXAMPLES.schema.yaml +98 -0
- package/templates/awa/.awa/.agent/schemas/FEAT.schema.yaml +143 -0
- package/templates/awa/.awa/.agent/schemas/PLAN.schema.yaml +151 -0
- package/templates/awa/.awa/.agent/schemas/README.schema.yaml +137 -0
- package/templates/awa/.awa/.agent/schemas/REQ.schema.yaml +169 -0
- package/templates/awa/.awa/.agent/schemas/TASK.schema.yaml +200 -0
- package/templates/awa/.claude/agents/awa.md +2 -2
- package/templates/awa/.claude/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.claude/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.codex/prompts/awa-align.md +3 -0
- package/templates/awa/.codex/prompts/awa-check.md +4 -0
- package/templates/awa/.cursor/rules/awa-agent.md +1 -1
- package/templates/awa/.cursor/rules/awa-align.md +8 -0
- package/templates/awa/.cursor/rules/awa-check.md +9 -0
- package/templates/awa/.gemini/commands/awa-align.md +3 -0
- package/templates/awa/.gemini/commands/awa-check.md +4 -0
- package/templates/awa/.gemini/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.gemini/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.github/agents/awa.agent.md +2 -2
- package/templates/awa/.github/prompts/awa.align.prompt.md +8 -0
- package/templates/awa/.github/prompts/awa.check.prompt.md +9 -0
- package/templates/awa/.github/skills/awa-align/SKILL.md +8 -0
- package/templates/awa/.github/skills/awa-check/SKILL.md +9 -0
- package/templates/awa/.kilocode/rules/awa-agent.md +1 -1
- package/templates/awa/.kilocode/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.kilocode/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.kilocode/workflows/awa-align.md +3 -0
- package/templates/awa/.kilocode/workflows/awa-check.md +4 -0
- package/templates/awa/.opencode/agents/awa.md +2 -2
- package/templates/awa/.opencode/commands/awa-align.md +3 -0
- package/templates/awa/.opencode/commands/awa-check.md +4 -0
- package/templates/awa/.opencode/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.opencode/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.qwen/commands/awa-align.md +3 -0
- package/templates/awa/.qwen/commands/awa-check.md +4 -0
- package/templates/awa/.qwen/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.qwen/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.roo/rules/awa-agent.md +1 -1
- package/templates/awa/.roo/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.roo/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/.windsurf/rules/awa-agent.md +1 -1
- package/templates/awa/.windsurf/skills/awa-align/SKILL.md +3 -0
- package/templates/awa/.windsurf/skills/awa-check/SKILL.md +4 -0
- package/templates/awa/AGENTS.md +1 -1
- package/templates/awa/CLAUDE.md +1 -1
- package/templates/awa/GEMINI.md +1 -1
- package/templates/awa/QWEN.md +1 -1
- package/templates/awa/_README.md +3 -2
- package/templates/awa/_delete.txt +49 -0
- package/templates/awa/_partials/{_cmd.awa-validate-alignment.md → _cmd.awa-align.md} +1 -1
- package/templates/awa/_partials/_cmd.awa-check.md +6 -0
- package/templates/awa/_partials/_skill.awa-align.md +6 -0
- package/templates/awa/_partials/_skill.awa-check.md +6 -0
- package/templates/awa/_partials/{awa.validate-alignment.md → awa.align.md} +2 -2
- package/templates/awa/_partials/awa.architecture.md +1 -1
- package/templates/awa/_partials/awa.check.md +73 -0
- package/templates/awa/_partials/awa.code.md +1 -0
- package/templates/awa/_partials/awa.core.md +24 -10
- 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 +1 -1
- package/templates/awa/_partials/awa.feature.md +1 -1
- package/templates/awa/_partials/awa.plan.md +1 -1
- package/templates/awa/_partials/awa.refactor.md +1 -0
- package/templates/awa/_partials/awa.requirements.md +2 -1
- package/templates/awa/_partials/awa.tasks.md +3 -3
- package/templates/awa/_partials/awa.upgrade.md +13 -12
- package/templates/awa/_tests/claude.toml +7 -0
- package/templates/awa/_tests/copilot.toml +6 -0
- package/templates/awa/.agent/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.agent/workflows/awa-validate-alignment.md +0 -3
- package/templates/awa/.agents/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.awa/.agent/schemas/ALIGN_REPORT.schema.md +0 -156
- package/templates/awa/.awa/.agent/schemas/API.schema.md +0 -4
- package/templates/awa/.awa/.agent/schemas/ARCHITECTURE.schema.md +0 -176
- package/templates/awa/.awa/.agent/schemas/DESIGN.schema.md +0 -253
- package/templates/awa/.awa/.agent/schemas/EXAMPLES.schema.md +0 -51
- package/templates/awa/.awa/.agent/schemas/FEAT.schema.md +0 -61
- package/templates/awa/.awa/.agent/schemas/PLAN.schema.md +0 -8
- package/templates/awa/.awa/.agent/schemas/README.schema.md +0 -133
- package/templates/awa/.awa/.agent/schemas/REQ.schema.md +0 -125
- package/templates/awa/.awa/.agent/schemas/TASK.schema.md +0 -137
- package/templates/awa/.claude/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.codex/prompts/awa-validate-alignment.md +0 -3
- package/templates/awa/.cursor/rules/awa-validate-alignment.md +0 -8
- package/templates/awa/.gemini/commands/awa-validate-alignment.md +0 -3
- package/templates/awa/.gemini/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.github/prompts/awa.validate-alignment.prompt.md +0 -8
- package/templates/awa/.github/skills/awa-validate-alignment/SKILL.md +0 -8
- package/templates/awa/.kilocode/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.kilocode/workflows/awa-validate-alignment.md +0 -3
- package/templates/awa/.opencode/commands/awa-validate-alignment.md +0 -3
- package/templates/awa/.opencode/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.qwen/commands/awa-validate-alignment.md +0 -3
- package/templates/awa/.qwen/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.roo/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/.windsurf/skills/awa-validate-alignment/SKILL.md +0 -3
- package/templates/awa/_partials/_skill.awa-validate-alignment.md +0 -6
|
@@ -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.
|
|
16
|
-
│ ├── FEAT.schema.
|
|
17
|
-
│ ├── EXAMPLES.schema.
|
|
18
|
-
│ ├── REQ.schema.
|
|
19
|
-
│ ├── DESIGN.schema.
|
|
20
|
-
│ ├── API.schema.
|
|
21
|
-
│ ├── TASK.schema.
|
|
22
|
-
│ ├── PLAN.schema.
|
|
23
|
-
│ ├── README.schema.
|
|
24
|
-
│ └── ALIGN_REPORT.schema.
|
|
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.
|
|
10
|
-
<read path=".awa/.agent/schemas/REQ.schema.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
10
|
-
<read path=".awa/.agent/schemas/REQ.schema.
|
|
11
|
-
<read path=".awa/.agent/schemas/TASK.schema.
|
|
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.
|
|
10
|
-
<read path=".awa/.agent/schemas/FEAT.schema.
|
|
11
|
-
<read path=".awa/.agent/schemas/EXAMPLES.schema.
|
|
12
|
-
<read path=".awa/.agent/schemas/REQ.schema.
|
|
13
|
-
<read path=".awa/.agent/schemas/DESIGN.schema.
|
|
14
|
-
<read path=".awa/.agent/schemas/TASK.schema.
|
|
15
|
-
<read path=".awa/.agent/schemas/PLAN.schema.
|
|
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)
|
|
45
|
-
3)
|
|
46
|
-
4)
|
|
47
|
-
5)
|
|
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
|
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
<schema target-files=".awa/alignment/ALIGN-{x}-WITH-{y}-{nnn}.md">
|
|
2
|
-
|
|
3
|
-
<definitions>
|
|
4
|
-
x = source artifact (what is being validated).
|
|
5
|
-
y = target artifact (what x is validated against).
|
|
6
|
-
<severity>
|
|
7
|
-
CRITICAL: MUST/SHALL violation, security, data integrity
|
|
8
|
-
MAJOR: SHOULD violation, UX, performance
|
|
9
|
-
MINOR: MAY not implemented, orphan traces, optional
|
|
10
|
-
INFO: superset additions, suggestions
|
|
11
|
-
</severity>
|
|
12
|
-
<confidence>
|
|
13
|
-
CERTAIN: explicit trace (IMPLEMENTS, VALIDATES, @awa-*)
|
|
14
|
-
LIKELY: naming convention or strong inference
|
|
15
|
-
UNCERTAIN: semantic inference only → flag for human review
|
|
16
|
-
</confidence>
|
|
17
|
-
<finding-type>
|
|
18
|
-
MISSING | DIFFERENCE | CONFLICT | INCOMPLETE | UNTESTED | ORPHAN | SUPERSET
|
|
19
|
-
</finding-type>
|
|
20
|
-
<trace_matrix>
|
|
21
|
-
<trace in="DESIGN component" marker="IMPLEMENTS: {CODE}-{n}[.{p}]_AC-{m}" to="REQ AC" />
|
|
22
|
-
<trace in="DESIGN property" marker="{CODE}_P-{n} VALIDATES: {CODE}-{n}[.{p}]_AC-{m} | {CODE}-{n}" to="REQ" />
|
|
23
|
-
<trace in="code" marker="@awa-component: {CODE}-{ComponentName}" to="DESIGN component" />
|
|
24
|
-
<trace in="code" marker="@awa-impl: {CODE}-{n}[.{p}]_AC-{m}" to="REQ AC" />
|
|
25
|
-
<trace in="tests" marker="@awa-test: {CODE}_P-{n}" to="DESIGN property" />
|
|
26
|
-
<trace in="tests" marker="@awa-test: {CODE}-{n}[.{p}]_AC-{m}" to="REQ AC" />
|
|
27
|
-
<infer target="semantic_traces" when="markers missing" confidence="LIKELY|UNCERTAIN" />
|
|
28
|
-
</trace_matrix>
|
|
29
|
-
</definitions>
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"description": "Render as Markdown per $rendering.",
|
|
34
|
-
"type": "object",
|
|
35
|
-
"required": ["source", "target", "findings"],
|
|
36
|
-
"properties": {
|
|
37
|
-
"source": { "type": "string", "description": "x artifact path or identifier" },
|
|
38
|
-
"target": { "type": "string", "description": "y artifact path or identifier" },
|
|
39
|
-
"findings": {
|
|
40
|
-
"type": "array",
|
|
41
|
-
"items": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"required": ["severity", "confidence", "type", "sourceRef", "problem"],
|
|
44
|
-
"properties": {
|
|
45
|
-
"severity": { "enum": ["critical", "major", "minor", "info"] },
|
|
46
|
-
"confidence": { "enum": ["certain", "likely", "uncertain"] },
|
|
47
|
-
"type": { "enum": ["missing", "difference", "conflict", "incomplete", "superset", "orphan", "untested"] },
|
|
48
|
-
"sourceRef": {
|
|
49
|
-
"type": "object",
|
|
50
|
-
"required": ["location"],
|
|
51
|
-
"properties": {
|
|
52
|
-
"location": { "type": "string" },
|
|
53
|
-
"text": { "type": "string" }
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"targetRef": {
|
|
57
|
-
"type": "object",
|
|
58
|
-
"properties": {
|
|
59
|
-
"location": { "type": "string" },
|
|
60
|
-
"text": { "type": "string" }
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"problem": { "type": "string" },
|
|
64
|
-
"traceability": { "enum": ["explicit-implements", "explicit-validates", "explicit-awa-component", "explicit-awa-impl", "explicit-awa-test", "naming", "semantic"], "description": "How the trace was established" },
|
|
65
|
-
"resolution": { "type": "string" }
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"$rendering": {
|
|
71
|
-
"templates": {
|
|
72
|
-
"withFindings": [
|
|
73
|
-
"# ALIGNMENT REPORT",
|
|
74
|
-
"{source} ↔ {target}",
|
|
75
|
-
"",
|
|
76
|
-
"{for each finding: templates.finding}",
|
|
77
|
-
"",
|
|
78
|
-
"## Summary",
|
|
79
|
-
"CRITICAL: {count}",
|
|
80
|
-
"MAJOR: {count}",
|
|
81
|
-
"MINOR: {count}",
|
|
82
|
-
"INFO: {count}",
|
|
83
|
-
"STATUS: {PASSED ✅ | FAILED ❌}"
|
|
84
|
-
],
|
|
85
|
-
"noFindings": [
|
|
86
|
-
"# ALIGNMENT REPORT",
|
|
87
|
-
"{source} ↔ {target}",
|
|
88
|
-
"All checks passed. No alignment issues found.",
|
|
89
|
-
"**STATUS: PASSED ✅**"
|
|
90
|
-
],
|
|
91
|
-
"finding": [
|
|
92
|
-
"- [ ] {n}. {SEVERITY} [{CONFIDENCE}] {TYPE}",
|
|
93
|
-
"",
|
|
94
|
-
" SOURCE: {sourceRef.location}",
|
|
95
|
-
" > {sourceRef.text}",
|
|
96
|
-
"",
|
|
97
|
-
" TARGET: {targetRef.location}",
|
|
98
|
-
" > {targetRef.text}",
|
|
99
|
-
"",
|
|
100
|
-
" ISSUE: {problem}",
|
|
101
|
-
"",
|
|
102
|
-
" RESOLUTION: {resolution}",
|
|
103
|
-
"",
|
|
104
|
-
" *Traced via: {traceability}*"
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
"statusRules": [
|
|
108
|
-
"FAILED if any CRITICAL or MAJOR findings",
|
|
109
|
-
"PASSED otherwise"
|
|
110
|
-
],
|
|
111
|
-
"templateSelection": [
|
|
112
|
-
"No findings → noFindings",
|
|
113
|
-
"Findings exist → withFindings"
|
|
114
|
-
],
|
|
115
|
-
"omissionRules": [
|
|
116
|
-
"Omit source blockquote if sourceRef.text absent",
|
|
117
|
-
"Omit TARGET: line entirely if targetRef absent → show 'TARGET: (not found)'",
|
|
118
|
-
"Omit target blockquote if targetRef.text absent",
|
|
119
|
-
"Omit *Traced via* if traceability starts with 'explicit-'",
|
|
120
|
-
"Omit RESOLUTION: if resolution absent"
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
<example>
|
|
127
|
-
# ALIGNMENT REPORT
|
|
128
|
-
|
|
129
|
-
DESIGN-WKS-workspace.md ↔ src/workspace/**
|
|
130
|
-
|
|
131
|
-
- [ ] 1. CRITICAL [CERTAIN] MISSING
|
|
132
|
-
SOURCE: WKS-WorkspaceConfig (IMPLEMENTS: WKS-1_AC-1)
|
|
133
|
-
> pub fn load(root: &Path) -> Result<Self, WorkspaceError>
|
|
134
|
-
TARGET: (not found)
|
|
135
|
-
ISSUE: Design component declares IMPLEMENTS: WKS-1_AC-1, but no code file contains @awa-component: WKS-WorkspaceConfig with @awa-impl: WKS-1_AC-1.
|
|
136
|
-
RESOLUTION: Add @awa-component: WKS-WorkspaceConfig and @awa-impl: WKS-1_AC-1 to src/workspace/config.rs
|
|
137
|
-
|
|
138
|
-
- [ ] 2. MAJOR [CERTAIN] DIFFERENCE
|
|
139
|
-
SOURCE: WKS-WorkspaceValidator (IMPLEMENTS: WKS-2_AC-3)
|
|
140
|
-
> fn validate(&self) -> Result<(), ValidationError>
|
|
141
|
-
TARGET: src/workspace/validator.rs:45
|
|
142
|
-
> fn validate(&self) -> bool
|
|
143
|
-
ISSUE: Return type mismatch. Design specifies Result<(), ValidationError> but implementation returns bool, losing error context.
|
|
144
|
-
RESOLUTION: Update validator.rs to return Result<(), ValidationError> as specified in design
|
|
145
|
-
|
|
146
|
-
## Summary
|
|
147
|
-
|
|
148
|
-
CRITICAL: 1
|
|
149
|
-
MAJOR: 1
|
|
150
|
-
MINOR: 0
|
|
151
|
-
INFO: 0
|
|
152
|
-
|
|
153
|
-
STATUS: FAILED ❌
|
|
154
|
-
</example>
|
|
155
|
-
|
|
156
|
-
</schema>
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
<schema target-file=".awa/specs/ARCHITECTURE.md">
|
|
2
|
-
- You MUST write API specs in TypeSpec format unless requested otherwise.
|
|
3
|
-
- If written in TypeSpec, API specifications follow TypeSpec format conventions.
|
|
4
|
-
|
|
5
|
-
```json
|
|
6
|
-
{
|
|
7
|
-
"description": "Architecture only. Succinct language. Do not overspecify. Omit irrelevant information.",
|
|
8
|
-
"required": ["projectPurpose", "systemOverview", "technologyStack", "architectureDiagram", "directoryStructure", "componentDetails", "componentInteractions", "architecturalRules", "developerCommands"],
|
|
9
|
-
"properties": {
|
|
10
|
-
"projectPurpose": { "type": "single paragraph: core problem and primary functionality" },
|
|
11
|
-
"systemOverview": { "type": "array of software layers/subsystems" },
|
|
12
|
-
"technologyStack": { "type": "array", "items": { "properties": { "technology": { "type": "name with major version only" }, "purpose": {} } } },
|
|
13
|
-
"architectureDiagram": { "type": "mermaid diagram showing components, data flow, dependencies" },
|
|
14
|
-
"directoryStructure": { "type": "array", "items": { "properties": { "path": {}, "description": {} } } },
|
|
15
|
-
"componentDetails": { "type": "array", "items": { "$ref": "#/$defs/component" } },
|
|
16
|
-
"componentInteractions": {
|
|
17
|
-
"required": ["description"],
|
|
18
|
-
"properties": {
|
|
19
|
-
"description": {},
|
|
20
|
-
"diagrams": { "type": "array", "items": { "properties": { "title": {}, "mermaid": {} } } }
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"architecturalRules": { "type": "array covering performance, scaling, maintainability, security, testing" },
|
|
24
|
-
"releaseStatus": { "type": "string: current release phase (e.g., Alpha, Beta, RC, GA) with brief description" },
|
|
25
|
-
"developerCommands": { "type": "array", "items": { "properties": { "command": {}, "description": {} } } },
|
|
26
|
-
"metadata": { "properties": { "changeLog": { "type": "array", "items": { "properties": { "version": {}, "date": {}, "changes": {} } } } } }
|
|
27
|
-
},
|
|
28
|
-
"$defs": {
|
|
29
|
-
"component": {
|
|
30
|
-
"required": ["name", "description", "responsibilities"],
|
|
31
|
-
"properties": {
|
|
32
|
-
"name": {},
|
|
33
|
-
"description": { "type": "single sentence" },
|
|
34
|
-
"responsibilities": { "type": "array of strings" },
|
|
35
|
-
"constraints": { "type": "array of strings" }
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"$render": {
|
|
40
|
-
"template": "# Architecture\n\n## Project Purpose\n{projectPurpose}\n\n## System Overview\n{systemOverview→'- {}'}\n\n## Technology Stack\n{technologyStack→'- `{technology}` — {purpose}'}\n\n## High-Level Architecture\n```mermaid\n{architectureDiagram}\n```\n\n## Directory Structure\n```\n{directoryStructure→'{path} # {description}'}\n```\n\n## Component Details\n{componentDetails→'### {name}\n\n{description}\n\nRESPONSIBILITIES\n{responsibilities→\"- {}\"}\n\nCONSTRAINTS\n{constraints?→\"- {}\"}'}\n\n## Component Interactions\n{componentInteractions.description}\n{componentInteractions.diagrams→'### {title}\n```mermaid\n{mermaid}\n```'}\n\n## Architectural Rules\n{architecturalRules→'- {}'}\n\n## Release Status\n{releaseStatus}\n\n## Developer Commands\n{developerCommands→'- `{command}` — {description}'}\n\n## Change Log\n{metadata.changeLog→'- {version} ({date}): {changes}'}",
|
|
41
|
-
"omit": ["CONSTRAINTS section if empty", "diagrams section if empty"],
|
|
42
|
-
"prohibited": ["**bold** — use CAPITALS", "minor versions in tech stack (major only)", "non-architecture directories", "detailed implementation in component descriptions"]
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
<example>
|
|
48
|
-
# Architecture
|
|
49
|
-
|
|
50
|
-
## Project Purpose
|
|
51
|
-
|
|
52
|
-
awa CLI generates AI coding agent configuration files from templates, enabling developers to quickly scaffold consistent agent setups across projects.
|
|
53
|
-
|
|
54
|
-
## System Overview
|
|
55
|
-
|
|
56
|
-
- CLI Layer
|
|
57
|
-
- Core Engine
|
|
58
|
-
- Template System
|
|
59
|
-
- I/O Layer
|
|
60
|
-
|
|
61
|
-
## Technology Stack
|
|
62
|
-
|
|
63
|
-
- `Node.js 20` — Runtime environment
|
|
64
|
-
- `TypeScript 5` — Type-safe development
|
|
65
|
-
- `Eta 3` — Template rendering
|
|
66
|
-
- `Citty` — CLI framework
|
|
67
|
-
|
|
68
|
-
## High-Level Architecture
|
|
69
|
-
|
|
70
|
-
```mermaid
|
|
71
|
-
flowchart LR
|
|
72
|
-
subgraph Input
|
|
73
|
-
Args[CLI Args]
|
|
74
|
-
Config[.awa.toml]
|
|
75
|
-
Templates[Templates]
|
|
76
|
-
end
|
|
77
|
-
subgraph Core
|
|
78
|
-
Parser[ArgumentParser]
|
|
79
|
-
Engine[TemplateEngine]
|
|
80
|
-
Generator[FileGenerator]
|
|
81
|
-
end
|
|
82
|
-
subgraph Output
|
|
83
|
-
Files[Generated Files]
|
|
84
|
-
end
|
|
85
|
-
Args --> Parser
|
|
86
|
-
Config --> Parser
|
|
87
|
-
Parser --> Engine
|
|
88
|
-
Templates --> Engine
|
|
89
|
-
Engine --> Generator
|
|
90
|
-
Generator --> Files
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Directory Structure
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
src/ # Source code
|
|
97
|
-
src/cli/ # CLI entry and commands
|
|
98
|
-
src/core/ # Core engine logic
|
|
99
|
-
src/utils/ # Shared utilities
|
|
100
|
-
templates/ # Bundled templates
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Component Details
|
|
104
|
-
|
|
105
|
-
### CLI Layer
|
|
106
|
-
|
|
107
|
-
Handles argument parsing and command dispatch.
|
|
108
|
-
|
|
109
|
-
RESPONSIBILITIES
|
|
110
|
-
|
|
111
|
-
- Parse CLI arguments and options
|
|
112
|
-
- Load and merge configuration
|
|
113
|
-
- Dispatch to appropriate command handlers
|
|
114
|
-
|
|
115
|
-
CONSTRAINTS
|
|
116
|
-
|
|
117
|
-
- Must fail fast on invalid arguments
|
|
118
|
-
- Must support --help and --version
|
|
119
|
-
|
|
120
|
-
### Template Engine
|
|
121
|
-
|
|
122
|
-
Renders templates with feature flag context.
|
|
123
|
-
|
|
124
|
-
RESPONSIBILITIES
|
|
125
|
-
|
|
126
|
-
- Load templates from local or remote sources
|
|
127
|
-
- Render with Eta templating
|
|
128
|
-
- Detect empty output for conditional file creation
|
|
129
|
-
|
|
130
|
-
## Component Interactions
|
|
131
|
-
|
|
132
|
-
The CLI parses arguments, loads configuration, then passes resolved options to the template engine which renders files through the generator.
|
|
133
|
-
|
|
134
|
-
### Generate Command Flow
|
|
135
|
-
|
|
136
|
-
```mermaid
|
|
137
|
-
sequenceDiagram
|
|
138
|
-
participant User
|
|
139
|
-
participant CLI
|
|
140
|
-
participant Engine
|
|
141
|
-
participant Generator
|
|
142
|
-
User->>CLI: awa generate
|
|
143
|
-
CLI->>Engine: render(templates, features)
|
|
144
|
-
Engine->>Generator: write(files)
|
|
145
|
-
Generator-->>User: Success summary
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## Architectural Rules
|
|
149
|
-
|
|
150
|
-
- All file I/O must go through the I/O layer
|
|
151
|
-
- Core engine must not depend on CLI layer
|
|
152
|
-
- Templates must be stateless and deterministic
|
|
153
|
-
- Errors must provide actionable messages with file paths
|
|
154
|
-
- All public APIs must have TypeScript types
|
|
155
|
-
|
|
156
|
-
## Release Status
|
|
157
|
-
|
|
158
|
-
STATUS: Alpha
|
|
159
|
-
|
|
160
|
-
Core functionality implemented. API may change without notice.
|
|
161
|
-
|
|
162
|
-
## Developer Commands
|
|
163
|
-
|
|
164
|
-
- `npm install` — Install dependencies
|
|
165
|
-
- `npm run dev` — Run in development mode
|
|
166
|
-
- `npm test` — Run test suite
|
|
167
|
-
- `npm run lint` — Run linter
|
|
168
|
-
- `npm run build` — Build for production
|
|
169
|
-
|
|
170
|
-
## Change Log
|
|
171
|
-
|
|
172
|
-
- 1.0.0 (2025-01-10): Initial architecture
|
|
173
|
-
- 1.1.0 (2025-01-15): Added diff command
|
|
174
|
-
</example>
|
|
175
|
-
|
|
176
|
-
</schema>
|