@fermindi/pwn-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 (46) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +265 -251
  3. package/cli/batch.js +333 -333
  4. package/cli/codespaces.js +303 -303
  5. package/cli/index.js +98 -91
  6. package/cli/inject.js +78 -67
  7. package/cli/knowledge.js +531 -531
  8. package/cli/migrate.js +466 -0
  9. package/cli/notify.js +135 -135
  10. package/cli/patterns.js +665 -665
  11. package/cli/status.js +91 -91
  12. package/cli/validate.js +61 -61
  13. package/package.json +70 -70
  14. package/src/core/inject.js +208 -204
  15. package/src/core/state.js +91 -91
  16. package/src/core/validate.js +202 -202
  17. package/src/core/workspace.js +176 -176
  18. package/src/index.js +20 -20
  19. package/src/knowledge/gc.js +308 -308
  20. package/src/knowledge/lifecycle.js +401 -401
  21. package/src/knowledge/promote.js +364 -364
  22. package/src/knowledge/references.js +342 -342
  23. package/src/patterns/matcher.js +218 -218
  24. package/src/patterns/registry.js +375 -375
  25. package/src/patterns/triggers.js +423 -423
  26. package/src/services/batch-service.js +849 -849
  27. package/src/services/notification-service.js +342 -342
  28. package/templates/codespaces/devcontainer.json +52 -52
  29. package/templates/codespaces/setup.sh +70 -70
  30. package/templates/workspace/.ai/README.md +164 -164
  31. package/templates/workspace/.ai/agents/README.md +204 -204
  32. package/templates/workspace/.ai/agents/claude.md +625 -625
  33. package/templates/workspace/.ai/config/README.md +79 -79
  34. package/templates/workspace/.ai/config/notifications.template.json +20 -20
  35. package/templates/workspace/.ai/memory/deadends.md +79 -79
  36. package/templates/workspace/.ai/memory/decisions.md +58 -58
  37. package/templates/workspace/.ai/memory/patterns.md +65 -65
  38. package/templates/workspace/.ai/patterns/backend/README.md +126 -126
  39. package/templates/workspace/.ai/patterns/frontend/README.md +103 -103
  40. package/templates/workspace/.ai/patterns/index.md +256 -256
  41. package/templates/workspace/.ai/patterns/triggers.json +1087 -1087
  42. package/templates/workspace/.ai/patterns/universal/README.md +141 -141
  43. package/templates/workspace/.ai/state.template.json +8 -8
  44. package/templates/workspace/.ai/tasks/active.md +77 -77
  45. package/templates/workspace/.ai/tasks/backlog.md +95 -95
  46. package/templates/workspace/.ai/workflows/batch-task.md +356 -356
