opencode-codeops 1.4.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/CHANGELOG.md +179 -0
- package/LICENSE +21 -0
- package/README.md +171 -0
- package/_shared/auto-design.md +129 -0
- package/_shared/layout-convention.md +198 -0
- package/_shared/quality-profile.md +134 -0
- package/_shared/recommendation-hardening.md +166 -0
- package/_shared/scope-expansion-control.md +176 -0
- package/_shared/spec-first-ordering.md +79 -0
- package/_shared/zero-ambiguity-gate.md +311 -0
- package/agent-templates/codebase-scout.md +17 -0
- package/agent-templates/concurrency-auditor.md +5 -0
- package/agent-templates/design-challenger.md +26 -0
- package/agent-templates/financial-integrity-auditor.md +5 -0
- package/agent-templates/perf-auditor.md +23 -0
- package/agent-templates/phase-reviewer.md +54 -0
- package/agent-templates/plan-task-executor-opus.md +46 -0
- package/agent-templates/plan-task-executor.md +43 -0
- package/agent-templates/preflight-auditor.md +45 -0
- package/agent-templates/security-auditor.md +42 -0
- package/agent-templates/semantics-reviewer.md +5 -0
- package/agent-templates/spec-test-author.md +29 -0
- package/agents/concurrency-auditor.md +15 -0
- package/agents/correctness-reviewer.md +66 -0
- package/agents/demanding-executor.md +58 -0
- package/agents/design-challenger.md +38 -0
- package/agents/executor.md +55 -0
- package/agents/explorer.md +29 -0
- package/agents/financial-integrity-auditor.md +15 -0
- package/agents/performance-auditor.md +35 -0
- package/agents/preflight-auditor.md +57 -0
- package/agents/security-auditor.md +54 -0
- package/agents/semantics-reviewer.md +15 -0
- package/agents/spec-test-author.md +41 -0
- package/bin/codeops-worktree +244 -0
- package/bin/index.mjs +106 -0
- package/bin/install-agents.mjs +453 -0
- package/bin/install-skills.mjs +466 -0
- package/bin/lib/opencode-install.mjs +185 -0
- package/install.sh +55 -0
- package/package.json +73 -0
- package/plugin/index.ts +181 -0
- package/references/domains/compiler-and-language.md +28 -0
- package/references/domains/data-and-migration.md +22 -0
- package/references/domains/distributed-and-concurrent.md +26 -0
- package/references/domains/financial-system.md +28 -0
- package/references/domains/selection.md +19 -0
- package/references/domains/web-application.md +23 -0
- package/schemas/codeops-config.schema.json +56 -0
- package/scripts/check-version.mjs +163 -0
- package/scripts/codeops-migrate.sh +355 -0
- package/scripts/codeops-roadmap-compact.sh +232 -0
- package/scripts/codeops-roadmap-sync.sh +275 -0
- package/scripts/codeops_outcomes.py +155 -0
- package/scripts/codeops_plan.py +239 -0
- package/scripts/codeops_plan_migrate.py +318 -0
- package/scripts/codeops_worktree_snapshot.py +99 -0
- package/scripts/install_agents.py +288 -0
- package/scripts/release.mjs +533 -0
- package/skills/analyze-project/SKILL.md +28 -0
- package/skills/clean-comments/SKILL.md +22 -0
- package/skills/exec-plan/SKILL.md +267 -0
- package/skills/exec-plan/commit-modes.md +113 -0
- package/skills/exec-plan/execution-protocol.md +471 -0
- package/skills/git-commit/SKILL.md +35 -0
- package/skills/github-issues/SKILL.md +38 -0
- package/skills/grill-me/SKILL.md +342 -0
- package/skills/make-plan/SKILL.md +282 -0
- package/skills/make-plan/quality-checklist.md +96 -0
- package/skills/make-plan/templates.md +535 -0
- package/skills/make-plan/zero-ambiguity-gate.md +19 -0
- package/skills/make-requirements/SKILL.md +268 -0
- package/skills/make-requirements/discovery-phases.md +255 -0
- package/skills/make-requirements/review-and-add.md +73 -0
- package/skills/make-requirements/templates.md +296 -0
- package/skills/make-requirements/zero-ambiguity-gate.md +18 -0
- package/skills/outcome-review/SKILL.md +34 -0
- package/skills/preflight/SKILL.md +310 -0
- package/skills/preflight/dimensions.md +181 -0
- package/skills/preflight/report-format.md +300 -0
- package/skills/retro-requirements/SKILL.md +218 -0
- package/skills/retro-requirements/confidence-classification.md +45 -0
- package/skills/retro-requirements/phases.md +609 -0
- package/skills/retro-requirements/triage-gate.md +135 -0
- package/skills/roadmap/SKILL.md +381 -0
- package/skills/roadmap/stage-hooks.md +80 -0
- package/skills/roadmap/template.md +200 -0
- package/skills/setup-codeops/SKILL.md +94 -0
- package/skills/setup-codeops/migration.md +106 -0
- package/skills/setup-codeops/scaffold.md +99 -0
- package/skills/setup-routing/SKILL.md +102 -0
- package/skills/setup-routing/routing.md +44 -0
- package/skills/techdocs/SKILL.md +199 -0
- package/skills/techdocs/authoring-and-update.md +178 -0
- package/skills/techdocs/templates.md +655 -0
- package/skills/techdocs/vitepress-setup.md +143 -0
- package/skills/upgrade-plan/SKILL.md +75 -0
- package/skills/upgrade-plan/content-quality-gate.md +35 -0
- package/skills/upgrade-plan/upgrade-checklists.md +107 -0
- package/standards/coding-standards-full.md +124 -0
- package/standards/coding-standards.md +64 -0
- package/standards/output-style.md +17 -0
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
# techdocs — Document Templates (Phase 4)
|
|
2
|
+
|
|
3
|
+
> **CodeOps Artifact Schema**: 1
|
|
4
|
+
|
|
5
|
+
Canonical templates for every document in the VitePress `docs/` tree. Write a file from the
|
|
6
|
+
matching template, then fill the bracketed placeholders with real, verified project details. Only
|
|
7
|
+
create the sections relevant to the project type (see the adaptation table in SKILL.md). Replace
|
|
8
|
+
every `[YYYY-MM-DD]` "Last Updated" stamp with today's date when you write or update a file.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## `docs/index.md` — System overview (entry point)
|
|
13
|
+
|
|
14
|
+
This is the root document **and** the techdocs opt-in marker (`techdocs: true`).
|
|
15
|
+
|
|
16
|
+
````markdown
|
|
17
|
+
---
|
|
18
|
+
techdocs: true
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# [Project Name] — Technical Architecture
|
|
22
|
+
|
|
23
|
+
> **Project**: [Project Name]
|
|
24
|
+
> **Type**: [SaaS / API / Library / CLI / etc.]
|
|
25
|
+
> **Tech Stack**: [Key technologies]
|
|
26
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## System Purpose
|
|
31
|
+
|
|
32
|
+
[2-3 paragraphs: What this system does, who it's for, and why it exists.
|
|
33
|
+
Written for a developer who has never seen the project before.]
|
|
34
|
+
|
|
35
|
+
## Architecture at a Glance
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
graph TB
|
|
39
|
+
Client[Client App] --> API[API Server]
|
|
40
|
+
API --> DB[(Database)]
|
|
41
|
+
API --> Cache[(Cache)]
|
|
42
|
+
API --> Queue[Message Queue]
|
|
43
|
+
Queue --> Worker[Background Worker]
|
|
44
|
+
Worker --> DB
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Key Components
|
|
48
|
+
|
|
49
|
+
| Component | Technology | Purpose | Documentation |
|
|
50
|
+
|-----------|-----------|---------|---------------|
|
|
51
|
+
| [Component] | [Tech] | [Purpose] | [Link to detail doc] |
|
|
52
|
+
|
|
53
|
+
## Technology Decisions
|
|
54
|
+
|
|
55
|
+
See [Architecture Decision Records](/decisions/) for the rationale behind all major
|
|
56
|
+
technology and design choices.
|
|
57
|
+
|
|
58
|
+
## Getting Started
|
|
59
|
+
|
|
60
|
+
New to the project? Start with the [Getting Started Guide](/guides/getting-started).
|
|
61
|
+
````
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## `docs/architecture/system-overview.md`
|
|
66
|
+
|
|
67
|
+
````markdown
|
|
68
|
+
# System Overview
|
|
69
|
+
|
|
70
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
71
|
+
|
|
72
|
+
## Architecture Style
|
|
73
|
+
|
|
74
|
+
[Describe the overall architecture: monolith, microservices, serverless, event-driven, etc.
|
|
75
|
+
Explain WHY this style was chosen.]
|
|
76
|
+
|
|
77
|
+
## Component Architecture
|
|
78
|
+
|
|
79
|
+
[Detailed component diagram — more detailed than index.md]
|
|
80
|
+
|
|
81
|
+
```mermaid
|
|
82
|
+
graph TB
|
|
83
|
+
subgraph Frontend
|
|
84
|
+
Web[Web App]
|
|
85
|
+
Mobile[Mobile App]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
subgraph API Layer
|
|
89
|
+
Gateway[API Gateway]
|
|
90
|
+
AuthService[Auth Service]
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
subgraph Domain Services
|
|
94
|
+
ServiceA[Service A]
|
|
95
|
+
ServiceB[Service B]
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
subgraph Data Layer
|
|
99
|
+
DB[(Primary DB)]
|
|
100
|
+
Cache[(Cache)]
|
|
101
|
+
Search[(Search Index)]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
Web --> Gateway
|
|
105
|
+
Mobile --> Gateway
|
|
106
|
+
Gateway --> AuthService
|
|
107
|
+
Gateway --> ServiceA
|
|
108
|
+
Gateway --> ServiceB
|
|
109
|
+
ServiceA --> DB
|
|
110
|
+
ServiceA --> Cache
|
|
111
|
+
ServiceB --> DB
|
|
112
|
+
ServiceB --> Search
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Component Responsibilities
|
|
116
|
+
|
|
117
|
+
### [Component Name]
|
|
118
|
+
|
|
119
|
+
- **Purpose**: [What it does]
|
|
120
|
+
- **Technology**: [What it's built with]
|
|
121
|
+
- **Inputs**: [What data/events it receives]
|
|
122
|
+
- **Outputs**: [What data/events it produces]
|
|
123
|
+
- **Dependencies**: [What it depends on]
|
|
124
|
+
|
|
125
|
+
[Repeat for each major component]
|
|
126
|
+
|
|
127
|
+
## Communication Patterns
|
|
128
|
+
|
|
129
|
+
| From | To | Protocol | Pattern | Notes |
|
|
130
|
+
|------|-----|----------|---------|-------|
|
|
131
|
+
| [Component] | [Component] | [REST/gRPC/Events/etc.] | [Sync/Async] | [Notes] |
|
|
132
|
+
|
|
133
|
+
## Cross-Cutting Concerns
|
|
134
|
+
|
|
135
|
+
- **Authentication**: [How auth works across the system]
|
|
136
|
+
- **Logging**: [Logging strategy and tools]
|
|
137
|
+
- **Monitoring**: [Monitoring approach]
|
|
138
|
+
- **Error Handling**: [System-wide error handling strategy]
|
|
139
|
+
````
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## `docs/architecture/data-model.md`
|
|
144
|
+
|
|
145
|
+
````markdown
|
|
146
|
+
# Data Model
|
|
147
|
+
|
|
148
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
149
|
+
|
|
150
|
+
## Domain Model
|
|
151
|
+
|
|
152
|
+
```mermaid
|
|
153
|
+
erDiagram
|
|
154
|
+
User ||--o{ Project : owns
|
|
155
|
+
Project ||--|{ Task : contains
|
|
156
|
+
Task }o--|| User : "assigned to"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Entities
|
|
160
|
+
|
|
161
|
+
### [Entity Name]
|
|
162
|
+
|
|
163
|
+
| Field | Type | Constraints | Description |
|
|
164
|
+
|-------|------|------------|-------------|
|
|
165
|
+
| id | UUID | PK | Unique identifier |
|
|
166
|
+
| [field] | [type] | [constraints] | [description] |
|
|
167
|
+
|
|
168
|
+
**Relationships:**
|
|
169
|
+
- Has many [Related Entity] (via [foreign key])
|
|
170
|
+
- Belongs to [Related Entity] (via [foreign key])
|
|
171
|
+
|
|
172
|
+
**Business Rules:**
|
|
173
|
+
- [Rule 1]
|
|
174
|
+
- [Rule 2]
|
|
175
|
+
|
|
176
|
+
[Repeat for each entity]
|
|
177
|
+
|
|
178
|
+
## Data Flow
|
|
179
|
+
|
|
180
|
+
[Describe how data flows through the system — creation, transformation, storage, retrieval]
|
|
181
|
+
|
|
182
|
+
## Migration Strategy
|
|
183
|
+
|
|
184
|
+
[How database migrations are handled, tooling used, rollback procedures]
|
|
185
|
+
````
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## `docs/architecture/api-design.md`
|
|
190
|
+
|
|
191
|
+
````markdown
|
|
192
|
+
# API Design
|
|
193
|
+
|
|
194
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
195
|
+
|
|
196
|
+
## API Style
|
|
197
|
+
|
|
198
|
+
[REST / GraphQL / gRPC / mixed — and why]
|
|
199
|
+
|
|
200
|
+
## Authentication
|
|
201
|
+
|
|
202
|
+
[How API authentication works — JWT, API keys, OAuth, session tokens]
|
|
203
|
+
|
|
204
|
+
## Conventions
|
|
205
|
+
|
|
206
|
+
- **Base URL**: `[base url]`
|
|
207
|
+
- **Versioning**: [Strategy — URL path, header, query param]
|
|
208
|
+
- **Pagination**: [Strategy — cursor, offset, keyset]
|
|
209
|
+
- **Error Format**: [Standard error response shape]
|
|
210
|
+
|
|
211
|
+
## Endpoint Groups
|
|
212
|
+
|
|
213
|
+
### [Resource Group]
|
|
214
|
+
|
|
215
|
+
| Method | Endpoint | Description | Auth |
|
|
216
|
+
|--------|----------|-------------|------|
|
|
217
|
+
| GET | `/api/v1/[resource]` | List [resources] | [Required/Public] |
|
|
218
|
+
| POST | `/api/v1/[resource]` | Create [resource] | [Required/Public] |
|
|
219
|
+
| GET | `/api/v1/[resource]/:id` | Get [resource] | [Required/Public] |
|
|
220
|
+
| PUT | `/api/v1/[resource]/:id` | Update [resource] | [Required/Public] |
|
|
221
|
+
| DELETE | `/api/v1/[resource]/:id` | Delete [resource] | [Required/Public] |
|
|
222
|
+
|
|
223
|
+
[Repeat for each resource group]
|
|
224
|
+
|
|
225
|
+
## Error Handling
|
|
226
|
+
|
|
227
|
+
| Status Code | Meaning | Response Shape |
|
|
228
|
+
|-------------|---------|----------------|
|
|
229
|
+
| 400 | Bad Request | `{ error: string, details: [...] }` |
|
|
230
|
+
| 401 | Unauthorized | `{ error: string }` |
|
|
231
|
+
| 403 | Forbidden | `{ error: string }` |
|
|
232
|
+
| 404 | Not Found | `{ error: string }` |
|
|
233
|
+
| 500 | Internal Error | `{ error: string }` |
|
|
234
|
+
|
|
235
|
+
## Rate Limiting
|
|
236
|
+
|
|
237
|
+
[Rate limiting strategy, limits per endpoint category, response headers]
|
|
238
|
+
````
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## `docs/architecture/infrastructure.md`
|
|
243
|
+
|
|
244
|
+
````markdown
|
|
245
|
+
# Infrastructure
|
|
246
|
+
|
|
247
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
248
|
+
|
|
249
|
+
## Deployment Architecture
|
|
250
|
+
|
|
251
|
+
```mermaid
|
|
252
|
+
graph TB
|
|
253
|
+
subgraph Production
|
|
254
|
+
LB[Load Balancer]
|
|
255
|
+
App1[App Instance 1]
|
|
256
|
+
App2[App Instance 2]
|
|
257
|
+
DB[(Database)]
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
subgraph CI/CD
|
|
261
|
+
GH[GitHub Actions]
|
|
262
|
+
Registry[Container Registry]
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
GH --> Registry
|
|
266
|
+
Registry --> App1
|
|
267
|
+
Registry --> App2
|
|
268
|
+
LB --> App1
|
|
269
|
+
LB --> App2
|
|
270
|
+
App1 --> DB
|
|
271
|
+
App2 --> DB
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Environments
|
|
275
|
+
|
|
276
|
+
| Environment | Purpose | URL | Infrastructure |
|
|
277
|
+
|-------------|---------|-----|---------------|
|
|
278
|
+
| Development | Local development | localhost:XXXX | Docker Compose |
|
|
279
|
+
| Staging | Pre-production testing | [URL] | [Platform] |
|
|
280
|
+
| Production | Live system | [URL] | [Platform] |
|
|
281
|
+
|
|
282
|
+
## Container Architecture
|
|
283
|
+
|
|
284
|
+
[Docker setup, base images, multi-stage builds, compose configuration]
|
|
285
|
+
|
|
286
|
+
## CI/CD Pipeline
|
|
287
|
+
|
|
288
|
+
[Pipeline stages, triggers, deployment strategy]
|
|
289
|
+
|
|
290
|
+
## Secrets Management
|
|
291
|
+
|
|
292
|
+
[How secrets are stored, rotated, and injected — NEVER list actual secrets]
|
|
293
|
+
|
|
294
|
+
## Backup & Recovery
|
|
295
|
+
|
|
296
|
+
[Backup strategy, recovery procedures, RPO/RTO targets]
|
|
297
|
+
|
|
298
|
+
## Monitoring & Alerting
|
|
299
|
+
|
|
300
|
+
[What is monitored, alerting thresholds, incident response]
|
|
301
|
+
````
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## `docs/architecture/security.md`
|
|
306
|
+
|
|
307
|
+
````markdown
|
|
308
|
+
# Security Architecture
|
|
309
|
+
|
|
310
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
311
|
+
> **See also**: your project's security coding standards (AGENTS.md) for implementation-level standards
|
|
312
|
+
|
|
313
|
+
## Threat Model
|
|
314
|
+
|
|
315
|
+
[High-level threat model — what are we protecting, from whom?]
|
|
316
|
+
|
|
317
|
+
| Asset | Threat | Mitigation | Status |
|
|
318
|
+
|-------|--------|------------|--------|
|
|
319
|
+
| [Asset] | [Threat] | [How it's mitigated] | ✅ Implemented / ⏳ Planned |
|
|
320
|
+
|
|
321
|
+
## Authentication Architecture
|
|
322
|
+
|
|
323
|
+
[Auth flow, token lifecycle, session management]
|
|
324
|
+
|
|
325
|
+
## Authorization Model
|
|
326
|
+
|
|
327
|
+
[RBAC / ABAC / ACL — how permissions work]
|
|
328
|
+
|
|
329
|
+
| Role | Permissions | Scope |
|
|
330
|
+
|------|------------|-------|
|
|
331
|
+
| [Role] | [What they can do] | [Where it applies] |
|
|
332
|
+
|
|
333
|
+
## Data Protection
|
|
334
|
+
|
|
335
|
+
- **Encryption at rest**: [Strategy]
|
|
336
|
+
- **Encryption in transit**: [TLS configuration]
|
|
337
|
+
- **PII handling**: [What PII exists, how it's protected]
|
|
338
|
+
- **Data retention**: [Retention policies, deletion procedures]
|
|
339
|
+
|
|
340
|
+
## Input Validation & Injection Prevention
|
|
341
|
+
|
|
342
|
+
[System-wide input validation strategy, which libraries/frameworks handle this]
|
|
343
|
+
|
|
344
|
+
## Infrastructure Security
|
|
345
|
+
|
|
346
|
+
- **Container security**: [Non-root users, minimal images, vulnerability scanning]
|
|
347
|
+
- **Network security**: [Firewall rules, VPC, network segmentation]
|
|
348
|
+
- **Secrets management**: [Vault, env vars, CI/CD secrets — approach, not actual secrets]
|
|
349
|
+
- **Dependency management**: [Audit tools, update cadence, vulnerability response]
|
|
350
|
+
````
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## `docs/decisions/index.md` — ADR log
|
|
355
|
+
|
|
356
|
+
````markdown
|
|
357
|
+
# Architecture Decision Records
|
|
358
|
+
|
|
359
|
+
This log tracks all significant architecture and design decisions made for [Project Name].
|
|
360
|
+
Each decision is documented with context, options considered, and rationale.
|
|
361
|
+
|
|
362
|
+
## Decision Log
|
|
363
|
+
|
|
364
|
+
| # | Date | Decision | Status |
|
|
365
|
+
|---|------|----------|--------|
|
|
366
|
+
| [ADR-001](ADR-001-short-name.md) | YYYY-MM-DD | [Brief title] | ✅ Accepted |
|
|
367
|
+
| [ADR-002](ADR-002-short-name.md) | YYYY-MM-DD | [Brief title] | ✅ Accepted |
|
|
368
|
+
|
|
369
|
+
## How to Read ADRs
|
|
370
|
+
|
|
371
|
+
Each ADR follows a standard format:
|
|
372
|
+
- **Context**: What situation or problem triggered this decision?
|
|
373
|
+
- **Decision**: What was decided?
|
|
374
|
+
- **Rationale**: Why was this chosen over alternatives?
|
|
375
|
+
- **Consequences**: What are the trade-offs and implications?
|
|
376
|
+
|
|
377
|
+
## When to Create an ADR
|
|
378
|
+
|
|
379
|
+
Create a new ADR when:
|
|
380
|
+
- Choosing a technology, framework, or library
|
|
381
|
+
- Deciding on an architecture pattern or style
|
|
382
|
+
- Choosing between multiple valid approaches
|
|
383
|
+
- Making a decision that would be hard to reverse
|
|
384
|
+
- Making a decision that future developers will question
|
|
385
|
+
````
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## ADR template — `docs/decisions/ADR-XXX-[short-name].md`
|
|
390
|
+
|
|
391
|
+
````markdown
|
|
392
|
+
# ADR-XXX: [Decision Title]
|
|
393
|
+
|
|
394
|
+
> **Date**: YYYY-MM-DD
|
|
395
|
+
> **Status**: Proposed | Accepted | Deprecated | Superseded by [ADR-XXX]
|
|
396
|
+
> **Source**: [RD-XX / Plan: feature-name / Ad-hoc — where this decision originated]
|
|
397
|
+
|
|
398
|
+
## Context
|
|
399
|
+
|
|
400
|
+
[What is the situation? What problem or question triggered this decision?
|
|
401
|
+
Include technical context, constraints, and requirements.]
|
|
402
|
+
|
|
403
|
+
## Options Considered
|
|
404
|
+
|
|
405
|
+
### Option A: [Name]
|
|
406
|
+
|
|
407
|
+
- **Pros**: [advantages]
|
|
408
|
+
- **Cons**: [disadvantages]
|
|
409
|
+
|
|
410
|
+
### Option B: [Name]
|
|
411
|
+
|
|
412
|
+
- **Pros**: [advantages]
|
|
413
|
+
- **Cons**: [disadvantages]
|
|
414
|
+
|
|
415
|
+
### Option C: [Name] (if applicable)
|
|
416
|
+
|
|
417
|
+
- **Pros**: [advantages]
|
|
418
|
+
- **Cons**: [disadvantages]
|
|
419
|
+
|
|
420
|
+
## Decision
|
|
421
|
+
|
|
422
|
+
[What was decided? State it clearly in one sentence.]
|
|
423
|
+
|
|
424
|
+
**Chosen option**: [Option X], because [one-line rationale].
|
|
425
|
+
|
|
426
|
+
## Rationale
|
|
427
|
+
|
|
428
|
+
[Detailed explanation of why this option was chosen. Reference specific requirements,
|
|
429
|
+
constraints, or trade-offs that made this the best choice.]
|
|
430
|
+
|
|
431
|
+
## Consequences
|
|
432
|
+
|
|
433
|
+
### Positive
|
|
434
|
+
|
|
435
|
+
- [Benefit 1]
|
|
436
|
+
- [Benefit 2]
|
|
437
|
+
|
|
438
|
+
### Negative
|
|
439
|
+
|
|
440
|
+
- [Trade-off 1]
|
|
441
|
+
- [Trade-off 2]
|
|
442
|
+
|
|
443
|
+
### Risks
|
|
444
|
+
|
|
445
|
+
- [Risk and how it will be mitigated]
|
|
446
|
+
````
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
## `docs/guides/getting-started.md`
|
|
451
|
+
|
|
452
|
+
````markdown
|
|
453
|
+
# Getting Started
|
|
454
|
+
|
|
455
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
456
|
+
|
|
457
|
+
## Prerequisites
|
|
458
|
+
|
|
459
|
+
| Tool | Version | Installation |
|
|
460
|
+
|------|---------|-------------|
|
|
461
|
+
| [Tool] | [Version] | [Link or command] |
|
|
462
|
+
|
|
463
|
+
## Setup
|
|
464
|
+
|
|
465
|
+
### 1. Clone the Repository
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
git clone [repository-url]
|
|
469
|
+
cd [project-name]
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
### 2. Install Dependencies
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
[install command]
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### 3. Configure Environment
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
cp .env.example .env
|
|
482
|
+
# Edit .env with your local configuration
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### 4. Start Development
|
|
486
|
+
|
|
487
|
+
```bash
|
|
488
|
+
[dev start command]
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### 5. Verify Setup
|
|
492
|
+
|
|
493
|
+
```bash
|
|
494
|
+
[verify/test command]
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
## Project Structure
|
|
498
|
+
|
|
499
|
+
```
|
|
500
|
+
[Directory tree with descriptions — keep synchronized with actual structure]
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
## Common Tasks
|
|
504
|
+
|
|
505
|
+
| Task | Command |
|
|
506
|
+
|------|---------|
|
|
507
|
+
| Run tests | `[command]` |
|
|
508
|
+
| Build | `[command]` |
|
|
509
|
+
| Lint | `[command]` |
|
|
510
|
+
| Database migration | `[command]` |
|
|
511
|
+
|
|
512
|
+
## Next Steps
|
|
513
|
+
|
|
514
|
+
- Read the [System Overview](/architecture/system-overview) to understand the architecture
|
|
515
|
+
- Review [Architecture Decisions](/decisions/) to understand why things are built this way
|
|
516
|
+
- Check the [Development Guide](/guides/development) for coding conventions
|
|
517
|
+
````
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
## `docs/guides/development.md`
|
|
522
|
+
|
|
523
|
+
````markdown
|
|
524
|
+
# Development Workflow
|
|
525
|
+
|
|
526
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
527
|
+
|
|
528
|
+
## Coding Conventions
|
|
529
|
+
|
|
530
|
+
[Project-specific conventions — naming, file organization, patterns used.
|
|
531
|
+
Reference the project's AGENTS.md (or detected project conventions) if it exists.]
|
|
532
|
+
|
|
533
|
+
## Branch Strategy
|
|
534
|
+
|
|
535
|
+
[Git workflow — trunk-based, GitFlow, feature branches, etc.]
|
|
536
|
+
|
|
537
|
+
## Testing Strategy
|
|
538
|
+
|
|
539
|
+
[How to write and run tests, what coverage is expected, test file organization.
|
|
540
|
+
Follow your project's testing standards (AGENTS.md).]
|
|
541
|
+
|
|
542
|
+
## Code Review
|
|
543
|
+
|
|
544
|
+
[Code review process, what to look for, how to give/receive feedback]
|
|
545
|
+
|
|
546
|
+
## Common Patterns
|
|
547
|
+
|
|
548
|
+
### [Pattern Name]
|
|
549
|
+
|
|
550
|
+
[Description and code example of a common pattern used in this project]
|
|
551
|
+
|
|
552
|
+
[Repeat for each pattern]
|
|
553
|
+
````
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## `docs/guides/deployment.md`
|
|
558
|
+
|
|
559
|
+
````markdown
|
|
560
|
+
# Deployment
|
|
561
|
+
|
|
562
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
563
|
+
|
|
564
|
+
## Environments
|
|
565
|
+
|
|
566
|
+
| Environment | Branch | Auto-Deploy | URL |
|
|
567
|
+
|-------------|--------|-------------|-----|
|
|
568
|
+
| [Env] | [Branch] | [Yes/No] | [URL] |
|
|
569
|
+
|
|
570
|
+
## Deployment Process
|
|
571
|
+
|
|
572
|
+
### [Environment Name]
|
|
573
|
+
|
|
574
|
+
1. [Step 1]
|
|
575
|
+
2. [Step 2]
|
|
576
|
+
3. [Step 3]
|
|
577
|
+
|
|
578
|
+
## Configuration
|
|
579
|
+
|
|
580
|
+
[Environment-specific configuration, how to set environment variables]
|
|
581
|
+
|
|
582
|
+
## Rollback Procedure
|
|
583
|
+
|
|
584
|
+
[How to roll back a deployment if something goes wrong]
|
|
585
|
+
|
|
586
|
+
## Health Checks
|
|
587
|
+
|
|
588
|
+
[How to verify a deployment is healthy]
|
|
589
|
+
````
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
## `docs/reference/configuration.md`
|
|
594
|
+
|
|
595
|
+
````markdown
|
|
596
|
+
# Configuration Reference
|
|
597
|
+
|
|
598
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
599
|
+
|
|
600
|
+
## Environment Variables
|
|
601
|
+
|
|
602
|
+
| Variable | Required | Default | Description |
|
|
603
|
+
|----------|----------|---------|-------------|
|
|
604
|
+
| `[VAR]` | [Yes/No] | [Default] | [Description] |
|
|
605
|
+
|
|
606
|
+
## Feature Flags
|
|
607
|
+
|
|
608
|
+
| Flag | Default | Description |
|
|
609
|
+
|------|---------|-------------|
|
|
610
|
+
| `[FLAG]` | [Value] | [Description] |
|
|
611
|
+
|
|
612
|
+
## Configuration Files
|
|
613
|
+
|
|
614
|
+
### [Config File Name]
|
|
615
|
+
|
|
616
|
+
[Description, location, format, key options]
|
|
617
|
+
````
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## `docs/reference/integrations.md`
|
|
622
|
+
|
|
623
|
+
````markdown
|
|
624
|
+
# External Integrations
|
|
625
|
+
|
|
626
|
+
> **Last Updated**: [YYYY-MM-DD]
|
|
627
|
+
|
|
628
|
+
## Integration Map
|
|
629
|
+
|
|
630
|
+
| System | Protocol | Direction | Purpose | Auth |
|
|
631
|
+
|--------|----------|-----------|---------|------|
|
|
632
|
+
| [System] | [REST/gRPC/SMTP/etc.] | [In/Out/Both] | [Purpose] | [Auth method] |
|
|
633
|
+
|
|
634
|
+
## [Integration Name]
|
|
635
|
+
|
|
636
|
+
### Overview
|
|
637
|
+
|
|
638
|
+
[What this integration does and why it exists]
|
|
639
|
+
|
|
640
|
+
### Configuration
|
|
641
|
+
|
|
642
|
+
[How to configure the integration — env vars, API keys, endpoints]
|
|
643
|
+
|
|
644
|
+
### Data Flow
|
|
645
|
+
|
|
646
|
+
[What data is exchanged, format, frequency]
|
|
647
|
+
|
|
648
|
+
### Error Handling
|
|
649
|
+
|
|
650
|
+
[What happens when the integration is unavailable, retry strategy]
|
|
651
|
+
|
|
652
|
+
### Testing
|
|
653
|
+
|
|
654
|
+
[How to test the integration locally — mocks, sandboxes, test accounts]
|
|
655
|
+
````
|