helixevo 0.4.0 → 0.5.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/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to HelixEvo are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.5.0] - 2026-03-24
8
+
9
+ ### Added
10
+ - New `helixevo ontology` command for ontology frontier status, refresh, review, and deprecation control
11
+ - New `~/.helix/ontology/` persistence model with kernel snapshot, frontier concepts, approved extensions, review decisions, and native ontology change events
12
+ - New `/ontology` dashboard route and `/api/ontology` operator control surface for governed semantic review
13
+
14
+ ### Changed
15
+ - Overview semantic-backbone summaries now expose hybrid native + derived ontology state instead of only compatibility-era framing
16
+ - Dashboard Guide, Commands, and README now document ontology frontier control alongside co-evolution and topology control
17
+
18
+ ## [0.4.1] - 2026-03-24
19
+
20
+ ### Changed
21
+ - Rebuilt the dashboard Guide into a clearer operator-and-theory manual with a brain-stack explanation, end-to-end adaptation loop, dashboard surface map, grouped memory model, explicit maturity/safety boundaries, glossary, and current command coverage including `project-setup` and `topology`
22
+
7
23
  ## [0.4.0] - 2026-03-24
8
24
 
9
25
  ### Added
package/README.md CHANGED
@@ -89,6 +89,7 @@ helixevo dashboard
89
89
  | `helixevo generalize` | Promote cross-project patterns ↑ |
90
90
  | `helixevo specialize --project <name>` | Create project-specific skills ↓ |
91
91
  | `helixevo graph` | View skill network in terminal |
92
+ | `helixevo ontology` | Refresh, review, and govern ontology frontier concepts |
92
93
  | `helixevo topology` | Prepare, apply, roll back, and inspect reviewed topology execution |
93
94
  | `helixevo research` | Proactive web research for skill improvement |
94
95
  | `helixevo dashboard [--port <n>]` | Open web dashboard, preferring localhost:3847 and falling forward if occupied |
@@ -109,6 +110,10 @@ helixevo graph --mermaid # Open in browser as Mermaid diagram
109
110
  helixevo graph --obsidian ~/vault # Sync to Obsidian vault
110
111
  helixevo graph --rebuild # Re-infer relationships (LLM call)
111
112
  helixevo graph --optimize # Detect structural candidates + refresh topology review queue
113
+ helixevo ontology --status # Show ontology kernel / frontier / extension state
114
+ helixevo ontology --refresh # Derive frontier concepts from recurring evidence
115
+ helixevo ontology --review <id> --decision promote
116
+ # Promote a reviewed frontier concept into approved extensions
112
117
  helixevo topology --status # Show reviewed topology execution state
113
118
  helixevo topology --prepare <id> # Prepare an accepted topology candidate
114
119
  helixevo topology --apply <id> # Apply a safe prepared topology plan
@@ -144,7 +149,13 @@ All data is stored in `~/.helix/`:
144
149
  ├── topology-apply-plans.json # Prepared reviewed topology plans
145
150
  ├── topology-executions.jsonl # Prepared/applied/rolled-back execution ledger
146
151
  ├── topology-artifacts.jsonl # Evidence artifacts for reviewed structural execution
147
- ├── evolution-artifacts.jsonl # Evolution evidence artifacts per proposal/iteration
152
+ ├── evolution-artifacts.jsonl # Evolution + ontology-review evidence artifacts
153
+ ├── ontology/
154
+ │ ├── kernel.json # Materialized ontology kernel snapshot
155
+ │ ├── extensions.json # Approved ontology extensions
156
+ │ ├── frontier.json # Provisional frontier concepts awaiting review
157
+ │ ├── reviews.jsonl # Ontology review decisions
158
+ │ └── change-log.jsonl # Native ontology change events
148
159
  ├── frontier.json # Pareto frontier (top-k configurations)
149
160
  ├── evolution-history.json # All evolution runs + proposals
150
161
  ├── skill-tests.jsonl # Regression test cases
