oh-my-patent 0.3.0 → 0.3.3

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 (172) hide show
  1. package/README.md +75 -348
  2. package/README.zh-CN.md +69 -451
  3. package/assets/brand/README.md +92 -0
  4. package/assets/brand/png/favicon.ico +0 -0
  5. package/assets/brand/png/logo-on-dark.png +0 -0
  6. package/assets/brand/png/logo-primary.png +0 -0
  7. package/assets/brand/png/mark-primary-512.png +0 -0
  8. package/dist/adapters/claude/index.d.ts +26 -9
  9. package/dist/adapters/claude/index.js +119 -38
  10. package/dist/adapters/claude/index.js.map +1 -1
  11. package/dist/adapters/claude/mcp-config.d.ts +2 -0
  12. package/dist/adapters/claude/mcp-config.js +15 -0
  13. package/dist/adapters/claude/mcp-config.js.map +1 -0
  14. package/dist/adapters/codex/index.d.ts +29 -7
  15. package/dist/adapters/codex/index.js +94 -23
  16. package/dist/adapters/codex/index.js.map +1 -1
  17. package/dist/adapters/codex/marketplace.d.ts +4 -0
  18. package/dist/adapters/codex/marketplace.js +34 -0
  19. package/dist/adapters/codex/marketplace.js.map +1 -0
  20. package/dist/adapters/generate.js +19 -3
  21. package/dist/adapters/generate.js.map +1 -1
  22. package/dist/adapters/generated-marker.d.ts +30 -0
  23. package/dist/adapters/generated-marker.js +44 -0
  24. package/dist/adapters/generated-marker.js.map +1 -0
  25. package/dist/adapters/loader.d.ts +21 -0
  26. package/dist/adapters/loader.js +185 -92
  27. package/dist/adapters/loader.js.map +1 -1
  28. package/dist/adapters/opencode/index.d.ts +15 -7
  29. package/dist/adapters/opencode/index.js +34 -6
  30. package/dist/adapters/opencode/index.js.map +1 -1
  31. package/dist/adapters/prune.d.ts +45 -0
  32. package/dist/adapters/prune.js +145 -0
  33. package/dist/adapters/prune.js.map +1 -0
  34. package/dist/adapters/run-generate.d.ts +38 -0
  35. package/dist/adapters/run-generate.js +73 -0
  36. package/dist/adapters/run-generate.js.map +1 -0
  37. package/dist/adapters/types.d.ts +27 -7
  38. package/dist/cli.js +235 -121
  39. package/dist/cli.js.map +1 -1
  40. package/dist/commands/path-branch.d.ts +2 -0
  41. package/dist/commands/path-branch.js +135 -35
  42. package/dist/commands/path-branch.js.map +1 -1
  43. package/dist/commands/path-query.js +5 -1
  44. package/dist/commands/path-query.js.map +1 -1
  45. package/dist/commands/path-restore.js +7 -0
  46. package/dist/commands/path-restore.js.map +1 -1
  47. package/dist/commands/path-visualization.js +5 -4
  48. package/dist/commands/path-visualization.js.map +1 -1
  49. package/dist/commands/render.d.ts +8 -0
  50. package/dist/commands/render.js +79 -3
  51. package/dist/commands/render.js.map +1 -1
  52. package/dist/commands/shared.d.ts +6 -1
  53. package/dist/commands/shared.js +14 -2
  54. package/dist/commands/shared.js.map +1 -1
  55. package/dist/core/atomic-write.d.ts +46 -0
  56. package/dist/core/atomic-write.js +63 -0
  57. package/dist/core/atomic-write.js.map +1 -0
  58. package/dist/core/brainstorm-path.d.ts +27 -0
  59. package/dist/core/brainstorm-path.js +80 -3
  60. package/dist/core/brainstorm-path.js.map +1 -1
  61. package/dist/core/cli-args.d.ts +5 -0
  62. package/dist/core/cli-args.js +27 -0
  63. package/dist/core/cli-args.js.map +1 -0
  64. package/dist/core/diagram-inserter.js +3 -1
  65. package/dist/core/diagram-inserter.js.map +1 -1
  66. package/dist/core/diagram-renderer.d.ts +29 -0
  67. package/dist/core/diagram-renderer.js +255 -67
  68. package/dist/core/diagram-renderer.js.map +1 -1
  69. package/dist/core/diagram-types.d.ts +32 -1
  70. package/dist/core/diagram-types.js +36 -1
  71. package/dist/core/diagram-types.js.map +1 -1
  72. package/dist/core/init-checker.d.ts +10 -2
  73. package/dist/core/init-checker.js +92 -57
  74. package/dist/core/init-checker.js.map +1 -1
  75. package/dist/core/jsonc.d.ts +18 -0
  76. package/dist/core/jsonc.js +64 -0
  77. package/dist/core/jsonc.js.map +1 -0
  78. package/dist/core/landscape-schema.js +43 -4
  79. package/dist/core/landscape-schema.js.map +1 -1
  80. package/dist/core/path-constants.d.ts +35 -0
  81. package/dist/core/path-constants.js +36 -0
  82. package/dist/core/path-constants.js.map +1 -0
  83. package/dist/core/path-graph.d.ts +10 -0
  84. package/dist/core/path-graph.js +68 -21
  85. package/dist/core/path-graph.js.map +1 -1
  86. package/dist/core/path-persistence.js +11 -8
  87. package/dist/core/path-persistence.js.map +1 -1
  88. package/dist/core/path-safety.d.ts +40 -0
  89. package/dist/core/path-safety.js +103 -0
  90. package/dist/core/path-safety.js.map +1 -0
  91. package/dist/core/router.d.ts +1 -0
  92. package/dist/core/router.js +20 -12
  93. package/dist/core/router.js.map +1 -1
  94. package/dist/core/state-manager.d.ts +1 -0
  95. package/dist/core/state-manager.js +28 -22
  96. package/dist/core/state-manager.js.map +1 -1
  97. package/dist/core/state.d.ts +15 -3
  98. package/dist/core/state.js +25 -18
  99. package/dist/core/state.js.map +1 -1
  100. package/dist/core/threshold-config.d.ts +7 -1
  101. package/dist/core/threshold-config.js +14 -6
  102. package/dist/core/threshold-config.js.map +1 -1
  103. package/dist/core/validator.js +4 -1
  104. package/dist/core/validator.js.map +1 -1
  105. package/dist/core/workflow-stages.d.ts +61 -0
  106. package/dist/core/workflow-stages.js +60 -0
  107. package/dist/core/workflow-stages.js.map +1 -0
  108. package/dist/core/workflow.d.ts +4 -13
  109. package/dist/core/workflow.js +15 -32
  110. package/dist/core/workflow.js.map +1 -1
  111. package/dist/index.d.ts +1 -1
  112. package/dist/index.js +1 -1
  113. package/dist/index.js.map +1 -1
  114. package/dist/skills/jurisdiction.d.ts +14 -0
  115. package/dist/skills/jurisdiction.js +16 -0
  116. package/dist/skills/jurisdiction.js.map +1 -1
  117. package/dist/tui/app.d.ts +8 -0
  118. package/dist/tui/app.js +136 -93
  119. package/dist/tui/app.js.map +1 -1
  120. package/opencode.jsonc.example +116 -0
  121. package/package.json +18 -5
  122. package/plugin.jsonc +1 -1
  123. package/src/adapters/claude/index.ts +119 -37
  124. package/src/adapters/claude/mcp-config.ts +14 -0
  125. package/src/adapters/codex/index.ts +98 -25
  126. package/src/adapters/codex/marketplace.ts +37 -0
  127. package/src/adapters/generate.ts +17 -3
  128. package/src/adapters/generated-marker.ts +48 -0
  129. package/src/adapters/loader.ts +186 -94
  130. package/src/adapters/opencode/index.ts +36 -7
  131. package/src/adapters/prune.ts +162 -0
  132. package/src/adapters/run-generate.ts +111 -0
  133. package/src/adapters/types.ts +29 -2
  134. package/src/agents/archimedes.md +43 -24
  135. package/src/agents/patent-diagram-generator.md +7 -5
  136. package/src/agents/patent-init-sentinel.md +10 -1
  137. package/src/agents/patent-path-recorder.md +14 -5
  138. package/src/agents/patent-product-compliance-analyst.md +7 -0
  139. package/src/agents/patent-security-engineer.md +7 -0
  140. package/src/cli.ts +229 -123
  141. package/src/commands/archimedes.md +4 -1
  142. package/src/commands/path-branch.ts +150 -38
  143. package/src/commands/path-query.ts +5 -1
  144. package/src/commands/path-restore.ts +9 -0
  145. package/src/commands/path-visualization.ts +5 -4
  146. package/src/commands/render.ts +81 -3
  147. package/src/commands/shared.ts +14 -2
  148. package/src/core/atomic-write.ts +85 -0
  149. package/src/core/brainstorm-path.ts +114 -8
  150. package/src/core/cli-args.ts +27 -0
  151. package/src/core/diagram-inserter.ts +3 -1
  152. package/src/core/diagram-renderer.ts +292 -68
  153. package/src/core/diagram-types.ts +51 -2
  154. package/src/core/init-checker.ts +119 -54
  155. package/src/core/jsonc.ts +60 -0
  156. package/src/core/landscape-schema.ts +50 -4
  157. package/src/core/path-constants.ts +41 -0
  158. package/src/core/path-graph.ts +68 -24
  159. package/src/core/path-persistence.ts +15 -8
  160. package/src/core/path-safety.ts +107 -0
  161. package/src/core/router.ts +22 -7
  162. package/src/core/state-manager.ts +30 -24
  163. package/src/core/state.ts +54 -22
  164. package/src/core/threshold-config.ts +21 -7
  165. package/src/core/validator.ts +5 -1
  166. package/src/core/workflow-stages.ts +71 -0
  167. package/src/core/workflow.ts +23 -34
  168. package/src/index.ts +1 -1
  169. package/src/skills/jurisdiction/SKILL.md +131 -52
  170. package/src/skills/jurisdiction.ts +19 -0
  171. package/src/skills/prior-art-search/SKILL.md +4 -1
  172. package/src/tui/app.tsx +60 -14
