opencodekit 0.2.3 → 0.2.5

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 (55) hide show
  1. package/README.md +2 -1
  2. package/dist/index.js +1 -1
  3. package/dist/template/.opencode/AGENTS.md +43 -3
  4. package/dist/template/.opencode/command/create.md +21 -2
  5. package/dist/template/.opencode/command/issue.md +1 -1
  6. package/dist/template/.opencode/command/plan.md +85 -4
  7. package/dist/template/.opencode/memory/_templates/observation.md +39 -0
  8. package/dist/template/.opencode/package.json +1 -1
  9. package/dist/template/.opencode/plugin/superpowers.ts +227 -288
  10. package/dist/template/.opencode/tool/memory-search.ts +140 -0
  11. package/dist/template/.opencode/tool/observation.ts +155 -0
  12. package/package.json +1 -1
  13. package/dist/template/.opencode/memory/README.md +0 -128
  14. package/dist/template/.opencode/memory/_templates/handoff.md +0 -33
  15. package/dist/template/.opencode/memory/_templates/research.md +0 -29
  16. package/dist/template/.opencode/memory/_templates/task-design.md +0 -59
  17. package/dist/template/.opencode/memory/_templates/task-review.md +0 -73
  18. package/dist/template/.opencode/memory/_templates/task-spec.md +0 -71
  19. package/dist/template/.opencode/memory/design-guidelines.md +0 -281
  20. /package/dist/template/.opencode/memory/_templates/{task-prd.md → prd.md} +0 -0
  21. /package/dist/template/.opencode/{superpowers/skills → skills}/brainstorming/SKILL.md +0 -0
  22. /package/dist/template/.opencode/{superpowers/skills → skills}/condition-based-waiting/SKILL.md +0 -0
  23. /package/dist/template/.opencode/{superpowers/skills → skills}/condition-based-waiting/example.ts +0 -0
  24. /package/dist/template/.opencode/{superpowers/skills → skills}/defense-in-depth/SKILL.md +0 -0
  25. /package/dist/template/.opencode/{superpowers/skills → skills}/dispatching-parallel-agents/SKILL.md +0 -0
  26. /package/dist/template/.opencode/{superpowers/skills → skills}/executing-plans/SKILL.md +0 -0
  27. /package/dist/template/.opencode/{superpowers/skills → skills}/finishing-a-development-branch/SKILL.md +0 -0
  28. /package/dist/template/.opencode/{superpowers/skills → skills}/frontend-aesthetics/SKILL.md +0 -0
  29. /package/dist/template/.opencode/{superpowers/skills → skills}/gemini-large-context/SKILL.md +0 -0
  30. /package/dist/template/.opencode/{superpowers/skills → skills}/receiving-code-review/SKILL.md +0 -0
  31. /package/dist/template/.opencode/{superpowers/skills → skills}/requesting-code-review/SKILL.md +0 -0
  32. /package/dist/template/.opencode/{superpowers/skills → skills}/requesting-code-review/code-reviewer.md +0 -0
  33. /package/dist/template/.opencode/{superpowers/skills → skills}/root-cause-tracing/SKILL.md +0 -0
  34. /package/dist/template/.opencode/{superpowers/skills → skills}/root-cause-tracing/find-polluter.sh +0 -0
  35. /package/dist/template/.opencode/{superpowers/skills → skills}/sharing-skills/SKILL.md +0 -0
  36. /package/dist/template/.opencode/{superpowers/skills → skills}/subagent-driven-development/SKILL.md +0 -0
  37. /package/dist/template/.opencode/{superpowers/skills → skills}/systematic-debugging/CREATION-LOG.md +0 -0
  38. /package/dist/template/.opencode/{superpowers/skills → skills}/systematic-debugging/SKILL.md +0 -0
  39. /package/dist/template/.opencode/{superpowers/skills → skills}/systematic-debugging/test-academic.md +0 -0
  40. /package/dist/template/.opencode/{superpowers/skills → skills}/systematic-debugging/test-pressure-1.md +0 -0
  41. /package/dist/template/.opencode/{superpowers/skills → skills}/systematic-debugging/test-pressure-2.md +0 -0
  42. /package/dist/template/.opencode/{superpowers/skills → skills}/systematic-debugging/test-pressure-3.md +0 -0
  43. /package/dist/template/.opencode/{superpowers/skills → skills}/test-driven-development/SKILL.md +0 -0
  44. /package/dist/template/.opencode/{superpowers/skills → skills}/testing-anti-patterns/SKILL.md +0 -0
  45. /package/dist/template/.opencode/{superpowers/skills → skills}/testing-skills-with-subagents/SKILL.md +0 -0
  46. /package/dist/template/.opencode/{superpowers/skills → skills}/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +0 -0
  47. /package/dist/template/.opencode/{superpowers/skills → skills}/ui-ux-research/SKILL.md +0 -0
  48. /package/dist/template/.opencode/{superpowers/skills → skills}/using-git-worktrees/SKILL.md +0 -0
  49. /package/dist/template/.opencode/{superpowers/skills → skills}/using-superpowers/SKILL.md +0 -0
  50. /package/dist/template/.opencode/{superpowers/skills → skills}/verification-before-completion/SKILL.md +0 -0
  51. /package/dist/template/.opencode/{superpowers/skills → skills}/writing-plans/SKILL.md +0 -0
  52. /package/dist/template/.opencode/{superpowers/skills → skills}/writing-skills/SKILL.md +0 -0
  53. /package/dist/template/.opencode/{superpowers/skills → skills}/writing-skills/anthropic-best-practices.md +0 -0
  54. /package/dist/template/.opencode/{superpowers/skills → skills}/writing-skills/graphviz-conventions.dot +0 -0
  55. /package/dist/template/.opencode/{superpowers/skills → skills}/writing-skills/persuasion-principles.md +0 -0