@@ -171,9 +182,10 @@ helixevo dashboard --port 3900
171
182
  ```
172
183
 
173
184
  **Tabs:**
174
- - **Overview** — Premium control cockpit with frontier signals, brain foundation, semantic backbone, pressure counts, topology review visibility, and prepared/applied structural state
185
+ - **Overview** — Premium control cockpit with frontier signals, brain foundation, semantic backbone, pressure counts, ontology frontier visibility, topology review visibility, and prepared/applied structural state
175
186
  - **Skill Network** — Interactive graph, premium inspector, co-evolution routing signals, and topology review/execution handoff links
176
187
  - **Co-Evolution** — Operator cockpit for routed pressure response, governance mode visibility, promotion queues, transfer evidence, and topology handoff
188
+ - **Ontology** — Semantic control surface for kernel visibility, frontier concept review, approved ontology extensions, and native ontology change events
177
189
  - **Topology** — Governance steering plus a persistent operator pipeline for review → prepare → apply → rollback across merge / split / promote / rewire / consolidate candidates
178
190
  - **Projects** — Project intake studio, live project analysis, gap routing, per-project pressure hotspots, and promotion feeders
179
191
  - **Evolution** — Timeline of evolution runs with judge scores, artifact provenance, and activation-aware context
@@ -212,6 +224,7 @@ Failures → Cluster → Propose → Replay → Multi-Judge → Regression → C
212
224
 
213
225
  **Brain foundation:**
214
226
  - **Ontology** defines the stable semantic kernel for skills, projects, tasks, capabilities, artifacts, and mutations.
227
+ - **Ontology frontier and extensions** let new semantic concepts emerge as provisional hypotheses, pass explicit review, and become approved extensions without free-form drift.
215
228
  - **Activation traces** record which skills and gaps were active during capture and project analysis.
216
229
  - **Pressure signals** turn failures and project gaps into explicit adaptation demand.
217
230
  - **Pressure interventions** record how HelixEvo responded across research, specialize, evolve, generalize, and manual-review lanes.
@@ -0,0 +1,89 @@
1
+ import { NextResponse } from 'next/server'
2
+ import { spawn } from 'child_process'
3
+ import { existsSync } from 'fs'
4
+ import { join } from 'path'
5
+ import { loadOntologyControlSummary } from '@/lib/data'
6
+
7
+ export const dynamic = 'force-dynamic'
8
+
9
+ function resolveOntologyRunner(): { cmd: string; argsPrefix: string[] } {
10
+ const candidates = [
11
+ join(process.cwd(), '..', 'dist', 'cli.js'),
12
+ join(process.cwd(), 'dist', 'cli.js'),
13
+ ]
14
+
15
+ for (const candidate of candidates) {
16
+ if (existsSync(candidate)) return { cmd: process.execPath, argsPrefix: [candidate] }
17
+ }
18
+
19
+ return { cmd: 'helixevo', argsPrefix: [] }
20
+ }
21
+
22
+ function runOntologyCommand(args: string[]): Promise<{ success: boolean; output: string }> {
23
+ return new Promise((resolve) => {
24
+ const runner = resolveOntologyRunner()
25
+ const child = spawn(runner.cmd, [...runner.argsPrefix, 'ontology', ...args], {
26
+ env: { ...process.env },
27
+ stdio: ['ignore', 'pipe', 'pipe'],
28
+ })
29
+
30
+ let output = ''
31
+ child.stdout?.on('data', (chunk: Buffer) => {
32
+ output += chunk.toString()
33
+ })
34
+ child.stderr?.on('data', (chunk: Buffer) => {
35
+ output += chunk.toString()
36
+ })
37
+ child.on('close', (code) => {
38
+ resolve({ success: code === 0, output })
39
+ })
40
+ child.on('error', (err) => {
41
+ resolve({ success: false, output: `Error: ${err.message}` })
42
+ })
43
+ })
44
+ }
45
+
46
+ export async function GET() {
47
+ return NextResponse.json(loadOntologyControlSummary())
48
+ }
49
+
50
+ export async function POST(request: Request) {
51
+ const body = await request.json() as {
52
+ action?: 'refresh' | 'review' | 'deprecate'
53
+ conceptId?: string
54
+ decision?: 'promote' | 'reject' | 'defer'
55
+ rationale?: string
56
+ }
57
+
58
+ if (!body.action) {
59
+ return NextResponse.json({ success: false, error: 'action is required' }, { status: 400 })
60
+ }
61
+
62
+ let args: string[] = []
63
+ if (body.action === 'refresh') {
64
+ args = ['--refresh']
65
+ } else if (body.action === 'review') {
66
+ if (!body.conceptId || !body.decision) {
67
+ return NextResponse.json({ success: false, error: 'conceptId and decision are required for review' }, { status: 400 })
68
+ }
69
+ args = ['--review', body.conceptId, '--decision', body.decision]
70
+ if (body.rationale?.trim()) args.push('--rationale', body.rationale.trim())
71
+ } else if (body.action === 'deprecate') {
72
+ if (!body.conceptId) {
73
+ return NextResponse.json({ success: false, error: 'conceptId is required for deprecate' }, { status: 400 })
74
+ }
75
+ args = ['--deprecate', body.conceptId]
76
+ if (body.rationale?.trim()) args.push('--rationale', body.rationale.trim())
77
+ }
78
+
79
+ const result = await runOntologyCommand(args)
80
+ if (!result.success) {
81
+ return NextResponse.json({ success: false, error: result.output || 'Ontology command failed' }, { status: 500 })
82
+ }
83
+
84
+ return NextResponse.json({
85
+ success: true,
86
+ output: result.output,
87
+ dashboard: loadOntologyControlSummary(),
88
+ })
89
+ }
@@ -103,6 +103,14 @@ type Summary = {
103
103
 
104
104
  interface Props {
105
105
  summary: Summary
106
+ ontology: {
107
+ ontologyLoop: {
108
+ frontier: number
109
+ reviewOpen: number
110
+ extensions: number
111
+ changeEvents: number
112
+ }
113
+ }
106
114
  }
107
115
 
108
116
  function consoleTone(state: RunState): 'neutral' | 'green' | 'red' | 'yellow' {
@@ -145,7 +153,7 @@ function formatMode(mode: Summary['governance']['activeMode']) {
145
153
  return mode.split('-').join(' ')
146
154
  }
147
155
 
148
- export default function CoEvolutionClient({ summary }: Props) {
156
+ export default function CoEvolutionClient({ summary, ontology }: Props) {
149
157
  const [runState, setRunState] = useState<RunState>('idle')
150
158
  const [activeCommand, setActiveCommand] = useState<CommandName | null>(null)
151
159
  const [output, setOutput] = useState('')
@@ -246,6 +254,7 @@ export default function CoEvolutionClient({ summary }: Props) {
246
254
  { label: `${summary.pressureLifecycle.open} open`, tone: summary.pressureLifecycle.open > 0 ? 'yellow' : 'green' },
247
255
  { label: `${summary.pressureMotifs.promotionReady} promotion-ready motifs`, tone: summary.pressureMotifs.promotionReady > 0 ? 'purple' : 'neutral' },
248
256
  { label: `${summary.topologyReviews.open} topology reviews`, tone: summary.topologyReviews.open > 0 ? 'yellow' : 'green' },
257
+ { label: `${ontology.ontologyLoop.frontier} ontology frontier`, tone: ontology.ontologyLoop.reviewOpen > 0 ? 'blue' : 'neutral' },
249
258
  { label: `${summary.recentTransfers.length} recent transfers`, tone: summary.recentTransfers.length > 0 ? 'green' : 'neutral' },
250
259
  { label: formatMode(summary.governance.activeMode), tone: toneForMode(summary.governance.activeMode) },
251
260
  ]}
@@ -264,6 +273,7 @@ export default function CoEvolutionClient({ summary }: Props) {
264
273
  <button onClick={() => handleRun('research')} disabled={runState === 'running'} className="badge badge-blue" style={{ border: 'none', cursor: 'pointer' }}>Run research</button>
265
274
  <button onClick={() => handleRun('evolve')} disabled={runState === 'running'} className="badge badge-green" style={{ border: 'none', cursor: 'pointer' }}>Run evolve</button>
266
275
  <button onClick={() => handleRun('generalize')} disabled={runState === 'running'} className="badge badge-purple" style={{ border: 'none', cursor: 'pointer' }}>Run generalize</button>
276
+ <Link href="/ontology" className="badge badge-gray">Open ontology</Link>
267
277
  <Link href="/topology" className="badge badge-gray">Open topology</Link>
268
278
  </div>
269
279
  </div>
@@ -1,9 +1,10 @@
1
- import { loadCoEvolutionSummary } from '@/lib/data'
1
+ import { loadCoEvolutionSummary, loadOntologySummary } from '@/lib/data'
2
2
  import CoEvolutionClient from './client'
3
3
 
4
4
  export const dynamic = 'force-dynamic'
5
5
 
6
6
  export default function CoEvolutionPage() {
7
7
  const summary = loadCoEvolutionSummary()
8
- return <CoEvolutionClient summary={summary} />
8
+ const ontology = loadOntologySummary()
9
+ return <CoEvolutionClient summary={summary} ontology={ontology} />
9
10
  }
@@ -131,6 +131,29 @@ const COMMANDS: CommandInfo[] = [
131
131
  needsLLM: true,
132
132
  runnable: { command: 'graph-rebuild', label: 'Rebuild Graph', icon: 'M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1', color: 'var(--purple)' },
133
133
  },
134
+ {
135
+ name: 'ontology',
136
+ description: 'Govern the ontology frontier explicitly. Refresh provisional concepts from recurring evidence, review them with promote/reject/defer decisions, and deprecate approved extensions without allowing free-form semantic drift.',
137
+ usage: 'helixevo ontology [options]',
138
+ examples: [
139
+ { cmd: 'helixevo ontology --status', desc: 'Show kernel, frontier, extension, and change-log counts' },
140
+ { cmd: 'helixevo ontology --refresh', desc: 'Derive frontier concepts from recurring capability, pressure, and topology evidence' },
141
+ { cmd: 'helixevo ontology --review ontology_capability_ui --decision promote', desc: 'Promote a frontier concept into approved ontology extensions' },
142
+ { cmd: 'helixevo ontology --deprecate ontology_capability_ui', desc: 'Deprecate an approved ontology extension' },
143
+ ],
144
+ options: [
145
+ { flag: '--status', desc: 'Show ontology kernel, frontier, extension, and review state' },
146
+ { flag: '--refresh', desc: 'Refresh frontier concepts from recurring evidence' },
147
+ { flag: '--review <conceptId>', desc: 'Review a frontier concept' },
148
+ { flag: '--decision <promote|reject|defer>', desc: 'Decision for --review' },
149
+ { flag: '--rationale <text>', desc: 'Optional review or deprecate rationale' },
150
+ { flag: '--deprecate <conceptId>', desc: 'Deprecate an approved ontology extension' },
151
+ { flag: '--verbose', desc: 'Show detailed frontier concepts, extensions, and change events' },
152
+ ],
153
+ category: 'network',
154
+ needsLLM: false,
155
+ note: 'Milestone 8 keeps ontology growth governed: concepts begin in the frontier, require explicit review, and only then become approved extensions.',
156
+ },
134
157
  {
135
158
  name: 'topology',
136
159
  description: 'Move reviewed topology candidates through an explicit structural execution pipeline. Prepare accepted candidates, apply only the safe subset, inspect snapshots and artifacts, and roll back applied structural overrides when needed.',