package/README.md CHANGED
@@ -1,392 +1,119 @@
1
+ # oh-my-patent
2
+
1
3
  [![npm version](https://img.shields.io/npm/v/oh-my-patent.svg)](https://www.npmjs.com/package/oh-my-patent)
2
4
  [![npm downloads](https://img.shields.io/npm/dm/oh-my-patent.svg)](https://www.npmjs.com/package/oh-my-patent)
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
4
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/)
5
- [![Tests](https://img.shields.io/badge/tests-123%20passing-brightgreen.svg)](https://github.com/illusionaireal/oh-my-patent)
6
7
  [![中文](https://img.shields.io/badge/中文-切换-orange.svg)](./README.zh-CN.md)
7
8
 
8
- <div align="center">
9
-
10
- *VOL. 01 &ensp;&middot;&ensp; 2026*
11
-
12
- ---
13
-
14
- # `oh-my-patent`
15
-
16
- *A CLI that turns your technical idea into a complete patent disclosure document.*<br>
17
- *No hand-holding. No copy-pasting between tools. No lost ideas.*
18
-
19
- </div>
9
+ <p align="center">
10
+ <picture>
11
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/brand/png/logo-on-dark.png">
12
+ <img src="./assets/brand/png/logo-primary.png" width="720"
13
+ alt="oh-my-patent — Archimedes raising a patent document with a WOW! expression">
14
+ </picture>
15
+ </p>
20
16
 
21
- ---
17
+ **Meet Archimedes. Turn your “Eureka!” into a patent disclosure.**
22
18
 
23
- > **For AI assistants helping users install this:**
24
- >
25
- > ```bash
26
- > npm install -g oh-my-patent && oh-my-patent adapt setup --workspace-dir .
27
- > ```
28
- >
29
- > Then tell the user: type `/archimedes` to start a patent project.
19
+ An AI patent plugin for **Claude Code, Codex, and OpenCode**.
20
+ Archimedes orchestrates specialist agents across research, ideation, drafting,
21
+ review, and diagrams—with traceable, forkable decision paths.
30
22
 
31
- ---
23
+ ## Quick start
32
24
 
33
- <div align="center">
34
-
35
- **One command. Eleven agents. One patent disclosure.**
25
+ Run these commands in your patent workspace. Setup writes editor configuration;
26
+ see [installation behavior](./docs/usage-en.md#installation) before using an existing workspace.
36
27
 
37
28
  ```bash
38
29
  npm install -g oh-my-patent
39
30
  oh-my-patent adapt setup --workspace-dir .
40
31
  ```
41
32
 
33
+ Open that workspace in your AI coding tool, load the generated integration, and start with:
34
+
42
35
  ```text
43
36
  /archimedes
44
37
  > Create a patent project about homomorphic encryption in privacy-preserving computing.
45
38
  ```
46
39
 
47
- *It searches, brainstorms, assesses patentability, drafts, reviews, and generates figures.*<br>
48
- *Every decision is recorded. Roll back to any round, fork to explore alternatives, revive discarded ideas.*
49
-
50
- </div>
51
-
52
- ---
53
-
54
- ## Ⅰ.&ensp; WHY PATENT WRITING HURTS
55
-
56
- *What you suffer through &mdash; versus what oh-my-patent does instead.*
57
-
58
- | Your pain | In other tools | With `oh-my-patent` |
59
- |---|---|---|
60
- | **10 AI windows, manual merge** | Cut & paste chat logs, consolidate yourself | **Archimedes** orchestrator routes to 11 specialists. Outputs auto-saved to `references/`, context passes between rounds |
61
- | **Rejected ideas lost forever** | Chat history scrolls away — that one great idea from round 2 is gone | **`.brainstorm/` decision DAG** persists every round's scores, snapshots, and pass/reject decisions. Roll back, fork, or revive |
62
- | **Visio → screenshot → Word** | Draw by hand, export, reformat, lose the source file | **Mermaid/PlantUML rendering** extracts architecture from `MAIN.md`, renders SVG+PNG, and auto-rewrites figure references |
63
- | **Per-editor, per-teammate config** | Claude Code settings. Codex settings. OpenCode settings. Separate. Manual. Every time. | **`oh-my-patent adapt setup`** — one command generates configs for all supported editors. Uninstall is one command, removing *only* what we generated |
64
- | **Crash mid-project = start over** | Scramble through screenshots, guess where you left off | **Workflow state machine** — all stages written to `state.json`, decision tree in `path.json`. Resume from the exact point of failure |
65
- | **6 rounds in, no idea what "done" is** | A mess of loose documents | **Quantitative threshold model** auto-decides if brainstorming is mature. QA loop exits on 2 consecutive rounds with zero new issues |
66
-
67
- ---
68
-
69
- ## Ⅱ.&ensp; CORE CAPABILITIES
70
-
71
- *Eight things it does so you don't have to.*
72
-
73
- | | |
74
- |---|---|
75
- | 🧠 **Decision-path tracking**<br>`.brainstorm/` records every round's scores, innovations, and decisions as an auditable DAG. Roll back to any node, fork alternatives, revive abandoned ideas. | 🤖 **11-agent end-to-end pipeline**<br>Search → ideation → patentability → draft → review → diagrams. The full patent lifecycle, zero hand-holding between stages. |
76
- | ⚡ **`/archimedes` one-liner**<br>Start every task with Archimedes. He reads your state, routes to specialists, waits for output, and advances to the next stage. | 🔗 **Zero-config adapters**<br>`oh-my-patent adapt setup` generates configs for Claude Code, Codex, and OpenCode simultaneously. One command, all editors. |
77
- | 🛡️ **Safe uninstall**<br>Exact-file removal — only deletes what we auto-generated. No `readdir + unlink` traversing your workspace. Your custom edits are safe. | 📊 **Auto figure rendering**<br>Parses `MAIN.md` for technical architecture, renders Mermaid/PlantUML to SVG+PNG, and auto-rewrites figure references in-place. |
78
- | 🎯 **Scoring thresholds & QA loops**<br>Quantitative model judges if brainstorming is mature. Up to 6 QA rounds, exiting when 2 consecutive rounds produce zero new issues. | 🔄 **Resumable state machine**<br>`INIT → RESEARCH → BRAINSTORM → DRAFT → QA_LOOP → FINAL_REVIEW → DIAGRAM → DONE`. Crashes are non-destructive. Resume from `state.json`. |
79
-
80
- ---
81
-
82
- ## Ⅲ.&ensp; THE WORKFLOW
83
-
84
- *From idea to disclosure &mdash; 10 stages, 1 state machine.*
85
-
86
- ![End-to-End Workflow](docs/images/ai-gen/00-workflow.png)
87
-
88
- ```
89
- User proposes a topic
90
- │
91
- 01 │ INIT Generate projects/{NN}-{topic_slug}/
92
- │ Initialize .patent/state.json + .brainstorm/path.json
93
- │
94
- 02 │ RESEARCH Patent search by landscape-analyst
95
- │ → references/landscape.md, feature-matrix.md, problem-map.md
96
- │
97
- 03 │ BRAINSTORM_R1 Head-to-head debate
98
- │ innovation-architect generates candidates (TRIZ)
99
- │ adversarial-examiner attacks them (examiner perspective)
100
- │ brainstorm-moderator arbitrates & scores
101
- │
102
- 04 │ BRAINSTORM_R2 Parallel multi-dimensional evaluation
103
- │ security-engineer + compliance-analyst + patentability-evaluator
104
- │ Weighted score: S = 0.3·S_sec + 0.3·S_comp + 0.4·S_pat
105
- │ Threshold: S ≥ 8.5 and every dimension ≥ 6.0
106
- │ ←── threshold fail loops back to BRAINSTORM_R1
107
- 05 │ DRAFT Generate initial disclosure
108
- │ → MAIN.md (by disclosure-writer)
109
- │
110
- 06 │ DIAGRAM_DRAFT Render draft figures
111
- │ diagram-generator: Mermaid/PlantUML → SVG+PNG
112
- │
113
- 07 │ QA_LOOP Bounded argue-loop
114
- │ Reviewer raises issues → technical-responder writes patches
115
- │ Exit: 2 consecutive rounds with zero new issues
116
- │ ←── issues found loops back to DRAFT
117
- 08 │ FINAL_REVIEW Final pass
118
- │ ←── can loop back to QA_LOOP if needed
119
- 09 │ DIAGRAM_FINAL Re-render figures after final revisions
120
- │ Auto-updates figure references in MAIN.md
121
- │
122
- 10 │ DONE Quality gate check → finished
123
- ```
124
-
125
- > **Crash recovery**: reads `state.json` → resumes from the exact stage.<br>
126
- > **Regret a round?** `path branch --from-node round-{N}` → explore an alternative.<br>
127
- > **Long-forgotten idea was actually good?** `path restore` → bring it back.
128
-
129
- ---
130
-
131
- ## Ⅳ.&ensp; THE AGENTS
132
-
133
- *11 specialists, 5 collaboration patterns.*
134
-
135
- ### The agents at a glance
136
-
137
- | Agent | Role | Invoked in |
138
- |---|---|---|
139
- | `archimedes` | Primary orchestrator, state-machine dispatcher | Every stage |
140
- | `landscape-analyst` | Prior-art search, technology landscape | RESEARCH |
141
- | `innovation-architect` | TRIZ-based candidate generation | BRAINSTORM_R1 |
142
- | `adversarial-examiner` | Examiner-perspective invalidation attacks | R1, QA_LOOP |
143
- | `patentability-evaluator` | Novelty / creativity / utility scoring | BRAINSTORM_R2 |
144
- | `security-engineer` | Vulnerability & side-channel analysis | R2, QA_LOOP |
145
- | `compliance-analyst` | Regulatory & privacy compliance | R2 |
146
- | `brainstorm-moderator` | Aggregation, scoring, threshold decisions | R1, R2 |
147
- | `path-recorder` | Persist rounds, branches, snapshots | Every round end |
148
- | `disclosure-writer` | Generate `MAIN.md` disclosure | DRAFT |
149
- | `disclosure-reviewer` | Writing & legal compliance review | QA_LOOP, FINAL_REVIEW |
150
- | `technical-responder` | Issue-by-issue rebuttal + MAIN.md patches | QA_LOOP |
151
- | `diagram-generator` | Mermaid/PlantUML → SVG+PNG, MAIN.md rewrites | DIAGRAM_DRAFT, DIAGRAM_FINAL |
152
-
153
- ### How they collaborate
154
-
155
- The agents are wired into five distinct patterns, not a flat queue.
156
-
157
- #### Pattern 1 — Orchestration Routing
158
-
159
- `archimedes` reads `state.json`, dispatches to the right specialist based on `current_stage`, persists the result, advances the stage. The state machine is the source of truth &mdash; Archimedes is just the dispatcher.
160
-
161
- - **Threshold gate**: `passToDraft ≥ 8.5`, `novelty ≥ 6.0`, `creativity ≥ 6.0`. Fail → loop back to `BRAINSTORM_R1`. Force-iterate after `maxRounds: 3` with `minImprovement: 0.3`.
162
- - **Persistence**: every transition is atomic (temp file + rename). `state.json` for workflow, `path.json` for decisions, `references/` for agent outputs.
163
-
164
- #### Pattern 2 — Adversarial Brainstorming (R1)
165
-
166
- ![Adversarial brainstorming](docs/images/ai-gen/图2.png)
167
-
168
- `innovation-architect` generates candidates (TRIZ). `adversarial-examiner` attacks from an examiner's perspective. `brainstorm-moderator` arbitrates and scores. `path-recorder` snapshots the round. Output: innovation IDs + scores + `ACCEPT` / `ITERATE` / `REJECT`.
169
-
170
- #### Pattern 3 — Parallel Multi-Dimensional Evaluation (R2)
171
-
172
- ![Parallel evaluation](docs/images/ai-gen/图3.png)
173
-
174
- Fan-out / fan-in. Archimedes dispatches survivors to three evaluators in parallel:
175
-
176
- | Evaluator | Dimension | Score |
177
- |---|---|---|
178
- | `security-engineer` | Vulnerabilities, side-channel risks | `S_sec` |
179
- | `compliance-analyst` | Regulatory, privacy | `S_comp` |
180
- | `patentability-evaluator` | Novelty, creativity, utility | `S_pat` |
181
-
182
- `brainstorm-moderator` aggregates: `S = 0.3·S_sec + 0.3·S_comp + 0.4·S_pat`. Passes only if `S ≥ 8.5` and every dimension clears its red-line (`≥ 6.0`).
183
-
184
- #### Pattern 4 — QA Argue Loop
185
-
186
- ![QA argue loop](docs/images/ai-gen/图4.png)
187
-
188
- Bounded loop with quantitative exit. Three reviewers raise issues; `technical-responder` writes revisions with explicit MAIN.md patch locations. Exit requires **2 consecutive rounds with 0 new issues**.
40
+ Use `--tool claude-code`, `--tool codex`, or `--tool opencode` to configure one
41
+ platform. Without `--tool`, setup targets all three. See the
42
+ [platform notes](./docs/usage-en.md#platform-notes) if the entry point is unavailable.
189
43
 
190
- #### Pattern 5 — Decision Path DAG
44
+ <details>
45
+ <summary>For AI assistants helping users install this</summary>
191
46
 
192
- ![Decision path DAG](docs/images/ai-gen/图5.png)
193
-
194
- Every round is a node in a DAG under `.brainstorm/`. Two operations on top of the linear path:
195
-
196
- - **`path branch --from-node <id>`** &mdash; fork from any historical node
197
- - **`path restore --node <id> --innovation <id>`** &mdash; revive an abandoned innovation
198
-
199
- ---
200
-
201
- ## Ⅴ.&ensp; INSTALL & UNINSTALL
202
-
203
- ### Install
47
+ Choose the user's patent workspace, review the installation behavior above, and run:
204
48
 
205
49
  ```bash
206
- # Step 1 — install the CLI globally
207
50
  npm install -g oh-my-patent
208
-
209
- # Step 2 — generate editor configs
210
- cd your-patent-projects
211
51
  oh-my-patent adapt setup --workspace-dir .
52
+ oh-my-patent check --workspace-dir .
212
53
  ```
213
54
 
214
- This generates configs for **Claude Code** (`.claude/` + `CLAUDE.md`), **Codex** (`.codex/` + `AGENTS.md` + `codex.json`), and **OpenCode** (`.opencode/agent/`, `.opencode/command/`, and `.opencode/skills/`). After this, use `/archimedes` in your editor.
215
-
216
- ```bash
217
- # Options: generate for one editor only
218
- oh-my-patent adapt setup --tool claude-code --workspace-dir .
219
- oh-my-patent adapt setup --tool codex --workspace-dir .
220
- oh-my-patent adapt setup --tool opencode --workspace-dir .
221
-
222
- # Aliases
223
- oh-my-patent adapt install # same as setup
224
- oh-my-patent adapt generate # write to plugins/<tool>/ only, don't touch workspace
225
- ```
226
-
227
- ### Uninstall
228
-
229
- ```bash
230
- # Remove editor configs, keep the CLI
231
- cd your-patent-projects
232
- oh-my-patent adapt uninstall --workspace-dir .
233
- ```
55
+ Then help the user load the integration and start a project with `/archimedes`.
234
56
 
235
- **Safety guarantees:**
236
- - Exact-file removal only &mdash; precise paths, never traverses directories
237
- - Your custom edits to configs are safe &mdash; we only delete what we generated
238
- - Empty directory cleanup after removing all generated files
57
+ </details>
239
58
 
240
- ```bash
241
- # Complete removal (editor configs + CLI)
242
- oh-my-patent adapt uninstall --workspace-dir .
243
- npm uninstall -g oh-my-patent
244
- ```
59
+ ## What you can do
245
60
 
246
- > *Post-uninstall: your patent project data (`projects/`, `.brainstorm/`, `references/`, `figures/`, `MAIN.md`) is **not** deleted automatically. Run `git status` before manually removing anything.*
61
+ | Capability | What it gives you |
62
+ |---|---|
63
+ | Coordinate specialist agents | Research, ideation, patentability assessment, drafting, review, and technical responses under one orchestrator |
64
+ | Keep decisions traceable | Saved rounds, scores, innovation snapshots, and reasons in `.brainstorm/`; branch from a recorded node or restore an idea |
65
+ | Resume recorded work | Workflow state in `.patent/state.json` and agent outputs in `references/` provide context for continuing a project |
66
+ | Generate patent figures | Mermaid or PlantUML sources rendered to SVG and PNG, with figure references inserted into `MAIN.md` |
67
+ | Inspect progress | CLI queries, Markdown reports, a terminal UI, and environment checks |
247
68
 
248
- ---
69
+ The project brings the disclosure, its supporting material, and its decision history
70
+ together in one project directory. Rendering engines and retrieval services have
71
+ their own setup requirements; see the [usage guide](./docs/usage-en.md).
249
72
 
250
- ## Ⅵ.&ensp; FULL USAGE
73
+ ## From idea to disclosure
251
74
 
252
- ```
253
- oh-my-patent <domain> <subcommand> [options]
254
- ```
75
+ ![Archimedes workflow overview: prepare and research, develop and assess ideas, draft disclosure and figures, review and revise, finalize disclosure and figures; with research and drafting feedback loops](./docs/images/workflow-overview-brand-v1.png)
255
76
 
256
- ### Brainstorm path (`path`)
77
+ *Overview of the ten stages, grouped by purpose. Arrows back to research and
78
+ drafting show where further work may be needed.*
257
79
 
258
- | Subcommand | What it does |
80
+ | Step | Workflow stages |
259
81
  |---|---|
260
- | `path init <project>` | Initialize `.brainstorm/` and `state.json` |
261
- | `path record <project> --round <N> --data <json\|@file>` | Record round N with scores, decisions, snapshots |
262
- | `path overview <project>` | Summary: from start to finish, current position, done? |
263
- | `path node <project> <round-N>` | Details of a specific round |
264
- | `path innovation(s) <project> [ID]` | Full history of one innovation |
265
- | `path branch <project> --from-node <id> --reason <text>` | Fork from any historical node |
266
- | `path branches <project>` | List all branches |
267
- | `path restore <project> --node <id> --innovation <id>` | Revive an abandoned innovation |
268
- | `path threshold <project> --round <N>` | Evaluate if scores pass threshold |
269
- | `path visualize <project> [--mode ...] --target <id>` | Terminal box-drawing visualization |
270
- | `path markdown <project> [--mode ...] --target <id>` | Export a Markdown report |
271
-
272
- ### Patent diagrams (`diagram`)
82
+ | Prepare and research | `INIT` → `RESEARCH` |
83
+ | Develop and assess ideas | `BRAINSTORM_R1` → `BRAINSTORM_R2` |
84
+ | Write and illustrate | `DRAFT` → `DIAGRAM_DRAFT` |
85
+ | Review and revise | `QA_LOOP` → `FINAL_REVIEW` |
86
+ | Refresh figures and finish | `DIAGRAM_FINAL` → `DONE` |
273
87
 
274
- | Subcommand | What it does |
275
- |---|---|
276
- | `diagram render <project> --specs <json\|@file> --phase draft\|final` | Batch render SVG+PNG, auto-update MAIN.md references |
277
- | `diagram status <project>` | List rendered figures (number, phase, paths) |
278
- | `diagram rerender <project> --figure <ID> --source <mmd\|@file> --engine mermaid\|plantuml` | Update a single figure |
88
+ Review can return to earlier stages. The [workflow reference](./docs/workflow-diagram-en.md)
89
+ shows the supported transitions and explains scoring decisions separately from stage changes.
279
90
 
280
- ### Adapters (`adapt`)
91
+ ## How the team works
281
92
 
282
- | Subcommand | What it does |
93
+ | Pattern | Purpose |
283
94
  |---|---|
284
- | `adapt setup [--tool ...] [--workspace-dir .]` | Install editor configs (recommended entry) |
285
- | `adapt install` | Same as `setup` |
286
- | `adapt uninstall [--tool ...] [--workspace-dir .]` | Exact-file removal only |
287
- | `adapt generate` | Write to `plugins/<tool>/` only |
95
+ | Orchestration | Archimedes coordinates specialists and carries project context between stages |
96
+ | Adversarial brainstorming | Candidate ideas receive examiner-style challenges before selection |
97
+ | Parallel evaluation | Security, compliance, and patentability specialists assess different dimensions |
98
+ | Review and response | Reviewers raise issues; the technical responder proposes document changes |
99
+ | Decision recording | The path recorder preserves rounds for comparison, branching, and recovery |
288
100
 
289
- ### Interactive TUI (`tui`)
290
-
291
- ```bash
292
- oh-my-patent tui [project-path]
293
- ```
101
+ The [agent reference](./docs/agents-en.md) lists the 14 registered agents, 6 skills,
102
+ 9 commands, and their roles. Actual dispatch uses the capabilities of the selected host.
294
103
 
295
- Ink+React terminal UI. Navigate the decision path, view scores, switch branches, revive innovations &mdash; all locally, no internet needed.
104
+ ## Documentation
296
105
 
297
- ---
298
-
299
- ## Ⅶ.&ensp; ARCHITECTURE
300
-
301
- Four layers, one data flow.
302
-
303
- | Layer | What it governs | Key files |
304
- |---|---|---|
305
- | **Orchestration** | Agent / skill / command definitions | `plugin.jsonc`, `plugins/` |
306
- | **Engine** | Path tracking, state machine, diagrams, thresholds | `src/core/` |
307
- | **Command** | Unified CLI wrapping engine capabilities | `src/cli.ts`, `src/commands/` |
308
- | **Adapter** | Converts orchestration → Claude Code / Codex / OpenCode configs | `src/adapters/claude/`, `src/adapters/codex/`, `src/adapters/opencode/` |
309
-
310
- ```
311
- plugin.jsonc (orchestration definition)
312
- │
313
- [Adapters] generate
314
- │
315
- .claude/ (Claude Code) .codex/ (Codex) .opencode/ (OpenCode)
316
- CLAUDE.md AGENTS.md, codex.json agents, commands, skills
317
- │
318
- AI in your editor invokes 11 specialist agents
319
- │
320
- Output → .brainstorm/ decision-path records
321
- Output → state.json workflow state machine
322
- Output → references/ with standardized filenames
323
- Output → MAIN.md + figures/
324
- │
325
- CLI commands = automated operations on .brainstorm/ + .patent/ + references/
326
- TUI = visualized browsing of .brainstorm/
327
- ```
328
-
329
- ---
330
-
331
- ## Ⅷ.&ensp; DIRECTORY
332
-
333
- ```
334
- oh-my-patent/ # Core repo: configs and engine
335
- ├── src/
336
- │ ├── cli.ts # CLI entry
337
- │ ├── core/
338
- │ │ ├── brainstorm-path.ts # Decision-path data model + thresholds
339
- │ │ ├── path-persistence.ts # Atomic writes + rollback
340
- │ │ ├── path-graph.ts # Graph structure + fork algorithms
341
- │ │ ├── diagram-renderer.ts # Mermaid/PlantUML → SVG/PNG
342
- │ │ └── threshold-config.ts # Quantitative threshold model
343
- │ ├── commands/ # path init/record/overview/branch/restore...
344
- │ ├── adapters/
345
- │ │ ├── claude/ # → .claude/ + CLAUDE.md
346
- │ │ ├── codex/ # → .codex/ + AGENTS.md + codex.json
347
- │ │ └── opencode/ # → .opencode/ agents, commands, and skills
348
- │ └── tui/ # Ink+React interactive UI
349
- ├── plugin.jsonc
350
- └── dist/ # Compiled output
351
-
352
- projects/{NN}-{topic_slug}/ # One Git repo per patent
353
- ├── .brainstorm/
354
- │ ├── path.json # Metadata + edges + current node + final decision
355
- │ ├── nodes/
356
- │ │ └── round-{n}.json # Scores, innovations, decisions, timestamps
357
- │ ├── snapshots/ # Innovation history snapshots
358
- │ └── branches/ # Forked explorations
359
- ├── .patent/
360
- │ └── state.json # Workflow state: at DRAFT? QA round 3?
361
- ├── references/
362
- │ ├── landscape.md # Search results
363
- │ ├── brainstorm_round1_*.md # Agent outputs follow strict naming
364
- │ └── argue_round2_*.md
365
- ├── figures/
366
- │ ├── 001-system-overview.svg
367
- │ ├── 001-system-overview.png
368
- │ └── figures-manifest.json
369
- ├── MAIN.md # Final disclosure (auto-updated by diagram inserter)
370
- └── conversation.md # Chronological conversation log
371
- ```
372
-
373
- ### Scripts
374
-
375
- ```bash
376
- npm run build # Compile TypeScript → dist/
377
- npm test # Run vitest test suite (123 passing)
378
- npm run lint # tsc --noEmit type checking
379
- ```
380
-
381
- ---
382
-
383
- <div align="center">
384
-
385
- ---
386
-
387
- *MIT Licensed &ensp;&middot;&ensp; Crafted by [illusionaireal](https://github.com/illusionaireal)*<br>
388
- *With thanks to the [LINUX DO Community](https://linux.do/)*
389
-
390
- &mdash; 1 &mdash;
391
-
392
- </div>
106
+ | Read next | Contents |
107
+ |---|---|
108
+ | [Usage and CLI](./docs/usage-en.md) | Installation, platform differences, all CLI domains, and uninstall behavior |
109
+ | [Workflow](./docs/workflow-diagram-en.md) | Ten stages, review loops, and threshold behavior |
110
+ | [Agents and collaboration](./docs/agents-en.md) | Registered IDs, skills, commands, and collaboration patterns |
111
+ | [Architecture and development](./docs/architecture-en.md) | Four layers, repository layout, project files, and development commands |
112
+ | [Documentation index](./docs/README-en.md) | Bilingual guides and design references |
113
+ | [Brand guide](./assets/brand/README.md) | Archimedes artwork and usage rules |
114
+
115
+ Contributions are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md) or
116
+ [report an issue](https://github.com/illusionaireal/oh-my-patent/issues).
117
+ Licensed under [MIT](./LICENSE).
118
+
119
+ *With thanks to the* [*LINUX DO Community*](https://linux.do/)