@titan-design/brain 0.6.1 → 0.7.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.
- package/README.md +66 -44
- package/dist/{brain-service-4ETWBOIO.js → brain-service-TYFNTBT6.js} +2 -2
- package/dist/{chunk-KSJZ7CMP.js → chunk-4GDSQB2E.js} +1 -1
- package/dist/{chunk-HNC656YT.js → chunk-IESQY2UZ.js} +7 -5
- package/dist/{chunk-AJKFX2TM.js → chunk-LLAHWRO4.js} +2 -1
- package/dist/cli.js +2472 -223
- package/dist/{command-resolution-MO7LSFOT.js → command-resolution-EJ6LTC2Z.js} +1 -1
- package/dist/{search-AKSAQJOR.js → search-NPTRJV4W.js} +2 -2
- package/dist/templates/brainstorm-design.md +30 -0
- package/dist/templates/brainstorm-explore.md +30 -0
- package/dist/templates/brainstorm-interview.md +26 -0
- package/dist/templates/brainstorm-propose.md +28 -0
- package/dist/templates/brainstorm-write-doc.md +30 -0
- package/dist/templates/implementation-compact.md +46 -0
- package/dist/templates/implementation.md +92 -0
- package/dist/templates/ops.md +18 -0
- package/dist/templates/planning-critic.md +123 -0
- package/dist/templates/planning-decompose.md +221 -0
- package/dist/templates/planning-design.md +162 -0
- package/dist/templates/planning-interview.md +74 -0
- package/dist/templates/planning-research.md +114 -0
- package/dist/templates/planning-spectests.md +84 -0
- package/dist/templates/review-agent.md +155 -0
- package/dist/templates/review-fixup.md +79 -0
- package/dist/templates/validation-gates.md +84 -0
- package/dist/templates/writing-plans.md +48 -0
- package/package.json +11 -3
- package/skill/SKILL.md +53 -25
package/README.md
CHANGED
|
@@ -46,53 +46,53 @@ See [PM Quick Start](docs/pm-module/quickstart.md) for the full 5-minute guide.
|
|
|
46
46
|
|
|
47
47
|
### Core
|
|
48
48
|
|
|
49
|
-
| Command
|
|
50
|
-
|
|
51
|
-
| `brain init`
|
|
52
|
-
| `brain index`
|
|
53
|
-
| `brain search "query"`
|
|
54
|
-
| `brain add <file>`
|
|
55
|
-
| `brain quick "text"`
|
|
56
|
-
| `brain inbox`
|
|
57
|
-
| `brain import <paths>`
|
|
58
|
-
| `brain ingest`
|
|
59
|
-
| `brain feed`
|
|
60
|
-
| `brain extract`
|
|
61
|
-
| `brain memories`
|
|
62
|
-
| `brain context <id>`
|
|
63
|
-
| `brain lineage <id>`
|
|
64
|
-
| `brain profile`
|
|
65
|
-
| `brain tidy`
|
|
66
|
-
| `brain doctor`
|
|
67
|
-
| `brain install-hooks`
|
|
68
|
-
| `brain status`
|
|
69
|
-
| `brain stale`
|
|
70
|
-
| `brain graph <id>`
|
|
71
|
-
| `brain template <type>` | Output frontmatter template
|
|
72
|
-
| `brain archive`
|
|
73
|
-
| `brain config`
|
|
49
|
+
| Command | Description |
|
|
50
|
+
| ----------------------- | --------------------------------------------------------------- |
|
|
51
|
+
| `brain init` | Initialize workspace and database |
|
|
52
|
+
| `brain index` | Index all markdown notes |
|
|
53
|
+
| `brain search "query"` | Hybrid BM25 + vector search |
|
|
54
|
+
| `brain add <file>` | Add a note from file or stdin |
|
|
55
|
+
| `brain quick "text"` | Zero-friction capture to inbox |
|
|
56
|
+
| `brain inbox` | View/manage inbox items |
|
|
57
|
+
| `brain import <paths>` | Smart import with three-tier extraction (`--dry-run`, `--tier`) |
|
|
58
|
+
| `brain ingest` | Bulk-import files to inbox |
|
|
59
|
+
| `brain feed` | Manage RSS feed subscriptions |
|
|
60
|
+
| `brain extract` | Extract memories from notes (Ollama) |
|
|
61
|
+
| `brain memories` | List, history, and stats for memories |
|
|
62
|
+
| `brain context <id>` | Show context for a note (relations + memories) |
|
|
63
|
+
| `brain lineage <id>` | Show memory version lineage |
|
|
64
|
+
| `brain profile` | Generate agent context profile |
|
|
65
|
+
| `brain tidy` | LLM-powered note cleanup suggestions |
|
|
66
|
+
| `brain doctor` | System health checks (`--fix` for auto-repair) |
|
|
67
|
+
| `brain install-hooks` | Set up launchd/systemd scheduled processing |
|
|
68
|
+
| `brain status` | Database stats |
|
|
69
|
+
| `brain stale` | Notes needing review |
|
|
70
|
+
| `brain graph <id>` | Show note relations |
|
|
71
|
+
| `brain template <type>` | Output frontmatter template |
|
|
72
|
+
| `brain archive` | Archive expired notes |
|
|
73
|
+
| `brain config` | View/set configuration |
|
|
74
74
|
|
|
75
75
|
### Project Management (`brain pm`)
|
|
76
76
|
|
|
77
|
-
| Command
|
|
78
|
-
|
|
79
|
-
| `brain pm init <name> --prefix <P>` | Initialize a new project
|
|
80
|
-
| `brain pm use <prefix>`
|
|
81
|
-
| `brain pm list`
|
|
82
|
-
| `brain pm status [prefix]`
|
|
83
|
-
| `brain pm workstream add <name>`
|
|
84
|
-
| `brain pm task add <name>`
|
|
85
|
-
| `brain pm task list`
|
|
86
|
-
| `brain pm task done <id>`
|
|
87
|
-
| `brain pm next`
|
|
88
|
-
| `brain pm waves`
|
|
89
|
-
| `brain pm dispatch <id>`
|
|
90
|
-
| `brain pm complete <id>`
|
|
91
|
-
| `brain pm briefing`
|
|
92
|
-
| `brain pm audit summary`
|
|
93
|
-
| `brain pm check [--deep]`
|
|
94
|
-
| `brain pm setup`
|
|
95
|
-
| `brain pm install-hooks`
|
|
77
|
+
| Command | Description |
|
|
78
|
+
| ----------------------------------- | --------------------------------------------------------- |
|
|
79
|
+
| `brain pm init <name> --prefix <P>` | Initialize a new project |
|
|
80
|
+
| `brain pm use <prefix>` | Set active project context |
|
|
81
|
+
| `brain pm list` | List all projects |
|
|
82
|
+
| `brain pm status [prefix]` | Show project status |
|
|
83
|
+
| `brain pm workstream add <name>` | Add a workstream |
|
|
84
|
+
| `brain pm task add <name>` | Create a task |
|
|
85
|
+
| `brain pm task list` | List tasks (filterable by status, workstream) |
|
|
86
|
+
| `brain pm task done <id>` | Mark task done |
|
|
87
|
+
| `brain pm next` | Show eligible tasks (all deps satisfied) |
|
|
88
|
+
| `brain pm waves` | Topological wave grouping of remaining tasks |
|
|
89
|
+
| `brain pm dispatch <id>` | Assemble context bundle for a task |
|
|
90
|
+
| `brain pm complete <id>` | Mark done, run impact analysis |
|
|
91
|
+
| `brain pm briefing` | Session briefing with project state overview |
|
|
92
|
+
| `brain pm audit summary` | Activity log, cost tracking |
|
|
93
|
+
| `brain pm check [--deep]` | Consistency check (structural + semantic analysis) |
|
|
94
|
+
| `brain pm setup` | Configure PM module (paths, hooks) |
|
|
95
|
+
| `brain pm install-hooks` | Install PM hooks and skills (orchestrator + sanity-check) |
|
|
96
96
|
|
|
97
97
|
## Architecture
|
|
98
98
|
|
|
@@ -148,6 +148,28 @@ Brain indexes markdown files with YAML frontmatter into a SQLite database. It co
|
|
|
148
148
|
- `slow` — permanent knowledge (decisions, patterns, research) with review intervals
|
|
149
149
|
- `fast` — ephemeral (meetings, session logs) with expiry dates
|
|
150
150
|
|
|
151
|
+
### Knowledge Graph
|
|
152
|
+
|
|
153
|
+
Link related notes and traverse connections:
|
|
154
|
+
|
|
155
|
+
1. Add `related` field to YAML frontmatter:
|
|
156
|
+
```yaml
|
|
157
|
+
related:
|
|
158
|
+
- database-migration-patterns
|
|
159
|
+
- service-architecture-overview
|
|
160
|
+
```
|
|
161
|
+
2. Re-index after adding relations: `brain index`
|
|
162
|
+
3. Traverse the graph:
|
|
163
|
+
```bash
|
|
164
|
+
brain graph <note-id> # Show direct relations
|
|
165
|
+
brain graph <note-id> --depth 2 # Show 2-hop connections
|
|
166
|
+
brain graph <note-id> --json # Machine-readable output
|
|
167
|
+
```
|
|
168
|
+
4. Use `--expand` in search to include graph-connected notes:
|
|
169
|
+
```bash
|
|
170
|
+
brain search "query" --expand
|
|
171
|
+
```
|
|
172
|
+
|
|
151
173
|
## Testing
|
|
152
174
|
|
|
153
175
|
```bash
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-BDNH2E2O.js";
|
|
4
4
|
import {
|
|
5
5
|
addFrontmatterField
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LLAHWRO4.js";
|
|
7
7
|
|
|
8
8
|
// src/services/config.ts
|
|
9
9
|
import { readFileSync, writeFileSync, mkdirSync, existsSync, copyFileSync } from "fs";
|
|
@@ -1667,9 +1667,7 @@ var ModuleRegistry = class {
|
|
|
1667
1667
|
// --- Import Hints ---
|
|
1668
1668
|
/** Returns all note types that have importHints configured */
|
|
1669
1669
|
getImportableNoteTypes() {
|
|
1670
|
-
return this.getAllNoteTypes().filter(
|
|
1671
|
-
({ noteType }) => noteType.importHints
|
|
1672
|
-
);
|
|
1670
|
+
return this.getAllNoteTypes().filter(({ noteType }) => noteType.importHints);
|
|
1673
1671
|
}
|
|
1674
1672
|
/** Match CSV/table column headers against registered tableColumnAliases.
|
|
1675
1673
|
* Returns the best-matching note type if 2+ columns match, else null. */
|
|
@@ -1694,7 +1692,11 @@ var ModuleRegistry = class {
|
|
|
1694
1692
|
bestMatch = { module, noteType: noteType.name, columnMapping: mapping, hits };
|
|
1695
1693
|
}
|
|
1696
1694
|
}
|
|
1697
|
-
return bestMatch ? {
|
|
1695
|
+
return bestMatch ? {
|
|
1696
|
+
module: bestMatch.module,
|
|
1697
|
+
noteType: bestMatch.noteType,
|
|
1698
|
+
columnMapping: bestMatch.columnMapping
|
|
1699
|
+
} : null;
|
|
1698
1700
|
}
|
|
1699
1701
|
/** Returns archetype texts for embedding-based classification */
|
|
1700
1702
|
getArchetypeTexts() {
|