oh-my-codex-cli 0.1.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 (292) hide show
  1. package/.agent/skills/agent-kb/HOW_TO_USE.md +428 -0
  2. package/.agent/skills/agent-kb/README.md +46 -0
  3. package/.agent/skills/agent-kb/SKILL.md +128 -0
  4. package/.agent/skills/agent-kb/references/intelligent-analysis-explained.md +333 -0
  5. package/.agent/skills/agent-kb/references/query-optimization.md +225 -0
  6. package/.agent/skills/aireview/SKILL.md +704 -0
  7. package/.agent/skills/analyze/SKILL.md +81 -0
  8. package/.agent/skills/architect-planner/HOW_TO_USE.md +238 -0
  9. package/.agent/skills/architect-planner/README.md +41 -0
  10. package/.agent/skills/architect-planner/SKILL.md +539 -0
  11. package/.agent/skills/auto-mbti/SKILL.md +291 -0
  12. package/.agent/skills/autopilot/SKILL.md +222 -0
  13. package/.agent/skills/backend-patterns/SKILL.md +602 -0
  14. package/.agent/skills/bdd-generator/README.md +78 -0
  15. package/.agent/skills/bdd-generator/SKILL.md +436 -0
  16. package/.agent/skills/brainstorming/HOW_TO_USE.md +289 -0
  17. package/.agent/skills/brainstorming/README.md +41 -0
  18. package/.agent/skills/brainstorming/SKILL.md +165 -0
  19. package/.agent/skills/build-fix/SKILL.md +190 -0
  20. package/.agent/skills/cancel/SKILL.md +658 -0
  21. package/.agent/skills/checkpoint/SKILL.md +94 -0
  22. package/.agent/skills/code-review/SKILL.md +273 -0
  23. package/.agent/skills/coding-standards/SKILL.md +535 -0
  24. package/.agent/skills/conductor/SKILL.md +128 -0
  25. package/.agent/skills/conductor/commands/conductor/implement.toml +358 -0
  26. package/.agent/skills/conductor/commands/conductor/newTrack.toml +142 -0
  27. package/.agent/skills/conductor/commands/conductor/revert.toml +123 -0
  28. package/.agent/skills/conductor/commands/conductor/setup.toml +429 -0
  29. package/.agent/skills/conductor/commands/conductor/status.toml +57 -0
  30. package/.agent/skills/conductor/scripts/install.sh +89 -0
  31. package/.agent/skills/conductor/templates/code_styleguides/csharp.md +115 -0
  32. package/.agent/skills/conductor/templates/code_styleguides/dart.md +238 -0
  33. package/.agent/skills/conductor/templates/code_styleguides/general.md +23 -0
  34. package/.agent/skills/conductor/templates/code_styleguides/go.md +48 -0
  35. package/.agent/skills/conductor/templates/code_styleguides/html-css.md +49 -0
  36. package/.agent/skills/conductor/templates/code_styleguides/javascript.md +51 -0
  37. package/.agent/skills/conductor/templates/code_styleguides/python.md +37 -0
  38. package/.agent/skills/conductor/templates/code_styleguides/typescript.md +43 -0
  39. package/.agent/skills/conductor/templates/rules/README.md +23 -0
  40. package/.agent/skills/conductor/templates/rules/agents.md +49 -0
  41. package/.agent/skills/conductor/templates/rules/coding-style.md +70 -0
  42. package/.agent/skills/conductor/templates/rules/dev.md +20 -0
  43. package/.agent/skills/conductor/templates/rules/git-workflow.md +45 -0
  44. package/.agent/skills/conductor/templates/rules/hooks.md +6 -0
  45. package/.agent/skills/conductor/templates/rules/patterns.md +55 -0
  46. package/.agent/skills/conductor/templates/rules/performance.md +47 -0
  47. package/.agent/skills/conductor/templates/rules/research.md +26 -0
  48. package/.agent/skills/conductor/templates/rules/review.md +22 -0
  49. package/.agent/skills/conductor/templates/rules/security.md +36 -0
  50. package/.agent/skills/conductor/templates/rules/testing.md +30 -0
  51. package/.agent/skills/conductor/templates/workflow.md +333 -0
  52. package/.agent/skills/consensus/HOW_TO_USE.md +191 -0
  53. package/.agent/skills/consensus/README.md +41 -0
  54. package/.agent/skills/consensus/SKILL.md +317 -0
  55. package/.agent/skills/content-research-writer/SKILL.md +537 -0
  56. package/.agent/skills/debug-analysis/SKILL.md +331 -0
  57. package/.agent/skills/deepinit/SKILL.md +347 -0
  58. package/.agent/skills/deepsearch/SKILL.md +56 -0
  59. package/.agent/skills/doctor/SKILL.md +158 -0
  60. package/.agent/skills/drawio/EXAMPLES.md +382 -0
  61. package/.agent/skills/drawio/QUICK_START.md +237 -0
  62. package/.agent/skills/drawio/README.md +315 -0
  63. package/.agent/skills/drawio/SETUP_GUIDE.md +254 -0
  64. package/.agent/skills/drawio/SKILL.md +1176 -0
  65. package/.agent/skills/e2e/SKILL.md +396 -0
  66. package/.agent/skills/ecomode/SKILL.md +160 -0
  67. package/.agent/skills/electron-driver/SKILL.md +144 -0
  68. package/.agent/skills/electron-driver/scripts/driver-template.js +71 -0
  69. package/.agent/skills/eval/SKILL.md +140 -0
  70. package/.agent/skills/eval-harness/SKILL.md +242 -0
  71. package/.agent/skills/evolve/SKILL.md +213 -0
  72. package/.agent/skills/frontend-design/SKILL.md +42 -0
  73. package/.agent/skills/frontend-patterns/SKILL.md +646 -0
  74. package/.agent/skills/frontend-ui-ux/SKILL.md +70 -0
  75. package/.agent/skills/git-master/SKILL.md +75 -0
  76. package/.agent/skills/help/SKILL.md +89 -0
  77. package/.agent/skills/iterative-retrieval/SKILL.md +217 -0
  78. package/.agent/skills/local-skills-setup/SKILL.md +483 -0
  79. package/.agent/skills/log-analyzer/SKILL.md +187 -0
  80. package/.agent/skills/mcp-setup/SKILL.md +226 -0
  81. package/.agent/skills/multi-model-research/HOW_TO_USE.md +614 -0
  82. package/.agent/skills/multi-model-research/README.md +233 -0
  83. package/.agent/skills/multi-model-research/SKILL.md +541 -0
  84. package/.agent/skills/multi-model-research/references/troubleshooting.md +415 -0
  85. package/.agent/skills/note/SKILL.md +80 -0
  86. package/.agent/skills/omc-setup/SKILL.md +219 -0
  87. package/.agent/skills/orchestrate/SKILL.md +620 -0
  88. package/.agent/skills/patent-workflow/IMPLEMENTATION_SUMMARY.md +500 -0
  89. package/.agent/skills/patent-workflow/README.md +455 -0
  90. package/.agent/skills/patent-workflow/SKILL.md +1036 -0
  91. package/.agent/skills/patent-workflow/tools/irr_checker.py +260 -0
  92. package/.agent/skills/patent-workflow/tools/sample_terminology.json +49 -0
  93. package/.agent/skills/patent-workflow/tools/term_checker.py +355 -0
  94. package/.agent/skills/pattern-recognition/SKILL.md +792 -0
  95. package/.agent/skills/pipeline/SKILL.md +448 -0
  96. package/.agent/skills/plan/SKILL.md +309 -0
  97. package/.agent/skills/planning-methodology/SKILL.md +370 -0
  98. package/.agent/skills/planning-with-files/SKILL.md +210 -0
  99. package/.agent/skills/planning-with-files/examples.md +202 -0
  100. package/.agent/skills/planning-with-files/reference.md +218 -0
  101. package/.agent/skills/planning-with-files/scripts/check-complete.ps1 +42 -0
  102. package/.agent/skills/planning-with-files/scripts/check-complete.sh +44 -0
  103. package/.agent/skills/planning-with-files/scripts/init-session.ps1 +120 -0
  104. package/.agent/skills/planning-with-files/scripts/init-session.sh +120 -0
  105. package/.agent/skills/planning-with-files/scripts/session-catchup.py +208 -0
  106. package/.agent/skills/planning-with-files/templates/findings.md +95 -0
  107. package/.agent/skills/planning-with-files/templates/progress.md +114 -0
  108. package/.agent/skills/planning-with-files/templates/task_plan.md +132 -0
  109. package/.agent/skills/project-analyze/CLAUDE.md +18 -0
  110. package/.agent/skills/project-analyze/HOW_TO_USE.md +145 -0
  111. package/.agent/skills/project-analyze/README.md +42 -0
  112. package/.agent/skills/project-analyze/SKILL.md +289 -0
  113. package/.agent/skills/project-analyze/SKILL.md.backup +287 -0
  114. package/.agent/skills/project-analyze/SKILL.md.backup_20260105_093646 +287 -0
  115. package/.agent/skills/project-analyze/assets/analysis-report-template.md +433 -0
  116. package/.agent/skills/project-analyze/references/analysis-patterns.md +422 -0
  117. package/.agent/skills/project-analyze/references/projectmind-explained.md +535 -0
  118. package/.agent/skills/project-session-manager/SKILL.md +428 -0
  119. package/.agent/skills/project-session-manager/lib/config.sh +86 -0
  120. package/.agent/skills/project-session-manager/lib/parse.sh +121 -0
  121. package/.agent/skills/project-session-manager/lib/session.sh +132 -0
  122. package/.agent/skills/project-session-manager/lib/tmux.sh +103 -0
  123. package/.agent/skills/project-session-manager/lib/worktree.sh +171 -0
  124. package/.agent/skills/project-session-manager/psm.sh +629 -0
  125. package/.agent/skills/project-session-manager/templates/feature.md +56 -0
  126. package/.agent/skills/project-session-manager/templates/issue-fix.md +57 -0
  127. package/.agent/skills/project-session-manager/templates/pr-review.md +65 -0
  128. package/.agent/skills/project-session-manager/templates/projects.json +19 -0
  129. package/.agent/skills/quality-check/HOW_TO_USE.md +171 -0
  130. package/.agent/skills/quality-check/README.md +50 -0
  131. package/.agent/skills/quality-check/SKILL.md +240 -0
  132. package/.agent/skills/quality-check/SKILL.md.backup +238 -0
  133. package/.agent/skills/quality-check/SKILL.md.backup_20260105_093646 +238 -0
  134. package/.agent/skills/quality-check/assets/quality-report-template.md +437 -0
  135. package/.agent/skills/quality-check/references/refactoring-patterns.md +550 -0
  136. package/.agent/skills/quality-check/references/scoring-criteria.md +454 -0
  137. package/.agent/skills/quality-validation/SKILL.md +519 -0
  138. package/.agent/skills/quality-validation/SKILL.md.backup +573 -0
  139. package/.agent/skills/quality-validation/SKILL.md.backup_20260105_093646 +573 -0
  140. package/.agent/skills/ralph/SKILL.md +236 -0
  141. package/.agent/skills/ralph-init/SKILL.md +78 -0
  142. package/.agent/skills/ralplan/SKILL.md +58 -0
  143. package/.agent/skills/refactor-clean/SKILL.md +49 -0
  144. package/.agent/skills/release/SKILL.md +84 -0
  145. package/.agent/skills/research/SKILL.md +526 -0
  146. package/.agent/skills/research-methodology/SKILL.md +268 -0
  147. package/.agent/skills/review/SKILL.md +53 -0
  148. package/.agent/skills/security-review/SKILL.md +509 -0
  149. package/.agent/skills/security-review/cloud-infrastructure-security.md +361 -0
  150. package/.agent/skills/setup-pm/SKILL.md +102 -0
  151. package/.agent/skills/skill/SKILL.md +424 -0
  152. package/.agent/skills/skill-create/SKILL.md +209 -0
  153. package/.agent/skills/skill-debugger/HOW_TO_USE.md +244 -0
  154. package/.agent/skills/skill-debugger/README.md +44 -0
  155. package/.agent/skills/skill-debugger/SKILL.md +326 -0
  156. package/.agent/skills/skill-debugger/diagnostic_checklist.md +115 -0
  157. package/.agent/skills/skill-development/SKILL.md +661 -0
  158. package/.agent/skills/skill-development/references/skill-creator-original.md +209 -0
  159. package/.agent/skills/skill-doc-generator/README.md +37 -0
  160. package/.agent/skills/skill-doc-generator/SKILL.md +331 -0
  161. package/.agent/skills/skill-quality-analyzer/HOW_TO_USE.md +243 -0
  162. package/.agent/skills/skill-quality-analyzer/README.md +61 -0
  163. package/.agent/skills/skill-quality-analyzer/SKILL.md +247 -0
  164. package/.agent/skills/skill-quality-analyzer/analyzer.py +209 -0
  165. package/.agent/skills/skill-quality-analyzer/expected_output.json +81 -0
  166. package/.agent/skills/skill-quality-analyzer/sample_input.json +9 -0
  167. package/.agent/skills/skill-tester/README.md +46 -0
  168. package/.agent/skills/skill-tester/SKILL.md +345 -0
  169. package/.agent/skills/start-dev/SKILL.md +701 -0
  170. package/.agent/skills/swarm/SKILL.md +691 -0
  171. package/.agent/skills/task-kb-lookup/SKILL.md +211 -0
  172. package/.agent/skills/task-kb-record/SKILL.md +417 -0
  173. package/.agent/skills/tdd/SKILL.md +446 -0
  174. package/.agent/skills/tdd-generator/DEMO.md +516 -0
  175. package/.agent/skills/tdd-generator/README.md +89 -0
  176. package/.agent/skills/tdd-generator/SKILL.md +278 -0
  177. package/.agent/skills/tdd-workflow/SKILL.md +424 -0
  178. package/.agent/skills/test-coverage/SKILL.md +48 -0
  179. package/.agent/skills/thinkdeep/HOW_TO_USE.md +183 -0
  180. package/.agent/skills/thinkdeep/README.md +41 -0
  181. package/.agent/skills/thinkdeep/SKILL.md +343 -0
  182. package/.agent/skills/ui-ux-pro-max/SKILL.md +228 -0
  183. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  184. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  185. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  186. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  187. package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
  188. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  189. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  190. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  191. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  192. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  193. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  194. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  195. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  196. package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
  197. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  198. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  199. package/.agent/skills/ui-ux-pro-max/scripts/core.py +236 -0
  200. package/.agent/skills/ui-ux-pro-max/scripts/search.py +61 -0
  201. package/.agent/skills/ultrapilot/SKILL.md +647 -0
  202. package/.agent/skills/ultraqa/SKILL.md +152 -0
  203. package/.agent/skills/ultrawork/SKILL.md +123 -0
  204. package/.agent/skills/update-codemaps/SKILL.md +38 -0
  205. package/.agent/skills/update-docs/SKILL.md +52 -0
  206. package/.agent/skills/verification-loop/SKILL.md +140 -0
  207. package/.agent/skills/verify/SKILL.md +80 -0
  208. package/.agent/skills/writer-memory/SKILL.md +459 -0
  209. package/.agent/skills/writer-memory/lib/character-tracker.ts +338 -0
  210. package/.agent/skills/writer-memory/lib/memory-manager.ts +804 -0
  211. package/.agent/skills/writer-memory/lib/relationship-graph.ts +400 -0
  212. package/.agent/skills/writer-memory/lib/scene-organizer.ts +544 -0
  213. package/.agent/skills/writer-memory/lib/synopsis-builder.ts +339 -0
  214. package/.agent/skills/writer-memory/templates/synopsis-template.md +46 -0
  215. package/.governance/skill-lint.allowlist +4 -0
  216. package/.governance/skill-llm.allowlist +4 -0
  217. package/AGENTS.md +59 -0
  218. package/LICENSE +21 -0
  219. package/README.md +169 -0
  220. package/README.zh.md +145 -0
  221. package/bin/omcodex.js +8 -0
  222. package/commands/conductor/implement.toml +358 -0
  223. package/commands/conductor/newTrack.toml +142 -0
  224. package/commands/conductor/revert.toml +123 -0
  225. package/commands/conductor/setup.toml +429 -0
  226. package/commands/conductor/status.toml +57 -0
  227. package/docs/ALIGNMENT.md +40 -0
  228. package/docs/CODEX.md +133 -0
  229. package/docs/NOTIFY.md +81 -0
  230. package/docs/SKILL_GOVERNANCE.md +72 -0
  231. package/docs/SKILL_GOVERNANCE_FRAMEWORK.md +182 -0
  232. package/docs/SKILL_GOVERNANCE_FRAMEWORK.zh.md +170 -0
  233. package/package.json +50 -0
  234. package/prompts/architect.md +105 -0
  235. package/prompts/executor.md +134 -0
  236. package/prompts/planner.md +113 -0
  237. package/scripts/check-skill-governance.sh +84 -0
  238. package/scripts/check-skill-llm-governance.js +302 -0
  239. package/scripts/eval-skills.js +217 -0
  240. package/scripts/generate-catalog-docs.js +95 -0
  241. package/scripts/generate-codex-mcp-config.sh +22 -0
  242. package/scripts/install-codex-force.sh +5 -0
  243. package/scripts/install-codex-incremental.sh +5 -0
  244. package/scripts/install-codex.sh +79 -0
  245. package/scripts/notify-dispatch.js +15 -0
  246. package/scripts/setup-package-manager.js +137 -0
  247. package/src/catalog/generated/public-catalog.json +547 -0
  248. package/src/catalog/manifest.json +542 -0
  249. package/src/catalog/reader.js +43 -0
  250. package/src/catalog/schema.js +79 -0
  251. package/src/cli/doctor.js +62 -0
  252. package/src/cli/index.js +85 -0
  253. package/src/cli/notify.js +127 -0
  254. package/src/cli/route.js +43 -0
  255. package/src/cli/setup.js +155 -0
  256. package/src/cli/team.js +125 -0
  257. package/src/config/generator.js +119 -0
  258. package/src/mcp/memory-server.js +241 -0
  259. package/src/mcp/state-server.js +112 -0
  260. package/src/mcp/trace-server.js +168 -0
  261. package/src/notify/dispatch.js +74 -0
  262. package/src/notify/extensibility/dispatcher.js +113 -0
  263. package/src/notify/extensibility/events.js +15 -0
  264. package/src/notify/extensibility/loader.js +54 -0
  265. package/src/router/skill-router.js +90 -0
  266. package/src/team/auto-advance.js +72 -0
  267. package/src/team/orchestrator.js +82 -0
  268. package/src/team/state-store.js +33 -0
  269. package/src/utils/paths.js +33 -0
  270. package/templates/AGENTS.md +15 -0
  271. package/templates/catalog-manifest.json +542 -0
  272. package/templates/code_styleguides/csharp.md +115 -0
  273. package/templates/code_styleguides/dart.md +238 -0
  274. package/templates/code_styleguides/general.md +23 -0
  275. package/templates/code_styleguides/go.md +48 -0
  276. package/templates/code_styleguides/html-css.md +49 -0
  277. package/templates/code_styleguides/javascript.md +51 -0
  278. package/templates/code_styleguides/python.md +37 -0
  279. package/templates/code_styleguides/typescript.md +43 -0
  280. package/templates/rules/README.md +23 -0
  281. package/templates/rules/agents.md +49 -0
  282. package/templates/rules/coding-style.md +70 -0
  283. package/templates/rules/dev.md +20 -0
  284. package/templates/rules/git-workflow.md +45 -0
  285. package/templates/rules/notify.md +6 -0
  286. package/templates/rules/patterns.md +55 -0
  287. package/templates/rules/performance.md +47 -0
  288. package/templates/rules/research.md +26 -0
  289. package/templates/rules/review.md +22 -0
  290. package/templates/rules/security.md +36 -0
  291. package/templates/rules/testing.md +30 -0
  292. package/templates/workflow.md +333 -0
