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.
- package/README.md +75 -348
- package/README.zh-CN.md +69 -451
- package/assets/brand/README.md +92 -0
- package/assets/brand/png/favicon.ico +0 -0
- package/assets/brand/png/logo-on-dark.png +0 -0
- package/assets/brand/png/logo-primary.png +0 -0
- package/assets/brand/png/mark-primary-512.png +0 -0
- package/dist/adapters/claude/index.d.ts +26 -9
- package/dist/adapters/claude/index.js +119 -38
- package/dist/adapters/claude/index.js.map +1 -1
- package/dist/adapters/claude/mcp-config.d.ts +2 -0
- package/dist/adapters/claude/mcp-config.js +15 -0
- package/dist/adapters/claude/mcp-config.js.map +1 -0
- package/dist/adapters/codex/index.d.ts +29 -7
- package/dist/adapters/codex/index.js +94 -23
- package/dist/adapters/codex/index.js.map +1 -1
- package/dist/adapters/codex/marketplace.d.ts +4 -0
- package/dist/adapters/codex/marketplace.js +34 -0
- package/dist/adapters/codex/marketplace.js.map +1 -0
- package/dist/adapters/generate.js +19 -3
- package/dist/adapters/generate.js.map +1 -1
- package/dist/adapters/generated-marker.d.ts +30 -0
- package/dist/adapters/generated-marker.js +44 -0
- package/dist/adapters/generated-marker.js.map +1 -0
- package/dist/adapters/loader.d.ts +21 -0
- package/dist/adapters/loader.js +185 -92
- package/dist/adapters/loader.js.map +1 -1
- package/dist/adapters/opencode/index.d.ts +15 -7
- package/dist/adapters/opencode/index.js +34 -6
- package/dist/adapters/opencode/index.js.map +1 -1
- package/dist/adapters/prune.d.ts +45 -0
- package/dist/adapters/prune.js +145 -0
- package/dist/adapters/prune.js.map +1 -0
- package/dist/adapters/run-generate.d.ts +38 -0
- package/dist/adapters/run-generate.js +73 -0
- package/dist/adapters/run-generate.js.map +1 -0
- package/dist/adapters/types.d.ts +27 -7
- package/dist/cli.js +235 -121
- package/dist/cli.js.map +1 -1
- package/dist/commands/path-branch.d.ts +2 -0
- package/dist/commands/path-branch.js +135 -35
- package/dist/commands/path-branch.js.map +1 -1
- package/dist/commands/path-query.js +5 -1
- package/dist/commands/path-query.js.map +1 -1
- package/dist/commands/path-restore.js +7 -0
- package/dist/commands/path-restore.js.map +1 -1
- package/dist/commands/path-visualization.js +5 -4
- package/dist/commands/path-visualization.js.map +1 -1
- package/dist/commands/render.d.ts +8 -0
- package/dist/commands/render.js +79 -3
- package/dist/commands/render.js.map +1 -1
- package/dist/commands/shared.d.ts +6 -1
- package/dist/commands/shared.js +14 -2
- package/dist/commands/shared.js.map +1 -1
- package/dist/core/atomic-write.d.ts +46 -0
- package/dist/core/atomic-write.js +63 -0
- package/dist/core/atomic-write.js.map +1 -0
- package/dist/core/brainstorm-path.d.ts +27 -0
- package/dist/core/brainstorm-path.js +80 -3
- package/dist/core/brainstorm-path.js.map +1 -1
- package/dist/core/cli-args.d.ts +5 -0
- package/dist/core/cli-args.js +27 -0
- package/dist/core/cli-args.js.map +1 -0
- package/dist/core/diagram-inserter.js +3 -1
- package/dist/core/diagram-inserter.js.map +1 -1
- package/dist/core/diagram-renderer.d.ts +29 -0
- package/dist/core/diagram-renderer.js +255 -67
- package/dist/core/diagram-renderer.js.map +1 -1
- package/dist/core/diagram-types.d.ts +32 -1
- package/dist/core/diagram-types.js +36 -1
- package/dist/core/diagram-types.js.map +1 -1
- package/dist/core/init-checker.d.ts +10 -2
- package/dist/core/init-checker.js +92 -57
- package/dist/core/init-checker.js.map +1 -1
- package/dist/core/jsonc.d.ts +18 -0
- package/dist/core/jsonc.js +64 -0
- package/dist/core/jsonc.js.map +1 -0
- package/dist/core/landscape-schema.js +43 -4
- package/dist/core/landscape-schema.js.map +1 -1
- package/dist/core/path-constants.d.ts +35 -0
- package/dist/core/path-constants.js +36 -0
- package/dist/core/path-constants.js.map +1 -0
- package/dist/core/path-graph.d.ts +10 -0
- package/dist/core/path-graph.js +68 -21
- package/dist/core/path-graph.js.map +1 -1
- package/dist/core/path-persistence.js +11 -8
- package/dist/core/path-persistence.js.map +1 -1
- package/dist/core/path-safety.d.ts +40 -0
- package/dist/core/path-safety.js +103 -0
- package/dist/core/path-safety.js.map +1 -0
- package/dist/core/router.d.ts +1 -0
- package/dist/core/router.js +20 -12
- package/dist/core/router.js.map +1 -1
- package/dist/core/state-manager.d.ts +1 -0
- package/dist/core/state-manager.js +28 -22
- package/dist/core/state-manager.js.map +1 -1
- package/dist/core/state.d.ts +15 -3
- package/dist/core/state.js +25 -18
- package/dist/core/state.js.map +1 -1
- package/dist/core/threshold-config.d.ts +7 -1
- package/dist/core/threshold-config.js +14 -6
- package/dist/core/threshold-config.js.map +1 -1
- package/dist/core/validator.js +4 -1
- package/dist/core/validator.js.map +1 -1
- package/dist/core/workflow-stages.d.ts +61 -0
- package/dist/core/workflow-stages.js +60 -0
- package/dist/core/workflow-stages.js.map +1 -0
- package/dist/core/workflow.d.ts +4 -13
- package/dist/core/workflow.js +15 -32
- package/dist/core/workflow.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/skills/jurisdiction.d.ts +14 -0
- package/dist/skills/jurisdiction.js +16 -0
- package/dist/skills/jurisdiction.js.map +1 -1
- package/dist/tui/app.d.ts +8 -0
- package/dist/tui/app.js +136 -93
- package/dist/tui/app.js.map +1 -1
- package/opencode.jsonc.example +116 -0
- package/package.json +18 -5
- package/plugin.jsonc +1 -1
- package/src/adapters/claude/index.ts +119 -37
- package/src/adapters/claude/mcp-config.ts +14 -0
- package/src/adapters/codex/index.ts +98 -25
- package/src/adapters/codex/marketplace.ts +37 -0
- package/src/adapters/generate.ts +17 -3
- package/src/adapters/generated-marker.ts +48 -0
- package/src/adapters/loader.ts +186 -94
- package/src/adapters/opencode/index.ts +36 -7
- package/src/adapters/prune.ts +162 -0
- package/src/adapters/run-generate.ts +111 -0
- package/src/adapters/types.ts +29 -2
- package/src/agents/archimedes.md +43 -24
- package/src/agents/patent-diagram-generator.md +7 -5
- package/src/agents/patent-init-sentinel.md +10 -1
- package/src/agents/patent-path-recorder.md +14 -5
- package/src/agents/patent-product-compliance-analyst.md +7 -0
- package/src/agents/patent-security-engineer.md +7 -0
- package/src/cli.ts +229 -123
- package/src/commands/archimedes.md +4 -1
- package/src/commands/path-branch.ts +150 -38
- package/src/commands/path-query.ts +5 -1
- package/src/commands/path-restore.ts +9 -0
- package/src/commands/path-visualization.ts +5 -4
- package/src/commands/render.ts +81 -3
- package/src/commands/shared.ts +14 -2
- package/src/core/atomic-write.ts +85 -0
- package/src/core/brainstorm-path.ts +114 -8
- package/src/core/cli-args.ts +27 -0
- package/src/core/diagram-inserter.ts +3 -1
- package/src/core/diagram-renderer.ts +292 -68
- package/src/core/diagram-types.ts +51 -2
- package/src/core/init-checker.ts +119 -54
- package/src/core/jsonc.ts +60 -0
- package/src/core/landscape-schema.ts +50 -4
- package/src/core/path-constants.ts +41 -0
- package/src/core/path-graph.ts +68 -24
- package/src/core/path-persistence.ts +15 -8
- package/src/core/path-safety.ts +107 -0
- package/src/core/router.ts +22 -7
- package/src/core/state-manager.ts +30 -24
- package/src/core/state.ts +54 -22
- package/src/core/threshold-config.ts +21 -7
- package/src/core/validator.ts +5 -1
- package/src/core/workflow-stages.ts +71 -0
- package/src/core/workflow.ts +23 -34
- package/src/index.ts +1 -1
- package/src/skills/jurisdiction/SKILL.md +131 -52
- package/src/skills/jurisdiction.ts +19 -0
- package/src/skills/prior-art-search/SKILL.md +4 -1
- package/src/tui/app.tsx +60 -14
package/README.md
CHANGED
|
@@ -1,392 +1,119 @@
|
|
|
1
|
+
# oh-my-patent
|
|
2
|
+
|
|
1
3
|
[](https://www.npmjs.com/package/oh-my-patent)
|
|
2
4
|
[](https://www.npmjs.com/package/oh-my-patent)
|
|
3
|
-
[](
|
|
5
|
+
[](./LICENSE)
|
|
4
6
|
[](https://www.typescriptlang.org/)
|
|
5
|
-
[](https://github.com/illusionaireal/oh-my-patent)
|
|
6
7
|
[](./README.zh-CN.md)
|
|
7
8
|
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Ⅰ.  WHY PATENT WRITING HURTS
|
|
55
|
-
|
|
56
|
-
*What you suffer through — 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
|
-
## Ⅱ.  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
|
-
## Ⅲ.  THE WORKFLOW
|
|
83
|
-
|
|
84
|
-
*From idea to disclosure — 10 stages, 1 state machine.*
|
|
85
|
-
|
|
86
|
-

|
|
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
|
-
## Ⅳ.  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 — 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
|
-

|
|
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
|
-

|
|
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
|
-

|
|
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
|
-
|
|
44
|
+
<details>
|
|
45
|
+
<summary>For AI assistants helping users install this</summary>
|
|
191
46
|
|
|
192
|
-
|
|
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>`** — fork from any historical node
|
|
197
|
-
- **`path restore --node <id> --innovation <id>`** — revive an abandoned innovation
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Ⅴ.  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
|
-
|
|
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
|
-
|
|
236
|
-
- Exact-file removal only — precise paths, never traverses directories
|
|
237
|
-
- Your custom edits to configs are safe — we only delete what we generated
|
|
238
|
-
- Empty directory cleanup after removing all generated files
|
|
57
|
+
</details>
|
|
239
58
|
|
|
240
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
73
|
+
## From idea to disclosure
|
|
251
74
|
|
|
252
|
-
|
|
253
|
-
oh-my-patent <domain> <subcommand> [options]
|
|
254
|
-
```
|
|
75
|
+

|
|
255
76
|
|
|
256
|
-
|
|
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
|
-
|
|
|
80
|
+
| Step | Workflow stages |
|
|
259
81
|
|---|---|
|
|
260
|
-
|
|
|
261
|
-
|
|
|
262
|
-
|
|
|
263
|
-
|
|
|
264
|
-
|
|
|
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
|
-
|
|
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
|
-
|
|
91
|
+
## How the team works
|
|
281
92
|
|
|
282
|
-
|
|
|
93
|
+
| Pattern | Purpose |
|
|
283
94
|
|---|---|
|
|
284
|
-
|
|
|
285
|
-
|
|
|
286
|
-
|
|
|
287
|
-
|
|
|
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
|
-
|
|
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
|
-
|
|
104
|
+
## Documentation
|
|
296
105
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
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
|
-
## Ⅷ.  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  ·  Crafted by [illusionaireal](https://github.com/illusionaireal)*<br>
|
|
388
|
-
*With thanks to the [LINUX DO Community](https://linux.do/)*
|
|
389
|
-
|
|
390
|
-
— 1 —
|
|
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/)
|