astragentic 1.0.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.
@@ -0,0 +1,175 @@
1
+ ---
2
+ description: "Manage changes to approved documentation"
3
+ argument-hint: "<title>"
4
+ allowed-tools: ["Read", "Write", "Edit", "Glob", "Grep"]
5
+ ---
6
+
7
+ Creates a change record and updates affected documentation.
8
+
9
+ ## Activation
10
+
11
+ 1. LOAD engine rules from `@_astraler/engine.md`
12
+ 2. LOAD workflow from `@_astraler/workflows/change.md`
13
+ 3. Execute change workflow phases
14
+
15
+ ## Workflow Phases
16
+
17
+ ### Phase 1: Capture
18
+ - Generate CHG ID: `CHG-{YYYY-MM-DD}-{slug}`
19
+ - Record change description
20
+ - Identify change type (feature, enhancement, fix, refactor)
21
+
22
+ ### Phase 2: Impact
23
+ - Search for affected documents
24
+ - List impacted specs, archs, tasks
25
+ - Classify impact level (low/medium/high)
26
+ - Check if ADR required
27
+
28
+ ### Phase 3: Update
29
+ - Edit affected documents with CHG reference
30
+ - Bump versions appropriately
31
+ - Update cross-references
32
+
33
+ ### Phase 4: Replan
34
+ - Generate new tasks if needed
35
+ - Update existing task scope
36
+ - Mark obsolete tasks as CANCELLED
37
+
38
+ ## Mermaid Diagram Requirements
39
+
40
+ Every CHG record MUST include:
41
+
42
+ | Diagram Type | Section | Purpose |
43
+ |--------------|---------|---------|
44
+ | `flowchart` | Impact Analysis | Show affected artifacts visually |
45
+
46
+ **Include in CHG:**
47
+ - Impact diagram showing which documents are affected
48
+ - Use color coding for impact severity
49
+
50
+ ## CHG Record Structure
51
+
52
+ File: `.astraler-docs/05-changes/impact/CHG-{YYYY-MM-DD}-{slug}.md`
53
+
54
+ ```markdown
55
+ ---
56
+ id: CHG-{YYYY-MM-DD}-{slug}
57
+ title: {Title}
58
+ type: {feature|enhancement|fix|refactor}
59
+ status: Open
60
+ domain: {primary domain}
61
+ impact: {Low|Medium|High}
62
+ created: {YYYY-MM-DD}
63
+ author: {user}
64
+ ---
65
+
66
+ # CHG-{YYYY-MM-DD}-{slug}: {Title}
67
+
68
+ > {One-line summary}
69
+
70
+ ## Summary
71
+
72
+ **What:** {Brief description of the change}
73
+
74
+ **Why:** {Reason/trigger for the change}
75
+
76
+ ## Impact Analysis
77
+
78
+ ```mermaid
79
+ flowchart TD
80
+ CHG[CHG-2026-01-04-change-title]
81
+
82
+ subgraph Affected Specs
83
+ S1[02-spec/domains/domain.md]
84
+ end
85
+
86
+ subgraph Affected Arch
87
+ A1[03-arch/domains/domain.arch.md]
88
+ end
89
+
90
+ subgraph Affected Tasks
91
+ T1[TSK-domain-xxx]
92
+ end
93
+
94
+ CHG --> S1
95
+ CHG --> A1
96
+ CHG --> T1
97
+
98
+ style CHG fill:#fff3e0
99
+ style S1 fill:#e3f2fd
100
+ style A1 fill:#f3e5f5
101
+ style T1 fill:#e8f5e9
102
+ ```
103
+
104
+ > Replace `CHG-2026-01-04-change-title`, `domain`, and task IDs with actual values.
105
+
106
+ ### Impact Level: {Low|Medium|High}
107
+
108
+ **Rationale:** {Why this impact level}
109
+
110
+ ### Affected Artifacts
111
+
112
+ | Artifact | Section | Change Type |
113
+ |----------|---------|-------------|
114
+ | 02-spec/domains/{domain}.md | {section} | {Add/Modify/Remove} |
115
+ | 03-arch/domains/{domain}.arch.md | {section} | {Add/Modify/Remove} |
116
+ | 04-tasks/domains/{domain}.tasks.md | {task IDs} | {Add/Modify/Cancel} |
117
+
118
+ ## Changes Made
119
+
120
+ ### 1. Specification Changes
121
+
122
+ **File:** `02-spec/domains/{domain}.md`
123
+
124
+ ```diff
125
+ + Added content
126
+ - Removed content
127
+ ```
128
+
129
+ ### 2. Architecture Changes
130
+
131
+ **File:** `03-arch/domains/{domain}.arch.md`
132
+
133
+ ```diff
134
+ + Added content
135
+ - Removed content
136
+ ```
137
+
138
+ ### 3. Task Changes
139
+
140
+ **File:** `04-tasks/domains/{domain}.tasks.md`
141
+
142
+ - **New:** {list}
143
+ - **Modified:** {list}
144
+ - **Cancelled:** {list}
145
+
146
+ ## Verification
147
+
148
+ ```
149
+ {/astra:verify output}
150
+ ```
151
+
152
+ ## Checklist
153
+
154
+ - [ ] Impact confirmed
155
+ - [ ] Specs updated
156
+ - [ ] Arch updated
157
+ - [ ] Tasks replanned
158
+ - [ ] Verification passed
159
+ - [ ] Human approved
160
+ ```
161
+
162
+ ## Also Update
163
+
164
+ - `.astraler-docs/05-changes/changelog.md` - Add entry to recent changes
165
+
166
+ ## Human Gates
167
+
168
+ - After impact analysis: Confirm affected artifacts
169
+ - After update: Review changes before proceeding
170
+ - After completion: Approve to mark Applied
171
+
172
+ ## Output
173
+
174
+ Change record created at `.astraler-docs/05-changes/impact/{CHG-ID}.md`
175
+ Summary of all modifications made, including diagrams.
@@ -0,0 +1,240 @@
1
+ ---
2
+ description: "List available Astra commands and workflow guidance"
3
+ argument-hint: "[command]"
4
+ allowed-tools: ["Read"]
5
+ ---
6
+
7
+ Display available commands, their purposes, and workflow guidance.
8
+
9
+ ## Activation
10
+
11
+ 1. If command argument provided → show detailed help for that command
12
+ 2. Otherwise → show command overview and workflow
13
+
14
+ ## Command Overview
15
+
16
+ ### Discovery & Status
17
+
18
+ | Command | Purpose | When to Use |
19
+ |---------|---------|-------------|
20
+ | `/astra:start` | Bootstrap new or scan existing project | First time setup |
21
+ | `/astra:status` | Show current project state | Check progress, find next action |
22
+ | `/astra:help` | This help | Learn available commands |
23
+
24
+ ### Design Phase
25
+
26
+ | Command | Purpose | When to Use |
27
+ |---------|---------|-------------|
28
+ | `/astra:spec <domain>` | Create/update domain specification | Define business requirements |
29
+ | `/astra:arch <domain>` | Create/update domain architecture | Design technical solution |
30
+ | `/astra:plan <domain>` | Generate implementation tasks | Break down work |
31
+
32
+ ### Build Phase
33
+
34
+ | Command | Purpose | When to Use |
35
+ |---------|---------|-------------|
36
+ | `/astra:build <task>` | Implement with code + tests | Execute implementation |
37
+ | `/astra:verify` | Check documentation consistency | Before approving, after changes |
38
+
39
+ ### Governance
40
+
41
+ | Command | Purpose | When to Use |
42
+ |---------|---------|-------------|
43
+ | `/astra:change <title>` | Manage changes to approved docs | Modify locked artifacts |
44
+
45
+ ---
46
+
47
+ ## Workflow Diagram
48
+
49
+ ```
50
+ ┌─────────────────────────────────────┐
51
+ │ /astra:start │
52
+ │ (Greenfield or Brownfield) │
53
+ └──────────────┬──────────────────────┘
54
+
55
+ ┌──────────────▼──────────────────────┐
56
+ │ /astra:status │
57
+ │ (Check state, get guidance) │
58
+ └──────────────┬──────────────────────┘
59
+
60
+ ┌─────────────────────────┼─────────────────────────┐
61
+ │ │ │
62
+ ▼ ▼ ▼
63
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
64
+ │ /astra:spec │────▶│ /astra:arch │────▶│ /astra:plan │
65
+ │ (Specify) │ │ (Design) │ │ (Plan) │
66
+ └─────────────────┘ └─────────────────┘ └────────┬────────┘
67
+
68
+
69
+ ┌─────────────────┐
70
+ │ /astra:build │
71
+ │ (Implement) │
72
+ └────────┬────────┘
73
+
74
+ ┌────────────────────────────────┤
75
+ │ │
76
+ ▼ ▼
77
+ ┌─────────────────┐ ┌─────────────────┐
78
+ │ /astra:verify │ │ /astra:change │
79
+ │ (Validate) │ │ (Modify locked) │
80
+ └─────────────────┘ └─────────────────┘
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Command Details
86
+
87
+ ### /astra:start
88
+
89
+ ```
90
+ /astra:start [--scan]
91
+
92
+ Bootstrap a new project or scan an existing codebase.
93
+
94
+ Options:
95
+ --scan Force brownfield mode (scan existing code)
96
+
97
+ Without --scan:
98
+ - If no codebase exists → Greenfield workflow
99
+ - If codebase exists → Brownfield workflow
100
+
101
+ Creates: .astraler-docs/ structure
102
+ ```
103
+
104
+ ### /astra:status
105
+
106
+ ```
107
+ /astra:status [domain]
108
+
109
+ Show project status and suggest next action.
110
+
111
+ Arguments:
112
+ domain (optional) Focus on specific domain
113
+
114
+ Output: Artifact matrix, task summary, suggested actions
115
+ ```
116
+
117
+ ### /astra:spec
118
+
119
+ ```
120
+ /astra:spec <domain>
121
+
122
+ Create or update domain specification.
123
+
124
+ Arguments:
125
+ domain Domain name (e.g., order, payment, auth)
126
+
127
+ Requires: 01-context/product.md exists
128
+ Creates: 02-spec/domains/{domain}.md
129
+ ```
130
+
131
+ ### /astra:arch
132
+
133
+ ```
134
+ /astra:arch <domain>
135
+
136
+ Create or update domain architecture.
137
+
138
+ Arguments:
139
+ domain Domain name
140
+
141
+ Requires: 02-spec/domains/{domain}.md exists
142
+ Creates: 03-arch/domains/{domain}.arch.md
143
+ ```
144
+
145
+ ### /astra:plan
146
+
147
+ ```
148
+ /astra:plan <domain>
149
+
150
+ Generate implementation tasks from spec and arch.
151
+
152
+ Arguments:
153
+ domain Domain name
154
+
155
+ Requires: spec + arch exist for domain
156
+ Creates: 04-tasks/domains/{domain}.tasks.md
157
+ ```
158
+
159
+ ### /astra:build
160
+
161
+ ```
162
+ /astra:build <target> [--auto]
163
+
164
+ Implement tasks with code and tests.
165
+
166
+ Arguments:
167
+ target TSK-ID, domain name, or --all
168
+
169
+ Options:
170
+ --auto Skip human confirmation gates
171
+
172
+ Examples:
173
+ /astra:build TSK-order-001 Single task
174
+ /astra:build order All TODO tasks in domain
175
+ /astra:build --all All TODO tasks
176
+ /astra:build order --auto Batch mode, no confirmations
177
+ ```
178
+
179
+ ### /astra:verify
180
+
181
+ ```
182
+ /astra:verify [domain|--all]
183
+
184
+ Check documentation consistency (read-only).
185
+
186
+ Arguments:
187
+ domain Check specific domain
188
+ --all Check all domains (default)
189
+
190
+ Output: Verification report with blockers, warnings, diagram compliance
191
+ ```
192
+
193
+ ### /astra:change
194
+
195
+ ```
196
+ /astra:change <title>
197
+
198
+ Manage changes to approved documentation.
199
+
200
+ Arguments:
201
+ title Brief description of the change
202
+
203
+ Creates: 05-changes/impact/CHG-{date}-{slug}.md
204
+ Updates: Affected specs, archs, tasks with version bumps
205
+ ```
206
+
207
+ ---
208
+
209
+ ## Quick Reference
210
+
211
+ | I want to... | Command |
212
+ |--------------|---------|
213
+ | Start a new project | `/astra:start` |
214
+ | Document existing code | `/astra:start --scan` |
215
+ | Check my progress | `/astra:status` |
216
+ | Define requirements | `/astra:spec <domain>` |
217
+ | Design solution | `/astra:arch <domain>` |
218
+ | Break down work | `/astra:plan <domain>` |
219
+ | Implement code | `/astra:build <task>` |
220
+ | Validate docs | `/astra:verify` |
221
+ | Modify approved docs | `/astra:change <title>` |
222
+
223
+ ---
224
+
225
+ ## Document Status Lifecycle
226
+
227
+ ```
228
+ Draft → Approved → Deprecated
229
+ │ │
230
+ │ └── Locked (requires /astra:change to edit)
231
+ └── AI may edit freely
232
+ ```
233
+
234
+ ---
235
+
236
+ ## Getting Help
237
+
238
+ - `/astra:help` — This overview
239
+ - `/astra:help <command>` — Detailed command help
240
+ - `/astra:status` — Current state and suggestions
@@ -0,0 +1,171 @@
1
+ ---
2
+ description: "Generate implementation tasks from spec and arch"
3
+ argument-hint: "<domain>"
4
+ allowed-tools: ["Read", "Write", "Edit", "Glob"]
5
+ ---
6
+
7
+ Generates actionable implementation tasks from domain spec and architecture.
8
+
9
+ ## Activation
10
+
11
+ 1. LOAD engine rules from `@_astraler/engine.md`
12
+ 2. Parse domain name from arguments
13
+ 3. Check prerequisites
14
+ 4. Generate or update tasks
15
+
16
+ ## Prerequisites
17
+
18
+ - `.astraler-docs/02-spec/domains/{domain}.md` exists
19
+ - `.astraler-docs/03-arch/domains/{domain}.arch.md` exists
20
+
21
+ ## Reads
22
+
23
+ - `.astraler-docs/02-spec/domains/{domain}.md` (flows, rules, edge cases)
24
+ - `.astraler-docs/03-arch/domains/{domain}.arch.md` (components, contracts)
25
+ - `.astraler-docs/04-tasks/domains/{domain}.tasks.md` (if updating)
26
+ - `.astraler-docs/04-tasks/milestones.md` (epic context)
27
+
28
+ ## Writes
29
+
30
+ - `.astraler-docs/04-tasks/domains/{domain}.tasks.md`
31
+ - `.astraler-docs/04-tasks/milestones.md` (if adding new epic)
32
+
33
+ ## Mermaid Diagram Requirements
34
+
35
+ Every tasks doc MUST include these diagrams:
36
+
37
+ | Diagram Type | Section | Purpose |
38
+ |--------------|---------|---------|
39
+ | `pie` | Summary | Show task status distribution |
40
+ | `flowchart` | Dependency Graph | Show task dependencies |
41
+
42
+ **Optional but recommended:**
43
+ - `gantt` for sprint timeline visualization
44
+
45
+ ## Task Generation Logic
46
+
47
+ For each spec flow:
48
+ - Create task(s) to implement the flow
49
+ - Reference spec section
50
+
51
+ For each arch component:
52
+ - Create task(s) to build the component
53
+ - Reference arch section
54
+
55
+ For each arch contract:
56
+ - Create task to implement contract
57
+ - Include test requirements
58
+
59
+ ## Task Structure
60
+
61
+ ```markdown
62
+ ---
63
+ doc: {domain}-tasks
64
+ domain: {domain}
65
+ status: Draft
66
+ owner: astra-planner
67
+ version: v1.0
68
+ change-id: CHG-INIT
69
+ last-updated: {YYYY-MM-DD}
70
+ spec-ref: 02-spec/domains/{domain}.md
71
+ arch-ref: 03-arch/domains/{domain}.arch.md
72
+ ---
73
+
74
+ # {Domain} Tasks
75
+
76
+ Implementation tasks for the {Domain} domain.
77
+
78
+ ## Summary
79
+
80
+ ```mermaid
81
+ pie title Domain Tasks Status
82
+ "TODO" : 5
83
+ "DOING" : 2
84
+ "DONE" : 3
85
+ ```
86
+
87
+ > Replace counts with actual task numbers.
88
+
89
+ | Status | Count | Tasks |
90
+ |--------|:-----:|-------|
91
+ | TODO | {n} | {list} |
92
+ | DOING | {n} | {list} |
93
+ | DONE | {n} | {list} |
94
+ | BLOCKED | {n} | {list} |
95
+
96
+ ## Dependency Graph
97
+
98
+ ```mermaid
99
+ flowchart TD
100
+ T001[TSK-domain-001] --> T002[TSK-domain-002]
101
+ T001 --> T003[TSK-domain-003]
102
+ T002 --> T004[TSK-domain-004]
103
+ T003 --> T004
104
+
105
+ style T001 fill:#c8e6c9
106
+ style T002 fill:#fff9c4
107
+ ```
108
+
109
+ > Replace `domain` with actual domain name.
110
+
111
+ **Legend:** 🟢 DONE | 🟡 DOING | ⚪ TODO | 🔴 BLOCKED
112
+
113
+ ---
114
+
115
+ ## Tasks
116
+
117
+ ### TSK-{domain}-001: {Title}
118
+
119
+ **Spec:** [02-spec/domains/{domain}.md#{section}](../../02-spec/domains/{domain}.md#{section})
120
+ **Arch:** [03-arch/domains/{domain}.arch.md#{section}](../../03-arch/domains/{domain}.arch.md#{section})
121
+
122
+ **Description**
123
+ {What needs to be done}
124
+
125
+ **Acceptance Criteria**
126
+ - [ ] Criterion 1
127
+ - [ ] Criterion 2
128
+ - [ ] Criterion 3
129
+
130
+ **Test Expectations**
131
+ - [ ] Unit tests for {component}
132
+ - [ ] Integration tests for {flow}
133
+
134
+ **Status:** TODO
135
+
136
+ **Dependencies:** {TSK-xxx-xxx or none}
137
+
138
+ ---
139
+ ```
140
+
141
+ ## Task Statuses
142
+
143
+ - `TODO` - Not started
144
+ - `DOING` - In progress
145
+ - `DONE` - Completed
146
+ - `BLOCKED` - Waiting on dependency
147
+ - `CANCELLED` - No longer needed
148
+
149
+ ## ID Generation
150
+
151
+ Sequential per domain: `TSK-{domain}-{###}`
152
+
153
+ Start from 001, increment for each new task.
154
+
155
+ ## Diagram Updates
156
+
157
+ When task status changes:
158
+ 1. Update the `pie` chart counts
159
+ 2. Update node styles in dependency `flowchart`:
160
+ - DONE: `fill:#c8e6c9` (green)
161
+ - DOING: `fill:#fff9c4` (yellow)
162
+ - TODO: default (white)
163
+ - BLOCKED: `fill:#ffcdd2` (red)
164
+
165
+ ## Output
166
+
167
+ Summary of tasks generated:
168
+ - New tasks created
169
+ - Existing tasks (if updating)
170
+ - Total task count
171
+ - Diagrams included