@garethdaine/agentops 0.9.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/.claude-plugin/plugin.json +10 -0
- package/LICENSE +21 -0
- package/README.md +410 -0
- package/agents/architecture-researcher.md +115 -0
- package/agents/code-critic.md +190 -0
- package/agents/delegation-router.md +40 -0
- package/agents/feature-researcher.md +117 -0
- package/agents/interrogator.md +11 -0
- package/agents/pitfalls-researcher.md +112 -0
- package/agents/plan-validator.md +173 -0
- package/agents/proposer.md +61 -0
- package/agents/security-reviewer.md +189 -0
- package/agents/skill-builder.md +43 -0
- package/agents/spec-compliance-reviewer.md +154 -0
- package/agents/stack-researcher.md +89 -0
- package/commands/build.md +766 -0
- package/commands/code-analysis.md +39 -0
- package/commands/code-field.md +22 -0
- package/commands/compliance-check.md +34 -0
- package/commands/configure.md +178 -0
- package/commands/cost-report.md +17 -0
- package/commands/enterprise/adr.md +78 -0
- package/commands/enterprise/brainstorm.md +461 -0
- package/commands/enterprise/design.md +203 -0
- package/commands/enterprise/dev-setup.md +136 -0
- package/commands/enterprise/docker-dev.md +229 -0
- package/commands/enterprise/e2e.md +233 -0
- package/commands/enterprise/feature.md +218 -0
- package/commands/enterprise/gap-analysis.md +204 -0
- package/commands/enterprise/handover.md +195 -0
- package/commands/enterprise/herd.md +152 -0
- package/commands/enterprise/knowledge.md +173 -0
- package/commands/enterprise/onboard.md +86 -0
- package/commands/enterprise/qa-check.md +80 -0
- package/commands/enterprise/reason.md +196 -0
- package/commands/enterprise/review.md +177 -0
- package/commands/enterprise/scaffold.md +153 -0
- package/commands/enterprise/status-report.md +101 -0
- package/commands/enterprise/tech-catalog.md +170 -0
- package/commands/enterprise/test-gen.md +138 -0
- package/commands/evolve.md +39 -0
- package/commands/flags.md +44 -0
- package/commands/interrogate.md +263 -0
- package/commands/lesson.md +15 -0
- package/commands/lessons.md +10 -0
- package/commands/plan.md +44 -0
- package/commands/prune.md +27 -0
- package/commands/star.md +17 -0
- package/commands/supply-chain-scan.md +44 -0
- package/commands/unicode-scan.md +63 -0
- package/commands/verify.md +41 -0
- package/commands/workflow.md +436 -0
- package/hooks/ai-guardrails.sh +114 -0
- package/hooks/audit-log.sh +26 -0
- package/hooks/auto-delegate.sh +45 -0
- package/hooks/auto-evolve.sh +22 -0
- package/hooks/auto-lesson.sh +26 -0
- package/hooks/auto-plan.sh +59 -0
- package/hooks/auto-test.sh +46 -0
- package/hooks/auto-verify.sh +30 -0
- package/hooks/budget-check.sh +24 -0
- package/hooks/code-field-preamble.sh +30 -0
- package/hooks/compliance-gate.sh +50 -0
- package/hooks/content-trust.sh +22 -0
- package/hooks/credential-redact.sh +23 -0
- package/hooks/delegation-trust.sh +15 -0
- package/hooks/detect-test-run.sh +19 -0
- package/hooks/enforcement-lib.sh +60 -0
- package/hooks/evolve-gate.sh +32 -0
- package/hooks/evolve-lib.sh +32 -0
- package/hooks/exfiltration-check.sh +67 -0
- package/hooks/failure-collector.sh +27 -0
- package/hooks/feature-flags.sh +67 -0
- package/hooks/file-provenance.sh +31 -0
- package/hooks/flag-utils.sh +36 -0
- package/hooks/hooks.json +145 -0
- package/hooks/injection-scan.sh +58 -0
- package/hooks/integrity-verify.sh +91 -0
- package/hooks/lessons-check.sh +17 -0
- package/hooks/lockfile-audit.sh +109 -0
- package/hooks/patterns-lib.sh +22 -0
- package/hooks/plan-gate.sh +18 -0
- package/hooks/redact-lib.sh +15 -0
- package/hooks/runtime-mode.sh +56 -0
- package/hooks/session-cleanup.sh +74 -0
- package/hooks/skill-validator.sh +28 -0
- package/hooks/standards-enforce.sh +106 -0
- package/hooks/star-gate.sh +93 -0
- package/hooks/star-preamble.sh +10 -0
- package/hooks/telemetry.sh +33 -0
- package/hooks/todo-prune.sh +84 -0
- package/hooks/unicode-firewall.sh +122 -0
- package/hooks/unicode-lib.sh +66 -0
- package/hooks/unicode-scan-session.sh +96 -0
- package/hooks/validate-command.sh +103 -0
- package/hooks/validate-env.sh +51 -0
- package/hooks/validate-path.sh +81 -0
- package/package.json +40 -0
- package/settings.json +6 -0
- package/templates/ai-config/tool-standards.md +56 -0
- package/templates/architecture/api-first.md +192 -0
- package/templates/architecture/auth-patterns.md +302 -0
- package/templates/architecture/caching-strategy.md +359 -0
- package/templates/architecture/database-patterns.md +347 -0
- package/templates/architecture/event-driven.md +252 -0
- package/templates/architecture/integration-patterns.md +185 -0
- package/templates/architecture/multi-tenancy.md +104 -0
- package/templates/architecture/service-boundaries.md +200 -0
- package/templates/build/brief-template.md +86 -0
- package/templates/build/summary-template.md +100 -0
- package/templates/build/task-plan-template.md +133 -0
- package/templates/communication/effort-estimate.md +54 -0
- package/templates/communication/incident-response.md +59 -0
- package/templates/communication/post-mortem.md +109 -0
- package/templates/communication/risk-register.md +43 -0
- package/templates/communication/sprint-demo-checklist.md +64 -0
- package/templates/communication/stakeholder-presentation-outline.md +84 -0
- package/templates/communication/technical-proposal.md +77 -0
- package/templates/delivery/deployment/deployment-checklist.md +49 -0
- package/templates/delivery/design/solution-design-checklist.md +37 -0
- package/templates/delivery/discovery/stakeholder-questions.md +33 -0
- package/templates/delivery/handover/knowledge-transfer-checklist.md +75 -0
- package/templates/delivery/handover/operational-runbook.md +117 -0
- package/templates/delivery/handover/support-escalation-matrix.md +56 -0
- package/templates/delivery/implementation/blocker-escalation-template.md +55 -0
- package/templates/delivery/implementation/sprint-planning-template.md +49 -0
- package/templates/delivery/implementation/task-decomposition-guide.md +59 -0
- package/templates/delivery/qa/test-plan-template.md +76 -0
- package/templates/delivery/qa/test-results-template.md +55 -0
- package/templates/delivery/qa/uat-signoff-template.md +44 -0
- package/templates/governance/codeowners.md +60 -0
- package/templates/integration/adapter-pattern.md +160 -0
- package/templates/scaffolds/env-validation.md +85 -0
- package/templates/scaffolds/error-handling.md +171 -0
- package/templates/scaffolds/graceful-shutdown.md +139 -0
- package/templates/scaffolds/health-check.md +109 -0
- package/templates/scaffolds/structured-logging.md +134 -0
- package/templates/standards/engineering-standards.md +413 -0
- package/templates/standards/standards-checklist.md +125 -0
- package/templates/tech-catalog.json +663 -0
- package/templates/utilities/project-detection.md +75 -0
- package/templates/utilities/requirements-collection.md +68 -0
- package/templates/utilities/template-rendering.md +81 -0
- package/templates/workflows/architecture-decision.md +90 -0
- package/templates/workflows/bug-investigation.md +83 -0
- package/templates/workflows/feature-implementation.md +80 -0
- package/templates/workflows/refactoring.md +83 -0
- package/templates/workflows/spike-exploration.md +82 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Architecture Pattern: Service Boundaries
|
|
2
|
+
|
|
3
|
+
## When to Use
|
|
4
|
+
|
|
5
|
+
- Codebase has grown beyond a single team's cognitive capacity
|
|
6
|
+
- Multiple teams need to ship independently without merge conflicts
|
|
7
|
+
- You need clear dependency rules to prevent spaghetti imports
|
|
8
|
+
- Deciding between a monolith with strong module boundaries and microservices
|
|
9
|
+
|
|
10
|
+
## Pattern Description
|
|
11
|
+
|
|
12
|
+
Service boundaries define how a system is decomposed into modules or services, what each module owns, and the rules governing communication between them. Done well, boundaries enable independent development, testing, and deployment. Done poorly, they create distributed monoliths or circular dependency nightmares.
|
|
13
|
+
|
|
14
|
+
## Bounded Contexts (DDD)
|
|
15
|
+
|
|
16
|
+
Each bounded context owns a slice of the domain with its own ubiquitous language. The same real-world concept may have different representations in different contexts.
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
// --- Billing context: a "User" is a billing account
|
|
20
|
+
// src/billing/types.ts
|
|
21
|
+
export interface BillingAccount {
|
|
22
|
+
accountId: string;
|
|
23
|
+
plan: 'free' | 'pro' | 'enterprise';
|
|
24
|
+
paymentMethodId: string | null;
|
|
25
|
+
invoiceEmail: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// --- Identity context: a "User" is an authentication principal
|
|
29
|
+
// src/identity/types.ts
|
|
30
|
+
export interface UserIdentity {
|
|
31
|
+
userId: string;
|
|
32
|
+
email: string;
|
|
33
|
+
roles: string[];
|
|
34
|
+
mfaEnabled: boolean;
|
|
35
|
+
lastLoginAt: Date;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// These are NOT the same type. Each context defines
|
|
39
|
+
// only the fields it needs, using its own language.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Module Structure: Package by Feature
|
|
43
|
+
|
|
44
|
+
Organise code around business capabilities, not technical layers:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
src/
|
|
48
|
+
projects/
|
|
49
|
+
projects.controller.ts # HTTP layer
|
|
50
|
+
projects.service.ts # Business logic
|
|
51
|
+
projects.repository.ts # Data access
|
|
52
|
+
projects.types.ts # Types scoped to this module
|
|
53
|
+
projects.test.ts # Tests for this module
|
|
54
|
+
index.ts # Barrel export (public API)
|
|
55
|
+
billing/
|
|
56
|
+
billing.controller.ts
|
|
57
|
+
billing.service.ts
|
|
58
|
+
billing.repository.ts
|
|
59
|
+
billing.types.ts
|
|
60
|
+
billing.test.ts
|
|
61
|
+
index.ts
|
|
62
|
+
shared/
|
|
63
|
+
errors.ts
|
|
64
|
+
logger.ts
|
|
65
|
+
middleware/
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Contrast with package-by-layer (avoid):**
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
src/
|
|
72
|
+
controllers/ # Mixes all domains together
|
|
73
|
+
projects.ts
|
|
74
|
+
billing.ts
|
|
75
|
+
services/
|
|
76
|
+
projects.ts
|
|
77
|
+
billing.ts
|
|
78
|
+
repositories/
|
|
79
|
+
projects.ts
|
|
80
|
+
billing.ts
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Package-by-layer scatters related code across directories and makes it impossible to reason about a single feature in isolation.
|
|
84
|
+
|
|
85
|
+
## Public API Surface (Barrel Exports)
|
|
86
|
+
|
|
87
|
+
Each module exposes a deliberate public API through its `index.ts`. Internal implementation details stay private.
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
// src/projects/index.ts — the public API of the projects module
|
|
91
|
+
export { ProjectService } from './projects.service';
|
|
92
|
+
export type { Project, CreateProjectInput } from './projects.types';
|
|
93
|
+
|
|
94
|
+
// NOT exported: repository, internal helpers, database schemas
|
|
95
|
+
// Other modules may only import from this barrel file
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Dependency Rules
|
|
99
|
+
|
|
100
|
+
Define and enforce what can import what:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
/**
|
|
104
|
+
* Dependency rules (enforce via eslint-plugin-import or eslint-plugin-boundaries):
|
|
105
|
+
*
|
|
106
|
+
* 1. Modules may import from `shared/` — shared utilities have no domain logic
|
|
107
|
+
* 2. Modules must NOT import directly from another module's internals
|
|
108
|
+
* WRONG: import { projectRepo } from '../projects/projects.repository'
|
|
109
|
+
* RIGHT: import { ProjectService } from '../projects'
|
|
110
|
+
* 3. Circular dependencies between modules are forbidden
|
|
111
|
+
* 4. If module A needs data from module B, it calls B's public service API
|
|
112
|
+
* 5. shared/ must NOT import from any domain module
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
// ESLint boundaries configuration example
|
|
116
|
+
// .eslintrc.js
|
|
117
|
+
const boundaryRules = {
|
|
118
|
+
'boundaries/element-types': [
|
|
119
|
+
'error',
|
|
120
|
+
{
|
|
121
|
+
default: 'disallow',
|
|
122
|
+
rules: [
|
|
123
|
+
{ from: 'projects', allow: ['shared'] },
|
|
124
|
+
{ from: 'billing', allow: ['shared'] },
|
|
125
|
+
{ from: 'shared', allow: ['shared'] },
|
|
126
|
+
// projects and billing cannot import from each other
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
};
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Cross-Module Communication
|
|
134
|
+
|
|
135
|
+
When modules need to collaborate, use explicit integration points:
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
// Option 1: Direct service call (simpler, synchronous)
|
|
139
|
+
// src/billing/billing.service.ts
|
|
140
|
+
import { ProjectService } from '../projects';
|
|
141
|
+
|
|
142
|
+
export class BillingService {
|
|
143
|
+
constructor(private projectService: ProjectService) {}
|
|
144
|
+
|
|
145
|
+
async calculateUsage(accountId: string): Promise<UsageReport> {
|
|
146
|
+
const projects = await this.projectService.listByAccount(accountId);
|
|
147
|
+
return this.computeUsage(projects);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Option 2: Domain events (decoupled, asynchronous)
|
|
152
|
+
// src/projects/projects.service.ts
|
|
153
|
+
export class ProjectService {
|
|
154
|
+
constructor(private eventBus: EventBus) {}
|
|
155
|
+
|
|
156
|
+
async deleteProject(projectId: string): Promise<void> {
|
|
157
|
+
await this.repository.delete(projectId);
|
|
158
|
+
await this.eventBus.publish({
|
|
159
|
+
type: 'project.deleted',
|
|
160
|
+
data: { projectId },
|
|
161
|
+
});
|
|
162
|
+
// Billing module listens and cleans up independently
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## When to Split vs Keep Together
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
/**
|
|
171
|
+
* SPLIT into separate modules when:
|
|
172
|
+
* - Different teams own different parts
|
|
173
|
+
* - Different deployment cadences are needed
|
|
174
|
+
* - Data ownership is clearly separable
|
|
175
|
+
* - The bounded contexts have distinct ubiquitous languages
|
|
176
|
+
*
|
|
177
|
+
* KEEP TOGETHER when:
|
|
178
|
+
* - Changes to A almost always require changes to B
|
|
179
|
+
* - They share the same database tables
|
|
180
|
+
* - Splitting would require distributed transactions
|
|
181
|
+
* - The team is small enough to own the whole thing
|
|
182
|
+
* - You are unsure — premature splitting is harder to undo than late splitting
|
|
183
|
+
*/
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Trade-offs
|
|
187
|
+
|
|
188
|
+
- **Upfront design cost:** Defining boundaries requires deep domain understanding early on.
|
|
189
|
+
- **Cross-cutting changes:** Features that span boundaries require coordination across modules.
|
|
190
|
+
- **Indirection overhead:** Service calls between modules add complexity versus direct function calls.
|
|
191
|
+
- **Duplication is sometimes correct:** Each context should own its types even if they look similar. Sharing types across boundaries creates coupling.
|
|
192
|
+
|
|
193
|
+
## Common Pitfalls
|
|
194
|
+
|
|
195
|
+
1. **Shared database tables across modules** — If two modules read/write the same table, they are not truly separated. One module should own the table and expose an API.
|
|
196
|
+
2. **God modules** — A `shared/` or `common/` directory that grows unbounded. Keep shared code limited to genuinely cross-cutting concerns (logging, errors, HTTP utilities).
|
|
197
|
+
3. **Barrel export everything** — Only export what other modules actually need. Internal helpers should remain private.
|
|
198
|
+
4. **Splitting too early** — Extracting a microservice before you understand the domain leads to wrong boundaries that are expensive to move.
|
|
199
|
+
5. **Circular dependencies** — If module A imports from B and B imports from A, extract the shared concept into a third module or use events to break the cycle.
|
|
200
|
+
6. **Ignoring runtime coupling** — Two services that must be deployed together and fail together are a distributed monolith, not microservices.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Build Brief: {Project Name}
|
|
2
|
+
|
|
3
|
+
**Slug:** {project-slug}
|
|
4
|
+
**Created:** {ISO date}
|
|
5
|
+
**Status:** Draft / Approved
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Vision
|
|
10
|
+
|
|
11
|
+
> {One paragraph verbatim from the user describing what they want to build}
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Core Problem
|
|
16
|
+
|
|
17
|
+
What specific problem does this solve, and for whom?
|
|
18
|
+
|
|
19
|
+
- **Problem:** {Describe the pain point in concrete terms}
|
|
20
|
+
- **Who experiences it:** {Target user / persona}
|
|
21
|
+
- **Current solution / workaround:** {How this is solved today, if at all}
|
|
22
|
+
- **Why that's insufficient:** {What's wrong with the current approach}
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Proposed Direction
|
|
27
|
+
|
|
28
|
+
**Chosen framing:** {A — Minimal Core / B — Balanced / C — Ambitious Platform / Custom}
|
|
29
|
+
|
|
30
|
+
### Description
|
|
31
|
+
|
|
32
|
+
{2-3 paragraphs describing what will be built, in the chosen framing}
|
|
33
|
+
|
|
34
|
+
### What this is
|
|
35
|
+
|
|
36
|
+
- {Concrete capability 1}
|
|
37
|
+
- {Concrete capability 2}
|
|
38
|
+
- {Concrete capability 3}
|
|
39
|
+
|
|
40
|
+
### What this is NOT (explicit exclusions)
|
|
41
|
+
|
|
42
|
+
- {Explicitly out of scope item 1}
|
|
43
|
+
- {Explicitly out of scope item 2}
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Key Trade-offs
|
|
48
|
+
|
|
49
|
+
| Decision | Option A | Option B | Chosen | Rationale |
|
|
50
|
+
|----------|----------|----------|--------|-----------|
|
|
51
|
+
| {e.g. Architecture} | Monolith | Microservices | Monolith | Team size, delivery speed |
|
|
52
|
+
| {e.g. Auth} | Custom auth | Auth provider | Auth provider | Security, speed |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Constraints
|
|
57
|
+
|
|
58
|
+
| Constraint | Description | Source |
|
|
59
|
+
|-----------|-------------|--------|
|
|
60
|
+
| Timeline | {Deadline or time budget if known} | User |
|
|
61
|
+
| Team | {Solo / pair / team size} | User |
|
|
62
|
+
| Existing stack | {Languages / frameworks already committed} | Codebase |
|
|
63
|
+
| Compliance | {Any regulatory requirements: GDPR, HIPAA, SOC2, etc.} | User |
|
|
64
|
+
| Budget | {Infrastructure / tooling constraints if known} | User |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Open Questions
|
|
69
|
+
|
|
70
|
+
Questions that must be answered before or during planning. These will drive the interrogation phase.
|
|
71
|
+
|
|
72
|
+
- [ ] {Open question 1}
|
|
73
|
+
- [ ] {Open question 2}
|
|
74
|
+
- [ ] {Open question 3}
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Approval
|
|
79
|
+
|
|
80
|
+
- [ ] Brief approved by user
|
|
81
|
+
- **Approved direction:** {Framing chosen}
|
|
82
|
+
- **Approval date:** {date}
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
*Generated by `/agentops:build` Phase 1 — BRAINSTORM*
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Build Summary: {Project Name}
|
|
2
|
+
|
|
3
|
+
**Slug:** {project-slug}
|
|
4
|
+
**Build duration:** {start date} → {end date} ({N hours/days})
|
|
5
|
+
**PR:** {PR URL or "No PR created"}
|
|
6
|
+
**Status:** Complete
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Metrics
|
|
11
|
+
|
|
12
|
+
| Metric | Value |
|
|
13
|
+
|--------|-------|
|
|
14
|
+
| Total duration | {e.g. 4h 32m} |
|
|
15
|
+
| Phases completed | {N} / 8 |
|
|
16
|
+
| Tasks completed | {N} |
|
|
17
|
+
| Tasks fixed (fix wave) | {N} |
|
|
18
|
+
| Waves | {N} ({wave names}) |
|
|
19
|
+
| Commits | {N} |
|
|
20
|
+
| Tests added | {N} |
|
|
21
|
+
| Test pass rate | {N}% |
|
|
22
|
+
| Critical findings fixed | {N} |
|
|
23
|
+
| High findings fixed | {N} |
|
|
24
|
+
| Lessons captured | {N} |
|
|
25
|
+
| Estimated tokens used | ~{N}K |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## What Was Built
|
|
30
|
+
|
|
31
|
+
{2-4 paragraphs in plain language describing what was built. Written for a non-technical stakeholder who needs to understand what they're getting. Avoid jargon. Describe the user-facing outcome.}
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Architecture Decisions
|
|
36
|
+
|
|
37
|
+
The following key decisions were made during this build. Each decision is recorded with its rationale so future contributors understand why things are the way they are.
|
|
38
|
+
|
|
39
|
+
### ADR-001: {Decision title}
|
|
40
|
+
|
|
41
|
+
- **Context:** {Why this decision needed to be made}
|
|
42
|
+
- **Decision:** {What was chosen}
|
|
43
|
+
- **Rationale:** {Why this was the right choice for this project}
|
|
44
|
+
- **Consequences:** {Trade-offs accepted; what this makes harder}
|
|
45
|
+
|
|
46
|
+
### ADR-002: {Decision title}
|
|
47
|
+
[Same format]
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Known Limitations
|
|
52
|
+
|
|
53
|
+
These are medium-severity findings or deferred scope items from Phase 6 review. They are tracked and known — not surprises.
|
|
54
|
+
|
|
55
|
+
| # | Limitation | Severity | Deferred to |
|
|
56
|
+
|---|-----------|----------|-------------|
|
|
57
|
+
| 1 | {Description} | Medium | {v2 / next sprint / backlog} |
|
|
58
|
+
| 2 | {Description} | Medium | {when} |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Lessons Learned
|
|
63
|
+
|
|
64
|
+
These lessons were captured from failures and unexpected complexity during Phase 5 execution. They are written to prevent the same issues in future builds.
|
|
65
|
+
|
|
66
|
+
### Lesson 1: {Title}
|
|
67
|
+
|
|
68
|
+
- **What happened:** {Brief description of the failure or friction}
|
|
69
|
+
- **Why it happened:** {Root cause}
|
|
70
|
+
- **How it was resolved:** {What worked}
|
|
71
|
+
- **Apply next time:** {Specific rule or change to apply in the next build}
|
|
72
|
+
|
|
73
|
+
### Lesson 2: {Title}
|
|
74
|
+
[Same format]
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Files Created / Modified
|
|
79
|
+
|
|
80
|
+
| File | Action | Purpose |
|
|
81
|
+
|------|--------|---------|
|
|
82
|
+
| `{path/to/file}` | Created | {Purpose} |
|
|
83
|
+
| `{path/to/file}` | Modified | {What changed} |
|
|
84
|
+
|
|
85
|
+
**Total:** {N} files created, {N} files modified.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Next Steps
|
|
90
|
+
|
|
91
|
+
Recommended actions after this build:
|
|
92
|
+
|
|
93
|
+
1. {e.g. Run load testing against the new API endpoints}
|
|
94
|
+
2. {e.g. Set up monitoring and alerting for the new service}
|
|
95
|
+
3. {e.g. Schedule v2 planning for deferred features: [list]}
|
|
96
|
+
4. {e.g. Run /agentops:review after the first week of production use}
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
*Generated by `/agentops:build` Phase 8 — APPROVAL*
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Task Plan: {Task ID} — {Task Title}
|
|
2
|
+
|
|
3
|
+
**Wave:** {wave number}
|
|
4
|
+
**Complexity:** {S / M / L}
|
|
5
|
+
**Build:** {project-slug}
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
### Files to read first
|
|
12
|
+
|
|
13
|
+
Before writing a single line of code, read these files to understand what already exists:
|
|
14
|
+
|
|
15
|
+
| File | Why |
|
|
16
|
+
|------|-----|
|
|
17
|
+
| {path/to/file} | {What to understand from it} |
|
|
18
|
+
|
|
19
|
+
### Dependencies satisfied
|
|
20
|
+
|
|
21
|
+
These tasks have already completed and their outputs are available:
|
|
22
|
+
|
|
23
|
+
| Task ID | What it produced |
|
|
24
|
+
|---------|-----------------|
|
|
25
|
+
| {T001} | {e.g. UserRepository interface at src/users/user.repository.ts} |
|
|
26
|
+
|
|
27
|
+
### Integration points
|
|
28
|
+
|
|
29
|
+
This task connects to:
|
|
30
|
+
- {Component or module this task integrates with}
|
|
31
|
+
- {API contract or interface this task must respect}
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## TDD Specification
|
|
36
|
+
|
|
37
|
+
### RED Phase — Write the failing test first
|
|
38
|
+
|
|
39
|
+
**Test file:** `{path/to/test-file}` *(use the project's test file naming convention — e.g., `.test.ts`, `_test.go`, `test_*.py`, `*_spec.rb`)*
|
|
40
|
+
|
|
41
|
+
**Test to write:**
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
{Write the test using the project's testing framework and language.
|
|
45
|
+
Follow Arrange-Act-Assert structure.
|
|
46
|
+
Test description format: "should {expected behaviour} when {condition}".
|
|
47
|
+
Example patterns by language:
|
|
48
|
+
|
|
49
|
+
TypeScript/Jest: describe('...', () => { it('should ...', () => { expect(...).toBe(...); }); });
|
|
50
|
+
Python/pytest: def test_should_do_x_when_y(): ... assert result == expected
|
|
51
|
+
Go: func TestShouldDoXWhenY(t *testing.T) { ... if got != want { t.Errorf(...) } }
|
|
52
|
+
Rust: #[test] fn should_do_x_when_y() { assert_eq!(...); }
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Expected failure message:** `{The exact error you expect to see when running this test before implementation — e.g., "ModuleNotFoundError", "undefined: FunctionName", "cannot find module"}`
|
|
57
|
+
|
|
58
|
+
**Run command:** `{project's test runner — e.g., npm test, pytest, go test, cargo test} {with filter for this specific test}`
|
|
59
|
+
|
|
60
|
+
**Confirm RED:** The test must fail with the expected error before any implementation begins. If it passes, the test is wrong.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### GREEN Phase — Minimal implementation
|
|
65
|
+
|
|
66
|
+
**File(s) to create or modify:**
|
|
67
|
+
|
|
68
|
+
| File | Action | Description |
|
|
69
|
+
|------|--------|-------------|
|
|
70
|
+
| `{path/to/file.ts}` | Create | {What this file contains} |
|
|
71
|
+
|
|
72
|
+
**Implementation approach:**
|
|
73
|
+
|
|
74
|
+
{2-3 sentences describing the minimal, correct implementation to make the test pass. No extra features. No premature abstraction. Just enough to go green.}
|
|
75
|
+
|
|
76
|
+
**Key decisions:**
|
|
77
|
+
- {Decision 1: e.g., "Use constructor injection for the repository dependency"}
|
|
78
|
+
- {Decision 2: e.g., "Return null (not throw) when the entity is not found — let callers decide"}
|
|
79
|
+
|
|
80
|
+
**After implementing:** Run the test. It must pass. If it doesn't, fix the implementation — do NOT modify the test to make it pass.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### REFACTOR Phase — Improve without changing behaviour
|
|
85
|
+
|
|
86
|
+
After the test is green, apply these improvements. Re-run tests after each change to confirm they still pass.
|
|
87
|
+
|
|
88
|
+
| Refactor | Rationale |
|
|
89
|
+
|----------|-----------|
|
|
90
|
+
| {e.g. Extract the validation logic into a private/internal function} | {SRP — keeps the main function at one abstraction level} |
|
|
91
|
+
| {e.g. Add doc comment to the public function} | {Aids future contributors} |
|
|
92
|
+
| {e.g. Replace magic number 3 with named constant MAX_RETRY_ATTEMPTS} | {Avoid magic numbers} |
|
|
93
|
+
|
|
94
|
+
**Standards to verify during refactor (from standards-checklist.md):**
|
|
95
|
+
- [ ] Function is ≤30 lines
|
|
96
|
+
- [ ] No concrete dependency instantiation in business logic
|
|
97
|
+
- [ ] Function is named as a verb phrase
|
|
98
|
+
- [ ] Boolean parameters removed (if any crept in)
|
|
99
|
+
- [ ] Command-query separation respected
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Verification
|
|
104
|
+
|
|
105
|
+
**Command:** `{full command to run — e.g., npm test -- --grep "UserService" && npm run typecheck}`
|
|
106
|
+
|
|
107
|
+
**Expected output:**
|
|
108
|
+
```
|
|
109
|
+
{The exact output expected — e.g., "Tests: 3 passed, 3 total"}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Additional checks:**
|
|
113
|
+
- [ ] `git diff` shows only the expected files changed
|
|
114
|
+
- [ ] No TypeScript errors: `{typecheck command}`
|
|
115
|
+
- [ ] {Any domain-specific check}
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Commit
|
|
120
|
+
|
|
121
|
+
**Message:** `{type(scope): description — e.g., feat(users): implement user registration with email validation}`
|
|
122
|
+
|
|
123
|
+
**Files to stage:** `{list of specific files to add — do NOT use git add -A}`
|
|
124
|
+
|
|
125
|
+
**Commit command:**
|
|
126
|
+
```
|
|
127
|
+
git add {file1} {file2}
|
|
128
|
+
git commit -m "{commit message}"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
*Generated by `/agentops:build` Phase 4 — TASK_BREAKDOWN*
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Communication Template: Effort Estimate
|
|
2
|
+
|
|
3
|
+
```markdown
|
|
4
|
+
# Effort Estimate: [Feature/Project Name]
|
|
5
|
+
|
|
6
|
+
**Prepared by:** [name]
|
|
7
|
+
**Date:** [date]
|
|
8
|
+
**Confidence level:** High / Medium / Low
|
|
9
|
+
|
|
10
|
+
## Feature Breakdown
|
|
11
|
+
|
|
12
|
+
| # | Feature | Complexity | Effort (days) | Dependencies | Risk |
|
|
13
|
+
|---|---------|-----------|--------------|-------------|------|
|
|
14
|
+
| 1 | [feature] | S/M/L/XL | [days] | [deps] | [risk] |
|
|
15
|
+
| 2 | [feature] | S/M/L/XL | [days] | [deps] | [risk] |
|
|
16
|
+
|
|
17
|
+
## Complexity Guide
|
|
18
|
+
|
|
19
|
+
| Size | Description | Typical Effort |
|
|
20
|
+
|------|-------------|---------------|
|
|
21
|
+
| S | Well-understood, similar to existing code | 0.5-1 day |
|
|
22
|
+
| M | Some unknowns, moderate scope | 2-3 days |
|
|
23
|
+
| L | Significant scope, multiple components | 5-8 days |
|
|
24
|
+
| XL | High complexity, cross-cutting concerns | 10+ days |
|
|
25
|
+
|
|
26
|
+
## Summary
|
|
27
|
+
|
|
28
|
+
| Category | Effort |
|
|
29
|
+
|----------|--------|
|
|
30
|
+
| Development | [days] |
|
|
31
|
+
| Testing | [days] |
|
|
32
|
+
| Code review | [days] |
|
|
33
|
+
| Documentation | [days] |
|
|
34
|
+
| **Total** | **[days]** |
|
|
35
|
+
|
|
36
|
+
## Assumptions
|
|
37
|
+
|
|
38
|
+
1. [assumption that affects estimate]
|
|
39
|
+
2. [assumption that affects estimate]
|
|
40
|
+
|
|
41
|
+
## Caveats
|
|
42
|
+
|
|
43
|
+
- Estimates assume [condition]
|
|
44
|
+
- Not included: [out of scope items]
|
|
45
|
+
- Confidence is [level] because [reason]
|
|
46
|
+
|
|
47
|
+
## Range Estimate
|
|
48
|
+
|
|
49
|
+
| Scenario | Effort | Conditions |
|
|
50
|
+
|----------|--------|-----------|
|
|
51
|
+
| Best case | [days] | No surprises, all assumptions hold |
|
|
52
|
+
| Expected | [days] | Moderate unknowns |
|
|
53
|
+
| Worst case | [days] | Major unknowns materialise |
|
|
54
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Communication Template: Incident Response
|
|
2
|
+
|
|
3
|
+
## Incident Report Template
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# Incident Report: [Title]
|
|
7
|
+
|
|
8
|
+
**Severity:** P1 (Critical) / P2 (High) / P3 (Medium) / P4 (Low)
|
|
9
|
+
**Status:** Investigating / Identified / Monitoring / Resolved
|
|
10
|
+
**Start time:** [timestamp]
|
|
11
|
+
**Resolution time:** [timestamp]
|
|
12
|
+
**Duration:** [hours/minutes]
|
|
13
|
+
**Affected systems:** [list]
|
|
14
|
+
**Impact:** [user-facing description of impact]
|
|
15
|
+
|
|
16
|
+
## Timeline
|
|
17
|
+
|
|
18
|
+
| Time | Event |
|
|
19
|
+
|------|-------|
|
|
20
|
+
| [HH:MM] | [what happened] |
|
|
21
|
+
| [HH:MM] | [action taken] |
|
|
22
|
+
| [HH:MM] | [resolution] |
|
|
23
|
+
|
|
24
|
+
## Root Cause
|
|
25
|
+
|
|
26
|
+
[What caused the incident — be specific and honest]
|
|
27
|
+
|
|
28
|
+
## Resolution
|
|
29
|
+
|
|
30
|
+
[What was done to fix it]
|
|
31
|
+
|
|
32
|
+
## Impact
|
|
33
|
+
|
|
34
|
+
- **Users affected:** [count/percentage]
|
|
35
|
+
- **Duration:** [time]
|
|
36
|
+
- **Data impact:** [any data loss or corruption]
|
|
37
|
+
- **Financial impact:** [if applicable]
|
|
38
|
+
|
|
39
|
+
## Action Items
|
|
40
|
+
|
|
41
|
+
| Action | Owner | Due Date | Status |
|
|
42
|
+
|--------|-------|----------|--------|
|
|
43
|
+
| [preventive action] | [name] | [date] | Open |
|
|
44
|
+
|
|
45
|
+
## Lessons Learned
|
|
46
|
+
|
|
47
|
+
1. [What went well]
|
|
48
|
+
2. [What could be improved]
|
|
49
|
+
3. [What we'll do differently]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Post-Mortem Framework
|
|
53
|
+
|
|
54
|
+
1. **What happened?** (factual timeline)
|
|
55
|
+
2. **Why did it happen?** (5 Whys root cause analysis)
|
|
56
|
+
3. **How was it detected?** (monitoring, user report, automated alert)
|
|
57
|
+
4. **How was it resolved?** (steps taken)
|
|
58
|
+
5. **How do we prevent recurrence?** (action items)
|
|
59
|
+
6. **Blameless culture:** Focus on systems and processes, not individuals
|