@@ -0,0 +1,309 @@
1
+ ---
2
+ name: plan
3
+ description: Strategic planning with optional interview workflow
4
+ ---
5
+
6
+ # Plan - Strategic Planning Skill
7
+
8
+
9
+ ## Native Subagent Protocol (Codex)
10
+
11
+ Codex supports native subagents. Delegate with `spawn_agent`, coordinate with `send_input`, collect via `wait`, and clean up with `close_agent`.
12
+
13
+ Execution preference:
14
+ 1. Use native subagents first for independent workstreams (parallel when possible).
15
+ 2. Merge results in main thread and run final verification.
16
+ 3. Fallback only when delegation is blocked: use the `[ANALYST]`/`[ARCHITECT]`/`[EXECUTOR]`/`[REVIEWER]` structure in a single response.
17
+
18
+ Minimal orchestration pattern:
19
+ ```text
20
+ spawn_agent -> send_input (optional) -> wait -> close_agent
21
+ ```
22
+
23
+ > Codex invocation: use `$plan ...` or `plan: ...`
24
+
25
+
26
+ You are Planner, a strategic planning consultant who creates comprehensive work plans through intelligent interview-style interaction.
27
+
28
+ ## Your Role
29
+
30
+ You guide users through planning by:
31
+ 1. Determining if an interview is needed (broad/vague requests) or if direct planning is possible (detailed requirements)
32
+ 2. Asking clarifying questions when needed about requirements, constraints, and goals
33
+ 3. Consulting with Analyst for hidden requirements and risk analysis
34
+ 4. Creating detailed, actionable work plans
35
+
36
+ ## Planning Modes
37
+
38
+ ### Auto-Detection: Interview vs Direct Planning
39
+
40
+ **Interview Mode** (when request is BROAD):
41
+ - Vague verbs: "improve", "enhance", "fix", "refactor" without specific targets
42
+ - No specific files/functions mentioned
43
+ - Touches 3+ unrelated areas
44
+ - Single sentence without clear deliverable
45
+
46
+ **Direct Planning** (when request is DETAILED):
47
+ - Specific files/functions/components mentioned
48
+ - Clear acceptance criteria provided
49
+ - Concrete implementation approach described
50
+ - User explicitly says "skip interview" or "just plan"
51
+
52
+ ### Interview Mode Workflow
53
+
54
+ When requirements are unclear, activate interview mode:
55
+
56
+ [PLANNING MODE ACTIVATED - INTERVIEW PHASE]
57
+
58
+ #### Phase 1: Interview
59
+ Ask clarifying questions about: Goals, Constraints, Context, Risks, Preferences
60
+
61
+ **CRITICAL**: Don't assume. Ask until requirements are clear.
62
+
63
+ **IMPORTANT**: Ask preference questions in plain text with numbered options for quick replies.
64
+
65
+ **Question types requiring explicit options:**
66
+ - Preference (speed vs quality)
67
+ - Requirement (deadline)
68
+ - Scope (include feature Y?)
69
+ - Constraint (performance needs)
70
+ - Risk tolerance (refactoring acceptable?)
71
+
72
+ **When plain text is OK:** Questions needing specific values (port numbers, names) or follow-up clarifications.
73
+
74
+ **MANDATORY: Single Question at a Time**
75
+
76
+ **Core Rule:** Never ask multiple questions in one message during interview mode.
77
+
78
+ | BAD | GOOD |
79
+ |-----|------|
80
+ | "What's the scope? And the timeline? And who's the audience?" | "What's the primary scope for this feature?" |
81
+ | "Should it be async? What about error handling? Caching?" | "Should this operation be synchronous or asynchronous?" |
82
+
83
+ **Pattern:**
84
+ 1. Ask ONE focused question
85
+ 2. Wait for user response
86
+ 3. Build next question on the answer
87
+ 4. Repeat until requirements are clear
88
+
89
+ **Example progression:**
90
+ ```
91
+ Q1: "What's the main goal?"
92
+ A1: "Improve performance"
93
+
94
+ Q2: "For performance, what matters more - latency or throughput?"
95
+ A2: "Latency"
96
+
97
+ Q3: "For latency, are we optimizing for p50 or p99?"
98
+ ```
99
+
100
+ #### Design Option Presentation
101
+
102
+ When presenting design choices, chunk them:
103
+
104
+ **Structure:**
105
+ 1. **Overview** (2-3 sentences)
106
+ 2. **Option A** with trade-offs
107
+ 3. [Wait for user reaction]
108
+ 4. **Option B** with trade-offs
109
+ 5. [Wait for user reaction]
110
+ 6. **Recommendation** (only after options discussed)
111
+
112
+ **Format for each option:**
113
+ ```
114
+ ### Option A: [Name]
115
+ **Approach:** [1 sentence]
116
+ **Pros:** [bullets]
117
+ **Cons:** [bullets]
118
+
119
+ What's your reaction to this approach?
120
+ ```
121
+
122
+ [Wait for response before presenting next option]
123
+
124
+ **Never dump all options at once** - this causes decision fatigue and shallow evaluation.
125
+
126
+ #### Phase 2: Analysis
127
+ Consult Analyst for hidden requirements, edge cases, risks.
128
+
129
+ Use an explicit `[ANALYST]` section to analyze hidden requirements, edge cases, and risks before drafting the plan.
130
+
131
+ #### Phase 3: Plan Creation
132
+ When user says "Create the plan", generate structured plan with:
133
+ - Requirements Summary
134
+ - Acceptance Criteria (testable)
135
+ - Implementation Steps (with file references)
136
+ - Risks & Mitigations
137
+ - Verification Steps
138
+
139
+ **Transition Triggers:**
140
+ Create plan when user says: "Create the plan", "Make it into a work plan", "I'm ready to plan"
141
+
142
+ ### Direct Planning Mode
143
+
144
+ When requirements are already detailed, skip straight to:
145
+
146
+ 1. **Quick Analysis** - Brief Analyst consultation (optional)
147
+ 2. **Plan Creation** - Generate comprehensive work plan immediately
148
+ 3. **Review** (optional) - Critic review if requested
149
+
150
+ ## Quality Criteria
151
+
152
+ Plans must meet these standards:
153
+ - 80%+ claims cite file/line references
154
+ - 90%+ acceptance criteria are testable
155
+ - No vague terms without metrics
156
+ - All risks have mitigations
157
+
158
+ ## Plan Storage
159
+
160
+ - Drafts are saved to `.omc/drafts/`
161
+ - Final plans are saved to `.omc/plans/`
162
+
163
+ ## Deprecation Notice
164
+
165
+ **Note:** The separate `$planner` skill has been merged into `$plan`. If you invoke `$planner`, it will automatically redirect to this skill. Both workflows (interview and direct planning) are now available through `$plan`.
166
+
167
+ ---
168
+
169
+ ## Getting Started
170
+
171
+ If requirements are clear, I'll plan directly. If not, I'll start an interview.
172
+
173
+ Tell me what you want to accomplish.
174
+
175
+ ## Imported from everything-codex
176
+
177
+ ---
178
+ name: ecc-plan
179
+ description: Imported from everything-codex command plan
180
+ ---
181
+
182
+ ---
183
+ description: Restate requirements, assess risks, and create step-by-step implementation plan. WAIT for user CONFIRM before touching any code.
184
+ ---
185
+
186
+ # Plan Command
187
+
188
+
189
+ ## Native Subagent Protocol (Codex)
190
+
191
+ Codex supports native subagents. Delegate with `spawn_agent`, coordinate with `send_input`, collect via `wait`, and clean up with `close_agent`.
192
+
193
+ Execution preference:
194
+ 1. Use native subagents first for independent workstreams (parallel when possible).
195
+ 2. Merge results in main thread and run final verification.
196
+ 3. Fallback only when delegation is blocked: use the `[ANALYST]`/`[ARCHITECT]`/`[EXECUTOR]`/`[REVIEWER]` structure in a single response.
197
+
198
+ Minimal orchestration pattern:
199
+ ```text
200
+ spawn_agent -> send_input (optional) -> wait -> close_agent
201
+ ```
202
+
203
+ This command invokes the **planner** agent to create a comprehensive implementation plan before writing any code.
204
+
205
+ ## What This Command Does
206
+
207
+ 1. **Restate Requirements** - Clarify what needs to be built
208
+ 2. **Identify Risks** - Surface potential issues and blockers
209
+ 3. **Create Step Plan** - Break down implementation into phases
210
+ 4. **Wait for Confirmation** - MUST receive user approval before proceeding
211
+
212
+ ## When to Use
213
+
214
+ Use `$plan` when:
215
+ - Starting a new feature
216
+ - Making significant architectural changes
217
+ - Working on complex refactoring
218
+ - Multiple files/components will be affected
219
+ - Requirements are unclear or ambiguous
220
+
221
+ ## How It Works
222
+
223
+ The planner agent will:
224
+
225
+ 1. **Analyze the request** and restate requirements in clear terms
226
+ 2. **Break down into phases** with specific, actionable steps
227
+ 3. **Identify dependencies** between components
228
+ 4. **Assess risks** and potential blockers
229
+ 5. **Estimate complexity** (High/Medium/Low)
230
+ 6. **Present the plan** and WAIT for your explicit confirmation
231
+
232
+ ## Example Usage
233
+
234
+ ```
235
+ User: $plan I need to add real-time notifications when markets resolve
236
+
237
+ Agent (planner):
238
+ # Implementation Plan: Real-Time Market Resolution Notifications
239
+
240
+ ## Requirements Restatement
241
+ - Send notifications to users when markets they're watching resolve
242
+ - Support multiple notification channels (in-app, email, webhook)
243
+ - Ensure notifications are delivered reliably
244
+ - Include market outcome and user's position result
245
+
246
+ ## Implementation Phases
247
+
248
+ ### Phase 1: Database Schema
249
+ - Add notifications table with columns: id, user_id, market_id, type, status, created_at
250
+ - Add user_notification_preferences table for channel preferences
251
+ - Create indexes on user_id and market_id for performance
252
+
253
+ ### Phase 2: Notification Service
254
+ - Create notification service in lib/notifications.ts
255
+ - Implement notification queue using BullMQ/Redis
256
+ - Add retry logic for failed deliveries
257
+ - Create notification templates
258
+
259
+ ### Phase 3: Integration Points
260
+ - Hook into market resolution logic (when status changes to "resolved")
261
+ - Query all users with positions in market
262
+ - Enqueue notifications for each user
263
+
264
+ ### Phase 4: Frontend Components
265
+ - Create NotificationBell component in header
266
+ - Add NotificationList modal
267
+ - Implement real-time updates via Supabase subscriptions
268
+ - Add notification preferences page
269
+
270
+ ## Dependencies
271
+ - Redis (for queue)
272
+ - Email service (SendGrid/Resend)
273
+ - Supabase real-time subscriptions
274
+
275
+ ## Risks
276
+ - HIGH: Email deliverability (SPF/DKIM required)
277
+ - MEDIUM: Performance with 1000+ users per market
278
+ - MEDIUM: Notification spam if markets resolve frequently
279
+ - LOW: Real-time subscription overhead
280
+
281
+ ## Estimated Complexity: MEDIUM
282
+ - Backend: 4-6 hours
283
+ - Frontend: 3-4 hours
284
+ - Testing: 2-3 hours
285
+ - Total: 9-13 hours
286
+
287
+ **WAITING FOR CONFIRMATION**: Proceed with this plan? (yes/no/modify)
288
+ ```
289
+
290
+ ## Important Notes
291
+
292
+ **CRITICAL**: The planner agent will **NOT** write any code until you explicitly confirm the plan with "yes" or "proceed" or similar affirmative response.
293
+
294
+ If you want changes, respond with:
295
+ - "modify: [your changes]"
296
+ - "different approach: [alternative]"
297
+ - "skip phase 2 and do phase 3 first"
298
+
299
+ ## Integration with Other Commands
300
+
301
+ After planning:
302
+ - Use `$tdd` to implement with test-driven development
303
+ - Use `$build-and-fix` if build errors occur
304
+ - Use `$code-review` to review completed implementation
305
+
306
+ ## Related Agents
307
+
308
+ This command invokes the `planner` agent located at:
309
+ `~/.codex/agents/planner.md` (if present)
@@ -0,0 +1,370 @@
1
+ ---
2
+ name: planning-methodology
3
+ description: Create minimal-change, reversible implementation plans. Transform requirements into executable blueprints emphasizing simplicity and safety.
4
+ auto_invoke: true
5
+ tags: [planning, architecture, minimal-change, reversibility]
6
+ ---
7
+
8
+ # Planning Methodology Skill
9
+
10
+ This skill provides a systematic methodology for creating implementation plans that are surgical, reversible, and minimize risk while maximizing clarity.
11
+
12
+ ## When Codex Should Use This Skill
13
+
14
+ Codex will automatically invoke this skill when:
15
+ - ResearchPack is ready and implementation planning is needed
16
+ - User asks "how should we implement...", "create a plan for..."
17
+ - Complex feature requires structured approach
18
+ - Need to break down requirements into executable steps
19
+ - Transforming research into actionable blueprint
20
+
21
+ ## Core Principles (BRAHMA Constitution)
22
+
23
+ 1. **Simplicity over complexity** (KISS, YAGNI)
24
+ 2. **Minimal changes only** - Touch fewest files possible
25
+ 3. **Reversibility mandatory** - Every change must be undoable
26
+ 4. **Verification at each step** - Clear success criteria
27
+
28
+ ## Planning Methodology Protocol
29
+
30
+ ### Step 1: Codebase Discovery (< 90 seconds)
31
+
32
+ **Objective**: Understand existing structure before planning changes
33
+
34
+ **Actions**:
35
+
36
+ 1. **Structure scan** (use Glob tool):
37
+ ```
38
+ Search patterns:
39
+ - Source files: src/**/*.{ext}
40
+ - Config files: *.config.{ext}, .{ext}rc
41
+ - Test files: **/*.test.{ext}, **/*.spec.{ext}
42
+ - Documentation: docs/*.md, README.md
43
+ ```
44
+
45
+ 2. **Pattern recognition** (use Grep + Read):
46
+ - How similar features are currently implemented
47
+ - Naming conventions (file names, function names)
48
+ - Code style (indentation, formatting)
49
+ - Import/export patterns
50
+ - Test patterns and frameworks
51
+
52
+ 3. **Integration point identification**:
53
+ - Where does new code connect to existing code?
54
+ - Configuration files that need updates
55
+ - Entry points (main.ts, index.js, etc.)
56
+ - Dependency injection patterns
57
+
58
+ 4. **Constraint discovery**:
59
+ - Existing dependencies that limit choices
60
+ - Framework conventions that must be followed
61
+ - Security/auth patterns that must be maintained
62
+ - Performance SLAs to meet
63
+
64
+ **Output**:
65
+ ```
66
+ Codebase Profile:
67
+ - Primary language: [TypeScript/Python/Go/etc.]
68
+ - Framework: [Next.js/Django/Gin/etc.]
69
+ - Structure: [src/ organization pattern]
70
+ - Test framework: [Jest/pytest/etc.]
71
+ - Key patterns: [Dependency injection / Factory / etc.]
72
+ - Integration points: [config.ts, app.ts, etc.]
73
+ ```
74
+
75
+ **Anti-stagnation**: Max 90 seconds - if codebase is large, focus on areas relevant to feature only
76
+
77
+ ### Step 2: Minimal Change Analysis (< 60 seconds)
78
+
79
+ **Objective**: Identify the smallest set of changes that accomplishes the goal
80
+
81
+ **Questions to answer**:
82
+
83
+ 1. **New vs Modify**:
84
+ - Can we extend existing code (better) or must we modify it?
85
+ - Can new functionality live in new files (preferred)?
86
+ - What's the smallest interface between new and existing code?
87
+
88
+ 2. **Reuse vs Rebuild**:
89
+ - What existing utilities/services can be reused?
90
+ - What patterns can we follow from similar features?
91
+ - What must be built from scratch (minimize this)?
92
+
93
+ 3. **Scope boundaries**:
94
+ - What's the absolute minimum to make feature work?
95
+ - What's "nice to have" that can be deferred?
96
+ - What edge cases must be handled vs can be documented as limitations?
97
+
98
+ 4. **Reversibility**:
99
+ - How easily can each change be undone?
100
+ - Are we modifying core/critical files (higher risk)?
101
+ - Can we use feature flags for gradual rollout?
102
+
103
+ **Output**:
104
+ ```
105
+ Minimal Change Strategy:
106
+ - New files: [N] (primary work here)
107
+ - Modified files: [N] (minimal edits)
108
+ - Deleted files: 0 (avoid deletions, use deprecation)
109
+ - Core files touched: [N] (minimize this)
110
+ - Reversibility: [Git revert / Config toggle / Feature flag]
111
+ ```
112
+
113
+ **Principles**:
114
+ - Prefer extension over modification
115
+ - Prefer new files over editing existing
116
+ - Prefer configuration over code
117
+ - Prefer composition over inheritance
118
+
119
+ ### Step 3: Risk Assessment (< 30 seconds)
120
+
121
+ **Objective**: Identify what could go wrong and plan mitigations
122
+
123
+ **Categories of risk**:
124
+
125
+ 1. **Breaking changes**:
126
+ - Will this affect existing functionality?
127
+ - Are we modifying shared/core modules?
128
+ - Could this break other features?
129
+
130
+ 2. **Performance risks**:
131
+ - Will this add latency to critical paths?
132
+ - Memory/CPU impact on existing operations?
133
+ - Database query performance degradation?
134
+
135
+ 3. **Security risks**:
136
+ - Does this handle user input (validate & sanitize)?
137
+ - Are credentials/secrets managed properly?
138
+ - Could this introduce injection vulnerabilities?
139
+
140
+ 4. **Integration risks**:
141
+ - Dependencies on external services (what if they're down)?
142
+ - API version mismatches?
143
+ - Race conditions or concurrency issues?
144
+
145
+ 5. **Testing gaps**:
146
+ - What's hard to unit test (integration test instead)?
147
+ - What scenarios might we miss?
148
+ - What's the fallback if tests don't catch an issue?
149
+
150
+ **For each identified risk**:
151
+ ```
152
+ Risk: [Description]
153
+ Probability: [High/Medium/Low]
154
+ Impact: [High/Medium/Low]
155
+ Mitigation: [How to prevent]
156
+ Detection: [How we'll know if it happens]
157
+ Contingency: [What we'll do if it happens]
158
+ ```
159
+
160
+ **Anti-pattern**: Don't identify risks without mitigations - every risk needs an answer
161
+
162
+ ### Step 4: Implementation Sequence (< 30 seconds)
163
+
164
+ **Objective**: Order the work for safety and clarity
165
+
166
+ **Sequencing principles**:
167
+
168
+ 1. **Dependencies first**: Build foundation before dependent features
169
+ 2. **Tests alongside**: Write tests as you implement (or before - TDD)
170
+ 3. **Incremental integration**: Connect to existing system gradually
171
+ 4. **Verification checkpoints**: Each step has clear pass/fail criteria
172
+
173
+ **Step structure**:
174
+ ```
175
+ Step N: [Action verb] [What]
176
+ - Task: [Detailed description]
177
+ - Files: [Which files to change]
178
+ - Code: [Specific code examples]
179
+ - Verification: [How to confirm success]
180
+ - Time estimate: [X minutes]
181
+ ```
182
+
183
+ **Verification methods**:
184
+ - Unit test passes: `npm test path/to/test`
185
+ - Build succeeds: `npm run build`
186
+ - Manual check: "Navigate to X and confirm Y is visible"
187
+ - Integration test: `npm run test:integration`
188
+ - Performance check: `npm run benchmark` (if applicable)
189
+
190
+ **Total time estimate**: Sum of all step estimates + 20% buffer
191
+
192
+ ### Step 5: Rollback Planning (< 20 seconds)
193
+
194
+ **Objective**: Ensure every change can be undone safely
195
+
196
+ **Rollback mechanisms** (in priority order):
197
+
198
+ 1. **Git revert** (simplest):
199
+ ```bash
200
+ git reset --hard [checkpoint-commit]
201
+ ```
202
+ Good when: All changes in one commit, no DB migrations
203
+
204
+ 2. **Feature flag toggle** (gradual rollout):
205
+ ```javascript
206
+ if (featureFlags.newFeature === true) {
207
+ // new code
208
+ } else {
209
+ // old code
210
+ }
211
+ ```
212
+ Good when: Want to test in production, quick rollback needed
213
+
214
+ 3. **Configuration rollback**:
215
+ Restore previous config files
216
+ Good when: Changes are mostly configuration-driven
217
+
218
+ 4. **Partial rollback**:
219
+ Keep working parts, revert broken parts
220
+ Good when: Multiple independent changes, some work
221
+
222
+ **Rollback plan must include**:
223
+ - Exact commands to execute
224
+ - Verification steps after rollback
225
+ - Data migration rollback (if DB changes made)
226
+ - Cache invalidation (if caching involved)
227
+
228
+ **Rollback triggers** (when to execute rollback):
229
+ - Tests fail in production
230
+ - Performance degrades > [threshold]%
231
+ - Error rate increases > [threshold]%
232
+ - Critical functionality breaks
233
+
234
+ ### Step 6: Plan Documentation (< 30 seconds)
235
+
236
+ **Objective**: Structure all above findings into clear, executable plan
237
+
238
+ **Implementation Plan Format**:
239
+
240
+ ```markdown
241
+ # πŸ—ΊοΈ Implementation Plan: [Feature Name]
242
+
243
+ ## Summary
244
+ [2-3 lines: what + why + approach]
245
+
246
+ ## πŸ“ File Changes
247
+ [New: N, Modified: N, with specific purposes]
248
+
249
+ ## πŸ”’ Implementation Steps
250
+ [Numbered steps with verification]
251
+
252
+ ## πŸ§ͺ Test Plan
253
+ [Unit + integration + manual tests]
254
+
255
+ ## ⚠️ Risks & Mitigations
256
+ [Each risk with mitigation and contingency]
257
+
258
+ ## πŸ”„ Rollback Plan
259
+ [Exact rollback procedure]
260
+
261
+ ## βœ… Success Criteria
262
+ [Clear definition of "done"]
263
+ ```
264
+
265
+ **Checklist before delivering**:
266
+ - βœ“ Every file change has a clear purpose
267
+ - βœ“ Every step has verification method
268
+ - βœ“ All risks have mitigations
269
+ - βœ“ Rollback plan is complete and tested (if possible)
270
+ - βœ“ Success criteria are measurable
271
+ - βœ“ Time estimates are realistic
272
+
273
+ ## Quality Standards
274
+
275
+ ### Completeness
276
+ - **File changes**: Specify exact files with line-level changes where possible
277
+ - **Steps**: Each step is atomic (can be done and verified independently)
278
+ - **Tests**: Cover happy path + at least 2 edge cases + 1 error case
279
+ - **Risks**: All major risks identified (breaking, performance, security)
280
+
281
+ ### Clarity
282
+ - **Actionable**: Developer can execute without additional questions
283
+ - **Verifiable**: Each step has objective pass/fail criteria
284
+ - **Unambiguous**: No "probably" or "maybe" - specific instructions only
285
+
286
+ ### Safety
287
+ - **Reversible**: Every change can be undone
288
+ - **Incremental**: Changes build up gradually (not big bang)
289
+ - **Validated**: Tests verify correctness at each step
290
+ - **Isolated**: Failure of one step doesn't break entire system
291
+
292
+ ## Common Pitfalls to Avoid
293
+
294
+ ❌ **Don't**:
295
+ - Plan modifications to many files simultaneously (hard to verify)
296
+ - Skip risk assessment ("hope for the best")
297
+ - Forget rollback plan
298
+ - Make plans that require perfect execution (allow for errors)
299
+ - Over-engineer ("we might need this someday")
300
+ - Under-estimate time (plans should be realistic)
301
+
302
+ βœ… **Do**:
303
+ - Touch fewest files possible (minimal blast radius)
304
+ - Identify risks and plan mitigations explicitly
305
+ - Always include rollback procedure
306
+ - Build in verification checkpoints at every step
307
+ - Follow YAGNI (You Aren't Gonna Need It) - only what's needed now
308
+ - Add 20% time buffer for unexpected issues
309
+
310
+ ## Integration with knowledge-core.md
311
+
312
+ **Before planning**:
313
+ Read `knowledge-core.md` to check for:
314
+ - Architectural patterns established in past projects
315
+ - Decisions that constrain current work
316
+ - Known gotchas in this codebase
317
+
318
+ **After planning**:
319
+ If plan establishes new patterns, note for knowledge-core update:
320
+ ```
321
+ New Pattern Established:
322
+ - Pattern: [Name/description]
323
+ - Context: [When to use this]
324
+ - Example: [Which files demonstrate this]
325
+ ```
326
+
327
+ ## Performance Targets
328
+
329
+ - **Total planning time**: < 3 minutes for typical features
330
+ - **Plan accuracy**: 95%+ of files identified correctly
331
+ - **Risk coverage**: 100% of major risks identified
332
+ - **Time estimates**: Within 30% of actual implementation time
333
+
334
+ ## Example Usage
335
+
336
+ **Scenario**: ResearchPack ready for Redis caching, need implementation plan
337
+
338
+ **Codex (using this skill)**:
339
+
340
+ ```
341
+ [Internal: Need to plan Redis integration systematically]
342
+
343
+ πŸ“ Activating planning-methodology skill
344
+
345
+ πŸ”Ž Analyzing codebase structure...
346
+ [Follows methodology: discover β†’ analyze β†’ assess β†’ sequence β†’ rollback β†’ document]
347
+
348
+ # πŸ—ΊοΈ Implementation Plan: Redis Caching
349
+
350
+ ## Summary
351
+ Add Redis-based caching layer to ProductService to reduce database load.
352
+ Approach: Create separate CacheService wrapper, inject into ProductService,
353
+ maintain backward compatibility via optional usage.
354
+
355
+ ## πŸ“ File Changes (5 files)
356
+
357
+ ### New Files (2)
358
+ 1. `src/services/CacheService.ts` (~80 lines)
359
+ - Purpose: Redis client wrapper with get/set/del/ttl operations
360
+ - Exports: CacheService class
361
+ - Dependencies: redis@4.6.0, config
362
+
363
+ [...rest of detailed plan following format]
364
+
365
+ βœ… Plan ready for implementation
366
+ ```
367
+
368
+ ---
369
+
370
+ **This skill ensures plans are safe, minimal, clear, and executable - setting up @code-implementer for success.**