compound-workflow 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +11 -0
- package/.claude-plugin/plugin.json +12 -0
- package/.cursor-plugin/plugin.json +12 -0
- package/README.md +155 -0
- package/package.json +22 -0
- package/scripts/install-cli.mjs +313 -0
- package/scripts/sync-into-repo.sh +103 -0
- package/src/.agents/agents/research/best-practices-researcher.md +132 -0
- package/src/.agents/agents/research/framework-docs-researcher.md +134 -0
- package/src/.agents/agents/research/git-history-analyzer.md +62 -0
- package/src/.agents/agents/research/learnings-researcher.md +288 -0
- package/src/.agents/agents/research/repo-research-analyst.md +146 -0
- package/src/.agents/agents/review/agent-native-reviewer.md +299 -0
- package/src/.agents/agents/workflow/bug-reproduction-validator.md +87 -0
- package/src/.agents/agents/workflow/lint.md +20 -0
- package/src/.agents/agents/workflow/spec-flow-analyzer.md +149 -0
- package/src/.agents/commands/assess.md +60 -0
- package/src/.agents/commands/install.md +53 -0
- package/src/.agents/commands/metrics.md +59 -0
- package/src/.agents/commands/setup.md +9 -0
- package/src/.agents/commands/sync.md +9 -0
- package/src/.agents/commands/test-browser.md +393 -0
- package/src/.agents/commands/workflow/brainstorm.md +252 -0
- package/src/.agents/commands/workflow/compound.md +142 -0
- package/src/.agents/commands/workflow/plan.md +737 -0
- package/src/.agents/commands/workflow/review-v2.md +148 -0
- package/src/.agents/commands/workflow/review.md +110 -0
- package/src/.agents/commands/workflow/triage.md +54 -0
- package/src/.agents/commands/workflow/work.md +439 -0
- package/src/.agents/references/README.md +12 -0
- package/src/.agents/references/standards/README.md +9 -0
- package/src/.agents/scripts/self-check.mjs +227 -0
- package/src/.agents/scripts/sync-opencode.mjs +355 -0
- package/src/.agents/skills/agent-browser/SKILL.md +223 -0
- package/src/.agents/skills/audit-traceability/SKILL.md +260 -0
- package/src/.agents/skills/brainstorming/SKILL.md +250 -0
- package/src/.agents/skills/compound-docs/SKILL.md +533 -0
- package/src/.agents/skills/compound-docs/assets/critical-pattern-template.md +34 -0
- package/src/.agents/skills/compound-docs/assets/resolution-template.md +97 -0
- package/src/.agents/skills/compound-docs/references/yaml-schema.md +87 -0
- package/src/.agents/skills/compound-docs/schema.project.yaml +18 -0
- package/src/.agents/skills/compound-docs/schema.yaml +119 -0
- package/src/.agents/skills/data-foundations/SKILL.md +185 -0
- package/src/.agents/skills/document-review/SKILL.md +108 -0
- package/src/.agents/skills/file-todos/SKILL.md +177 -0
- package/src/.agents/skills/file-todos/assets/todo-template.md +106 -0
- package/src/.agents/skills/financial-workflow-integrity/SKILL.md +423 -0
- package/src/.agents/skills/git-worktree/SKILL.md +268 -0
- package/src/.agents/skills/pii-protection-prisma/SKILL.md +629 -0
- package/src/.agents/skills/process-metrics/SKILL.md +46 -0
- package/src/.agents/skills/process-metrics/assets/daily-template.md +37 -0
- package/src/.agents/skills/process-metrics/assets/monthly-template.md +21 -0
- package/src/.agents/skills/process-metrics/assets/weekly-template.md +25 -0
- package/src/.agents/skills/technical-review/SKILL.md +83 -0
- package/src/AGENTS.md +213 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# YAML Frontmatter Schema
|
|
2
|
+
|
|
3
|
+
**See `.agents/skills/compound-docs/schema.yaml` for the core portable schema specification.**
|
|
4
|
+
|
|
5
|
+
If present, `.agents/skills/compound-docs/schema.project.yaml` acts as an optional repo-specific overlay for stricter enums.
|
|
6
|
+
|
|
7
|
+
## Required Fields
|
|
8
|
+
|
|
9
|
+
- **module** (string): Module name (e.g., "EmailProcessing") or "System" for system-wide issues
|
|
10
|
+
- **date** (string): ISO 8601 date (YYYY-MM-DD)
|
|
11
|
+
- **problem_type** (enum): One of [build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap]
|
|
12
|
+
- **component** (string): Free text. Prefer stable slugs like [backend, frontend, database, infra, ci, auth, api, docs, tooling]
|
|
13
|
+
- **symptoms** (array): 1-5 specific observable symptoms
|
|
14
|
+
- **root_cause** (string): Free text. Describe the actual cause (not a symptom). Prefer stable slugs when possible.
|
|
15
|
+
- **resolution_type** (enum): One of [code_fix, migration, config_change, test_fix, dependency_update, environment_setup, workflow_improvement, documentation_update, tooling_addition, seed_data_update]
|
|
16
|
+
- **severity** (enum): One of [critical, high, medium, low]
|
|
17
|
+
|
|
18
|
+
## Optional Fields
|
|
19
|
+
|
|
20
|
+
- **framework** (string): Framework/library name if relevant (e.g., rails, django, react)
|
|
21
|
+
- **framework_version** (string): Framework version in X.Y.Z if known
|
|
22
|
+
- **runtime_version** (string): Runtime version (e.g., ruby 3.3.1, node 20.11.0)
|
|
23
|
+
- **environment** (string): dev|staging|prod|other
|
|
24
|
+
- **tags** (array): Searchable keywords (lowercase, hyphen-separated). Include `spike` when the solution originated from a spike (timeboxed investigation).
|
|
25
|
+
|
|
26
|
+
## Validation Rules
|
|
27
|
+
|
|
28
|
+
1. All required fields must be present
|
|
29
|
+
2. Enum fields must match allowed values exactly (case-sensitive)
|
|
30
|
+
3. symptoms must be YAML array with 1-5 items
|
|
31
|
+
4. date must match YYYY-MM-DD format
|
|
32
|
+
5. tags should be lowercase, hyphen-separated
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
---
|
|
38
|
+
module: Email Processing
|
|
39
|
+
date: 2025-11-12
|
|
40
|
+
problem_type: performance_issue
|
|
41
|
+
component: backend
|
|
42
|
+
symptoms:
|
|
43
|
+
- "N+1 query when loading email threads"
|
|
44
|
+
- "Brief generation taking >5 seconds"
|
|
45
|
+
root_cause: missing_include
|
|
46
|
+
framework: rails
|
|
47
|
+
framework_version: 7.1.2
|
|
48
|
+
resolution_type: code_fix
|
|
49
|
+
severity: high
|
|
50
|
+
tags: [n-plus-one, eager-loading, performance]
|
|
51
|
+
---
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Example with spike-origin doc:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
---
|
|
58
|
+
module: Auth Service
|
|
59
|
+
date: 2026-02-20
|
|
60
|
+
problem_type: integration_issue
|
|
61
|
+
component: backend
|
|
62
|
+
symptoms:
|
|
63
|
+
- "Unclear whether OAuth or API keys fit our scale"
|
|
64
|
+
root_cause: spike-recommendation
|
|
65
|
+
resolution_type: documentation_update
|
|
66
|
+
severity: medium
|
|
67
|
+
tags: [spike, oauth, api-keys]
|
|
68
|
+
---
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Category Mapping
|
|
72
|
+
|
|
73
|
+
Based on `problem_type`, documentation is filed in:
|
|
74
|
+
|
|
75
|
+
- **build_error** → `docs/solutions/build-errors/`
|
|
76
|
+
- **test_failure** → `docs/solutions/test-failures/`
|
|
77
|
+
- **runtime_error** → `docs/solutions/runtime-errors/`
|
|
78
|
+
- **performance_issue** → `docs/solutions/performance-issues/`
|
|
79
|
+
- **database_issue** → `docs/solutions/database-issues/`
|
|
80
|
+
- **security_issue** → `docs/solutions/security-issues/`
|
|
81
|
+
- **ui_bug** → `docs/solutions/ui-bugs/`
|
|
82
|
+
- **integration_issue** → `docs/solutions/integration-issues/`
|
|
83
|
+
- **logic_error** → `docs/solutions/logic-errors/`
|
|
84
|
+
- **developer_experience** → `docs/solutions/developer-experience/`
|
|
85
|
+
- **workflow_issue** → `docs/solutions/workflow-issues/`
|
|
86
|
+
- **best_practice** → `docs/solutions/best-practices/`
|
|
87
|
+
- **documentation_gap** → `docs/solutions/documentation-gaps/`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Optional Project Overlay Schema
|
|
2
|
+
#
|
|
3
|
+
# If you want stricter enums for a specific repository, fill in this file.
|
|
4
|
+
# The `compound-docs` flow should prefer validating against this overlay
|
|
5
|
+
# (in addition to the portable core schema.yaml).
|
|
6
|
+
#
|
|
7
|
+
# Notes:
|
|
8
|
+
# - You can convert `component` or `root_cause` into enums for this repo.
|
|
9
|
+
# - Keep `problem_type`, `severity`, and `resolution_type` aligned with core.
|
|
10
|
+
|
|
11
|
+
required_fields:
|
|
12
|
+
component:
|
|
13
|
+
# Set type to enum to enforce repo-specific taxonomy.
|
|
14
|
+
type: string
|
|
15
|
+
|
|
16
|
+
root_cause:
|
|
17
|
+
# Set type to enum to enforce repo-specific taxonomy.
|
|
18
|
+
type: string
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Portable Solution Documentation Schema
|
|
2
|
+
#
|
|
3
|
+
# This schema defines a portable, repo-agnostic frontmatter contract for
|
|
4
|
+
# `docs/solutions/**` documentation.
|
|
5
|
+
#
|
|
6
|
+
# Repos may optionally provide a stricter overlay at:
|
|
7
|
+
# .agents/skills/compound-docs/schema.project.yaml
|
|
8
|
+
|
|
9
|
+
required_fields:
|
|
10
|
+
module:
|
|
11
|
+
type: string
|
|
12
|
+
description: "Product area, subsystem, or module affected"
|
|
13
|
+
examples:
|
|
14
|
+
- "Authentication"
|
|
15
|
+
- "Billing"
|
|
16
|
+
- "Search"
|
|
17
|
+
|
|
18
|
+
date:
|
|
19
|
+
type: string
|
|
20
|
+
pattern: '^\d{4}-\d{2}-\d{2}$'
|
|
21
|
+
description: "Date when this problem was solved (YYYY-MM-DD)"
|
|
22
|
+
|
|
23
|
+
problem_type:
|
|
24
|
+
type: enum
|
|
25
|
+
values:
|
|
26
|
+
- build_error
|
|
27
|
+
- test_failure
|
|
28
|
+
- runtime_error
|
|
29
|
+
- performance_issue
|
|
30
|
+
- database_issue
|
|
31
|
+
- security_issue
|
|
32
|
+
- ui_bug
|
|
33
|
+
- integration_issue
|
|
34
|
+
- logic_error
|
|
35
|
+
- developer_experience
|
|
36
|
+
- workflow_issue
|
|
37
|
+
- best_practice
|
|
38
|
+
- documentation_gap
|
|
39
|
+
description: "Primary category of the problem"
|
|
40
|
+
|
|
41
|
+
component:
|
|
42
|
+
type: string
|
|
43
|
+
description: "Component area (free text). Prefer stable slugs."
|
|
44
|
+
examples:
|
|
45
|
+
- "backend"
|
|
46
|
+
- "frontend"
|
|
47
|
+
- "database"
|
|
48
|
+
- "infra"
|
|
49
|
+
- "ci"
|
|
50
|
+
- "auth"
|
|
51
|
+
- "api"
|
|
52
|
+
- "docs"
|
|
53
|
+
- "tooling"
|
|
54
|
+
|
|
55
|
+
symptoms:
|
|
56
|
+
type: array[string]
|
|
57
|
+
min_items: 1
|
|
58
|
+
max_items: 5
|
|
59
|
+
description: "Observable symptoms (exact error messages, behavior)"
|
|
60
|
+
|
|
61
|
+
root_cause:
|
|
62
|
+
type: string
|
|
63
|
+
description: "Actual underlying cause (free text or stable slug)"
|
|
64
|
+
|
|
65
|
+
resolution_type:
|
|
66
|
+
type: enum
|
|
67
|
+
values:
|
|
68
|
+
- code_fix
|
|
69
|
+
- migration
|
|
70
|
+
- config_change
|
|
71
|
+
- test_fix
|
|
72
|
+
- dependency_update
|
|
73
|
+
- environment_setup
|
|
74
|
+
- workflow_improvement
|
|
75
|
+
- documentation_update
|
|
76
|
+
- tooling_addition
|
|
77
|
+
- seed_data_update
|
|
78
|
+
description: "Type of fix applied"
|
|
79
|
+
|
|
80
|
+
severity:
|
|
81
|
+
type: enum
|
|
82
|
+
values:
|
|
83
|
+
- critical
|
|
84
|
+
- high
|
|
85
|
+
- medium
|
|
86
|
+
- low
|
|
87
|
+
description: "Impact severity"
|
|
88
|
+
|
|
89
|
+
optional_fields:
|
|
90
|
+
tags:
|
|
91
|
+
type: array[string]
|
|
92
|
+
max_items: 8
|
|
93
|
+
description: "Searchable keywords (lowercase, hyphen-separated)"
|
|
94
|
+
|
|
95
|
+
framework:
|
|
96
|
+
type: string
|
|
97
|
+
description: "Framework/library involved (if relevant)"
|
|
98
|
+
|
|
99
|
+
framework_version:
|
|
100
|
+
type: string
|
|
101
|
+
description: "Framework version (if known)"
|
|
102
|
+
|
|
103
|
+
runtime_version:
|
|
104
|
+
type: string
|
|
105
|
+
description: "Runtime version (if known)"
|
|
106
|
+
|
|
107
|
+
environment:
|
|
108
|
+
type: string
|
|
109
|
+
description: "dev|staging|prod|other"
|
|
110
|
+
|
|
111
|
+
validation_rules:
|
|
112
|
+
- "module must be non-empty"
|
|
113
|
+
- "date must be in YYYY-MM-DD format"
|
|
114
|
+
- "problem_type must match one of the enum values"
|
|
115
|
+
- "severity must match one of the enum values"
|
|
116
|
+
- "resolution_type must match one of the enum values"
|
|
117
|
+
- "symptoms must be specific and observable (not vague)"
|
|
118
|
+
- "root_cause must be the actual cause, not a symptom"
|
|
119
|
+
- "tags should be lowercase, hyphen-separated"
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: data-foundations
|
|
3
|
+
description: Enforce DB access boundaries, multi-tenant isolation (RLS), and mutation integrity patterns for scalable SaaS (Postgres + Prisma).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Data Foundations (Multi-Tenant SaaS)
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Establish enforceable, minimal, and scalable database patterns for multi-tenant SaaS systems.
|
|
11
|
+
|
|
12
|
+
These foundations are designed to:
|
|
13
|
+
|
|
14
|
+
- prevent architectural entropy
|
|
15
|
+
- enforce clear data boundaries
|
|
16
|
+
- preserve long-term velocity
|
|
17
|
+
- reduce security and compliance risk
|
|
18
|
+
- eliminate ambiguous implementation decisions
|
|
19
|
+
|
|
20
|
+
These patterns are non-negotiable in greenfield systems.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Core Foundations
|
|
25
|
+
|
|
26
|
+
## 1. Data Access Boundary
|
|
27
|
+
|
|
28
|
+
### Principle
|
|
29
|
+
|
|
30
|
+
Tables are internal implementation details.
|
|
31
|
+
|
|
32
|
+
### Rules
|
|
33
|
+
|
|
34
|
+
- Reads occur only through `v_*` views.
|
|
35
|
+
- Writes occur only through `fn_*` functions.
|
|
36
|
+
- Application roles cannot directly access base tables.
|
|
37
|
+
- Base tables are not part of the public contract.
|
|
38
|
+
|
|
39
|
+
### Enforcement
|
|
40
|
+
|
|
41
|
+
- `REVOKE` direct table privileges from app roles.
|
|
42
|
+
- `GRANT SELECT` on views only.
|
|
43
|
+
- `GRANT EXECUTE` on mutation functions only.
|
|
44
|
+
|
|
45
|
+
Notes:
|
|
46
|
+
|
|
47
|
+
- If `fn_*` functions use `SECURITY DEFINER`, they MUST set a safe `search_path` and MUST enforce tenant/actor context inside the function.
|
|
48
|
+
|
|
49
|
+
### Naming Conventions
|
|
50
|
+
|
|
51
|
+
- Tables: `snake_case`
|
|
52
|
+
- Views: `v_<entity>`
|
|
53
|
+
- Functions: `fn_<verb>_<entity>`
|
|
54
|
+
- Primary keys: `id uuid`
|
|
55
|
+
- Tenant tables include: `workspace_id`
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 2. Multi-Tenant Isolation
|
|
60
|
+
|
|
61
|
+
### Principle
|
|
62
|
+
|
|
63
|
+
Tenant isolation is enforced at the database layer.
|
|
64
|
+
|
|
65
|
+
### Requirements
|
|
66
|
+
|
|
67
|
+
- Every tenant table includes `workspace_id`.
|
|
68
|
+
- RLS is enabled on all tenant tables.
|
|
69
|
+
- Policies validate membership using `app.user_id` (request-scoped context).
|
|
70
|
+
|
|
71
|
+
### Application Requirement
|
|
72
|
+
|
|
73
|
+
Every request MUST:
|
|
74
|
+
|
|
75
|
+
1. Verify JWT.
|
|
76
|
+
2. Begin a transaction.
|
|
77
|
+
3. Set `app.user_id` using `set_config(..., true)` (transaction-local).
|
|
78
|
+
4. Execute queries inside that transaction.
|
|
79
|
+
|
|
80
|
+
Failure to set context MUST result in failure.
|
|
81
|
+
|
|
82
|
+
Implementation notes:
|
|
83
|
+
|
|
84
|
+
- Prefer `SELECT set_config('app.user_id', '<uuid>', true);` at the start of each transaction.
|
|
85
|
+
- Policies should use `current_setting('app.user_id', true)` and fail closed when missing.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 3. Mutation Integrity
|
|
90
|
+
|
|
91
|
+
### Principle
|
|
92
|
+
|
|
93
|
+
All writes must be safe, auditable, and repeatable.
|
|
94
|
+
|
|
95
|
+
### Required Patterns
|
|
96
|
+
|
|
97
|
+
#### Audit Logging
|
|
98
|
+
|
|
99
|
+
- Single append-only `audit_log` table.
|
|
100
|
+
- Every mutation function inserts an audit record.
|
|
101
|
+
- Logs survive soft deletes and anonymisation.
|
|
102
|
+
|
|
103
|
+
Minimum audit fields:
|
|
104
|
+
|
|
105
|
+
- actor_user_id
|
|
106
|
+
- workspace_id
|
|
107
|
+
- entity_type
|
|
108
|
+
- entity_id
|
|
109
|
+
- action
|
|
110
|
+
- occurred_at
|
|
111
|
+
|
|
112
|
+
#### Idempotency
|
|
113
|
+
|
|
114
|
+
- External mutations require idempotency keys.
|
|
115
|
+
- Enforced with unique constraints.
|
|
116
|
+
- Replays return stored result.
|
|
117
|
+
|
|
118
|
+
#### Concurrency Control
|
|
119
|
+
|
|
120
|
+
Use one of:
|
|
121
|
+
|
|
122
|
+
- optimistic locking (version column)
|
|
123
|
+
- advisory locks for serialized workflows
|
|
124
|
+
|
|
125
|
+
Concurrency control MUST live inside mutation functions.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Schema Conventions
|
|
130
|
+
|
|
131
|
+
All tenant tables MUST include:
|
|
132
|
+
|
|
133
|
+
- `id uuid primary key`
|
|
134
|
+
- `workspace_id uuid`
|
|
135
|
+
- `created_at timestamptz`
|
|
136
|
+
- `updated_at timestamptz`
|
|
137
|
+
- optional: `deleted_at timestamptz`
|
|
138
|
+
|
|
139
|
+
Indexes:
|
|
140
|
+
|
|
141
|
+
- index `workspace_id`
|
|
142
|
+
- unique constraints for business invariants
|
|
143
|
+
- partial indexes for active rows when soft deleting
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Sensitive Data Strategy (Optional Foundation)
|
|
148
|
+
|
|
149
|
+
If handling PII:
|
|
150
|
+
|
|
151
|
+
- store PII in a separate table (e.g. `user_pii`)
|
|
152
|
+
- restrict access via roles
|
|
153
|
+
- never expose PII through general views
|
|
154
|
+
- use anonymisation instead of hard delete
|
|
155
|
+
- introduce field-level encryption only if required by threat model or regulation
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Definition of Done for New Entity
|
|
160
|
+
|
|
161
|
+
For every new tenant entity:
|
|
162
|
+
|
|
163
|
+
1. Base table created.
|
|
164
|
+
2. RLS enabled with policy.
|
|
165
|
+
3. View created (`v_<entity>`).
|
|
166
|
+
4. Mutation functions created (`fn_*`).
|
|
167
|
+
5. Audit logging integrated.
|
|
168
|
+
6. Grants/revokes applied.
|
|
169
|
+
7. Required indexes added.
|
|
170
|
+
|
|
171
|
+
No entity is considered complete without all of the above.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Philosophy
|
|
176
|
+
|
|
177
|
+
These foundations are designed to:
|
|
178
|
+
|
|
179
|
+
- remove ambiguity
|
|
180
|
+
- reduce regression risk
|
|
181
|
+
- protect tenant data
|
|
182
|
+
- enable long-term speed
|
|
183
|
+
- prevent multi-year architectural decay
|
|
184
|
+
|
|
185
|
+
Clear boundaries enable compounding velocity.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: document-review
|
|
3
|
+
description: This skill should be used to refine brainstorm or plan documents before proceeding to the next workflow step. It applies when a brainstorm or plan document exists and the user wants to improve it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Document Review
|
|
7
|
+
|
|
8
|
+
Improve brainstorm or plan documents through structured review.
|
|
9
|
+
|
|
10
|
+
## Step 1: Get the Document
|
|
11
|
+
|
|
12
|
+
**If a document path is provided:** Read it, then proceed to Step 2.
|
|
13
|
+
|
|
14
|
+
**If no document is specified:** Ask which document to review, or look for the most recent brainstorm/plan in `docs/brainstorms/` or `docs/plans/`.
|
|
15
|
+
|
|
16
|
+
## Step 2: Assess
|
|
17
|
+
|
|
18
|
+
Read through the document and ask:
|
|
19
|
+
|
|
20
|
+
- What is unclear?
|
|
21
|
+
- What is unnecessary?
|
|
22
|
+
- What decision is being avoided?
|
|
23
|
+
- What assumptions are unstated?
|
|
24
|
+
- Where could scope accidentally expand?
|
|
25
|
+
|
|
26
|
+
These questions surface issues. Don't fix yet—just note what you find.
|
|
27
|
+
|
|
28
|
+
## Step 3: Evaluate
|
|
29
|
+
|
|
30
|
+
Score the document against these criteria:
|
|
31
|
+
|
|
32
|
+
| Criterion | What to Check |
|
|
33
|
+
| ---------------- | -------------------------------------------------------------------------------- |
|
|
34
|
+
| **Clarity** | Problem statement is clear, no vague language ("probably," "consider," "try to") |
|
|
35
|
+
| **Completeness** | Required sections present, constraints stated, open questions flagged |
|
|
36
|
+
| **Specificity** | Concrete enough for next step (brainstorm → can plan, plan → can implement) |
|
|
37
|
+
| **YAGNI** | No hypothetical features, simplest approach chosen |
|
|
38
|
+
|
|
39
|
+
If invoked within a workflow (after `/workflow:brainstorm` or `/workflow:plan`), also check:
|
|
40
|
+
|
|
41
|
+
- **User intent fidelity** — Document reflects what was discussed, assumptions validated
|
|
42
|
+
|
|
43
|
+
For plan documents, also verify:
|
|
44
|
+
|
|
45
|
+
- **Fidelity and confidence** — Declared and matches the plan depth (Low/Medium/High fidelity with High/Medium/Low confidence)
|
|
46
|
+
- **Fidelity fit** — Required sections exist for the selected fidelity (e.g., rollback/failure modes for high fidelity)
|
|
47
|
+
- **Confidence honesty** — Any remaining unknowns are captured as open questions (not hidden as assumptions)
|
|
48
|
+
|
|
49
|
+
## Step 4: Identify the Critical Improvement
|
|
50
|
+
|
|
51
|
+
Among everything found in Steps 2-3, does one issue stand out? If something would significantly improve the document's quality, this is the "must address" item. Highlight it prominently.
|
|
52
|
+
|
|
53
|
+
## Step 5: Make Changes
|
|
54
|
+
|
|
55
|
+
Present your findings, then:
|
|
56
|
+
|
|
57
|
+
1. **Auto-fix** minor issues (vague language, formatting) without asking
|
|
58
|
+
2. **Ask approval** before substantive changes (restructuring, removing sections, changing meaning)
|
|
59
|
+
3. **Update** the document inline—no separate files, no metadata sections
|
|
60
|
+
|
|
61
|
+
If the document is a plan file, ensure its frontmatter includes:
|
|
62
|
+
|
|
63
|
+
- `fidelity: low|medium|high`
|
|
64
|
+
- `confidence: high|medium|low`
|
|
65
|
+
|
|
66
|
+
### Simplification Guidance
|
|
67
|
+
|
|
68
|
+
Simplification is purposeful removal of unnecessary complexity, not shortening for its own sake.
|
|
69
|
+
|
|
70
|
+
**Simplify when:**
|
|
71
|
+
|
|
72
|
+
- Content serves hypothetical future needs, not current ones
|
|
73
|
+
- Sections repeat information already covered elsewhere
|
|
74
|
+
- Detail exceeds what's needed to take the next step
|
|
75
|
+
- Abstractions or structure add overhead without clarity
|
|
76
|
+
|
|
77
|
+
**Don't simplify:**
|
|
78
|
+
|
|
79
|
+
- Constraints or edge cases that affect implementation
|
|
80
|
+
- Rationale that explains why alternatives were rejected
|
|
81
|
+
- Open questions that need resolution
|
|
82
|
+
|
|
83
|
+
## Step 6: Offer Next Action
|
|
84
|
+
|
|
85
|
+
After changes are complete, ask:
|
|
86
|
+
|
|
87
|
+
1. **Refine again** - Another review pass
|
|
88
|
+
2. **Review complete** - Document is ready
|
|
89
|
+
|
|
90
|
+
### Iteration Guidance
|
|
91
|
+
|
|
92
|
+
After 2 refinement passes, recommend completion—diminishing returns are likely. But if the user wants to continue, allow it.
|
|
93
|
+
|
|
94
|
+
Return control to the caller (workflow or user) after selection.
|
|
95
|
+
|
|
96
|
+
## Required Output
|
|
97
|
+
|
|
98
|
+
End every review with:
|
|
99
|
+
|
|
100
|
+
- `Ready for next step: yes|no`
|
|
101
|
+
- `Top blocker:` one sentence
|
|
102
|
+
|
|
103
|
+
## What NOT to Do
|
|
104
|
+
|
|
105
|
+
- Do not rewrite the entire document
|
|
106
|
+
- Do not add new sections or requirements the user didn't discuss
|
|
107
|
+
- Do not over-engineer or add complexity
|
|
108
|
+
- Do not create separate review files or add metadata sections
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: file-todos
|
|
3
|
+
description: Manage a file-based todo tracking system in the todos/ directory. Use to create, triage, and execute persistent work items with status, priority, dependencies, and work logs.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Grep
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# File-Based Todo Tracking
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
The `todos/` directory is a persistent tracking system for:
|
|
17
|
+
|
|
18
|
+
- work items derived from plans
|
|
19
|
+
- code review feedback
|
|
20
|
+
- technical debt
|
|
21
|
+
- feature follow-ups
|
|
22
|
+
|
|
23
|
+
Each todo is a markdown file with YAML frontmatter and structured sections.
|
|
24
|
+
|
|
25
|
+
Use this skill when:
|
|
26
|
+
|
|
27
|
+
- creating new todo files
|
|
28
|
+
- triaging and approving pending work
|
|
29
|
+
- executing todos while maintaining a work log
|
|
30
|
+
- managing dependencies
|
|
31
|
+
|
|
32
|
+
## File Naming Convention
|
|
33
|
+
|
|
34
|
+
Todo files follow this pattern:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
{issue_id}-{status}-{priority}-{description}.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Components:
|
|
41
|
+
|
|
42
|
+
- `issue_id`: sequential (001, 002, 003...) - never reused
|
|
43
|
+
- `status`: `pending` (needs triage), `ready` (approved), `complete` (done), `deferred` (not this cycle; keep as reference)
|
|
44
|
+
- `priority`: `p1` (critical), `p2` (important), `p3` (nice-to-have)
|
|
45
|
+
- `description`: kebab-case, brief
|
|
46
|
+
|
|
47
|
+
Examples:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
001-pending-p1-fix-auth-redirect.md
|
|
51
|
+
002-ready-p2-add-pagination.md
|
|
52
|
+
003-deferred-p3-follow-up-refactor.md
|
|
53
|
+
005-complete-p3-update-docs.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## File Structure
|
|
57
|
+
|
|
58
|
+
Use the template at [todo-template.md](./assets/todo-template.md).
|
|
59
|
+
|
|
60
|
+
Required sections:
|
|
61
|
+
|
|
62
|
+
- Problem Statement
|
|
63
|
+
- Findings
|
|
64
|
+
- Proposed Solutions
|
|
65
|
+
- Recommended Action
|
|
66
|
+
- Acceptance Criteria
|
|
67
|
+
- Work Log
|
|
68
|
+
|
|
69
|
+
Frontmatter fields:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
---
|
|
73
|
+
status: ready # pending | ready | complete | deferred
|
|
74
|
+
priority: p1 # p1 | p2 | p3
|
|
75
|
+
issue_id: "002"
|
|
76
|
+
tags: [backend, testing]
|
|
77
|
+
dependencies: ["001"] # issue_ids this is blocked by
|
|
78
|
+
---
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Deferred:** Items with `status: deferred` are not planned for the current development cycle. Keep Problem Statement, Findings, and Work Log so the item can be re-triaged or picked up later. Only `*-ready-*.md` todos are executed; `pending` and `deferred` are non-executable.
|
|
82
|
+
|
|
83
|
+
## Common Workflows
|
|
84
|
+
|
|
85
|
+
### Create a New Todo
|
|
86
|
+
|
|
87
|
+
1. Ensure `todos/` exists.
|
|
88
|
+
2. Determine next issue id (001-based, zero-padded).
|
|
89
|
+
3. Copy the template into `todos/<id>-pending-<priority>-<description>.md`.
|
|
90
|
+
4. Fill:
|
|
91
|
+
- Problem Statement
|
|
92
|
+
- Proposed Solutions (at least 2 if non-trivial)
|
|
93
|
+
- Acceptance Criteria
|
|
94
|
+
- Initial Work Log entry
|
|
95
|
+
5. Tag for searchability.
|
|
96
|
+
|
|
97
|
+
Create a todo when it is non-trivial (>15-20 min), needs research, has dependencies, or should persist across sessions.
|
|
98
|
+
|
|
99
|
+
### Create Todos From a Plan (Recommended for /workflow:work)
|
|
100
|
+
|
|
101
|
+
When executing a plan, create persistent todos so progress is trackable across sessions.
|
|
102
|
+
|
|
103
|
+
Inputs:
|
|
104
|
+
|
|
105
|
+
- plan file path (required)
|
|
106
|
+
|
|
107
|
+
Default mapping rules:
|
|
108
|
+
|
|
109
|
+
1. Read the plan file completely.
|
|
110
|
+
2. Detect whether the plan contains task checkboxes (`- [ ]`).
|
|
111
|
+
3. If checkboxes exist:
|
|
112
|
+
- create one todo per checkbox by default
|
|
113
|
+
- group only when tasks are inseparable (e.g., schema change + required migration)
|
|
114
|
+
4. If checkboxes do not exist:
|
|
115
|
+
- create 3-7 todos based on major plan phases/sections
|
|
116
|
+
5. For every created todo:
|
|
117
|
+
- include the plan path in `Resources`
|
|
118
|
+
- include a "Plan checkbox" pointer when derived from a checkbox (exact text)
|
|
119
|
+
- otherwise include a short "Plan section" pointer (heading name or anchor)
|
|
120
|
+
- write Acceptance Criteria that is testable
|
|
121
|
+
6. **Discussion Points and Spike Candidates:** If the plan has sections `## Discussion Points (resolve/decide)` or `## Spike Candidates (timeboxed)`:
|
|
122
|
+
- Checkboxes under **Discussion Points** → create `todos/*-pending-*.md` with `tags: [discussion]` and `status: pending`.
|
|
123
|
+
- Checkboxes under **Spike Candidates** (including items like `- [ ] Spike: ...`) → create `todos/*-pending-*.md` with `tags: [spike]` and `status: pending`.
|
|
124
|
+
- These items require triage before execution; do not default them to `ready` unless the plan is explicitly approved and triage has been run.
|
|
125
|
+
|
|
126
|
+
Status and priority defaults:
|
|
127
|
+
|
|
128
|
+
- `status`: `ready` when the plan is approved and the todo is not from Discussion Points or Spike Candidates; otherwise `pending`. Todos with `tags: [discussion]` or `tags: [spike]` default to `pending`.
|
|
129
|
+
- `priority`: `p2` unless clearly urgent/high-risk
|
|
130
|
+
|
|
131
|
+
Dependencies:
|
|
132
|
+
|
|
133
|
+
- Use `dependencies:` to model sequencing.
|
|
134
|
+
- Only mark a todo ready when all dependencies are complete.
|
|
135
|
+
|
|
136
|
+
Plan sync expectations:
|
|
137
|
+
|
|
138
|
+
- When a todo is complete, the executor should update the corresponding plan checkbox when possible.
|
|
139
|
+
|
|
140
|
+
### Triage Pending Todos
|
|
141
|
+
|
|
142
|
+
1. List pending todos.
|
|
143
|
+
2. For each todo:
|
|
144
|
+
- read Problem Statement + Findings
|
|
145
|
+
- choose a recommended action
|
|
146
|
+
- set priority and dependencies
|
|
147
|
+
3. Decision:
|
|
148
|
+
- **Approve:** rename `*-pending-*` -> `*-ready-*`, set frontmatter `status: ready`
|
|
149
|
+
- **Defer:** rename `*-pending-*` -> `*-deferred-*`, set frontmatter `status: deferred` (typically `p3`). Keep Work Log/Findings so the item is referenceable later; it will not appear in the executable queue until re-triaged to `ready`.
|
|
150
|
+
4. Only `*-ready-*.md` items are executable; `pending` and `deferred` are excluded from the work loop.
|
|
151
|
+
|
|
152
|
+
If this repo has a `/workflow:triage` command, it may be used. Otherwise, perform triage directly in the todo files.
|
|
153
|
+
|
|
154
|
+
### Execute a Ready Todo
|
|
155
|
+
|
|
156
|
+
Consider only `*-ready-*.md` todos. Ignore `pending` and `deferred`.
|
|
157
|
+
|
|
158
|
+
1. Verify dependencies are complete.
|
|
159
|
+
2. Work in small milestones.
|
|
160
|
+
3. Update the Work Log each session with:
|
|
161
|
+
- actions (file references + commands)
|
|
162
|
+
- tests run
|
|
163
|
+
- results
|
|
164
|
+
- learnings
|
|
165
|
+
4. Check off Acceptance Criteria as you complete items.
|
|
166
|
+
|
|
167
|
+
### Complete a Todo
|
|
168
|
+
|
|
169
|
+
1. Verify all acceptance criteria are checked.
|
|
170
|
+
2. Add a final Work Log entry.
|
|
171
|
+
3. Rename `*-ready-*` -> `*-complete-*`.
|
|
172
|
+
4. Update frontmatter `status: ready` -> `status: complete`.
|
|
173
|
+
|
|
174
|
+
## Distinctions
|
|
175
|
+
|
|
176
|
+
- This is persistent, file-based tracking in `todos/`.
|
|
177
|
+
- It is different from any application-level "Todo" model and different from any in-memory session todo tool.
|