aw-spec-cli 0.1.0 → 0.1.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.
Files changed (146) hide show
  1. package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +116 -0
  2. package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +31 -0
  3. package/assets/.agents/skills/aw-spec-analyze/SKILL.md +292 -0
  4. package/assets/.agents/skills/aw-spec-checklist/SKILL.md +374 -0
  5. package/assets/.agents/skills/aw-spec-clarify/SKILL.md +316 -0
  6. package/assets/.agents/skills/aw-spec-constitution/SKILL.md +190 -0
  7. package/assets/.agents/skills/aw-spec-foundation/SKILL.md +188 -0
  8. package/assets/.agents/skills/aw-spec-implement/SKILL.md +268 -0
  9. package/assets/.agents/skills/aw-spec-plan/SKILL.md +217 -0
  10. package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +73 -0
  11. package/assets/.agents/skills/aw-spec-specify/SKILL.md +378 -0
  12. package/assets/.agents/skills/aw-spec-tasks/SKILL.md +255 -0
  13. package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +107 -0
  14. package/assets/.aw-spec/domain.json +3 -0
  15. package/assets/.aw-spec/extensions/.registry +19 -0
  16. package/assets/.aw-spec/extensions/agent-context/README.md +57 -0
  17. package/assets/.aw-spec/extensions/agent-context/agent-context-config.yml +4 -0
  18. package/assets/.aw-spec/extensions/agent-context/commands/aw-spec.agent-context.update.md +26 -0
  19. package/assets/.aw-spec/extensions/agent-context/extension.yml +34 -0
  20. package/assets/.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh +201 -0
  21. package/assets/.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +237 -0
  22. package/assets/.aw-spec/extensions.yml +23 -0
  23. package/assets/.aw-spec/feature.json +3 -0
  24. package/assets/.aw-spec/init-options.json +9 -0
  25. package/assets/.aw-spec/integration.json +15 -0
  26. package/assets/.aw-spec/integrations/aw-spec.manifest.json +17 -0
  27. package/assets/.aw-spec/integrations/claude.manifest.json +17 -0
  28. package/assets/.aw-spec/memory/constitution.md +50 -0
  29. package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +189 -0
  30. package/assets/.aw-spec/scripts/bash/common.sh +582 -0
  31. package/assets/.aw-spec/scripts/bash/create-new-feature.sh +299 -0
  32. package/assets/.aw-spec/scripts/bash/setup-plan.sh +84 -0
  33. package/assets/.aw-spec/scripts/bash/setup-tasks.sh +91 -0
  34. package/assets/.aw-spec/templates/checklist-template.md +40 -0
  35. package/assets/.aw-spec/templates/constitution-template.md +57 -0
  36. package/assets/.aw-spec/templates/plan-template.md +113 -0
  37. package/assets/.aw-spec/templates/spec-template.md +131 -0
  38. package/assets/.aw-spec/templates/tasks-template.md +252 -0
  39. package/assets/.aw-spec/workflows/aw-spec/workflow.yml +77 -0
  40. package/assets/.aw-spec/workflows/workflow-registry.json +13 -0
  41. package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +116 -0
  42. package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +31 -0
  43. package/assets/.claude/skills/aw-spec-analyze/SKILL.md +292 -0
  44. package/assets/.claude/skills/aw-spec-checklist/SKILL.md +374 -0
  45. package/assets/.claude/skills/aw-spec-clarify/SKILL.md +316 -0
  46. package/assets/.claude/skills/aw-spec-constitution/SKILL.md +190 -0
  47. package/assets/.claude/skills/aw-spec-foundation/SKILL.md +188 -0
  48. package/assets/.claude/skills/aw-spec-implement/SKILL.md +268 -0
  49. package/assets/.claude/skills/aw-spec-plan/SKILL.md +217 -0
  50. package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +73 -0
  51. package/assets/.claude/skills/aw-spec-specify/SKILL.md +378 -0
  52. package/assets/.claude/skills/aw-spec-tasks/SKILL.md +255 -0
  53. package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +107 -0
  54. package/assets/docs/README.md +106 -0
  55. package/assets/docs/VerticalSlice/PACKAGING.md +185 -0
  56. package/assets/docs/VerticalSlice/VerticalSlice.pack.txt +2833 -0
  57. package/assets/docs/VerticalSlice/pack-foundation.ps1 +145 -0
  58. package/assets/docs/VerticalSlice/pack-foundation.sh +196 -0
  59. package/assets/docs/VerticalSlice/unpack-foundation.ps1 +126 -0
  60. package/assets/docs/VerticalSlice/unpack-foundation.sh +217 -0
  61. package/assets/docs/architecture/clean-architecture.md +71 -0
  62. package/assets/docs/architecture/cqrs.md +141 -0
  63. package/assets/docs/architecture/eventing.md +83 -0
  64. package/assets/docs/architecture/folder-structure.md +61 -0
  65. package/assets/docs/architecture/modular-monolith.md +47 -0
  66. package/assets/docs/architecture/persistence.md +269 -0
  67. package/assets/docs/architecture/testing.md +55 -0
  68. package/assets/docs/architecture/vertical-slices.md +201 -0
  69. package/assets/docs/command.txt +295 -0
  70. package/assets/docs/components/Email/README.md +112 -0
  71. package/assets/docs/components/Email/integration.md +260 -0
  72. package/assets/docs/components/Jobs/README.md +113 -0
  73. package/assets/docs/components/Jobs/integration.md +245 -0
  74. package/assets/docs/components/QrGenerator/README.md +78 -0
  75. package/assets/docs/components/QrGenerator/integration.md +185 -0
  76. package/assets/docs/components/README.md +57 -0
  77. package/assets/docs/domain/domain-driven-design.md +212 -0
  78. package/assets/docs/domainspecs/healthcare/ai-rules.domain.md +34 -0
  79. package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +17 -0
  80. package/assets/docs/domainspecs/healthcare/auditing.domain.md +29 -0
  81. package/assets/docs/domainspecs/healthcare/authorization.domain.md +26 -0
  82. package/assets/docs/domainspecs/healthcare/clinical-terms.md +20 -0
  83. package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +26 -0
  84. package/assets/docs/domainspecs/healthcare/comandrulemap.md +119 -0
  85. package/assets/docs/domainspecs/healthcare/consent.md +19 -0
  86. package/assets/docs/domainspecs/healthcare/cqrs.domain.md +12 -0
  87. package/assets/docs/domainspecs/healthcare/data-classification.domain.md +28 -0
  88. package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +11 -0
  89. package/assets/docs/domainspecs/healthcare/dicom.md +15 -0
  90. package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +28 -0
  91. package/assets/docs/domainspecs/healthcare/domain-requirements.md +55 -0
  92. package/assets/docs/domainspecs/healthcare/eventing.domain.md +18 -0
  93. package/assets/docs/domainspecs/healthcare/fhir.md +36 -0
  94. package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +23 -0
  95. package/assets/docs/domainspecs/healthcare/hipaa.md +34 -0
  96. package/assets/docs/domainspecs/healthcare/hl7.md +15 -0
  97. package/assets/docs/domainspecs/healthcare/integration-terms.md +21 -0
  98. package/assets/docs/domainspecs/healthcare/persistence.domain.md +20 -0
  99. package/assets/docs/domainspecs/healthcare/terminology.md +30 -0
  100. package/assets/docs/domainspecs/healthcare/testing.domain.md +15 -0
  101. package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +18 -0
  102. package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +12 -0
  103. package/assets/docs/domainspecs/pharma/ai-rules.domain.md +32 -0
  104. package/assets/docs/domainspecs/pharma/api-versioning.domain.md +20 -0
  105. package/assets/docs/domainspecs/pharma/atc.md +22 -0
  106. package/assets/docs/domainspecs/pharma/auditing.domain.md +26 -0
  107. package/assets/docs/domainspecs/pharma/authorization.domain.md +25 -0
  108. package/assets/docs/domainspecs/pharma/coding-standards.domain.md +28 -0
  109. package/assets/docs/domainspecs/pharma/comandrulemap.md +136 -0
  110. package/assets/docs/domainspecs/pharma/cqrs.domain.md +16 -0
  111. package/assets/docs/domainspecs/pharma/data-classification.domain.md +24 -0
  112. package/assets/docs/domainspecs/pharma/data-provenance.md +21 -0
  113. package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +11 -0
  114. package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +36 -0
  115. package/assets/docs/domainspecs/pharma/domain-requirements.md +99 -0
  116. package/assets/docs/domainspecs/pharma/eventing.domain.md +18 -0
  117. package/assets/docs/domainspecs/pharma/fhir.md +31 -0
  118. package/assets/docs/domainspecs/pharma/folder-structure.domain.md +24 -0
  119. package/assets/docs/domainspecs/pharma/hl7.md +17 -0
  120. package/assets/docs/domainspecs/pharma/idmp.md +26 -0
  121. package/assets/docs/domainspecs/pharma/integration-terms.md +21 -0
  122. package/assets/docs/domainspecs/pharma/ndc.md +28 -0
  123. package/assets/docs/domainspecs/pharma/persistence.domain.md +23 -0
  124. package/assets/docs/domainspecs/pharma/pharma-terms.md +27 -0
  125. package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +30 -0
  126. package/assets/docs/domainspecs/pharma/regulatory-compliance.md +19 -0
  127. package/assets/docs/domainspecs/pharma/terminology.md +32 -0
  128. package/assets/docs/domainspecs/pharma/testing.domain.md +19 -0
  129. package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +17 -0
  130. package/assets/docs/domainspecs/pharma/zero-trust.domain.md +12 -0
  131. package/assets/docs/glossary/ai-rules.md +59 -0
  132. package/assets/docs/governance/api-versioning.md +99 -0
  133. package/assets/docs/governance/coding-standards.md +87 -0
  134. package/assets/docs/governance/dependency-policy.md +40 -0
  135. package/assets/docs/interop/ihe-conformance.md +31 -0
  136. package/assets/docs/pharma-constitution.my-ref.md +86 -0
  137. package/assets/docs/requirement-spec.txt +15 -0
  138. package/assets/docs/security/auditing.md +117 -0
  139. package/assets/docs/security/authorization-matrix.md +14 -0
  140. package/assets/docs/security/authorization.md +87 -0
  141. package/assets/docs/security/data-classification.md +38 -0
  142. package/assets/docs/security/zero-trust.md +76 -0
  143. package/assets/docs/technology-constitution.md +172 -0
  144. package/dist/utils/paths.js +1 -1
  145. package/dist/utils/paths.js.map +1 -1
  146. package/package.json +1 -1
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: "aw-spec-tasks"
3
+ description: "Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts."
4
+ argument-hint: "Optional task generation constraints"
5
+ compatibility: "Requires aw-spec project structure with .aw-spec/ directory"
6
+ metadata:
7
+ author: "github-aw-spec"
8
+ source: "templates/commands/tasks.md"
9
+ user-invocable: true
10
+ disable-model-invocation: false
11
+ ---
12
+
13
+
14
+ ## User Input
15
+
16
+ ```text
17
+ $ARGUMENTS
18
+ ```
19
+
20
+ You **MUST** consider the user input before proceeding (if not empty).
21
+
22
+ ## Auto-Loaded Engineering Standards (Required Context)
23
+
24
+ **Before doing anything else in this command, load the project engineering-standards files listed below into context using the Read tool.** These were previously supplied manually as `@docs/...` mentions; they are now loaded automatically so the user does not need to pass them. Rules:
25
+
26
+ - Read each file below **before** starting the Pre-Execution Checks / Outline. Treat their contents as authoritative engineering standards for this command, second only to `.aw-spec/memory/constitution.md`.
27
+ - If a listed file does not exist, skip it silently and continue — do **not** error and do **not** ask the user to provide it.
28
+ - This is the **domain-agnostic technical** set, so the framework is reusable across domains. Domain-specific rule files (e.g. healthcare FHIR/HL7/PHI) are **not** part of this set — they are offered separately in the **Domain Rule-File Selection** section below (sourced from `comandrulemap.md`). You can also add any extra file directly with an `@` mention.
29
+
30
+ Standards for `/aw-spec-tasks`:
31
+ - docs/architecture/folder-structure.md
32
+ - docs/architecture/vertical-slices.md
33
+ - docs/architecture/cqrs.md
34
+ - docs/architecture/persistence.md
35
+ - docs/architecture/testing.md
36
+ - docs/architecture/eventing.md
37
+ - docs/domain/domain-driven-design.md
38
+ - docs/security/authorization.md
39
+ - docs/security/auditing.md
40
+ - docs/governance/coding-standards.md
41
+ - docs/glossary/ai-rules.md
42
+
43
+ ## Domain Rule-File Selection (interactive)
44
+
45
+ After the technical standards above are loaded, and **before** the Pre-Execution Checks, resolve the active domain and ask the user which **domain** rule files to load for this command:
46
+
47
+ 1. **Resolve the active domain.** Read `.aw-spec/domain.json` and take its `domain` value — the active domain-specs folder name. The candidate domain rule files are the bullet list under the `## /aw-spec-tasks` heading in `docs/domainspecs/<domain>/comandrulemap.md`.
48
+ 2. **Domain gate (missing domain or rules).** If `.aw-spec/domain.json` is absent or its `domain` is empty, **or** `docs/domainspecs/<domain>/comandrulemap.md` does not exist:
49
+ - Ask one single-select question with the AskUserQuestion tool — *"Domain is not set or its rule files are missing (state which: no domain set / domain '<domain>' has no comandrulemap.md). Continue without domain rules?"* — with options **"Continue (technical only)"** and **"Exit"**.
50
+ - **Continue (technical only)** → skip steps 3-5 and proceed with only the auto-loaded technical standards (plus any `@`-mentioned files).
51
+ - **Exit** → stop the command **immediately** with no side effects: do **not** run the Pre-Execution Checks, hooks, Outline, or any later step, and create/modify nothing. Tell the user to run `/aw-spec-select-domain` (or fix the domain folder) and re-run.
52
+ - If interactive questions cannot be asked (non-interactive/automated run), default to **Continue (technical only)**.
53
+ - Exception: if `comandrulemap.md` exists but has **no entries under this command's heading**, this is **not** a gate trigger — load no domain files for this command and continue normally to the Pre-Execution Checks.
54
+ 3. **Show a selection box** using the AskUserQuestion tool:
55
+ - Ask one single-select question — *"Domain rule files for /aw-spec-tasks:"* — with options **"Select all (recommended)"**, **"Pick a subset"**, and **"None (technical only)"**.
56
+ - If the user chooses **"Pick a subset"**, follow up with **multi-select** questions whose options are the individual candidate files so the user can tick the ones they want. AskUserQuestion allows ≤4 options per question and ≤4 questions per call, so split the candidates into groups of ≤4 (by category: architecture overlays, clinical domain, security overlays, governance overlays, glossary) across as many calls as needed.
57
+ - If interactive questions cannot be asked (non-interactive or automated run), skip the prompt and default to **Select all**.
58
+ 4. **Load the selection.** Read every file the user selected (the full list for "Select all"; nothing extra for "None"). If any selected file does not exist on disk, skip it silently and continue — do not error.
59
+ 5. **Final context set** = the always-loaded technical standards (section above) **+** the domain files selected here **+** any files the user passed via `@` mention in their command. The `@`-mentioned files are always loaded in addition, whether or not they appear in the candidate list, and are never removed by a "None"/subset choice.
60
+ 6. Proceed to the Pre-Execution Checks only after the selected files are loaded.
61
+
62
+ ## Pre-Execution Checks
63
+
64
+ **Check for extension hooks (before tasks generation)**:
65
+ - Check if `.aw-spec/extensions.yml` exists in the project root.
66
+ - If it exists, read it and look for entries under the `hooks.before_tasks` key
67
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
68
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
69
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
70
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
71
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
72
+ - When constructing slash commands from hook command names, replace dots (`.`) with hyphens (`-`). For example, `aw-spec.git.commit` → `/aw-spec-git-commit`.
73
+ - For each executable hook, output the following based on its `optional` flag:
74
+ - **Optional hook** (`optional: true`):
75
+ ```
76
+ ## Extension Hooks
77
+
78
+ **Optional Pre-Hook**: {extension}
79
+ Command: `/{command}`
80
+ Description: {description}
81
+
82
+ Prompt: {prompt}
83
+ To execute: `/{command}`
84
+ ```
85
+ - **Mandatory hook** (`optional: false`):
86
+ ```
87
+ ## Extension Hooks
88
+
89
+ **Automatic Pre-Hook**: {extension}
90
+ Executing: `/{command}`
91
+ EXECUTE_COMMAND: {command}
92
+
93
+ Wait for the result of the hook command before proceeding to the Outline.
94
+ ```
95
+ - If no hooks are registered or `.aw-spec/extensions.yml` does not exist, skip silently
96
+
97
+ ## Outline
98
+
99
+ 1. **Setup**: Run `.aw-spec/scripts/bash/setup-tasks.sh --json` from repo root and parse FEATURE_DIR, TASKS_TEMPLATE, and AVAILABLE_DOCS list. `FEATURE_DIR` and `TASKS_TEMPLATE` must be absolute paths when provided. `AVAILABLE_DOCS` is a list of document names/relative paths available under `FEATURE_DIR` (for example `research.md` or `contracts/`). For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
100
+
101
+ 2. **Load design documents**: Read from FEATURE_DIR:
102
+ - **Required**: plan.md (tech stack, libraries, structure), spec.md (user stories with priorities)
103
+ - **Optional**: data-model.md (entities), contracts/ (interface contracts), research.md (decisions), quickstart.md (test scenarios)
104
+ - **IF EXISTS**: Load `.aw-spec/memory/constitution.md` for project principles and governance constraints
105
+ - Note: Not all projects have all documents. Generate tasks based on what's available.
106
+
107
+ 3. **Execute task generation workflow**:
108
+ - Load plan.md and extract tech stack, libraries, project structure
109
+ - Load spec.md and extract user stories with their priorities (P1, P2, P3, etc.)
110
+ - If data-model.md exists: Extract entities and map to user stories
111
+ - If contracts/ exists: Map interface contracts to user stories
112
+ - If research.md exists: Extract decisions for setup tasks
113
+ - Generate tasks organized by user story (see Task Generation Rules below)
114
+ - Generate dependency graph showing user story completion order
115
+ - Create parallel execution examples per user story
116
+ - Validate task completeness (each user story has all needed tasks, independently testable)
117
+
118
+ 4. **Generate tasks.md**: Read the tasks template from TASKS_TEMPLATE (from the JSON output above) and use it as structure. If TASKS_TEMPLATE is empty, fall back to `.aw-spec/templates/tasks-template.md`. Fill with:
119
+ - Correct feature name from plan.md
120
+ - Phase 1: Setup tasks (project initialization)
121
+ - Phase 2: Foundational tasks (blocking prerequisites for all user stories)
122
+ - Phase 3+: One phase per user story (in priority order from spec.md)
123
+ - Each phase includes: story goal, independent test criteria, tests (if requested), implementation tasks
124
+ - Final Phase: Polish & cross-cutting concerns
125
+ - All tasks must follow the strict checklist format (see Task Generation Rules below)
126
+ - Clear file paths for each task
127
+ - Dependencies section showing story completion order
128
+ - Parallel execution examples per story
129
+ - Implementation strategy section (MVP first, incremental delivery)
130
+
131
+ ## Mandatory Post-Execution Hooks
132
+
133
+ **You MUST complete this section before reporting completion to the user.**
134
+
135
+ Check if `.aw-spec/extensions.yml` exists in the project root.
136
+ - If it does not exist, or no hooks are registered under `hooks.after_tasks`, skip to the Completion Report.
137
+ - If it exists, read it and look for entries under the `hooks.after_tasks` key.
138
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue to the Completion Report.
139
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
140
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
141
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
142
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
143
+ - When constructing slash commands from hook command names, replace dots (`.`) with hyphens (`-`). For example, `aw-spec.git.commit` → `/aw-spec-git-commit`.
144
+ - For each executable hook, output the following based on its `optional` flag:
145
+ - **Mandatory hook** (`optional: false`) — **You MUST emit `EXECUTE_COMMAND:` for each mandatory hook**:
146
+ ```
147
+ ## Extension Hooks
148
+
149
+ **Automatic Hook**: {extension}
150
+ Executing: `/{command}`
151
+ EXECUTE_COMMAND: {command}
152
+ ```
153
+ - **Optional hook** (`optional: true`):
154
+ ```
155
+ ## Extension Hooks
156
+
157
+ **Optional Hook**: {extension}
158
+ Command: `/{command}`
159
+ Description: {description}
160
+
161
+ Prompt: {prompt}
162
+ To execute: `/{command}`
163
+ ```
164
+
165
+ ## Completion Report
166
+
167
+ Output path to generated tasks.md and summary:
168
+ - Total task count
169
+ - Task count per user story
170
+ - Parallel opportunities identified
171
+ - Independent test criteria for each story
172
+ - Suggested MVP scope (typically just User Story 1)
173
+ - Format validation: Confirm ALL tasks follow the checklist format (checkbox, ID, labels, file paths)
174
+
175
+ Context for task generation: $ARGUMENTS
176
+
177
+ The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context.
178
+
179
+ ## Task Generation Rules
180
+
181
+ **CRITICAL**: Tasks MUST be organized by user story to enable independent implementation and testing.
182
+
183
+ **Tests are OPTIONAL**: Only generate test tasks if explicitly requested in the feature specification or if user requests TDD approach.
184
+
185
+ ### Checklist Format (REQUIRED)
186
+
187
+ Every task MUST strictly follow this format:
188
+
189
+ ```text
190
+ - [ ] [TaskID] [P?] [Story?] Description with file path
191
+ ```
192
+
193
+ **Format Components**:
194
+
195
+ 1. **Checkbox**: ALWAYS start with `- [ ]` (markdown checkbox)
196
+ 2. **Task ID**: Sequential number (T001, T002, T003...) in execution order
197
+ 3. **[P] marker**: Include ONLY if task is parallelizable (different files, no dependencies on incomplete tasks)
198
+ 4. **[Story] label**: REQUIRED for user story phase tasks only
199
+ - Format: [US1], [US2], [US3], etc. (maps to user stories from spec.md)
200
+ - Setup phase: NO story label
201
+ - Foundational phase: NO story label
202
+ - User Story phases: MUST have story label
203
+ - Polish phase: NO story label
204
+ 5. **Description**: Clear action with exact file path
205
+
206
+ **Examples**:
207
+
208
+ - ✅ CORRECT: `- [ ] T001 Create project structure per implementation plan`
209
+ - ✅ CORRECT: `- [ ] T005 [P] Implement authentication middleware in src/middleware/auth.py`
210
+ - ✅ CORRECT: `- [ ] T012 [P] [US1] Create User model in src/models/user.py`
211
+ - ✅ CORRECT: `- [ ] T014 [US1] Implement UserService in src/services/user_service.py`
212
+ - ❌ WRONG: `- [ ] Create User model` (missing ID and Story label)
213
+ - ❌ WRONG: `T001 [US1] Create model` (missing checkbox)
214
+ - ❌ WRONG: `- [ ] [US1] Create User model` (missing Task ID)
215
+ - ❌ WRONG: `- [ ] T001 [US1] Create model` (missing file path)
216
+
217
+ ### Task Organization
218
+
219
+ 1. **From User Stories (spec.md)** - PRIMARY ORGANIZATION:
220
+ - Each user story (P1, P2, P3...) gets its own phase
221
+ - Map all related components to their story:
222
+ - Models needed for that story
223
+ - Services needed for that story
224
+ - Interfaces/UI needed for that story
225
+ - If tests requested: Tests specific to that story
226
+ - Mark story dependencies (most stories should be independent)
227
+
228
+ 2. **From Contracts**:
229
+ - Map each interface contract → to the user story it serves
230
+ - If tests requested: Each interface contract → contract test task [P] before implementation in that story's phase
231
+
232
+ 3. **From Data Model**:
233
+ - Map each entity to the user story(ies) that need it
234
+ - If entity serves multiple stories: Put in earliest story or Setup phase
235
+ - Relationships → service layer tasks in appropriate story phase
236
+
237
+ 4. **From Setup/Infrastructure**:
238
+ - Shared infrastructure → Setup phase (Phase 1)
239
+ - Foundational/blocking tasks → Foundational phase (Phase 2)
240
+ - Story-specific setup → within that story's phase
241
+
242
+ ### Phase Structure
243
+
244
+ - **Phase 1**: Setup (project initialization)
245
+ - **Phase 2**: Foundational (blocking prerequisites - MUST complete before user stories)
246
+ - **Phase 3+**: User Stories in priority order (P1, P2, P3...)
247
+ - Within each story: Tests (if requested) → Models → Services → Endpoints → Integration
248
+ - Each phase should be a complete, independently testable increment
249
+ - **Final Phase**: Polish & Cross-Cutting Concerns
250
+
251
+ ## Done When
252
+
253
+ - [ ] tasks.md generated with all phases, task IDs, and file paths
254
+ - [ ] Extension hooks dispatched or skipped according to the rules in Mandatory Post-Execution Hooks above
255
+ - [ ] Completion reported to user with task count, story breakdown, and MVP scope
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: "aw-spec-taskstoissues"
3
+ description: "Convert existing tasks into actionable, dependency-ordered GitHub issues for the feature based on available design artifacts."
4
+ argument-hint: "Optional filter or label for GitHub issues"
5
+ compatibility: "Requires aw-spec project structure with .aw-spec/ directory"
6
+ metadata:
7
+ author: "github-aw-spec"
8
+ source: "templates/commands/taskstoissues.md"
9
+ user-invocable: true
10
+ disable-model-invocation: false
11
+ ---
12
+
13
+
14
+ ## User Input
15
+
16
+ ```text
17
+ $ARGUMENTS
18
+ ```
19
+
20
+ You **MUST** consider the user input before proceeding (if not empty).
21
+
22
+ ## Pre-Execution Checks
23
+
24
+ **Check for extension hooks (before tasks-to-issues conversion)**:
25
+ - Check if `.aw-spec/extensions.yml` exists in the project root.
26
+ - If it exists, read it and look for entries under the `hooks.before_taskstoissues` key
27
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
28
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
29
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
30
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
31
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
32
+ - When constructing slash commands from hook command names, replace dots (`.`) with hyphens (`-`). For example, `aw-spec.git.commit` → `/aw-spec-git-commit`.
33
+ - For each executable hook, output the following based on its `optional` flag:
34
+ - **Optional hook** (`optional: true`):
35
+ ```
36
+ ## Extension Hooks
37
+
38
+ **Optional Pre-Hook**: {extension}
39
+ Command: `/{command}`
40
+ Description: {description}
41
+
42
+ Prompt: {prompt}
43
+ To execute: `/{command}`
44
+ ```
45
+ - **Mandatory hook** (`optional: false`):
46
+ ```
47
+ ## Extension Hooks
48
+
49
+ **Automatic Pre-Hook**: {extension}
50
+ Executing: `/{command}`
51
+ EXECUTE_COMMAND: {command}
52
+
53
+ Wait for the result of the hook command before proceeding to the Outline.
54
+ ```
55
+ - If no hooks are registered or `.aw-spec/extensions.yml` does not exist, skip silently
56
+
57
+ ## Outline
58
+
59
+ 1. Run `.aw-spec/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
60
+ 1. **IF EXISTS**: Load `.aw-spec/memory/constitution.md` for project principles and governance constraints.
61
+ 1. From the executed script, extract the path to **tasks**.
62
+ 1. Get the Git remote by running:
63
+
64
+ ```bash
65
+ git config --get remote.origin.url
66
+ ```
67
+
68
+ > [!CAUTION]
69
+ > ONLY PROCEED TO NEXT STEPS IF THE REMOTE IS A GITHUB URL
70
+
71
+ 1. For each task in the list, use the GitHub MCP server to create a new issue in the repository that is representative of the Git remote.
72
+
73
+ > [!CAUTION]
74
+ > UNDER NO CIRCUMSTANCES EVER CREATE ISSUES IN REPOSITORIES THAT DO NOT MATCH THE REMOTE URL
75
+
76
+ ## Post-Execution Checks
77
+
78
+ **Check for extension hooks (after tasks-to-issues conversion)**:
79
+ Check if `.aw-spec/extensions.yml` exists in the project root.
80
+ - If it exists, read it and look for entries under the `hooks.after_taskstoissues` key
81
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
82
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
83
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
84
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
85
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
86
+ - When constructing slash commands from hook command names, replace dots (`.`) with hyphens (`-`). For example, `aw-spec.git.commit` → `/aw-spec-git-commit`.
87
+ - For each executable hook, output the following based on its `optional` flag:
88
+ - **Optional hook** (`optional: true`):
89
+ ```
90
+ ## Extension Hooks
91
+
92
+ **Optional Hook**: {extension}
93
+ Command: `/{command}`
94
+ Description: {description}
95
+
96
+ Prompt: {prompt}
97
+ To execute: `/{command}`
98
+ ```
99
+ - **Mandatory hook** (`optional: false`):
100
+ ```
101
+ ## Extension Hooks
102
+
103
+ **Automatic Hook**: {extension}
104
+ Executing: `/{command}`
105
+ EXECUTE_COMMAND: {command}
106
+ ```
107
+ - If no hooks are registered or `.aw-spec/extensions.yml` does not exist, skip silently
@@ -0,0 +1,3 @@
1
+ {
2
+ "domain": ""
3
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "extensions": {
4
+ "agent-context": {
5
+ "version": "1.0.0",
6
+ "source": "local",
7
+ "manifest_hash": "sha256:9a1dc02d2d0139bb03860392ecacef79183be2c442feda2f9ccaa4e5907b1e47",
8
+ "enabled": true,
9
+ "priority": 10,
10
+ "registered_commands": {
11
+ "claude": [
12
+ "aw-spec.agent-context.update"
13
+ ]
14
+ },
15
+ "registered_skills": [],
16
+ "installed_at": "2026-06-10T07:39:02.078494+00:00"
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,57 @@
1
+ # Coding Agent Context Extension
2
+
3
+ This bundled extension manages the **coding agent context/instruction file** (e.g. `CLAUDE.md`, `.github/copilot-instructions.md`, `AGENTS.md`, `GEMINI.md`, …) for the active integration.
4
+
5
+ It owns the lifecycle of the managed section delimited by the configurable start/end markers (defaults: `<!-- AW-SPEC START -->` / `<!-- AW-SPEC END -->`).
6
+
7
+ ## Why an extension?
8
+
9
+ Not every AW-Spec user wants AW-Spec to write into the coding agent's context file. Extracting this behavior into a dedicated extension lets users:
10
+
11
+ - **Opt out** entirely with `specify extension disable agent-context` — AW-Spec will then never create or modify the agent context file.
12
+ - **Customize the markers** by editing `.aw-spec/extensions/agent-context/agent-context-config.yml` — both the Python layer and the bundled scripts honor the same `context_markers` value.
13
+ - **Refresh on demand** with `/aw-spec.agent-context.update`, or automatically through the hooks declared in `extension.yml` (`after_specify`, `after_plan`).
14
+
15
+ ## Commands
16
+
17
+ | Command | Description |
18
+ |---------|-------------|
19
+ | `aw-spec.agent-context.update` | Refresh the managed section in the agent context file with the current plan path. |
20
+
21
+ ## Configuration
22
+
23
+ All configuration flows through the extension's own config file at
24
+ `.aw-spec/extensions/agent-context/agent-context-config.yml`:
25
+
26
+ ```yaml
27
+ # Path to the coding agent context file managed by this extension
28
+ context_file: CLAUDE.md
29
+
30
+ # Delimiters for the managed AW-Spec section
31
+ context_markers:
32
+ start: "<!-- AW-SPEC START -->"
33
+ end: "<!-- AW-SPEC END -->"
34
+ ```
35
+
36
+ - `context_file` — the project-relative path to the coding agent context file, written by `specify init` and `specify integration install`.
37
+ - `context_markers.start` / `.end` — the delimiters around the managed section. Edit these to use custom markers.
38
+
39
+ ## Requirements
40
+
41
+ The bundled update scripts require **Python 3** with **PyYAML** for YAML/upsert processing (PowerShell can also use `ConvertFrom-Yaml` when available).
42
+
43
+ PyYAML ships with the `specify` CLI and is normally available via the same `python3` interpreter. If a hook reports *"PyYAML is required … not available in the current Python environment"*, it means the system `python3` differs from the one used to install AW-Spec. To resolve, run:
44
+
45
+ ```bash
46
+ pip install pyyaml
47
+ # or target the specific interpreter AW-Spec uses:
48
+ /path/to/aw-spec-python -m pip install pyyaml
49
+ ```
50
+
51
+ ## Disable
52
+
53
+ ```bash
54
+ specify extension disable agent-context
55
+ ```
56
+
57
+ When disabled, AW-Spec skips context file creation, updates, and removal (the gates are inside `upsert_context_section()` and `remove_context_section()`).
@@ -0,0 +1,4 @@
1
+ context_file: CLAUDE.md
2
+ context_markers:
3
+ start: <!-- AW-SPEC START -->
4
+ end: <!-- AW-SPEC END -->
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: "Refresh the managed AW-Spec section in the coding agent context file"
3
+ ---
4
+
5
+ # Update Coding Agent Context
6
+
7
+ Refresh the managed AW-Spec section inside the active coding agent's context/instruction file (e.g. `CLAUDE.md`, `.github/copilot-instructions.md`, `AGENTS.md`).
8
+
9
+ ## Behavior
10
+
11
+ The script reads the agent-context extension config at
12
+ `.aw-spec/extensions/agent-context/agent-context-config.yml` to discover:
13
+
14
+ - `context_file` — the path of the coding agent context file to manage.
15
+ - `context_markers.start` / `.end` — the delimiters surrounding the managed section. Defaults to `<!-- AW-SPEC START -->` and `<!-- AW-SPEC END -->` when the field is missing.
16
+
17
+ It then creates, replaces, or appends the managed block so that the section points at the most recent plan path when one can be discovered (`specs/<feature>/plan.md`).
18
+
19
+ If `context_file` is empty or the file cannot be located, the command reports nothing to do and exits successfully.
20
+
21
+ ## Execution
22
+
23
+ - **Bash**: `.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh [plan_path]`
24
+ - **PowerShell**: `.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 [plan_path]`
25
+
26
+ When `plan_path` is omitted, the script auto-detects the most recently modified `specs/*/plan.md`.
@@ -0,0 +1,34 @@
1
+ schema_version: "1.0"
2
+
3
+ extension:
4
+ id: agent-context
5
+ name: "Coding Agent Context"
6
+ version: "1.0.0"
7
+ description: "Manages coding agent context/instruction files (e.g., CLAUDE.md, copilot-instructions.md) with project-specific plan references and configurable markers"
8
+ author: aw-spec-core
9
+ repository: https://github.com/github/aw-spec
10
+ license: MIT
11
+
12
+ requires:
13
+ aw-spec_version: ">=0.2.0"
14
+
15
+ provides:
16
+ commands:
17
+ - name: aw-spec.agent-context.update
18
+ file: commands/aw-spec.agent-context.update.md
19
+ description: "Refresh the managed AW-Spec section in the coding agent context file"
20
+
21
+ hooks:
22
+ after_specify:
23
+ command: aw-spec.agent-context.update
24
+ optional: true
25
+ description: "Refresh agent context after specification"
26
+ after_plan:
27
+ command: aw-spec.agent-context.update
28
+ optional: true
29
+ description: "Refresh agent context after planning"
30
+
31
+ tags:
32
+ - "agent"
33
+ - "context"
34
+ - "core"