@thatix.io/context-first-agents-cli 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +25 -12
  2. package/dist/commands/create-orchestrator.js +4 -1
  3. package/dist/commands/doctor.js +21 -5
  4. package/dist/commands/init.js +3 -1
  5. package/dist/templates/commands/en/engineer/plan.md +301 -0
  6. package/dist/templates/commands/en/engineer/pr.md +194 -0
  7. package/dist/templates/commands/en/engineer/pre-pr.md +325 -0
  8. package/dist/templates/commands/en/engineer/start.md +285 -0
  9. package/dist/templates/commands/en/engineer/work.md +256 -0
  10. package/dist/templates/commands/en/products/check.md +237 -0
  11. package/dist/templates/commands/en/products/collect.md +170 -0
  12. package/dist/templates/commands/en/products/refine.md +231 -0
  13. package/dist/templates/commands/en/products/spec.md +273 -0
  14. package/dist/templates/commands/en/quality/metrics.md +266 -0
  15. package/dist/templates/commands/en/quality/observe.md +172 -0
  16. package/dist/templates/commands/en/warm-up.md +59 -0
  17. package/dist/templates/commands/es/agents/CONTEXT-CONTRACT.md +63 -0
  18. package/dist/templates/commands/es/agents/implementer.md +27 -0
  19. package/dist/templates/commands/es/agents/integrator.md +24 -0
  20. package/dist/templates/commands/es/agents/reviewer.md +31 -0
  21. package/dist/templates/commands/es/agents/tester.md +22 -0
  22. package/dist/templates/commands/es/engineer/plan.md +335 -0
  23. package/dist/templates/commands/es/engineer/pr.md +228 -0
  24. package/dist/templates/commands/es/engineer/pre-pr.md +359 -0
  25. package/dist/templates/commands/es/engineer/start.md +318 -0
  26. package/dist/templates/commands/es/engineer/work.md +290 -0
  27. package/dist/templates/commands/es/orchestrate.md +125 -0
  28. package/dist/templates/commands/es/products/check.md +271 -0
  29. package/dist/templates/commands/es/products/collect.md +218 -0
  30. package/dist/templates/commands/es/products/refine.md +265 -0
  31. package/dist/templates/commands/es/products/spec.md +306 -0
  32. package/dist/templates/commands/es/quality/metrics.md +300 -0
  33. package/dist/templates/commands/es/quality/observe.md +205 -0
  34. package/dist/templates/commands/es/warm-up.md +59 -0
  35. package/dist/templates/commands/pt-BR/engineer/plan.md +335 -0
  36. package/dist/templates/commands/pt-BR/engineer/pr.md +228 -0
  37. package/dist/templates/commands/pt-BR/engineer/pre-pr.md +359 -0
  38. package/dist/templates/commands/pt-BR/engineer/start.md +319 -0
  39. package/dist/templates/commands/pt-BR/engineer/work.md +290 -0
  40. package/dist/templates/commands/pt-BR/products/check.md +271 -0
  41. package/dist/templates/commands/pt-BR/products/collect.md +219 -0
  42. package/dist/templates/commands/pt-BR/products/refine.md +265 -0
  43. package/dist/templates/commands/pt-BR/products/spec.md +307 -0
  44. package/dist/templates/commands/pt-BR/quality/metrics.md +300 -0
  45. package/dist/templates/commands/pt-BR/quality/observe.md +206 -0
  46. package/dist/templates/commands/pt-BR/warm-up.md +59 -0
  47. package/package.json +1 -1
  48. package/templates/commands/en/engineer/plan.md +301 -0
  49. package/templates/commands/en/engineer/pr.md +194 -0
  50. package/templates/commands/en/engineer/pre-pr.md +325 -0
  51. package/templates/commands/en/engineer/start.md +285 -0
  52. package/templates/commands/en/engineer/work.md +256 -0
  53. package/templates/commands/en/products/check.md +237 -0
  54. package/templates/commands/en/products/collect.md +170 -0
  55. package/templates/commands/en/products/refine.md +231 -0
  56. package/templates/commands/en/products/spec.md +273 -0
  57. package/templates/commands/en/quality/metrics.md +266 -0
  58. package/templates/commands/en/quality/observe.md +172 -0
  59. package/templates/commands/en/warm-up.md +59 -0
  60. package/templates/commands/es/agents/CONTEXT-CONTRACT.md +63 -0
  61. package/templates/commands/es/agents/implementer.md +27 -0
  62. package/templates/commands/es/agents/integrator.md +24 -0
  63. package/templates/commands/es/agents/reviewer.md +31 -0
  64. package/templates/commands/es/agents/tester.md +22 -0
  65. package/templates/commands/es/engineer/plan.md +335 -0
  66. package/templates/commands/es/engineer/pr.md +228 -0
  67. package/templates/commands/es/engineer/pre-pr.md +359 -0
  68. package/templates/commands/es/engineer/start.md +318 -0
  69. package/templates/commands/es/engineer/work.md +290 -0
  70. package/templates/commands/es/orchestrate.md +125 -0
  71. package/templates/commands/es/products/check.md +271 -0
  72. package/templates/commands/es/products/collect.md +218 -0
  73. package/templates/commands/es/products/refine.md +265 -0
  74. package/templates/commands/es/products/spec.md +306 -0
  75. package/templates/commands/es/quality/metrics.md +300 -0
  76. package/templates/commands/es/quality/observe.md +205 -0
  77. package/templates/commands/es/warm-up.md +59 -0
  78. package/templates/commands/pt-BR/engineer/plan.md +335 -0
  79. package/templates/commands/pt-BR/engineer/pr.md +228 -0
  80. package/templates/commands/pt-BR/engineer/pre-pr.md +359 -0
  81. package/templates/commands/pt-BR/engineer/start.md +319 -0
  82. package/templates/commands/pt-BR/engineer/work.md +290 -0
  83. package/templates/commands/pt-BR/products/check.md +271 -0
  84. package/templates/commands/pt-BR/products/collect.md +219 -0
  85. package/templates/commands/pt-BR/products/refine.md +265 -0
  86. package/templates/commands/pt-BR/products/spec.md +307 -0
  87. package/templates/commands/pt-BR/quality/metrics.md +300 -0
  88. package/templates/commands/pt-BR/quality/observe.md +206 -0
  89. package/templates/commands/pt-BR/warm-up.md +59 -0