@@ -0,0 +1,140 @@
1
+ import path from "path";
2
+ import { tool } from "@opencode-ai/plugin";
3
+ import fs from "fs/promises";
4
+
5
+ interface SearchResult {
6
+ file: string;
7
+ matches: { line: number; content: string }[];
8
+ }
9
+
10
+ async function searchDirectory(
11
+ dir: string,
12
+ pattern: RegExp,
13
+ results: SearchResult[],
14
+ baseDir: string,
15
+ ): Promise<void> {
16
+ try {
17
+ const entries = await fs.readdir(dir, { withFileTypes: true });
18
+
19
+ for (const entry of entries) {
20
+ const fullPath = path.join(dir, entry.name);
21
+
22
+ if (entry.isDirectory()) {
23
+ // Skip hidden directories except _templates
24
+ if (entry.name.startsWith(".") && entry.name !== "_templates") {
25
+ continue;
26
+ }
27
+ await searchDirectory(fullPath, pattern, results, baseDir);
28
+ } else if (entry.name.endsWith(".md")) {
29
+ const content = await fs.readFile(fullPath, "utf-8");
30
+ const lines = content.split("\n");
31
+ const matches: { line: number; content: string }[] = [];
32
+
33
+ lines.forEach((line, index) => {
34
+ if (pattern.test(line)) {
35
+ matches.push({
36
+ line: index + 1,
37
+ content: line.trim().substring(0, 150),
38
+ });
39
+ }
40
+ });
41
+
42
+ if (matches.length > 0) {
43
+ const relativePath = path.relative(baseDir, fullPath);
44
+ results.push({ file: relativePath, matches });
45
+ }
46
+ }
47
+ }
48
+ } catch {
49
+ // Directory doesn't exist or not readable
50
+ }
51
+ }
52
+
53
+ export default tool({
54
+ description:
55
+ "Search across all memory files using keywords or patterns. Returns matching files with line numbers and context. Useful for finding past decisions, research, or handoffs.",
56
+ args: {
57
+ query: tool.schema
58
+ .string()
59
+ .describe(
60
+ "Search query: keywords or regex pattern (e.g., 'authentication', 'bugfix.*session')",
61
+ ),
62
+ type: tool.schema
63
+ .string()
64
+ .optional()
65
+ .describe(
66
+ "Filter by type: 'all' (default), 'handoffs', 'research', 'templates', 'observations', 'beads'",
67
+ ),
68
+ limit: tool.schema
69
+ .number()
70
+ .optional()
71
+ .describe("Max results per file (default: 5)"),
72
+ },
73
+ execute: async (args: { query: string; type?: string; limit?: number }) => {
74
+ const memoryDir = path.join(process.cwd(), ".opencode/memory");
75
+ const beadsDir = path.join(process.cwd(), ".beads/artifacts");
76
+ const globalMemoryDir = path.join(
77
+ process.env.HOME || "",
78
+ ".config/opencode/memory",
79
+ );
80
+
81
+ const limit = args.limit || 5;
82
+
83
+ // Create case-insensitive regex from query
84
+ let pattern: RegExp;
85
+ try {
86
+ pattern = new RegExp(args.query, "i");
87
+ } catch {
88
+ // Escape special chars if not valid regex
89
+ const escaped = args.query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
90
+ pattern = new RegExp(escaped, "i");
91
+ }
92
+
93
+ const results: SearchResult[] = [];
94
+
95
+ // Handle type filtering
96
+ if (args.type === "beads") {
97
+ // Search only bead artifacts
98
+ await searchDirectory(beadsDir, pattern, results, beadsDir);
99
+ } else if (args.type && args.type !== "all") {
100
+ const typeMap: Record<string, string> = {
101
+ handoffs: "handoffs",
102
+ research: "research",
103
+ templates: "_templates",
104
+ observations: "observations",
105
+ };
106
+ const subdir = typeMap[args.type];
107
+ if (subdir) {
108
+ const searchDir = path.join(memoryDir, subdir);
109
+ await searchDirectory(searchDir, pattern, results, memoryDir);
110
+ }
111
+ } else {
112
+ // Search all: memory + beads
113
+ await searchDirectory(memoryDir, pattern, results, memoryDir);
114
+ await searchDirectory(beadsDir, pattern, results, beadsDir);
115
+ await searchDirectory(globalMemoryDir, pattern, results, globalMemoryDir);
116
+ }
117
+
118
+ if (results.length === 0) {
119
+ return `No matches found for "${args.query}" in memory files.\n\nTip: Try broader search terms or check available types: handoffs, research, templates, observations, beads`;
120
+ }
121
+
122
+ // Build output
123
+ let output = `# Memory Search: "${args.query}"\n\n`;
124
+ output += `Found ${results.length} file(s) with matches.\n\n`;
125
+
126
+ for (const result of results) {
127
+ output += `## ${result.file}\n\n`;
128
+ const matchesToShow = result.matches.slice(0, limit);
129
+ for (const match of matchesToShow) {
130
+ output += `- **Line ${match.line}:** ${match.content}\n`;
131
+ }
132
+ if (result.matches.length > limit) {
133
+ output += `- ... and ${result.matches.length - limit} more matches\n`;
134
+ }
135
+ output += "\n";
136
+ }
137
+
138
+ return output;
139
+ },
140
+ });
@@ -0,0 +1,155 @@
1
+ import path from "path";
2
+ import { tool } from "@opencode-ai/plugin";
3
+ import fs from "fs/promises";
4
+
5
+ // Observation types following claude-mem patterns
6
+ type ObservationType =
7
+ | "decision"
8
+ | "bugfix"
9
+ | "feature"
10
+ | "pattern"
11
+ | "discovery"
12
+ | "learning"
13
+ | "warning";
14
+
15
+ const TYPE_ICONS: Record<ObservationType, string> = {
16
+ decision: "🎯",
17
+ bugfix: "🐛",
18
+ feature: "✨",
19
+ pattern: "🔄",
20
+ discovery: "💡",
21
+ learning: "📚",
22
+ warning: "⚠️",
23
+ };
24
+
25
+ export default tool({
26
+ description:
27
+ "Create a structured observation for future reference. Observations are categorized by type (decision, bugfix, feature, pattern, discovery, learning, warning) and stored in .opencode/memory/observations/.",
28
+ args: {
29
+ type: tool.schema
30
+ .string()
31
+ .describe(
32
+ "Observation type: decision, bugfix, feature, pattern, discovery, learning, warning",
33
+ ),
34
+ title: tool.schema.string().describe("Brief title for the observation"),
35
+ content: tool.schema
36
+ .string()
37
+ .describe("Detailed observation content with context"),
38
+ concepts: tool.schema
39
+ .string()
40
+ .optional()
41
+ .describe(
42
+ "Comma-separated concept tags (e.g., 'authentication, oauth, security')",
43
+ ),
44
+ files: tool.schema
45
+ .string()
46
+ .optional()
47
+ .describe(
48
+ "Comma-separated related files (e.g., 'src/auth.ts, src/login.ts')",
49
+ ),
50
+ bead_id: tool.schema
51
+ .string()
52
+ .optional()
53
+ .describe("Related bead ID for traceability"),
54
+ },
55
+ execute: async (args: {
56
+ type: string;
57
+ title: string;
58
+ content: string;
59
+ concepts?: string;
60
+ files?: string;
61
+ bead_id?: string;
62
+ }) => {
63
+ const obsDir = path.join(process.cwd(), ".opencode/memory/observations");
64
+
65
+ // Validate type
66
+ const validTypes: ObservationType[] = [
67
+ "decision",
68
+ "bugfix",
69
+ "feature",
70
+ "pattern",
71
+ "discovery",
72
+ "learning",
73
+ "warning",
74
+ ];
75
+ const obsType = args.type.toLowerCase() as ObservationType;
76
+ if (!validTypes.includes(obsType)) {
77
+ return `Error: Invalid observation type '${args.type}'.\nValid types: ${validTypes.join(", ")}`;
78
+ }
79
+
80
+ // Generate filename: YYYY-MM-DD-type-slug.md
81
+ const now = new Date();
82
+ const dateStr = now.toISOString().split("T")[0];
83
+ const slug = args.title
84
+ .toLowerCase()
85
+ .replace(/[^a-z0-9]+/g, "-")
86
+ .replace(/^-|-$/g, "")
87
+ .substring(0, 40);
88
+ const filename = `${dateStr}-${obsType}-${slug}.md`;
89
+ const filePath = path.join(obsDir, filename);
90
+
91
+ // Parse concepts and files
92
+ const concepts = args.concepts
93
+ ? args.concepts.split(",").map((c) => c.trim())
94
+ : [];
95
+ const files = args.files ? args.files.split(",").map((f) => f.trim()) : [];
96
+
97
+ // Build observation content
98
+ const icon = TYPE_ICONS[obsType];
99
+ let observation = `# ${icon} ${args.title}\n\n`;
100
+ observation += `**Type:** ${obsType}\n`;
101
+ observation += `**Created:** ${now.toISOString()}\n`;
102
+
103
+ if (args.bead_id) {
104
+ observation += `**Bead:** ${args.bead_id}\n`;
105
+ }
106
+
107
+ if (concepts.length > 0) {
108
+ observation += `**Concepts:** ${concepts.map((c) => `\`${c}\``).join(", ")}\n`;
109
+ }
110
+
111
+ if (files.length > 0) {
112
+ observation += `**Files:** ${files.map((f) => `\`${f}\``).join(", ")}\n`;
113
+ }
114
+
115
+ observation += `\n---\n\n`;
116
+ observation += args.content;
117
+ observation += `\n`;
118
+
119
+ try {
120
+ // Ensure directory exists
121
+ await fs.mkdir(obsDir, { recursive: true });
122
+
123
+ // Write observation
124
+ await fs.writeFile(filePath, observation, "utf-8");
125
+
126
+ let beadUpdate = "";
127
+
128
+ // Update bead notes if bead_id provided
129
+ if (args.bead_id) {
130
+ try {
131
+ const { execSync } = await import("child_process");
132
+ const noteContent = `${icon} ${obsType}: ${args.title}`;
133
+ execSync(
134
+ `bd edit ${args.bead_id} --note "${noteContent.replace(/"/g, '\\"')}"`,
135
+ {
136
+ cwd: process.cwd(),
137
+ encoding: "utf-8",
138
+ timeout: 5000,
139
+ },
140
+ );
141
+ beadUpdate = `\nBead updated: ${args.bead_id}`;
142
+ } catch {
143
+ beadUpdate = `\nWarning: Could not update bead ${args.bead_id}`;
144
+ }
145
+ }
146
+
147
+ return `✓ Observation saved: ${filename}\n\nType: ${icon} ${obsType}\nTitle: ${args.title}\nConcepts: ${concepts.join(", ") || "none"}\nFiles: ${files.join(", ") || "none"}${beadUpdate}\n\nPath: ${filePath}`;
148
+ } catch (error) {
149
+ if (error instanceof Error) {
150
+ return `Error saving observation: ${error.message}`;
151
+ }
152
+ return `Unknown error saving observation`;
153
+ }
154
+ },
155
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,128 +0,0 @@
1
- # Memory System README
2
-
3
- ## Overview
4
-
5
- The memory/ directory provides persistent cross-session context for OpenCode agents. This enables continuity and learning over time.
6
-
7
- ## Structure
8
-
9
- ```
10
- memory/
11
- ├── _templates/ # Document templates
12
- │ ├── spec.md # Template for task specifications
13
- │ ├── research.md # Template for research documents
14
- │ └── session.md # Template for session memory
15
- ├── memory.md # Current project state and session learnings
16
- ├── todo.md # Task tracking and progress
17
- ├── development-guidelines.md # Code conventions and patterns
18
- ├── architecture-decisions.md # Why we built it this way
19
- ├── blockers.md # Known issues and workarounds
20
-
21
- ├── research/ # Research findings and analysis
22
- │ ├── YYYY-MM-DD-topic.md # Research documents
23
- │ └── cache-topic.md # Research cache files
24
-
25
- ├── design-guidelines.md # Design system and UI standards
26
- ├── decisions/ # Architectural decision records
27
- │ └── database-choice.md # Example: Why PostgreSQL
28
-
29
- └── plans/ # Strategic planning documents
30
- └── q4-roadmap.md # Example: Quarterly objectives
31
- ```
32
-
33
- **Subdirectories:** Use to organize knowledge by category and prevent flat directory bloat.
34
-
35
- ## Usage
36
-
37
- ### For Agents
38
-
39
- **At Session Start:**
40
-
41
- 1. Read `memory.md` for current project context
42
- 2. Check `todo.md` for active tasks
43
- 3. Review `blockers.md` for known issues
44
-
45
- **During Session:**
46
-
47
- - Consult `development-guidelines.md` for coding standards
48
- - Reference `architecture-decisions.md` for design rationale
49
- - Reference `design-guidelines.md` for design standards
50
- - Update progress in `todo.md`
51
- - Save research to `research/YYYY-MM-DD-topic.md` (auto-created by /research command)
52
- - Document decisions in `decisions/choice-name.md`
53
- - Create specs using templates from `_templates/spec.md`
54
-
55
- **At Session End:**
56
-
57
- - Update `memory.md` with new learnings
58
- - Mark completed tasks in `todo.md`
59
- - Document new blockers or resolve existing ones
60
-
61
- ### For Humans
62
-
63
- **Quick Status Check:**
64
-
65
- ```bash
66
- # See current state
67
- cat memory/memory.md
68
-
69
- # Check active tasks
70
- cat memory/todo.md
71
-
72
- # Review blockers
73
- cat memory/blockers.md
74
- ```
75
-
76
- **Update Memory:**
77
- Edit files directly or use memory-update tool - agents will read on next session.
78
-
79
- **Examples:**
80
-
81
- ```bash
82
- # Read research notes
83
- memory-read research/opencode-sessions
84
-
85
- # Create new research note
86
- memory-update research/new-topic content="# Research Notes\n..."
87
-
88
- # Add decision record
89
- memory-update decisions/database-choice content="# Why PostgreSQL\n..."
90
-
91
- # Tools auto-create subdirectories and strip .md extension
92
- ```
93
-
94
- ## Memory Lifecycle
95
-
96
- ### Compaction (When memory.md > 5000 words)
97
-
98
- 1. Distill to critical facts only
99
- 2. Archive detailed history to dated file: `memory-archive-YYYY-MM-DD.md`
100
- 3. Keep current state lean and focused
101
-
102
- ### Rotation
103
-
104
- - Archive completed tasks monthly
105
- - Move resolved blockers to history section
106
- - Keep active memory under 5000 words
107
-
108
- ## Integration Points
109
-
110
- - **Plan Agent:** Reads memory.md before creating plans
111
- - **Build Agent:** Updates memory.md after major completions
112
- - **All Agents:** Consult development-guidelines.md for standards
113
- - **Design Agent:** Consults design-guidelines.md for design standards
114
-
115
- ## Best Practices
116
-
117
- 1. **Be Specific:** "Uses React 18 Server Components" vs "Uses React"
118
- 2. **Date Decisions:** Track when and why choices were made
119
- 3. **Keep Current:** Update after significant progress, not every trivial change
120
- 4. **Prune Regularly:** Remove obsolete information
121
- 5. **Link Context:** Reference related files/specs when relevant
122
-
123
- ## Future Enhancements
124
-
125
- - Automatic memory compaction triggers
126
- - Memory-read and memory-update tools
127
- - Integration with task ledgers
128
- - Progress monitoring and re-planning triggers
@@ -1,33 +0,0 @@
1
- # Handoff: [Phase Name]
2
-
3
- **Date:** YYYY-MM-DD
4
- **From:** [Current phase/agent]
5
- **To:** [Next phase/agent]
6
- **Task:** [Task ID if applicable]
7
-
8
- ## Summary
9
-
10
- [1-2 sentences: What was accomplished in this phase]
11
-
12
- ## Relevant Files
13
-
14
- - `@path/to/file1` - [Why needed]
15
- - `@path/to/file2` - [Why needed]
16
-
17
- ## Key Decisions
18
-
19
- - [Decision 1]: [Rationale]
20
- - [Decision 2]: [Rationale]
21
-
22
- ## Constraints
23
-
24
- - [Constraint that must be followed]
25
- - [Limitation to be aware of]
26
-
27
- ## Next Instructions
28
-
29
- [Clear prompt for the next agent - what exactly to do next]
30
-
31
- ## Open Questions
32
-
33
- - [Unresolved question for next phase]
@@ -1,29 +0,0 @@
1
- # Research: [Topic]
2
-
3
- **Date:** YYYY-MM-DD
4
- **Context:** [Why this research was needed]
5
-
6
- ## Question
7
-
8
- [The specific question or problem being researched]
9
-
10
- ## Findings
11
-
12
- ### [Finding 1]
13
-
14
- - [Key insight]
15
- - Source: [URL or document]
16
-
17
- ### [Finding 2]
18
-
19
- - [Key insight]
20
- - Source: [URL or document]
21
-
22
- ## Decision
23
-
24
- [Clear recommendation based on findings]
25
-
26
- ## Next Steps
27
-
28
- 1. [Action item]
29
- 2. [Action item]
@@ -1,59 +0,0 @@
1
- # Design Document
2
-
3
- **Bead ID:** [bead-id]
4
- **Created:** [date]
5
- **Status:** Draft | Validated
6
-
7
- ## Problem Statement
8
-
9
- What we're solving and why it matters:
10
-
11
- ## Approaches Considered
12
-
13
- ### Option A: [Name]
14
-
15
- - **Pros:** [advantages]
16
- - **Cons:** [drawbacks]
17
-
18
- ### Option B: [Name]
19
-
20
- - **Pros:** [advantages]
21
- - **Cons:** [drawbacks]
22
-
23
- ### Chosen Approach
24
-
25
- [Which option and why]
26
-
27
- ## Architecture
28
-
29
- High-level structure and how components fit together:
30
-
31
- ### Components
32
-
33
- - [Component 1]: [purpose]
34
- - [Component 2]: [purpose]
35
-
36
- ### Data Flow
37
-
38
- [How data moves through the system]
39
-
40
- ## Error Handling
41
-
42
- How the design handles failure cases:
43
-
44
- - [Error scenario 1]: [handling approach]
45
- - [Error scenario 2]: [handling approach]
46
-
47
- ## Testing Strategy
48
-
49
- How we'll validate this design works:
50
-
51
- - [Testing approach 1]
52
- - [Testing approach 2]
53
-
54
- ## Open Questions
55
-
56
- Unresolved items to address during implementation:
57
-
58
- - [ ] [Question 1]
59
- - [ ] [Question 2]
@@ -1,73 +0,0 @@
1
- # Task Review Template
2
-
3
- **Task ID:** [auto-generated]
4
- **Completed:** [date]
5
- **Status:** Done
6
-
7
- ## What Changed
8
-
9
- ### Files Modified:
10
-
11
- - `src/[file1.js]` - [brief description of changes]
12
- - `src/[file2.js]` - [brief description of changes]
13
- - `tests/[test.js]` - [brief description of changes]
14
-
15
- ### Logic Added:
16
-
17
- - [New functionality implemented]
18
- - [Key algorithms or business logic]
19
- - [Data flow changes]
20
-
21
- ### Files Created:
22
-
23
- - [List any new files created]
24
-
25
- ## What Skipped
26
-
27
- ### Intentionally Not Done:
28
-
29
- - [Feature X - reason: out of scope for this task]
30
- - [Optimization Y - reason: will be separate task]
31
- - [Test case Z - reason: requires additional setup]
32
-
33
- ### Known Limitations:
34
-
35
- - [Limitation 1 - temporary workaround]
36
- - [Limitation 2 - technical debt introduced]
37
- - [Limitation 3 - performance considerations]
38
-
39
- ## Inconsistencies with Architecture
40
-
41
- ### Deviations from Spec:
42
-
43
- - [What was supposed to happen vs what actually happened]
44
- - [Why the deviation was necessary]
45
- - [Impact on overall architecture]
46
-
47
- ### Unexpected Challenges:
48
-
49
- - [Problem 1 encountered and how solved]
50
- - [Problem 2 encountered and how solved]
51
- - [Problem 3 encountered and how solved]
52
-
53
- ## Validation Results
54
-
55
- ### Success Criteria Met:
56
-
57
- - [x] [Criteria 1 from PRD - how verified]
58
- - [x] [Criteria 2 from PRD - how verified]
59
- - [x] [Criteria 3 from PRD - how verified]
60
-
61
- ### Test Results:
62
-
63
- - [Test suite results summary]
64
- - [Performance benchmarks]
65
- - [Security validations]
66
-
67
- ## Next Micro-Task
68
-
69
- [Immediate next step or follow-up task needed]
70
-
71
- ## Lessons Learned
72
-
73
- [What worked well, what didn't, what to improve for future tasks]
@@ -1,71 +0,0 @@
1
- # Task Spec Template
2
-
3
- **Task ID:** [auto-generated]
4
- **PRD:** [link to task-XXX-prd.md]
5
- **Created:** [date]
6
-
7
- ## Architecture Plan
8
-
9
- Where this feature plugs into the repo, which layers it touches, expected file paths:
10
-
11
- ### Files to Create/Modify:
12
-
13
- - `src/[path/to/file1.js]` - [purpose]
14
- - `src/[path/to/file2.js]` - [purpose]
15
- - `tests/[path/to/test.js]` - [purpose]
16
-
17
- ### Integration Points:
18
-
19
- - [Existing module/service it connects to]
20
- - [Database schema changes needed]
21
- - [API endpoints affected]
22
-
23
- ## Constraints
24
-
25
- ### Naming Conventions:
26
-
27
- - Functions: [pattern, e.g., camelCase]
28
- - Files: [pattern, e.g., kebab-case]
29
- - Variables: [pattern, e.g., descriptive names]
30
-
31
- ### Framework Requirements:
32
-
33
- - Must use: [required libraries/patterns]
34
- - Must NOT use: [forbidden libraries/patterns]
35
- - Must follow: [specific patterns, e.g., controllers → services → repository]
36
-
37
- ### Code Style:
38
-
39
- - [Linting rules to follow]
40
- - [Testing patterns required]
41
- - [Documentation requirements]
42
-
43
- ## Edge Cases
44
-
45
- Every scenario I know devs forget when in a rush:
46
-
47
- - [Edge case 1: what happens when X fails]
48
- - [Edge case 2: handling of invalid input Y]
49
- - [Edge case 3: performance under load Z]
50
- - [Edge case 4: error recovery scenarios]
51
- - [Edge case 5: security considerations]
52
-
53
- ## Testing Notes
54
-
55
- Expected inputs/outputs, how to validate behavior, what logs/errors should look like:
56
-
57
- ### Test Cases:
58
-
59
- - [Test case 1: normal flow]
60
- - [Test case 2: error conditions]
61
- - [Test case 3: edge cases]
62
-
63
- ### Validation:
64
-
65
- - [How to verify it works correctly]
66
- - [Expected logs/messages]
67
- - [Performance benchmarks]
68
-
69
- ### Rollback Plan:
70
-
71
- - [How to undo changes if something goes wrong]