octocode-cli 1.1.1 → 1.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.
@@ -1,166 +0,0 @@
1
- ---
2
- name: octocode-plan
3
- description: Plans complex implementations with research-driven analysis and step-by-step breakdowns. Use when planning features, making architectural decisions, designing systems, or implementing multi-step changes.
4
- ---
5
-
6
- # Octocode Plan
7
-
8
- Research-driven planning and implementation using Octocode MCP tools.
9
-
10
- ## Core Principle
11
-
12
- ```
13
- RESEARCH BEFORE CODE. VERIFY PATTERNS. FOLLOW THE PLAN.
14
- ```
15
-
16
- 1. **Research First**: Validate patterns in high-quality repos before writing code
17
- 2. **Plan Before Implement**: Break down tasks, identify risks
18
- 3. **Green Build Required**: All changes must pass build/lint/test
19
-
20
- ## Flow
21
-
22
- ```
23
- UNDERSTAND → RESEARCH → PLAN → [IMPLEMENT] → VERIFY
24
- ```
25
-
26
- ## Tools
27
-
28
- **Research**:
29
- | Tool | Purpose |
30
- |------|---------|
31
- | `packageSearch` | Find libs/metadata |
32
- | `githubSearchRepositories` | Find reference repos |
33
- | `githubViewRepoStructure` | Map layout |
34
- | `githubSearchCode` | Find implementations |
35
- | `githubGetFileContent` | Read code |
36
- | `localSearchCode` | Search local codebase |
37
- | `localGetFileContent` | Read local files |
38
-
39
- **Execution**: `Read`, `Write`, `Edit`, `Bash`
40
-
41
- ## Goal Classification
42
-
43
- | Type | Description | Action |
44
- |------|-------------|--------|
45
- | `RESEARCH_ONLY` | No code changes | Research → Report |
46
- | `ANALYSIS` | Understand existing code | Research → Document |
47
- | `CREATION` | New files/features | Research → Plan → Implement |
48
- | `FEATURE` | Add to existing | Research → Plan → Implement |
49
- | `BUG` | Fix issue | Research → Plan → Implement |
50
- | `REFACTOR` | Improve structure | Research → Plan → Implement |
51
-
52
- ## Execution Phases
53
-
54
- ### Phase 0: Understand
55
- 1. Classify goal type (above)
56
- 2. Assess complexity: Quick | Medium | Thorough
57
- 3. Gather context: existing code, patterns, dependencies
58
- 4. Define constraints: tech stack, style, testing requirements
59
-
60
- **User Checkpoint**: If scope unclear or >2 repos involved → STOP & ASK
61
-
62
- ### Phase 1: Research
63
- **Progressive Discovery**: PKG → REPO → STRUCT → PATTERN → READ
64
-
65
- | Stage | Tool | Goal |
66
- |-------|------|------|
67
- | PKG | `packageSearch` | Find libs/metadata |
68
- | REPO | `githubSearchRepositories` | Find reference repos |
69
- | STRUCT | `githubViewRepoStructure` | Map layout |
70
- | PATTERN | `githubSearchCode` | Find implementations |
71
- | READ | `githubGetFileContent` | Read code |
72
-
73
- **Research Loop (ReAct)**:
74
- 1. **THOUGHT**: What do I need to know next?
75
- 2. **ACTION**: Execute Octocode tool
76
- 3. **OBSERVATION**: Analyze results - hypothesis confirmed?
77
- 4. **DECISION**: Use finding | Research more | Ask user
78
-
79
- **Quality Guards**:
80
- - Key findings need second source unless primary is definitive
81
- - Prefer repos updated within last year
82
- - Real code only (no dead code, deprecated, tests unless researching tests)
83
-
84
- ### Phase 2: Plan
85
- Write plan with:
86
- - Summary of approach
87
- - Step-by-step tasks with file paths
88
- - Dependencies/prerequisites
89
- - Risk areas and mitigations
90
- - Validation checklist
91
-
92
- **Plan Template**:
93
- ```markdown
94
- # Plan: {Title}
95
-
96
- ## Summary
97
- [TL;DR of approach]
98
-
99
- ## Research Findings
100
- [Key patterns with confidence levels]
101
-
102
- ## Implementation Steps
103
- 1. [ ] Step 1: [Description] - `path/to/file`
104
- 2. [ ] Step 2: [Description] - `path/to/file`
105
-
106
- ## Risk Areas
107
- - [Potential issues and mitigations]
108
-
109
- ## Validation
110
- - [ ] Build passes
111
- - [ ] Tests pass
112
- - [ ] [Custom checks]
113
- ```
114
-
115
- **CRITICAL**: Wait for explicit user approval before implementing
116
-
117
- ### Phase 3: Implement
118
- Prerequisite: Approved plan from Phase 2
119
-
120
- **Execution Loop**:
121
- 1. **THOUGHT**: Next plan step? Dependencies resolved?
122
- 2. **ACTION**: Read file → Write/Edit → Verify
123
- 3. **OBSERVATION**: Success? Errors? Side effects?
124
- 4. **LOOP**: Success → Next step; Fail → Fix
125
-
126
- **Guidelines**:
127
- - Follow plan sequentially
128
- - Use explicit file paths
129
- - Add TypeScript types
130
- - Handle errors appropriately
131
- - Minimal changes only
132
-
133
- ### Phase 4: Verify
134
- **For Code Changes**:
135
- - [ ] `npm run build` passes
136
- - [ ] `npm run lint` clean
137
- - [ ] `npm test` passes
138
- - [ ] No TypeScript errors
139
-
140
- **Loop**: Fail → Fix → Re-verify until all green
141
-
142
- ## Confidence Framework
143
-
144
- | Finding | Confidence | Action |
145
- |---------|------------|--------|
146
- | Single authoritative source | HIGH | Use directly |
147
- | Multiple consistent sources | HIGH | Use with references |
148
- | Single non-authoritative source | MED | Seek second source |
149
- | Conflicting sources | LOW | Ask user |
150
- | No sources found | LOW | Try semantic variants OR ask user |
151
-
152
- ## When to Skip Planning
153
-
154
- - Single-file, obvious fix
155
- - User provides exact implementation
156
- - Trivial changes (typo, comment, formatting)
157
-
158
- ## Error Recovery
159
-
160
- | Situation | Action |
161
- |-----------|--------|
162
- | Research returns empty | Try semantic variants, broaden scope |
163
- | Too many results | Add filters (path, extension, owner/repo) |
164
- | Conflicting patterns | Find authoritative source OR ask user |
165
- | Build fails | Check error, fix, re-verify |
166
- | Blocked >2 attempts | Summarize → Ask user for guidance |