@@ -0,0 +1,325 @@
1
+ # Pull Request Preparation
2
+
3
+ This command validates that everything is ready to create Pull Requests.
4
+
5
+ ## 📋 Prerequisites
6
+
7
+ - Complete implementation (all tasks from `/plan` executed)
8
+ - All commits made
9
+ - Clean and organized workspace
10
+
11
+ ## Configuration
12
+
13
+ Read `context-manifest.json` and `ai.properties.md` from the orchestrator to get repositories, base_path, and task_management_system.
14
+
15
+ ## 🎯 Objective
16
+
17
+ Ensure that the implementation is complete, tested, and ready for review before creating PRs.
18
+
19
+ ## 🛑 CRITICAL: WHERE TO WORK
20
+
21
+ **⚠️ ATTENTION: ALL CODE (tests, fixes, adjustments) MUST BE CREATED INSIDE THE WORKTREE!**
22
+
23
+ **✅ CORRECT** - Work inside the worktree:
24
+ ```
25
+ <orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
26
+ <orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/tests/test.ts ✅
27
+ <orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/.eslintrc.js ✅
28
+ ```
29
+
30
+ **❌ WRONG** - NEVER create code outside the worktree:
31
+ ```
32
+ <orchestrator>/.sessions/test.ts ❌
33
+ <orchestrator>/.sessions/<ISSUE-ID>/test.ts ❌
34
+ {base_path}/<repo-name>/test.ts ❌ (main repository!)
35
+ ```
36
+
37
+ **ABSOLUTE RULE**:
38
+ - 🛑 **ALL code** (tests, fixes, configurations) **MUST be in** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
39
+ - 🛑 **NEVER modify** the main repository in `{base_path}/<repo-name>/`
40
+ - ✅ **Work ONLY** inside the worktree of the specific repository
41
+
42
+ ## ✅ Validation Checklist
43
+
44
+ ### 1. Implementation Completeness
45
+
46
+ ```markdown
47
+ ## Completeness Check
48
+
49
+ - [ ] All plan tasks have been executed
50
+ - [ ] All functional requirements from the PRD have been implemented
51
+ - [ ] All acceptance criteria have been met
52
+ - [ ] No functionality is half-done
53
+ ```
54
+
55
+ ### 2. Code Quality
56
+
57
+ For each modified repository:
58
+
59
+ ```bash
60
+ cd <repository>
61
+
62
+ # Check status
63
+ git status
64
+
65
+ # Check linting (examples by stack):
66
+ # Node.js: npm run lint / yarn lint / pnpm lint
67
+ # Python: flake8 . / pylint src/ / black --check .
68
+ # Java: mvn checkstyle:check / gradle check
69
+ # Go: golangci-lint run / go vet ./...
70
+ # Ruby: rubocop
71
+ # Rust: cargo clippy
72
+ # PHP: ./vendor/bin/phpcs
73
+ # C#: dotnet format --verify-no-changes
74
+
75
+ # Check formatting (examples by stack):
76
+ # Node.js: npm run format:check / prettier --check .
77
+ # Python: black --check . / autopep8 --diff .
78
+ # Java: mvn formatter:validate
79
+ # Go: gofmt -l . / go fmt ./...
80
+ # Ruby: rubocop --format-only
81
+ # Rust: cargo fmt --check
82
+
83
+ # Check build (examples by stack):
84
+ # Node.js: npm run build / yarn build
85
+ # Python: python setup.py build
86
+ # Java: mvn compile / gradle build
87
+ # Go: go build ./...
88
+ # Ruby: rake build
89
+ # Rust: cargo build
90
+ ```
91
+
92
+ Checklist:
93
+ ```markdown
94
+ ## Code Quality
95
+
96
+ ### <repo-1>
97
+ - [ ] Linting without errors
98
+ - [ ] Correct formatting
99
+ - [ ] Build without errors
100
+ - [ ] No critical warnings
101
+
102
+ ### <repo-2>
103
+ - [ ] Linting without errors
104
+ - [ ] Correct formatting
105
+ - [ ] Build without errors
106
+ - [ ] No critical warnings
107
+ ```
108
+
109
+ ### 3. Tests
110
+
111
+ For each repository:
112
+
113
+ ```bash
114
+ cd <repository>
115
+
116
+ # Run unit tests (examples by stack):
117
+ # Node.js: npm run test:unit / jest / vitest
118
+ # Python: pytest tests/unit / python -m unittest
119
+ # Java: mvn test / gradle test
120
+ # Go: go test ./... -short
121
+ # Ruby: rspec spec/unit / rake test:unit
122
+ # Rust: cargo test --lib
123
+ # PHP: ./vendor/bin/phpunit --testsuite=unit
124
+ # C#: dotnet test --filter Category=Unit
125
+
126
+ # Run integration tests (examples by stack):
127
+ # Node.js: npm run test:integration
128
+ # Python: pytest tests/integration
129
+ # Java: mvn verify / gradle integrationTest
130
+ # Go: go test ./... -run Integration
131
+ # Ruby: rspec spec/integration
132
+ # Rust: cargo test --test '*'
133
+ # PHP: ./vendor/bin/phpunit --testsuite=integration
134
+
135
+ # Check coverage (examples by stack):
136
+ # Node.js: npm run test:coverage / jest --coverage
137
+ # Python: pytest --cov=src tests/
138
+ # Java: mvn jacoco:report / gradle jacocoTestReport
139
+ # Go: go test -cover ./...
140
+ # Ruby: rspec --coverage
141
+ # Rust: cargo tarpaulin
142
+ # PHP: ./vendor/bin/phpunit --coverage-html coverage/
143
+ ```
144
+
145
+ Checklist:
146
+ ```markdown
147
+ ## Tests
148
+
149
+ ### <repo-1>
150
+ - [ ] All unit tests passing
151
+ - [ ] All integration tests passing
152
+ - [ ] Adequate test coverage (>= X%)
153
+ - [ ] New tests added for new features
154
+
155
+ ### <repo-2>
156
+ - [ ] All unit tests passing
157
+ - [ ] All integration tests passing
158
+ - [ ] Adequate test coverage (>= X%)
159
+ - [ ] New tests added for new features
160
+ ```
161
+
162
+ ### 4. Documentation
163
+
164
+ ```markdown
165
+ ## Documentation
166
+
167
+ - [ ] README updated (if necessary)
168
+ - [ ] Appropriate code comments
169
+ - [ ] API documentation updated (if there are changes)
170
+ - [ ] Changelog updated
171
+ - [ ] Technical documentation updated in metaspecs (if applicable)
172
+ ```
173
+
174
+ ### 5. Commits
175
+
176
+ ```markdown
177
+ ## Commits
178
+
179
+ - [ ] All commits have clear and descriptive messages
180
+ - [ ] Commits follow the project standard (conventional commits, etc.)
181
+ - [ ] No commits with generic messages ("fix", "update", etc.)
182
+ - [ ] Commits are logically organized
183
+ - [ ] No debug or temporary commits
184
+ ```
185
+
186
+ ### 6. Synchronization
187
+
188
+ ```markdown
189
+ ## Synchronization
190
+
191
+ - [ ] Branches are up to date with the base branch (main/develop)
192
+ - [ ] No merge conflicts
193
+ - [ ] Changes between repositories are synchronized
194
+ - [ ] Dependencies between repos have been tested
195
+ ```
196
+
197
+ ### 7. Security
198
+
199
+ ```markdown
200
+ ## Security
201
+
202
+ - [ ] No credentials or secrets in the code
203
+ - [ ] No sensitive data in logs
204
+ - [ ] Security dependencies have been checked
205
+ - [ ] No known vulnerabilities introduced
206
+ ```
207
+
208
+ ### 8. Performance
209
+
210
+ ```markdown
211
+ ## Performance
212
+
213
+ - [ ] No obvious performance regressions
214
+ - [ ] Costly queries/operations have been optimized
215
+ - [ ] No memory leaks introduced
216
+ - [ ] PRD performance requirements have been met
217
+ ```
218
+
219
+ ## 🔍 Cross Validation
220
+
221
+ If multiple repositories were modified:
222
+
223
+ ```markdown
224
+ ## Cross Validation
225
+
226
+ - [ ] Tested integration between repositories locally
227
+ - [ ] APIs/contracts between repos are consistent
228
+ - [ ] No undocumented breaking changes
229
+ - [ ] Deployment/merge order is clear
230
+ ```
231
+
232
+ ## 📄 PR Description Preparation
233
+
234
+ Create `./.sessions/<ISSUE-ID>/pr-description.md`:
235
+
236
+ ```markdown
237
+ ## 🎯 Objective
238
+ [Brief description of what this feature does]
239
+
240
+ ## 📝 Main Changes
241
+ - [Change 1]
242
+ - [Change 2]
243
+ - [Change 3]
244
+
245
+ ## 🔗 Links
246
+ - **Issue**: [ISSUE-ID]
247
+ - **PRD**: [link or path]
248
+ - **Technical Plan**: [link or path]
249
+
250
+ ## ✅ Checklist
251
+ - [x] Code implemented and tested
252
+ - [x] Unit tests added/updated
253
+ - [x] Integration tests passing
254
+ - [x] Documentation updated
255
+ - [x] Linting and formatting OK
256
+ - [x] Build without errors
257
+
258
+ ## 🧪 How to Test
259
+ 1. [Step 1]
260
+ 2. [Step 2]
261
+ 3. [Expected result]
262
+
263
+ ## 🔍 Notes for Reviewers
264
+ - [Point of attention 1]
265
+ - [Point of attention 2]
266
+ ```
267
+
268
+ ## 🚨 Issues Found
269
+
270
+ If any validation fails:
271
+ 1. 🛑 **STOP** the PR creation process
272
+ 2. 📝 **DOCUMENT** the problem
273
+ 3. 🔧 **FIX** the problem
274
+ 4. 🔄 **RUN** `/pre-pr` again
275
+
276
+ ## 📊 Validation Report
277
+
278
+ Create `./.sessions/<ISSUE-ID>/pre-pr-report.md`:
279
+
280
+ ```markdown
281
+ # Pre-PR Validation Report
282
+
283
+ **Date**: [date/time]
284
+ **Issue**: [ISSUE-ID]
285
+
286
+ ## Overall Status
287
+ ✅ Ready for PR / ⚠️ Pending / ❌ Blocked
288
+
289
+ ## Validated Repositories
290
+ - **<repo-1>**: ✅ OK
291
+ - **<repo-2>**: ✅ OK
292
+
293
+ ## Test Summary
294
+ - **Unit Tests**: X/X passing
295
+ - **Integration Tests**: Y/Y passing
296
+ - **Coverage**: Z%
297
+
298
+ ## Pending Items (if any)
299
+ - [Pending item 1]
300
+ - [Pending item 2]
301
+
302
+ ## Next Steps
303
+ - [x] All validations passed
304
+ - [ ] Run `/pr` to create Pull Requests
305
+ ```
306
+
307
+ ---
308
+
309
+ **Provided arguments**:
310
+
311
+ ```
312
+ #$ARGUMENTS
313
+ ```
314
+
315
+ ---
316
+
317
+ ## 🎯 Next Step
318
+
319
+ If all validations passed:
320
+
321
+ ```bash
322
+ /pr
323
+ ```
324
+
325
+ This command will create Pull Requests for all modified repositories.
@@ -0,0 +1,285 @@
1
+ # Start Development
2
+
3
+ This command initiates the development of a feature in the current workspace.
4
+
5
+ ## 📍 IMPORTANT: Understand the Structure
6
+
7
+ **Workspace** (where you will work):
8
+ ```
9
+ <orchestrator>/.sessions/<ISSUE-ID>/
10
+ ├── repo-1/ # worktree with branch feature/<ISSUE-ID>
11
+ ├── repo-2/ # worktree with branch feature/<ISSUE-ID>
12
+ ├── context.md # context (immutable - created by this command)
13
+ ├── architecture.md # architecture (immutable - created by this command)
14
+ └── plan.md # plan (mutable - created by /plan)
15
+ ```
16
+
17
+ **Main Repositories** (read-only):
18
+ ```
19
+ {base_path}/repo-1/ # main repo (branch main/master)
20
+ {base_path}/repo-2/ # main repo (branch main/master)
21
+ ```
22
+
23
+ **GOLDEN RULE**:
24
+ - ✅ Read metaspecs and code from main repositories (read-only)
25
+ - ✅ Create `context.md` and `architecture.md` in `.sessions/<ISSUE-ID>/`
26
+ - ❌ NEVER checkout main repositories
27
+ - ❌ NEVER modify code in this command (use `/work` later)
28
+
29
+ ## Configuration
30
+
31
+ Read `context-manifest.json` and `ai.properties.md` from the orchestrator to get repositories, base_path, and task_management_system.
32
+
33
+ ## 📚 Load MetaSpecs
34
+
35
+ **Automatically locate MetaSpecs**:
36
+ 1. Read `context-manifest.json` from the orchestrator
37
+ 2. Find the repository with `"role": "metaspecs"`
38
+ 3. Read `ai.properties.md` to get the `base_path`
39
+ 4. The metaspecs are at: `{base_path}/{metaspecs-repo-id}/`
40
+ 5. Read relevant `index.md` files:
41
+ - Business context
42
+ - Stack, architecture, and technical patterns
43
+ - Project conventions
44
+ - ADRs (Architecture Decision Records)
45
+
46
+ ## 🎯 Project Context
47
+
48
+ Before starting, load the context by consulting:
49
+ - `context-manifest.json` - Repository structure
50
+ - MetaSpecs (located above) - Architecture and patterns
51
+ - `workspace directory` - Current workspace information
52
+
53
+ ## ⚙️ Initial Setup
54
+
55
+ 1. **Verify Workspace**:
56
+ - Confirm you are in the correct workspace (check `workspace directory`)
57
+ - List repositories available in the workspace
58
+
59
+ 2. **Check Branches**:
60
+ - For each repository in the workspace, check the current branch
61
+ - Confirm all branches are synchronized
62
+
63
+ 3. **Load Specification**:
64
+ - **If task manager configured**: Read the issue using the appropriate MCP
65
+ - **Otherwise**: Ask the user for the specification file or feature description
66
+
67
+ 4. **Update Status** (if task manager configured):
68
+ - Move the issue to "In Progress"
69
+
70
+ ## 📋 Analysis and Understanding
71
+
72
+ Analyze the specification and build a complete understanding by answering:
73
+
74
+ ### Business
75
+ - **Why** is this being built?
76
+ - **Who** benefits?
77
+ - **Which** metric do we want to impact?
78
+
79
+ ### Functional
80
+ - **What is the expected outcome?** (user behavior, system output)
81
+ - **Which components** will be created/modified in each repository?
82
+ - **Which integrations** between repositories are necessary?
83
+
84
+ ### Technical
85
+ - **Approved stack?** Check against technical specifications
86
+ - **Architectural patterns?** Check ADRs (if available)
87
+ - **New dependencies?** Justify and document
88
+ - **How to test?** (according to project standards)
89
+
90
+ ### Validation against MetaSpecs
91
+
92
+ If metaspecs are available, validate:
93
+ - Aligned with strategy and roadmap?
94
+ - Uses approved technology stack?
95
+ - Respects Architecture Decision Records?
96
+ - Follows documented business rules?
97
+
98
+ ## 🤔 Clarification Questions
99
+
100
+ After initial analysis, formulate **3-5 most important clarifications**:
101
+
102
+ **Examples of relevant questions**:
103
+ - Which repository should contain the main logic?
104
+ - How should repositories communicate?
105
+ - Are there dependencies between changes in different repos?
106
+ - What is the recommended implementation order?
107
+ - Is there impact on APIs or contracts between services?
108
+
109
+ ## 💾 Creation of Context.md
110
+
111
+ **IMPORTANT**: This file is **IMMUTABLE** after approval. It must not be modified by subsequent commands.
112
+
113
+ Create file `./.sessions/<ISSUE-ID>/context.md` with:
114
+
115
+ ```markdown
116
+ # Context: [Feature Name]
117
+
118
+ ## Why
119
+ [Business value, persona served, impacted metric]
120
+
121
+ ## What
122
+ [Main functionalities, expected behavior]
123
+
124
+ ## How
125
+ [Technical approach, components, affected repositories]
126
+
127
+ ## Validation against MetaSpecs
128
+ - [x] Aligned with product strategy
129
+ - [x] Serves correct persona
130
+ - [x] Impacted metric documented
131
+ - [x] Uses approved stack
132
+ - [x] Respects ADRs
133
+ - [x] No conflicts with known limitations
134
+
135
+ ## Dependencies
136
+ [Libraries, APIs, existing components]
137
+
138
+ ## Constraints
139
+ [Technical limitations, performance targets, budget]
140
+
141
+ ## Tests
142
+ [Critical E2E, necessary unit tests, expected coverage]
143
+ ```
144
+
145
+ **After creating `context.md`, request user review and approval before proceeding.**
146
+
147
+ ---
148
+
149
+ ## 🏗️ Creation of Architecture.md
150
+
151
+ **IMPORTANT**: This file is **IMMUTABLE** after approval. It must not be modified by subsequent commands.
152
+
153
+ ### Architectural Principles (MANDATORY)
154
+
155
+ **BEFORE creating the architecture, you MUST:**
156
+
157
+ 1. **Read ADRs (Architecture Decision Records)**:
158
+ - List ADRs in metaspecs
159
+ - Read ALL ADRs relevant to the feature
160
+ - Identify mandatory constraints and patterns
161
+
162
+ 2. **Consult architectural patterns**:
163
+ - Read project structure guides in metaspecs
164
+ - Read coding patterns in metaspecs
165
+ - Identify existing patterns in code (use Glob/Grep to find similar examples)
166
+
167
+ 3. **Validate compliance with ADRs**:
168
+ - For each relevant ADR, check if the proposed solution respects the decisions
169
+ - Document compliance in architecture.md
170
+ - If violation exists, justify or propose correction
171
+
172
+ 4. **Analyze existing code**:
173
+ - Use Glob/Grep to find similar components/modules
174
+ - Understand existing patterns and structures
175
+ - Align new implementation with project standards
176
+
177
+ ### Architecture Document Structure
178
+
179
+ Create file `./.sessions/<ISSUE-ID>/architecture.md` with:
180
+
181
+ ```markdown
182
+ # Architecture: [Feature Name]
183
+
184
+ ## Overview
185
+ [High-level view of the system before and after the change]
186
+
187
+ ## Affected Components
188
+ [List of components and their relationships, dependencies]
189
+
190
+ ### Component Diagram
191
+ [Textual description or Mermaid diagram of components]
192
+
193
+ ### Data Flow
194
+ 1. [Step 1 of the flow]
195
+ 2. [Step 2 of the flow]
196
+ 3. [Step 3 of the flow]
197
+
198
+ ## Proposed Directory Structure
199
+ [Based on project patterns]
200
+
201
+ ```
202
+ repo-1/
203
+ ├── src/
204
+ │ ├── components/
205
+ │ │ └── NewComponent.tsx (CREATE)
206
+ │ └── services/
207
+ │ └── NewService.ts (CREATE)
208
+ ```
209
+
210
+ ## Patterns and Best Practices
211
+ [Patterns to be maintained or introduced]
212
+
213
+ ## ADR Validation
214
+ [List of consulted ADRs and compliance]
215
+
216
+ - [x] ADR-001: [Name] - Compliant
217
+ - [x] ADR-002: [Name] - Compliant
218
+
219
+ ## External Dependencies
220
+ [Libraries to be used or added]
221
+
222
+ ## Technical Decisions
223
+
224
+ ### Decision 1: [Title]
225
+ **Context**: [Why we need to decide this]
226
+ **Options considered**:
227
+ - Option A: [Pros and cons]
228
+ - Option B: [Pros and cons]
229
+ **Decision**: [Chosen option]
230
+ **Justification**: [Why we chose this option]
231
+
232
+ ## Constraints and Assumptions
233
+ [Technical limitations and premises]
234
+
235
+ ## Trade-offs
236
+ [Alternatives considered and why they were not chosen]
237
+
238
+ ## Consequences
239
+ **Positive**:
240
+ - [Benefit 1]
241
+ - [Benefit 2]
242
+
243
+ **Negative**:
244
+ - [Cost/limitation 1]
245
+ - [Cost/limitation 2]
246
+
247
+ ## Main Files
248
+ [List of main files to be edited/created]
249
+
250
+ - `repo-1/src/components/NewComponent.tsx` (CREATE)
251
+ - `repo-1/src/services/NewService.ts` (CREATE)
252
+ - `repo-2/src/controllers/NewController.ts` (CREATE)
253
+ ```
254
+
255
+ **After creating `architecture.md`, request user review and approval before proceeding.**
256
+
257
+ ---
258
+
259
+ **Provided arguments**:
260
+
261
+ ```
262
+ #$ARGUMENTS
263
+ ```
264
+
265
+ ---
266
+
267
+ ## 🎯 Next Step
268
+
269
+ **After user approval of `context.md` and `architecture.md` files**:
270
+
271
+ ```bash
272
+ /plan
273
+ ```
274
+
275
+ This command will create the detailed technical implementation plan.
276
+
277
+ ---
278
+
279
+ ## ⚠️ IMPORTANT: Immutable Files
280
+
281
+ **`context.md` and `architecture.md` are IMMUTABLE after approval.**
282
+
283
+ - ✅ They can be READ by subsequent commands (`/plan`, `/work`)
284
+ - ❌ They MUST NOT be MODIFIED by any command
285
+ - ❌ If changes are needed, discuss with the user and create new files or update the issue in the task manager