@@ -1,141 +1,141 @@
1
- # Universal Patterns
2
-
3
- This directory contains cross-cutting patterns that apply to both frontend and backend development.
4
-
5
- ## Overview
6
-
7
- Universal patterns cover:
8
- - TypeScript best practices
9
- - Testing strategies (unit, integration, e2e)
10
- - Error handling and logging
11
- - Git workflow and commit conventions
12
- - Build tool configuration
13
- - Code organization
14
- - Documentation standards
15
- - Performance profiling
16
- - Security principles
17
-
18
- ## Structure
19
-
20
- ```
21
- universal/
22
- ├── README.md # This file
23
- ├── typescript/ # TypeScript patterns
24
- │ └── README.md # Type definitions, generics, etc.
25
- ├── testing/ # Testing patterns
26
- │ ├── unit/README.md # Unit test patterns
27
- │ ├── integration/README.md # Integration test patterns
28
- │ └── e2e/README.md # End-to-end test patterns
29
- ├── error-handling/ # Error handling patterns
30
- │ └── README.md # Exception handling, logging
31
- ├── git/ # Git workflow patterns
32
- │ └── README.md # Branching, commits, PRs
33
- ├── build-tools/ # Build and package patterns
34
- │ └── README.md # Webpack, Vite, etc.
35
- ├── performance/ # Performance optimization
36
- │ └── README.md # Profiling, optimization
37
- └── security/ # Security patterns
38
- └── README.md # Input validation, secrets, etc.
39
- ```
40
-
41
- ## Auto-Apply Triggers
42
-
43
- These patterns are automatically loaded when:
44
-
45
- - **File:** `*.ts`, `*.tsx` (TypeScript)
46
- - **File:** `*.test.ts`, `*.spec.ts` (Tests)
47
- - **Import:** `from 'jest'`, `from 'vitest'` (Testing)
48
- - **Command:** `git commit`, `npm build` (Git, Build)
49
- - **Path:** `src/__tests__/`, `cypress/`, `playwright/`
50
-
51
- See `patterns/index.md` for trigger configuration.
52
-
53
- ## Common Patterns
54
-
55
- ### TypeScript
56
- - Enable strict mode in `tsconfig.json`
57
- - Use interfaces for object shapes, types for aliases
58
- - Avoid `any` - use `unknown` with type guards instead
59
- - Export types alongside implementations
60
- - Use generics for reusable, type-safe code
61
- - Document complex types with JSDoc comments
62
-
63
- ### Testing Strategy
64
- - Unit tests for utilities and pure functions
65
- - Integration tests for API endpoints and workflows
66
- - E2E tests for critical user journeys
67
- - Test file co-located with source: `feature.ts` + `feature.test.ts`
68
- - Aim for >80% code coverage on critical paths
69
- - Mock external dependencies, test real business logic
70
-
71
- ### Error Handling
72
- - Use custom error classes that extend Error
73
- - Include error context (what, why, how to fix)
74
- - Log errors with full stack traces
75
- - Different handling strategies for different error types
76
- - Never silently catch and ignore errors
77
- - Provide user-friendly error messages
78
-
79
- ### Git Workflow
80
- - Descriptive commit messages (50 char subject, blank line, details)
81
- - Atomic commits (one logical change per commit)
82
- - Branch naming: `feature/name`, `fix/name`, `docs/name`
83
- - Pull request template with context
84
- - Code review before merge
85
- - Squash or rebase to keep history clean
86
-
87
- ### Build Tools
88
- - Consistent build configuration across projects
89
- - Separate dev and production builds
90
- - Fast development build (hot reload, source maps)
91
- - Optimized production build (minification, tree-shaking)
92
- - Automate with npm/pnpm scripts
93
- - Cache dependencies to speed up builds
94
-
95
- ### Code Organization
96
- - Organize by feature, not by type
97
- - Keep related code together
98
- - Use barrel exports (`index.ts`) for clean imports
99
- - Avoid circular dependencies
100
- - Monorepo structure for related packages
101
- - Clear separation of concerns
102
-
103
- ### Documentation
104
- - JSDoc comments for public APIs
105
- - README files in each directory explaining purpose
106
- - Architecture decision records (ADRs)
107
- - Code examples for complex logic
108
- - Keep docs in sync with code
109
- - Link to external references where relevant
110
-
111
- ## Usage
112
-
113
- 1. Read the relevant sub-directory README for your task
114
- 2. Check code examples for reference implementations
115
- 3. Apply patterns to new code
116
- 4. Update patterns if you discover improvements
117
-
118
- ## Contributing
119
-
120
- Found a better pattern?
121
-
122
- 1. Document it with examples
123
- 2. Add to appropriate subdirectory
124
- 3. Update this README
125
- 4. Commit with message: `docs: add [pattern name] pattern`
126
- 5. Update triggers in `patterns/index.md` if widely applicable
127
-
128
- ## Links
129
-
130
- - [TypeScript Patterns](typescript/README.md)
131
- - [Testing Strategies](testing/README.md)
132
- - [Error Handling](error-handling/README.md)
133
- - [Git Workflow](git/README.md)
134
- - [Build Tools](build-tools/README.md)
135
- - [Performance Profiling](performance/README.md)
136
- - [Security Principles](security/README.md)
137
-
138
- ## Version
139
-
140
- **Last Updated:** (Set on template injection)
141
- **Maintained By:** Development Team
1
+ # Universal Patterns
2
+
3
+ This directory contains cross-cutting patterns that apply to both frontend and backend development.
4
+
5
+ ## Overview
6
+
7
+ Universal patterns cover:
8
+ - TypeScript best practices
9
+ - Testing strategies (unit, integration, e2e)
10
+ - Error handling and logging
11
+ - Git workflow and commit conventions
12
+ - Build tool configuration
13
+ - Code organization
14
+ - Documentation standards
15
+ - Performance profiling
16
+ - Security principles
17
+
18
+ ## Structure
19
+
20
+ ```
21
+ universal/
22
+ ├── README.md # This file
23
+ ├── typescript/ # TypeScript patterns
24
+ │ └── README.md # Type definitions, generics, etc.
25
+ ├── testing/ # Testing patterns
26
+ │ ├── unit/README.md # Unit test patterns
27
+ │ ├── integration/README.md # Integration test patterns
28
+ │ └── e2e/README.md # End-to-end test patterns
29
+ ├── error-handling/ # Error handling patterns
30
+ │ └── README.md # Exception handling, logging
31
+ ├── git/ # Git workflow patterns
32
+ │ └── README.md # Branching, commits, PRs
33
+ ├── build-tools/ # Build and package patterns
34
+ │ └── README.md # Webpack, Vite, etc.
35
+ ├── performance/ # Performance optimization
36
+ │ └── README.md # Profiling, optimization
37
+ └── security/ # Security patterns
38
+ └── README.md # Input validation, secrets, etc.
39
+ ```
40
+
41
+ ## Auto-Apply Triggers
42
+
43
+ These patterns are automatically loaded when:
44
+
45
+ - **File:** `*.ts`, `*.tsx` (TypeScript)
46
+ - **File:** `*.test.ts`, `*.spec.ts` (Tests)
47
+ - **Import:** `from 'jest'`, `from 'vitest'` (Testing)
48
+ - **Command:** `git commit`, `npm build` (Git, Build)
49
+ - **Path:** `src/__tests__/`, `cypress/`, `playwright/`
50
+
51
+ See `patterns/index.md` for trigger configuration.
52
+
53
+ ## Common Patterns
54
+
55
+ ### TypeScript
56
+ - Enable strict mode in `tsconfig.json`
57
+ - Use interfaces for object shapes, types for aliases
58
+ - Avoid `any` - use `unknown` with type guards instead
59
+ - Export types alongside implementations
60
+ - Use generics for reusable, type-safe code
61
+ - Document complex types with JSDoc comments
62
+
63
+ ### Testing Strategy
64
+ - Unit tests for utilities and pure functions
65
+ - Integration tests for API endpoints and workflows
66
+ - E2E tests for critical user journeys
67
+ - Test file co-located with source: `feature.ts` + `feature.test.ts`
68
+ - Aim for >80% code coverage on critical paths
69
+ - Mock external dependencies, test real business logic
70
+
71
+ ### Error Handling
72
+ - Use custom error classes that extend Error
73
+ - Include error context (what, why, how to fix)
74
+ - Log errors with full stack traces
75
+ - Different handling strategies for different error types
76
+ - Never silently catch and ignore errors
77
+ - Provide user-friendly error messages
78
+
79
+ ### Git Workflow
80
+ - Descriptive commit messages (50 char subject, blank line, details)
81
+ - Atomic commits (one logical change per commit)
82
+ - Branch naming: `feature/name`, `fix/name`, `docs/name`
83
+ - Pull request template with context
84
+ - Code review before merge
85
+ - Squash or rebase to keep history clean
86
+
87
+ ### Build Tools
88
+ - Consistent build configuration across projects
89
+ - Separate dev and production builds
90
+ - Fast development build (hot reload, source maps)
91
+ - Optimized production build (minification, tree-shaking)
92
+ - Automate with npm/pnpm scripts
93
+ - Cache dependencies to speed up builds
94
+
95
+ ### Code Organization
96
+ - Organize by feature, not by type
97
+ - Keep related code together
98
+ - Use barrel exports (`index.ts`) for clean imports
99
+ - Avoid circular dependencies
100
+ - Monorepo structure for related packages
101
+ - Clear separation of concerns
102
+
103
+ ### Documentation
104
+ - JSDoc comments for public APIs
105
+ - README files in each directory explaining purpose
106
+ - Architecture decision records (ADRs)
107
+ - Code examples for complex logic
108
+ - Keep docs in sync with code
109
+ - Link to external references where relevant
110
+
111
+ ## Usage
112
+
113
+ 1. Read the relevant sub-directory README for your task
114
+ 2. Check code examples for reference implementations
115
+ 3. Apply patterns to new code
116
+ 4. Update patterns if you discover improvements
117
+
118
+ ## Contributing
119
+
120
+ Found a better pattern?
121
+
122
+ 1. Document it with examples
123
+ 2. Add to appropriate subdirectory
124
+ 3. Update this README
125
+ 4. Commit with message: `docs: add [pattern name] pattern`
126
+ 5. Update triggers in `patterns/index.md` if widely applicable
127
+
128
+ ## Links
129
+
130
+ - [TypeScript Patterns](typescript/README.md)
131
+ - [Testing Strategies](testing/README.md)
132
+ - [Error Handling](error-handling/README.md)
133
+ - [Git Workflow](git/README.md)
134
+ - [Build Tools](build-tools/README.md)
135
+ - [Performance Profiling](performance/README.md)
136
+ - [Security Principles](security/README.md)
137
+
138
+ ## Version
139
+
140
+ **Last Updated:** (Set on template injection)
141
+ **Maintained By:** Development Team
@@ -1,8 +1,8 @@
1
- {
2
- "developer": "unknown",
3
- "session_started": "2026-01-21T00:00:00Z",
4
- "current_task": null,
5
- "context_loaded": [],
6
- "patterns_registered": [],
7
- "last_updated": "2026-01-21T00:00:00Z"
8
- }
1
+ {
2
+ "developer": "unknown",
3
+ "session_started": "2026-01-21T00:00:00Z",
4
+ "current_task": null,
5
+ "context_loaded": [],
6
+ "patterns_registered": [],
7
+ "last_updated": "2026-01-21T00:00:00Z"
8
+ }
@@ -1,77 +1,77 @@
1
- # Active Tasks
2
-
3
- This file tracks work currently in progress.
4
-
5
- ## Format
6
-
7
- Use checkboxes to track completion status:
8
-
9
- ```markdown
10
- - [ ] US-001: Pending task
11
- - [x] US-002: Completed task
12
- ```
13
-
14
- Each task can have:
15
- - **Status indicator:** [ ] = pending, [x] = completed
16
- - **ID:** US-XXX, BUG-XXX, DEV-XXX, or SPIKE-XXX
17
- - **Title:** Clear, actionable description
18
- - **Notes:** Optional context or blockers
19
- - **Assignee:** Who's working on it (optional)
20
-
21
- ---
22
-
23
- ## Task Types
24
-
25
- - **US-XXX:** User Story (feature work)
26
- - **BUG-XXX:** Bug fix
27
- - **DEV-XXX:** Developer task (refactoring, tech debt)
28
- - **SPIKE-XXX:** Research or investigation
29
- - **DOCS-XXX:** Documentation
30
-
31
- ---
32
-
33
- ## Management Rules
34
-
35
- 1. **Limit WIP:** Keep 3-5 tasks active max
36
- 2. **Prioritize:** Order from highest to lowest priority
37
- 3. **Clarify blockers:** Note if task is blocked
38
- 4. **Update daily:** Check boxes as you work
39
- 5. **Archive completion:** Move finished tasks to backlog with date
40
-
41
- ---
42
-
43
- ## Template for New Task
44
-
45
- ```markdown
46
- - [ ] US-XXX: [Clear title]
47
- - Assignee: (your name or team)
48
- - Priority: High/Medium/Low
49
- - Blocked by: (if applicable)
50
- - Notes: (context)
51
- ```
52
-
53
- ---
54
-
55
- ## Current Sprint
56
-
57
- Update this section weekly with sprint goals and dates.
58
-
59
- **Sprint:** YYYY-MM-DD to YYYY-MM-DD
60
- **Goal:** (What we're trying to accomplish)
61
- **Capacity:** (Team capacity/points)
62
-
63
- ---
64
-
65
- ## Today's Focus
66
-
67
- Highlight 1-3 most important tasks for today.
68
-
69
- ---
70
-
71
- ## Notes
72
-
73
- - Check backlog.md for upcoming work
74
- - Move completed tasks to archive or backlog with completion date
75
- - When stuck, create SPIKE task to investigate
76
- - Reference decisions from `memory/decisions.md`
77
- - Flag architectural changes for team discussion
1
+ # Active Tasks
2
+
3
+ This file tracks work currently in progress.
4
+
5
+ ## Format
6
+
7
+ Use checkboxes to track completion status:
8
+
9
+ ```markdown
10
+ - [ ] US-001: Pending task
11
+ - [x] US-002: Completed task
12
+ ```
13
+
14
+ Each task can have:
15
+ - **Status indicator:** [ ] = pending, [x] = completed
16
+ - **ID:** US-XXX, BUG-XXX, DEV-XXX, or SPIKE-XXX
17
+ - **Title:** Clear, actionable description
18
+ - **Notes:** Optional context or blockers
19
+ - **Assignee:** Who's working on it (optional)
20
+
21
+ ---
22
+
23
+ ## Task Types
24
+
25
+ - **US-XXX:** User Story (feature work)
26
+ - **BUG-XXX:** Bug fix
27
+ - **DEV-XXX:** Developer task (refactoring, tech debt)
28
+ - **SPIKE-XXX:** Research or investigation
29
+ - **DOCS-XXX:** Documentation
30
+
31
+ ---
32
+
33
+ ## Management Rules
34
+
35
+ 1. **Limit WIP:** Keep 3-5 tasks active max
36
+ 2. **Prioritize:** Order from highest to lowest priority
37
+ 3. **Clarify blockers:** Note if task is blocked
38
+ 4. **Update daily:** Check boxes as you work
39
+ 5. **Archive completion:** Move finished tasks to backlog with date
40
+
41
+ ---
42
+
43
+ ## Template for New Task
44
+
45
+ ```markdown
46
+ - [ ] US-XXX: [Clear title]
47
+ - Assignee: (your name or team)
48
+ - Priority: High/Medium/Low
49
+ - Blocked by: (if applicable)
50
+ - Notes: (context)
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Current Sprint
56
+
57
+ Update this section weekly with sprint goals and dates.
58
+
59
+ **Sprint:** YYYY-MM-DD to YYYY-MM-DD
60
+ **Goal:** (What we're trying to accomplish)
61
+ **Capacity:** (Team capacity/points)
62
+
63
+ ---
64
+
65
+ ## Today's Focus
66
+
67
+ Highlight 1-3 most important tasks for today.
68
+
69
+ ---
70
+
71
+ ## Notes
72
+
73
+ - Check backlog.md for upcoming work
74
+ - Move completed tasks to archive or backlog with completion date
75
+ - When stuck, create SPIKE task to investigate
76
+ - Reference decisions from `memory/decisions.md`
77
+ - Flag architectural changes for team discussion
@@ -1,95 +1,95 @@
1
- # Backlog
2
-
3
- This file contains prioritized future tasks not yet in active work.
4
-
5
- ## Format
6
-
7
- Tasks are listed in priority order (highest to lowest):
8
-
9
- ```markdown
10
- ### US-XXX: Task Title
11
- **Type:** Story | Bug | DevTask
12
- **Priority:** High | Medium | Low
13
- **Effort:** (T-shirt size: XS, S, M, L, XL)
14
- **Description:** What needs to be done
15
- **Acceptance Criteria:**
16
- - [ ] Criterion 1
17
- - [ ] Criterion 2
18
- **Dependencies:** (Other tasks needed first)
19
- **Notes:** Context, caveats, research needed
20
- ```
21
-
22
- ---
23
-
24
- ## Moving to Active
25
-
26
- When starting a backlog task:
27
-
28
- 1. Create issue/ticket in your tracking system
29
- 2. Move to `active.md` with checkbox
30
- 3. Assign team member
31
- 4. Update priority based on sprint plan
32
- 5. Reference in commit messages
33
-
34
- ---
35
-
36
- ## Adding New Tasks
37
-
38
- When new work is identified:
39
-
40
- 1. Assign next ID (US-XXX, BUG-XXX, etc.)
41
- 2. Add to appropriate section
42
- 3. Fill in all fields
43
- 4. Don't assign yet - wait for planning
44
- 5. Commit with message: `docs: add [ID] to backlog`
45
-
46
- ---
47
-
48
- ## Backlog Sections
49
-
50
- ### High Priority
51
- Work that should start soon. Review weekly.
52
-
53
- ### Medium Priority
54
- Important but can wait. Review biweekly.
55
-
56
- ### Low Priority
57
- Nice-to-have improvements. Review monthly.
58
-
59
- ### Roadmap (Future Phases)
60
- Longer-term projects for future planning.
61
-
62
- ---
63
-
64
- ## Template for New Backlog Item
65
-
66
- ```markdown
67
- ### US-XXX: [Title]
68
- **Type:** Story | Bug | DevTask
69
- **Priority:** High | Medium | Low
70
- **Effort:** S/M/L
71
- **Description:** (What and why)
72
- **Acceptance Criteria:**
73
- - [ ] (Specific, measurable outcome)
74
- **Dependencies:** (Other tasks)
75
- **Notes:** (Research, concerns, constraints)
76
- ```
77
-
78
- ---
79
-
80
- ## Management Guidelines
81
-
82
- - Groom backlog every sprint (remove duplicates, clarify)
83
- - Estimate effort using relative sizing (XS, S, M, L, XL)
84
- - Link related tasks together
85
- - Archive completed items with date + time spent
86
- - Keep description brief - link to external tickets for details
87
-
88
- ---
89
-
90
- ## Cleanup
91
-
92
- - Remove or update duplicates
93
- - Close blocked items after 30 days of no progress
94
- - Archive completed items to `completed/` section
95
- - Re-estimate if context changes significantly
1
+ # Backlog
2
+
3
+ This file contains prioritized future tasks not yet in active work.
4
+
5
+ ## Format
6
+
7
+ Tasks are listed in priority order (highest to lowest):
8
+
9
+ ```markdown
10
+ ### US-XXX: Task Title
11
+ **Type:** Story | Bug | DevTask
12
+ **Priority:** High | Medium | Low
13
+ **Effort:** (T-shirt size: XS, S, M, L, XL)
14
+ **Description:** What needs to be done
15
+ **Acceptance Criteria:**
16
+ - [ ] Criterion 1
17
+ - [ ] Criterion 2
18
+ **Dependencies:** (Other tasks needed first)
19
+ **Notes:** Context, caveats, research needed
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Moving to Active
25
+
26
+ When starting a backlog task:
27
+
28
+ 1. Create issue/ticket in your tracking system
29
+ 2. Move to `active.md` with checkbox
30
+ 3. Assign team member
31
+ 4. Update priority based on sprint plan
32
+ 5. Reference in commit messages
33
+
34
+ ---
35
+
36
+ ## Adding New Tasks
37
+
38
+ When new work is identified:
39
+
40
+ 1. Assign next ID (US-XXX, BUG-XXX, etc.)
41
+ 2. Add to appropriate section
42
+ 3. Fill in all fields
43
+ 4. Don't assign yet - wait for planning
44
+ 5. Commit with message: `docs: add [ID] to backlog`
45
+
46
+ ---
47
+
48
+ ## Backlog Sections
49
+
50
+ ### High Priority
51
+ Work that should start soon. Review weekly.
52
+
53
+ ### Medium Priority
54
+ Important but can wait. Review biweekly.
55
+
56
+ ### Low Priority
57
+ Nice-to-have improvements. Review monthly.
58
+
59
+ ### Roadmap (Future Phases)
60
+ Longer-term projects for future planning.
61
+
62
+ ---
63
+
64
+ ## Template for New Backlog Item
65
+
66
+ ```markdown
67
+ ### US-XXX: [Title]
68
+ **Type:** Story | Bug | DevTask
69
+ **Priority:** High | Medium | Low
70
+ **Effort:** S/M/L
71
+ **Description:** (What and why)
72
+ **Acceptance Criteria:**
73
+ - [ ] (Specific, measurable outcome)
74
+ **Dependencies:** (Other tasks)
75
+ **Notes:** (Research, concerns, constraints)
76
+ ```
77
+
78
+ ---
79
+
80
+ ## Management Guidelines
81
+
82
+ - Groom backlog every sprint (remove duplicates, clarify)
83
+ - Estimate effort using relative sizing (XS, S, M, L, XL)
84
+ - Link related tasks together
85
+ - Archive completed items with date + time spent
86
+ - Keep description brief - link to external tickets for details
87
+
88
+ ---
89
+
90
+ ## Cleanup
91
+
92
+ - Remove or update duplicates
93
+ - Close blocked items after 30 days of no progress
94
+ - Archive completed items to `completed/` section
95
+ - Re-estimate if context changes significantly