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,45 @@
1
+ # Git Workflow
2
+
3
+ ## Commit Message Format
4
+
5
+ ```
6
+ <type>: <description>
7
+
8
+ <optional body>
9
+ ```
10
+
11
+ Types: feat, fix, refactor, docs, test, chore, perf, ci
12
+
13
+ Note: Attribution disabled globally via ~/.codex/settings.json (if present).
14
+
15
+ ## Pull Request Workflow
16
+
17
+ When creating PRs:
18
+ 1. Analyze full commit history (not just latest commit)
19
+ 2. Use `git diff [base-branch]...HEAD` to see all changes
20
+ 3. Draft comprehensive PR summary
21
+ 4. Include test plan with TODOs
22
+ 5. Push with `-u` flag if new branch
23
+
24
+ ## Feature Implementation Workflow
25
+
26
+ 1. **Plan First**
27
+ - Use **planner** agent to create implementation plan
28
+ - Identify dependencies and risks
29
+ - Break down into phases
30
+
31
+ 2. **TDD Approach**
32
+ - Use **tdd-guide** agent
33
+ - Write tests first (RED)
34
+ - Implement to pass tests (GREEN)
35
+ - Refactor (IMPROVE)
36
+ - Verify 80%+ coverage
37
+
38
+ 3. **Code Review**
39
+ - Use **code-reviewer** agent immediately after writing code
40
+ - Address CRITICAL and HIGH issues
41
+ - Fix MEDIUM issues when possible
42
+
43
+ 4. **Commit & Push**
44
+ - Detailed commit messages
45
+ - Follow conventional commits format
@@ -0,0 +1,6 @@
1
+ # Notify System (Codex)
2
+
3
+ Codex CLI does not support Claude Code interception lifecycle APIs (PreToolUse/PostToolUse/Stop).
4
+
5
+ If you need equivalent safeguards, use explicit checklists in skills or run
6
+ verifications manually (lint, typecheck, tests) after edits.
@@ -0,0 +1,55 @@
1
+ # Common Patterns
2
+
3
+ ## API Response Format
4
+
5
+ ```typescript
6
+ interface ApiResponse<T> {
7
+ success: boolean
8
+ data?: T
9
+ error?: string
10
+ meta?: {
11
+ total: number
12
+ page: number
13
+ limit: number
14
+ }
15
+ }
16
+ ```
17
+
18
+ ## Debounce Utility Pattern
19
+
20
+ ```typescript
21
+ export function useDebounce<T>(value: T, delay: number): T {
22
+ const [debouncedValue, setDebouncedValue] = useState<T>(value)
23
+
24
+ useEffect(() => {
25
+ const handler = setTimeout(() => setDebouncedValue(value), delay)
26
+ return () => clearTimeout(handler)
27
+ }, [value, delay])
28
+
29
+ return debouncedValue
30
+ }
31
+ ```
32
+
33
+ ## Repository Pattern
34
+
35
+ ```typescript
36
+ interface Repository<T> {
37
+ findAll(filters?: Filters): Promise<T[]>
38
+ findById(id: string): Promise<T | null>
39
+ create(data: CreateDto): Promise<T>
40
+ update(id: string, data: UpdateDto): Promise<T>
41
+ delete(id: string): Promise<void>
42
+ }
43
+ ```
44
+
45
+ ## Skeleton Projects
46
+
47
+ When implementing new functionality:
48
+ 1. Search for battle-tested skeleton projects
49
+ 2. Use parallel agents to evaluate options:
50
+ - Security assessment
51
+ - Extensibility analysis
52
+ - Relevance scoring
53
+ - Implementation planning
54
+ 3. Clone best match as foundation
55
+ 4. Iterate within proven structure
@@ -0,0 +1,47 @@
1
+ # Performance Optimization
2
+
3
+ ## Model Selection Strategy
4
+
5
+ **Haiku 4.5** (90% of Sonnet capability, 3x cost savings):
6
+ - Lightweight agents with frequent invocation
7
+ - Pair programming and code generation
8
+ - Worker agents in multi-agent systems
9
+
10
+ **Sonnet 4.5** (Best coding model):
11
+ - Main development work
12
+ - Orchestrating multi-agent workflows
13
+ - Complex coding tasks
14
+
15
+ **Opus 4.5** (Deepest reasoning):
16
+ - Complex architectural decisions
17
+ - Maximum reasoning requirements
18
+ - Research and analysis tasks
19
+
20
+ ## Context Window Management
21
+
22
+ Avoid last 20% of context window for:
23
+ - Large-scale refactoring
24
+ - Feature implementation spanning multiple files
25
+ - Debugging complex interactions
26
+
27
+ Lower context sensitivity tasks:
28
+ - Single-file edits
29
+ - Independent utility creation
30
+ - Documentation updates
31
+ - Simple bug fixes
32
+
33
+ ## Ultrathink + Plan Mode
34
+
35
+ For complex tasks requiring deep reasoning:
36
+ 1. Use `ultrathink` for enhanced thinking
37
+ 2. Enable **Plan Mode** for structured approach
38
+ 3. "Rev the engine" with multiple critique rounds
39
+ 4. Use split role sub-agents for diverse analysis
40
+
41
+ ## Build Troubleshooting
42
+
43
+ If build fails:
44
+ 1. Use **build-error-resolver** agent
45
+ 2. Analyze error messages
46
+ 3. Fix incrementally
47
+ 4. Verify after each fix
@@ -0,0 +1,26 @@
1
+ # Research Context
2
+
3
+ Mode: Exploration, investigation, learning
4
+ Focus: Understanding before acting
5
+
6
+ ## Behavior
7
+ - Read widely before concluding
8
+ - Ask clarifying questions
9
+ - Document findings as you go
10
+ - Don't write code until understanding is clear
11
+
12
+ ## Research Process
13
+ 1. Understand the question
14
+ 2. Explore relevant code/docs
15
+ 3. Form hypothesis
16
+ 4. Verify with evidence
17
+ 5. Summarize findings
18
+
19
+ ## Tools to favor
20
+ - Read for understanding code
21
+ - Grep, Glob for finding patterns
22
+ - WebSearch, WebFetch for external docs
23
+ - Task with Explore agent for codebase questions
24
+
25
+ ## Output
26
+ Findings first, recommendations second
@@ -0,0 +1,22 @@
1
+ # Code Review Context
2
+
3
+ Mode: PR review, code analysis
4
+ Focus: Quality, security, maintainability
5
+
6
+ ## Behavior
7
+ - Read thoroughly before commenting
8
+ - Prioritize issues by severity (critical > high > medium > low)
9
+ - Suggest fixes, don't just point out problems
10
+ - Check for security vulnerabilities
11
+
12
+ ## Review Checklist
13
+ - [ ] Logic errors
14
+ - [ ] Edge cases
15
+ - [ ] Error handling
16
+ - [ ] Security (injection, auth, secrets)
17
+ - [ ] Performance
18
+ - [ ] Readability
19
+ - [ ] Test coverage
20
+
21
+ ## Output Format
22
+ Group findings by file, severity first
@@ -0,0 +1,36 @@
1
+ # Security Guidelines
2
+
3
+ ## Mandatory Security Checks
4
+
5
+ Before ANY commit:
6
+ - [ ] No hardcoded secrets (API keys, passwords, tokens)
7
+ - [ ] All user inputs validated
8
+ - [ ] SQL injection prevention (parameterized queries)
9
+ - [ ] XSS prevention (sanitized HTML)
10
+ - [ ] CSRF protection enabled
11
+ - [ ] Authentication/authorization verified
12
+ - [ ] Rate limiting on all endpoints
13
+ - [ ] Error messages don't leak sensitive data
14
+
15
+ ## Secret Management
16
+
17
+ ```typescript
18
+ // NEVER: Hardcoded secrets
19
+ const apiKey = "sk-proj-xxxxx"
20
+
21
+ // ALWAYS: Environment variables
22
+ const apiKey = process.env.OPENAI_API_KEY
23
+
24
+ if (!apiKey) {
25
+ throw new Error('OPENAI_API_KEY not configured')
26
+ }
27
+ ```
28
+
29
+ ## Security Response Protocol
30
+
31
+ If security issue found:
32
+ 1. STOP immediately
33
+ 2. Use **security-reviewer** agent
34
+ 3. Fix CRITICAL issues before continuing
35
+ 4. Rotate any exposed secrets
36
+ 5. Review entire codebase for similar issues
@@ -0,0 +1,30 @@
1
+ # Testing Requirements
2
+
3
+ ## Minimum Test Coverage: 80%
4
+
5
+ Test Types (ALL required):
6
+ 1. **Unit Tests** - Individual functions, utilities, components
7
+ 2. **Integration Tests** - API endpoints, database operations
8
+ 3. **E2E Tests** - Critical user flows (Playwright)
9
+
10
+ ## Test-Driven Development
11
+
12
+ MANDATORY workflow:
13
+ 1. Write test first (RED)
14
+ 2. Run test - it should FAIL
15
+ 3. Write minimal implementation (GREEN)
16
+ 4. Run test - it should PASS
17
+ 5. Refactor (IMPROVE)
18
+ 6. Verify coverage (80%+)
19
+
20
+ ## Troubleshooting Test Failures
21
+
22
+ 1. Use **tdd-guide** agent
23
+ 2. Check test isolation
24
+ 3. Verify mocks are correct
25
+ 4. Fix implementation, not tests (unless tests are wrong)
26
+
27
+ ## Agent Support
28
+
29
+ - **tdd-guide** - Use PROACTIVELY for new features, enforces write-tests-first
30
+ - **e2e-runner** - Playwright E2E testing specialist
@@ -0,0 +1,333 @@
1
+ # Project Workflow
2
+
3
+ ## Guiding Principles
4
+
5
+ 1. **The Plan is the Source of Truth:** All work must be tracked in `plan.md`
6
+ 2. **The Tech Stack is Deliberate:** Changes to the tech stack must be documented in `tech-stack.md` *before* implementation
7
+ 3. **Test-Driven Development:** Write unit tests before implementing functionality
8
+ 4. **High Code Coverage:** Aim for >80% code coverage for all modules
9
+ 5. **User Experience First:** Every decision should prioritize user experience
10
+ 6. **Non-Interactive & CI-Aware:** Prefer non-interactive commands. Use `CI=true` for watch-mode tools (tests, linters) to ensure single execution.
11
+
12
+ ## Task Workflow
13
+
14
+ All tasks follow a strict lifecycle:
15
+
16
+ ### Standard Task Workflow
17
+
18
+ 1. **Select Task:** Choose the next available task from `plan.md` in sequential order
19
+
20
+ 2. **Mark In Progress:** Before beginning work, edit `plan.md` and change the task from `[ ]` to `[~]`
21
+
22
+ 3. **Write Failing Tests (Red Phase):**
23
+ - Create a new test file for the feature or bug fix.
24
+ - Write one or more unit tests that clearly define the expected behavior and acceptance criteria for the task.
25
+ - **CRITICAL:** Run the tests and confirm that they fail as expected. This is the "Red" phase of TDD. Do not proceed until you have failing tests.
26
+
27
+ 4. **Implement to Pass Tests (Green Phase):**
28
+ - Write the minimum amount of application code necessary to make the failing tests pass.
29
+ - Run the test suite again and confirm that all tests now pass. This is the "Green" phase.
30
+
31
+ 5. **Refactor (Optional but Recommended):**
32
+ - With the safety of passing tests, refactor the implementation code and the test code to improve clarity, remove duplication, and enhance performance without changing the external behavior.
33
+ - Rerun tests to ensure they still pass after refactoring.
34
+
35
+ 6. **Verify Coverage:** Run coverage reports using the project's chosen tools. For example, in a Python project, this might look like:
36
+ ```bash
37
+ pytest --cov=app --cov-report=html
38
+ ```
39
+ Target: >80% coverage for new code. The specific tools and commands will vary by language and framework.
40
+
41
+ 7. **Document Deviations:** If implementation differs from tech stack:
42
+ - **STOP** implementation
43
+ - Update `tech-stack.md` with new design
44
+ - Add dated note explaining the change
45
+ - Resume implementation
46
+
47
+ 8. **Commit Code Changes:**
48
+ - Stage all code changes related to the task.
49
+ - Propose a clear, concise commit message e.g, `feat(ui): Create basic HTML structure for calculator`.
50
+ - Perform the commit.
51
+
52
+ 9. **Attach Task Summary with Git Notes:**
53
+ - **Step 9.1: Get Commit Hash:** Obtain the hash of the *just-completed commit* (`git log -1 --format="%H"`).
54
+ - **Step 9.2: Draft Note Content:** Create a detailed summary for the completed task. This should include the task name, a summary of changes, a list of all created/modified files, and the core "why" for the change.
55
+ - **Step 9.3: Attach Note:** Use the `git notes` command to attach the summary to the commit.
56
+ ```bash
57
+ # The note content from the previous step is passed via the -m flag.
58
+ git notes add -m "<note content>" <commit_hash>
59
+ ```
60
+
61
+ 10. **Get and Record Task Commit SHA:**
62
+ - **Step 10.1: Update Plan:** Read `plan.md`, find the line for the completed task, update its status from `[~]` to `[x]`, and append the first 7 characters of the *just-completed commit's* commit hash.
63
+ - **Step 10.2: Write Plan:** Write the updated content back to `plan.md`.
64
+
65
+ 11. **Commit Plan Update:**
66
+ - **Action:** Stage the modified `plan.md` file.
67
+ - **Action:** Commit this change with a descriptive message (e.g., `conductor(plan): Mark task 'Create user model' as complete`).
68
+
69
+ ### Phase Completion Verification and Checkpointing Protocol
70
+
71
+ **Trigger:** This protocol is executed immediately after a task is completed that also concludes a phase in `plan.md`.
72
+
73
+ 1. **Announce Protocol Start:** Inform the user that the phase is complete and the verification and checkpointing protocol has begun.
74
+
75
+ 2. **Ensure Test Coverage for Phase Changes:**
76
+ - **Step 2.1: Determine Phase Scope:** To identify the files changed in this phase, you must first find the starting point. Read `plan.md` to find the Git commit SHA of the *previous* phase's checkpoint. If no previous checkpoint exists, the scope is all changes since the first commit.
77
+ - **Step 2.2: List Changed Files:** Execute `git diff --name-only <previous_checkpoint_sha> HEAD` to get a precise list of all files modified during this phase.
78
+ - **Step 2.3: Verify and Create Tests:** For each file in the list:
79
+ - **CRITICAL:** First, check its extension. Exclude non-code files (e.g., `.json`, `.md`, `.yaml`).
80
+ - For each remaining code file, verify a corresponding test file exists.
81
+ - If a test file is missing, you **must** create one. Before writing the test, **first, analyze other test files in the repository to determine the correct naming convention and testing style.** The new tests **must** validate the functionality described in this phase's tasks (`plan.md`).
82
+
83
+ 3. **Execute Automated Tests with Proactive Debugging:**
84
+ - Before execution, you **must** announce the exact shell command you will use to run the tests.
85
+ - **Example Announcement:** "I will now run the automated test suite to verify the phase. **Command:** `CI=true npm test`"
86
+ - Execute the announced command.
87
+ - If tests fail, you **must** inform the user and begin debugging. You may attempt to propose a fix a **maximum of two times**. If the tests still fail after your second proposed fix, you **must stop**, report the persistent failure, and ask the user for guidance.
88
+
89
+ 4. **Propose a Detailed, Actionable Manual Verification Plan:**
90
+ - **CRITICAL:** To generate the plan, first analyze `product.md`, `product-guidelines.md`, and `plan.md` to determine the user-facing goals of the completed phase.
91
+ - You **must** generate a step-by-step plan that walks the user through the verification process, including any necessary commands and specific, expected outcomes.
92
+ - The plan you present to the user **must** follow this format:
93
+
94
+ **For a Frontend Change:**
95
+ ```
96
+ The automated tests have passed. For manual verification, please follow these steps:
97
+
98
+ **Manual Verification Steps:**
99
+ 1. **Start the development server with the command:** `npm run dev`
100
+ 2. **Open your browser to:** `http://localhost:3000`
101
+ 3. **Confirm that you see:** The new user profile page, with the user's name and email displayed correctly.
102
+ ```
103
+
104
+ **For a Backend Change:**
105
+ ```
106
+ The automated tests have passed. For manual verification, please follow these steps:
107
+
108
+ **Manual Verification Steps:**
109
+ 1. **Ensure the server is running.**
110
+ 2. **Execute the following command in your terminal:** `curl -X POST http://localhost:8080/api/v1/users -d '{"name": "test"}'`
111
+ 3. **Confirm that you receive:** A JSON response with a status of `201 Created`.
112
+ ```
113
+
114
+ 5. **Await Explicit User Feedback:**
115
+ - After presenting the detailed plan, ask the user for confirmation: "**Does this meet your expectations? Please confirm with yes or provide feedback on what needs to be changed.**"
116
+ - **PAUSE** and await the user's response. Do not proceed without an explicit yes or confirmation.
117
+
118
+ 6. **Create Checkpoint Commit:**
119
+ - Stage all changes. If no changes occurred in this step, proceed with an empty commit.
120
+ - Perform the commit with a clear and concise message (e.g., `conductor(checkpoint): Checkpoint end of Phase X`).
121
+
122
+ 7. **Attach Auditable Verification Report using Git Notes:**
123
+ - **Step 7.1: Draft Note Content:** Create a detailed verification report including the automated test command, the manual verification steps, and the user's confirmation.
124
+ - **Step 7.2: Attach Note:** Use the `git notes` command and the full commit hash from the previous step to attach the full report to the checkpoint commit.
125
+
126
+ 8. **Get and Record Phase Checkpoint SHA:**
127
+ - **Step 8.1: Get Commit Hash:** Obtain the hash of the *just-created checkpoint commit* (`git log -1 --format="%H"`).
128
+ - **Step 8.2: Update Plan:** Read `plan.md`, find the heading for the completed phase, and append the first 7 characters of the commit hash in the format `[checkpoint: <sha>]`.
129
+ - **Step 8.3: Write Plan:** Write the updated content back to `plan.md`.
130
+
131
+ 9. **Commit Plan Update:**
132
+ - **Action:** Stage the modified `plan.md` file.
133
+ - **Action:** Commit this change with a descriptive message following the format `conductor(plan): Mark phase '<PHASE NAME>' as complete`.
134
+
135
+ 10. **Announce Completion:** Inform the user that the phase is complete and the checkpoint has been created, with the detailed verification report attached as a git note.
136
+
137
+ ### Quality Gates
138
+
139
+ Before marking any task complete, verify:
140
+
141
+ - [ ] All tests pass
142
+ - [ ] Code coverage meets requirements (>80%)
143
+ - [ ] Code follows project's code style guidelines (as defined in `code_styleguides/`)
144
+ - [ ] All public functions/methods are documented (e.g., docstrings, JSDoc, GoDoc)
145
+ - [ ] Type safety is enforced (e.g., type hints, TypeScript types, Go types)
146
+ - [ ] No linting or static analysis errors (using the project's configured tools)
147
+ - [ ] Works correctly on mobile (if applicable)
148
+ - [ ] Documentation updated if needed
149
+ - [ ] No security vulnerabilities introduced
150
+
151
+ ## Development Commands
152
+
153
+ **AI AGENT INSTRUCTION: This section should be adapted to the project's specific language, framework, and build tools.**
154
+
155
+ ### Setup
156
+ ```bash
157
+ # Example: Commands to set up the development environment (e.g., install dependencies, configure database)
158
+ # e.g., for a Node.js project: npm install
159
+ # e.g., for a Go project: go mod tidy
160
+ ```
161
+
162
+ ### Daily Development
163
+ ```bash
164
+ # Example: Commands for common daily tasks (e.g., start dev server, run tests, lint, format)
165
+ # e.g., for a Node.js project: npm run dev, npm test, npm run lint
166
+ # e.g., for a Go project: go run main.go, go test ./..., go fmt ./...
167
+ ```
168
+
169
+ ### Before Committing
170
+ ```bash
171
+ # Example: Commands to run all pre-commit checks (e.g., format, lint, type check, run tests)
172
+ # e.g., for a Node.js project: npm run check
173
+ # e.g., for a Go project: make check (if a Makefile exists)
174
+ ```
175
+
176
+ ## Testing Requirements
177
+
178
+ ### Unit Testing
179
+ - Every module must have corresponding tests.
180
+ - Use appropriate test setup/teardown mechanisms (e.g., fixtures, beforeEach/afterEach).
181
+ - Mock external dependencies.
182
+ - Test both success and failure cases.
183
+
184
+ ### Integration Testing
185
+ - Test complete user flows
186
+ - Verify database transactions
187
+ - Test authentication and authorization
188
+ - Check form submissions
189
+
190
+ ### Mobile Testing
191
+ - Test on actual iPhone when possible
192
+ - Use Safari developer tools
193
+ - Test touch interactions
194
+ - Verify responsive layouts
195
+ - Check performance on 3G/4G
196
+
197
+ ## Code Review Process
198
+
199
+ ### Self-Review Checklist
200
+ Before requesting review:
201
+
202
+ 1. **Functionality**
203
+ - Feature works as specified
204
+ - Edge cases handled
205
+ - Error messages are user-friendly
206
+
207
+ 2. **Code Quality**
208
+ - Follows style guide
209
+ - DRY principle applied
210
+ - Clear variable/function names
211
+ - Appropriate comments
212
+
213
+ 3. **Testing**
214
+ - Unit tests comprehensive
215
+ - Integration tests pass
216
+ - Coverage adequate (>80%)
217
+
218
+ 4. **Security**
219
+ - No hardcoded secrets
220
+ - Input validation present
221
+ - SQL injection prevented
222
+ - XSS protection in place
223
+
224
+ 5. **Performance**
225
+ - Database queries optimized
226
+ - Images optimized
227
+ - Caching implemented where needed
228
+
229
+ 6. **Mobile Experience**
230
+ - Touch targets adequate (44x44px)
231
+ - Text readable without zooming
232
+ - Performance acceptable on mobile
233
+ - Interactions feel native
234
+
235
+ ## Commit Guidelines
236
+
237
+ ### Message Format
238
+ ```
239
+ <type>(<scope>): <description>
240
+
241
+ [optional body]
242
+
243
+ [optional footer]
244
+ ```
245
+
246
+ ### Types
247
+ - `feat`: New feature
248
+ - `fix`: Bug fix
249
+ - `docs`: Documentation only
250
+ - `style`: Formatting, missing semicolons, etc.
251
+ - `refactor`: Code change that neither fixes a bug nor adds a feature
252
+ - `test`: Adding missing tests
253
+ - `chore`: Maintenance tasks
254
+
255
+ ### Examples
256
+ ```bash
257
+ git commit -m "feat(auth): Add remember me functionality"
258
+ git commit -m "fix(posts): Correct excerpt generation for short posts"
259
+ git commit -m "test(comments): Add tests for emoji reaction limits"
260
+ git commit -m "style(mobile): Improve button touch targets"
261
+ ```
262
+
263
+ ## Definition of Done
264
+
265
+ A task is complete when:
266
+
267
+ 1. All code implemented to specification
268
+ 2. Unit tests written and passing
269
+ 3. Code coverage meets project requirements
270
+ 4. Documentation complete (if applicable)
271
+ 5. Code passes all configured linting and static analysis checks
272
+ 6. Works beautifully on mobile (if applicable)
273
+ 7. Implementation notes added to `plan.md`
274
+ 8. Changes committed with proper message
275
+ 9. Git note with task summary attached to the commit
276
+
277
+ ## Emergency Procedures
278
+
279
+ ### Critical Bug in Production
280
+ 1. Create hotfix branch from main
281
+ 2. Write failing test for bug
282
+ 3. Implement minimal fix
283
+ 4. Test thoroughly including mobile
284
+ 5. Deploy immediately
285
+ 6. Document in plan.md
286
+
287
+ ### Data Loss
288
+ 1. Stop all write operations
289
+ 2. Restore from latest backup
290
+ 3. Verify data integrity
291
+ 4. Document incident
292
+ 5. Update backup procedures
293
+
294
+ ### Security Breach
295
+ 1. Rotate all secrets immediately
296
+ 2. Review access logs
297
+ 3. Patch vulnerability
298
+ 4. Notify affected users (if any)
299
+ 5. Document and update security procedures
300
+
301
+ ## Deployment Workflow
302
+
303
+ ### Pre-Deployment Checklist
304
+ - [ ] All tests passing
305
+ - [ ] Coverage >80%
306
+ - [ ] No linting errors
307
+ - [ ] Mobile testing complete
308
+ - [ ] Environment variables configured
309
+ - [ ] Database migrations ready
310
+ - [ ] Backup created
311
+
312
+ ### Deployment Steps
313
+ 1. Merge feature branch to main
314
+ 2. Tag release with version
315
+ 3. Push to deployment service
316
+ 4. Run database migrations
317
+ 5. Verify deployment
318
+ 6. Test critical paths
319
+ 7. Monitor for errors
320
+
321
+ ### Post-Deployment
322
+ 1. Monitor analytics
323
+ 2. Check error logs
324
+ 3. Gather user feedback
325
+ 4. Plan next iteration
326
+
327
+ ## Continuous Improvement
328
+
329
+ - Review workflow weekly
330
+ - Update based on pain points
331
+ - Document lessons learned
332
+ - Optimize for user happiness
333
+ - Keep things simple and maintainable