pantheon-opencode 2.0.0-rc.1 → 2.0.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/AGENTS.global.md +2 -2
- package/AGENTS.md +8 -8
- package/CHANGELOG.md +54 -0
- package/README.md +2 -0
- package/README.pt-BR.md +2 -0
- package/bin/pantheon-init.mjs +13 -0
- package/commands/pantheon-audit.md +1 -1
- package/commands/pantheon-deepwork.md +1 -1
- package/commands/pantheon-optimize.md +41 -63
- package/package.json +4 -3
- package/plugin.json +1 -1
- package/prompts/optimize-database.prompt.md +5 -5
- package/prompts/plan-architecture.prompt.md +6 -6
- package/pyproject.toml +1 -1
- package/scripts/build-agents-md.mjs +10 -10
- package/scripts/build-plugin.mjs +26 -0
- package/scripts/install/opencode-version.mjs +17 -5
- package/scripts/install/opencode.mjs +8 -1
- package/scripts/optimize.mjs +322 -0
- package/scripts/prune.mjs +105 -14
- package/scripts/update.mjs +20 -15
- package/skills-lock.json +11 -11
- package/src/agents/aphrodite.md +15 -14
- package/src/agents/apollo.md +2 -1
- package/src/agents/athena.md +5 -5
- package/src/agents/demeter.md +2 -0
- package/src/agents/hephaestus.md +1 -0
- package/src/agents/hermes.md +19 -95
- package/src/agents/iris.md +3 -0
- package/src/agents/nyx.md +1 -0
- package/src/agents/prometheus.md +2 -0
- package/src/agents/talos.md +3 -0
- package/src/agents/themis.md +91 -87
- package/src/agents/zeus.md +41 -266
- package/src/instructions/agent-return-format.instructions.md +1 -1
- package/src/instructions/memory-protocol.instructions.md +1 -1
- package/src/instructions/zeus-anti-stall.instructions.md +3 -3
- package/src/instructions/zeus-communication-rules.instructions.md +1 -1
- package/src/instructions/zeus-council-synthesis.instructions.md +2 -2
- package/src/instructions/zeus-timeout-retry.instructions.md +10 -10
- package/src/pantheon/model-command.ts +12 -12
- package/src/pantheon/tools.ts +4 -0
- package/src/pantheon/tui-version-check.ts +1 -1
- package/src/pantheon/update-notifier.ts +13 -8
- package/src/pantheon/vision.ts +20 -20
- package/src/plugin/index.js +14594 -0
- package/src/plugins/tui/dist/tui.d.ts +3 -3
- package/src/plugins/tui/dist/tui.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui.js +923 -340
- package/src/plugins/tui/dist/tui.js.map +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/autonomy-state.ts +27 -15
- package/src/plugins/tui/src/index.tsx +44 -23
- package/src/plugins/tui/src/pantheon-settings.tsx +461 -105
- package/src/plugins/tui/src/tui-prefs.ts +106 -4
- package/src/plugins/tui/src/update-notice.ts +9 -6
- package/src/plugins/tui/src/whats-new-open.ts +4 -4
- package/src/plugins/tui/src/whats-new.tsx +119 -17
- package/src/skills/agent-coordination/SKILL.md +6 -6
- package/src/skills/artifact-management/SKILL.md +43 -39
- package/src/skills/artifact-management/references/artifact-templates.md +103 -48
- package/src/skills/auto-continue/references/auto-continue-details.md +13 -13
- package/src/skills/code-review-checklist/SKILL.md +6 -6
- package/src/skills/incremental-implementation/SKILL.md +13 -13
- package/src/skills/memory-bank/references/anti-patterns.md +3 -3
- package/src/skills/spec-driven-development/SKILL.md +12 -14
- package/src/skills/tdd-with-agents/SKILL.md +6 -5
- package/src/skills/visual-review-pipeline/SKILL.md +1 -1
- package/src/skills/visual-review-pipeline/references/workflow-steps.md +1 -1
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
* sub-lines and gauge style, and the two Pantheon footer lines. Everything
|
|
13
13
|
* defaults to on — the window exists to turn things OFF.
|
|
14
14
|
*/
|
|
15
|
+
|
|
15
16
|
import type { Context } from '@opencode/plugin/tui/context'
|
|
16
|
-
import type {
|
|
17
|
+
import type { Accessor, Setter } from 'solid-js'
|
|
18
|
+
import { createSignal } from 'solid-js'
|
|
19
|
+
import type { SettingsDraft, SettingsRow, SettingsTab } from './pantheon-settings-state.ts'
|
|
17
20
|
|
|
18
21
|
// ── The durable store handle (host storage, one per plugin) ────────────
|
|
19
22
|
// Created once at setup and stashed under a globalThis symbol so
|
|
@@ -21,12 +24,40 @@ import type { SettingsRow, SettingsTab } from './pantheon-settings-state.ts'
|
|
|
21
24
|
// singleton doctrine as the plugin's SINGLETON guard).
|
|
22
25
|
|
|
23
26
|
const PREFS_SYMBOL = Symbol.for('pantheon.tui.prefs.v1')
|
|
27
|
+
const DRAFT_PREVIEW_SYMBOL = Symbol.for('pantheon.tui.draft_preview.v1')
|
|
24
28
|
type PrefsStore = readonly [TuiPrefs, (mutation: (draft: TuiPrefs) => void) => Promise<void>]
|
|
29
|
+
type DraftSignal = [Accessor<SettingsDraft | undefined>, Setter<SettingsDraft | undefined>]
|
|
25
30
|
|
|
26
31
|
function stash(): PrefsStore | undefined {
|
|
27
32
|
return (globalThis as Record<PropertyKey, unknown>)[PREFS_SYMBOL] as PrefsStore | undefined
|
|
28
33
|
}
|
|
29
34
|
|
|
35
|
+
function getDraftPreviewSignal(): DraftSignal {
|
|
36
|
+
const g = globalThis as Record<PropertyKey, unknown>
|
|
37
|
+
if (!g[DRAFT_PREVIEW_SYMBOL]) {
|
|
38
|
+
g[DRAFT_PREVIEW_SYMBOL] = createSignal<SettingsDraft | undefined>(undefined)
|
|
39
|
+
}
|
|
40
|
+
return g[DRAFT_PREVIEW_SYMBOL] as DraftSignal
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Set the active draft preview overlay (used by settings window to provide live preview). */
|
|
44
|
+
export function setTuiDraftPreview(draft: SettingsDraft | undefined): void {
|
|
45
|
+
const [, setDraft] = getDraftPreviewSignal()
|
|
46
|
+
setDraft(draft && Object.keys(draft).length > 0 ? { ...draft } : undefined)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Clear the active draft preview overlay. */
|
|
50
|
+
export function clearTuiDraftPreview(): void {
|
|
51
|
+
const [, setDraft] = getDraftPreviewSignal()
|
|
52
|
+
setDraft(undefined)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** The active draft preview accessor. */
|
|
56
|
+
export function tuiDraftPreview(): SettingsDraft | undefined {
|
|
57
|
+
const [draft] = getDraftPreviewSignal()
|
|
58
|
+
return draft()
|
|
59
|
+
}
|
|
60
|
+
|
|
30
61
|
/** Create (or reuse) the durable prefs store. Fail-open: without host
|
|
31
62
|
* storage the consumers fall back to DEFAULT_TUI_PREFS (read-only). */
|
|
32
63
|
export function initTuiPrefs(context: Context): void {
|
|
@@ -51,8 +82,40 @@ export function initTuiPrefs(context: Context): void {
|
|
|
51
82
|
}
|
|
52
83
|
}
|
|
53
84
|
|
|
54
|
-
/**
|
|
55
|
-
export function
|
|
85
|
+
/** Deep clone and overlay staged settings draft onto base TuiPrefs. */
|
|
86
|
+
export function previewTuiPrefs(base: TuiPrefs, draft?: SettingsDraft): TuiPrefs {
|
|
87
|
+
if (!draft || Object.keys(draft).length === 0) return base
|
|
88
|
+
let hasTui = false
|
|
89
|
+
for (const k of Object.keys(draft)) {
|
|
90
|
+
if (k.startsWith('tui.')) {
|
|
91
|
+
hasTui = true
|
|
92
|
+
break
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (!hasTui) return base
|
|
96
|
+
|
|
97
|
+
const normalized = normalizeTuiPrefs(base)
|
|
98
|
+
const effective: TuiPrefs = {
|
|
99
|
+
version: 1,
|
|
100
|
+
layout: { ...normalized.layout },
|
|
101
|
+
sidebar: {
|
|
102
|
+
header: { ...normalized.sidebar.header },
|
|
103
|
+
blocks: { ...normalized.sidebar.blocks },
|
|
104
|
+
context: { ...normalized.sidebar.context },
|
|
105
|
+
},
|
|
106
|
+
footer: { ...normalized.footer },
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
for (const [id, value] of Object.entries(draft)) {
|
|
110
|
+
if (id.startsWith('tui.')) {
|
|
111
|
+
applyTuiRow(effective, id, value)
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return effective
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** The raw persisted prefs from host storage (no draft overlay). */
|
|
118
|
+
export function savedTuiPrefs(): TuiPrefs {
|
|
56
119
|
const s = stash()?.[0]
|
|
57
120
|
if (!s) return DEFAULT_TUI_PREFS
|
|
58
121
|
if (!s.layout) {
|
|
@@ -64,6 +127,16 @@ export function tuiPrefs(): TuiPrefs {
|
|
|
64
127
|
return s
|
|
65
128
|
}
|
|
66
129
|
|
|
130
|
+
/** The live reactive prefs (read properties inside memos/JSX — tracked).
|
|
131
|
+
* When a settings window has an active draft, preview overlays on top
|
|
132
|
+
* of durable storage in real time. */
|
|
133
|
+
export function tuiPrefs(): TuiPrefs {
|
|
134
|
+
const base = savedTuiPrefs()
|
|
135
|
+
const preview = tuiDraftPreview()
|
|
136
|
+
if (!preview) return base
|
|
137
|
+
return previewTuiPrefs(base, preview)
|
|
138
|
+
}
|
|
139
|
+
|
|
67
140
|
/** Stage a mutation against the durable store; resolves when persisted. */
|
|
68
141
|
export function mutateTuiPrefs(mutation: (draft: TuiPrefs) => void): Promise<void> {
|
|
69
142
|
const handle = stash()
|
|
@@ -95,18 +168,25 @@ export const SEPARATOR_STYLES_CYCLE: readonly string[] = Object.freeze([
|
|
|
95
168
|
'dots',
|
|
96
169
|
'slashes',
|
|
97
170
|
])
|
|
171
|
+
export const SETTINGS_VIEW_MODES: readonly string[] = Object.freeze([
|
|
172
|
+
'docked',
|
|
173
|
+
'fullscreen',
|
|
174
|
+
'dialog',
|
|
175
|
+
])
|
|
98
176
|
|
|
99
177
|
export type GaugeStyle = 'both' | 'bar' | 'percent' | 'off'
|
|
100
178
|
export type BarShapePref = 'line' | 'block' | 'smooth' | 'ascii' | 'dots' | 'braille'
|
|
101
179
|
export type BarWidthPref = 'standard' | 'compact' | 'wide' | 'full'
|
|
102
180
|
export type LayoutPresetPref = 'comfortable' | 'compact'
|
|
103
181
|
export type SeparatorStylePref = 'spaces' | 'pipes' | 'dots' | 'slashes'
|
|
182
|
+
export type SettingsViewModePref = 'docked' | 'fullscreen' | 'dialog'
|
|
104
183
|
|
|
105
184
|
export interface TuiPrefs {
|
|
106
185
|
version: 1
|
|
107
186
|
layout: {
|
|
108
187
|
preset: LayoutPresetPref
|
|
109
188
|
separator: SeparatorStylePref
|
|
189
|
+
settingsView?: SettingsViewModePref
|
|
110
190
|
}
|
|
111
191
|
sidebar: {
|
|
112
192
|
header: { version: boolean; preset: boolean; session: boolean }
|
|
@@ -131,6 +211,7 @@ export const DEFAULT_TUI_PREFS: TuiPrefs = {
|
|
|
131
211
|
layout: {
|
|
132
212
|
preset: 'comfortable',
|
|
133
213
|
separator: 'spaces',
|
|
214
|
+
settingsView: 'fullscreen',
|
|
134
215
|
},
|
|
135
216
|
sidebar: {
|
|
136
217
|
header: { version: true, preset: true, session: true },
|
|
@@ -181,6 +262,11 @@ export function normalizeTuiPrefs(raw: unknown): TuiPrefs {
|
|
|
181
262
|
const separator = SEPARATOR_STYLES_CYCLE.includes(layout.separator as string)
|
|
182
263
|
? (layout.separator as SeparatorStylePref)
|
|
183
264
|
: DEFAULT_TUI_PREFS.layout.separator
|
|
265
|
+
const settingsView = (
|
|
266
|
+
SETTINGS_VIEW_MODES.includes(layout.settingsView as string)
|
|
267
|
+
? layout.settingsView
|
|
268
|
+
: DEFAULT_TUI_PREFS.layout.settingsView
|
|
269
|
+
) as SettingsViewModePref
|
|
184
270
|
const gauge = GAUGE_STYLES.includes(context.gauge as string)
|
|
185
271
|
? (context.gauge as GaugeStyle)
|
|
186
272
|
: DEFAULT_TUI_PREFS.sidebar.context.gauge
|
|
@@ -197,6 +283,7 @@ export function normalizeTuiPrefs(raw: unknown): TuiPrefs {
|
|
|
197
283
|
layout: {
|
|
198
284
|
preset,
|
|
199
285
|
separator,
|
|
286
|
+
settingsView,
|
|
200
287
|
},
|
|
201
288
|
sidebar: {
|
|
202
289
|
header: {
|
|
@@ -262,6 +349,13 @@ export function buildTuiTab(prefs: TuiPrefs): SettingsTab {
|
|
|
262
349
|
cycle: SEPARATOR_STYLES_CYCLE,
|
|
263
350
|
note: 'spaces | pipes | dots | slashes — status line glyphs',
|
|
264
351
|
},
|
|
352
|
+
{
|
|
353
|
+
id: 'tui.layout.settingsView',
|
|
354
|
+
name: 'Settings surface',
|
|
355
|
+
value: tuiRowValue(prefs, 'tui.layout.settingsView') ?? 'docked',
|
|
356
|
+
cycle: SETTINGS_VIEW_MODES,
|
|
357
|
+
note: 'docked (above prompt) | fullscreen router page | dialog overlay',
|
|
358
|
+
},
|
|
265
359
|
],
|
|
266
360
|
},
|
|
267
361
|
{
|
|
@@ -361,7 +455,7 @@ export function buildTuiTab(prefs: TuiPrefs): SettingsTab {
|
|
|
361
455
|
'tui.sidebar.context.spent',
|
|
362
456
|
'Spent row',
|
|
363
457
|
prefs.sidebar.context.spent,
|
|
364
|
-
'the `$…
|
|
458
|
+
'the `$… spent in session` line',
|
|
365
459
|
),
|
|
366
460
|
row(
|
|
367
461
|
'tui.sidebar.context.modelUsage',
|
|
@@ -423,6 +517,12 @@ export function applyTuiRow(draft: TuiPrefs, id: string, value: string): void {
|
|
|
423
517
|
draft.layout.separator = value as SeparatorStylePref
|
|
424
518
|
}
|
|
425
519
|
return
|
|
520
|
+
case 'tui.layout.settingsView':
|
|
521
|
+
if (SETTINGS_VIEW_MODES.includes(value)) {
|
|
522
|
+
if (!draft.layout) draft.layout = { ...DEFAULT_TUI_PREFS.layout }
|
|
523
|
+
draft.layout.settingsView = value as SettingsViewModePref
|
|
524
|
+
}
|
|
525
|
+
return
|
|
426
526
|
case 'tui.sidebar.context.barShape':
|
|
427
527
|
if (BAR_SHAPES_CYCLE.includes(value)) draft.sidebar.context.barShape = value as BarShapePref
|
|
428
528
|
return
|
|
@@ -487,6 +587,8 @@ export function tuiRowValue(prefs: TuiPrefs, id: string): string | undefined {
|
|
|
487
587
|
if (id === 'tui.layout.preset') return prefs.layout?.preset ?? DEFAULT_TUI_PREFS.layout.preset
|
|
488
588
|
if (id === 'tui.layout.separator')
|
|
489
589
|
return prefs.layout?.separator ?? DEFAULT_TUI_PREFS.layout.separator
|
|
590
|
+
if (id === 'tui.layout.settingsView')
|
|
591
|
+
return prefs.layout?.settingsView ?? DEFAULT_TUI_PREFS.layout.settingsView ?? 'docked'
|
|
490
592
|
if (id === 'tui.sidebar.context.barShape') return prefs.sidebar.context.barShape
|
|
491
593
|
if (id === 'tui.sidebar.context.barWidth') return prefs.sidebar.context.barWidth
|
|
492
594
|
if (id === 'tui.sidebar.context.gauge') return prefs.sidebar.context.gauge
|
|
@@ -29,17 +29,19 @@ export interface UpdateNotice {
|
|
|
29
29
|
message: string
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
/** Semver-ish compare for X.Y.Z[-beta.N];
|
|
32
|
+
/** Semver-ish compare for X.Y.Z[-(beta|rc).N]; prereleases sort before their release. */
|
|
33
33
|
export function comparePantheonVersions(left: string, right: string): number {
|
|
34
34
|
const parse = (version: string) => {
|
|
35
35
|
const match = String(version)
|
|
36
36
|
.trim()
|
|
37
|
-
.match(/^(\d+)\.(\d+)\.(\d+)(?:-beta\.(\d+))?$/)
|
|
37
|
+
.match(/^(\d+)\.(\d+)\.(\d+)(?:-(beta|rc)\.(\d+))?$/)
|
|
38
38
|
if (!match) return null
|
|
39
|
-
const [, major = '', minor = '', patch = '',
|
|
39
|
+
const [, major = '', minor = '', patch = '', stage = '', stageNum = ''] = match
|
|
40
|
+
const stageRank = stage === 'beta' ? 1 : stage === 'rc' ? 2 : 3
|
|
40
41
|
return {
|
|
41
42
|
core: [+major, +minor, +patch] as [number, number, number],
|
|
42
|
-
|
|
43
|
+
stageRank,
|
|
44
|
+
stageNum: stage !== '' ? +stageNum : Number.POSITIVE_INFINITY,
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
const a = parse(left)
|
|
@@ -50,7 +52,8 @@ export function comparePantheonVersions(left: string, right: string): number {
|
|
|
50
52
|
if (aMajor !== bMajor) return aMajor - bMajor
|
|
51
53
|
if (aMinor !== bMinor) return aMinor - bMinor
|
|
52
54
|
if (aPatch !== bPatch) return aPatch - bPatch
|
|
53
|
-
return a.
|
|
55
|
+
if (a.stageRank !== b.stageRank) return a.stageRank - b.stageRank
|
|
56
|
+
return a.stageNum - b.stageNum
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
export function pickUpdateNotice(input: UpdateNoticeInput): UpdateNotice | null {
|
|
@@ -61,7 +64,7 @@ export function pickUpdateNotice(input: UpdateNoticeInput): UpdateNotice | null
|
|
|
61
64
|
if (nowMs - lastCheck < ttlMs) return null
|
|
62
65
|
if (state.lastNotifiedVersion === latestVersion) return null
|
|
63
66
|
|
|
64
|
-
const stable = (version: string) => !/-beta\.\d+$/.test(version)
|
|
67
|
+
const stable = (version: string) => !/-(?:beta|rc)\.\d+$/.test(version)
|
|
65
68
|
// A stable install is never advertised a beta: the update guard owns that
|
|
66
69
|
// crossing and requires explicit opt-in there.
|
|
67
70
|
if (stable(currentVersion) && !stable(latestVersion)) return null
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
} from './whats-new-highlights.ts'
|
|
25
25
|
import { markSeenWhatsNew, shouldShowWhatsNew } from './whats-new-state.ts'
|
|
26
26
|
|
|
27
|
-
/** Muted footer hint teaching the dismiss bind
|
|
28
|
-
export const WHATS_NEW_CLOSE_HINT = 'esc/q
|
|
27
|
+
/** Muted footer hint teaching the dismiss bind. */
|
|
28
|
+
export const WHATS_NEW_CLOSE_HINT = 'esc/q close'
|
|
29
29
|
|
|
30
30
|
/** Hint variant when the highlights span more than one page. */
|
|
31
|
-
export const WHATS_NEW_PAGES_HINT = 'esc/q
|
|
31
|
+
export const WHATS_NEW_PAGES_HINT = 'esc/q close · n next · p back'
|
|
32
32
|
|
|
33
33
|
/** The CHANGELOG pointer shown under the highlights (the window summarizes; the file is complete). */
|
|
34
|
-
export const WHATS_NEW_MORE_HINT = 'CHANGELOG
|
|
34
|
+
export const WHATS_NEW_MORE_HINT = 'Full CHANGELOG: CHANGELOG.md in package'
|
|
35
35
|
|
|
36
36
|
/** Rows per page — bounded so no changelog can overflow the terminal. */
|
|
37
37
|
export const WHATS_NEW_PAGE_SIZE = 14
|
|
@@ -32,39 +32,126 @@
|
|
|
32
32
|
* does not show (fail-open, like the rest of the plugin).
|
|
33
33
|
*/
|
|
34
34
|
import type { Context } from '@opencode/plugin/tui/context'
|
|
35
|
-
import { createSignal, For } from 'solid-js'
|
|
35
|
+
import { createSignal, For, Show } from 'solid-js'
|
|
36
36
|
import { readChangelogForBundle, resolveRunningVersion } from './whats-new-highlights.ts'
|
|
37
37
|
import { openWhatsNew, type WhatsNewViewData, wrapWhatsNewLine } from './whats-new-open.ts'
|
|
38
38
|
import { defaultWhatsNewStatePath } from './whats-new-state.ts'
|
|
39
39
|
|
|
40
|
-
/** Window body: title, rule, the current page (wrapped), footer
|
|
40
|
+
/** Window body: title, rule, the current page (wrapped), footer action bar with OK button. */
|
|
41
41
|
export function WhatsNewContent(props: {
|
|
42
42
|
data: WhatsNewViewData
|
|
43
43
|
page: () => number
|
|
44
44
|
pageCount: () => number
|
|
45
45
|
fg?: any
|
|
46
46
|
muted?: any
|
|
47
|
+
warn?: any
|
|
48
|
+
onClose?: () => void
|
|
49
|
+
onNext?: () => void
|
|
50
|
+
onPrev?: () => void
|
|
47
51
|
}) {
|
|
48
52
|
const rows = () => {
|
|
49
53
|
const current = props.data.pages[Math.min(props.page(), props.pageCount() - 1)] ?? []
|
|
50
54
|
const wrapped: string[] = []
|
|
51
|
-
for (const line of current) wrapped.push(...wrapWhatsNewLine(line,
|
|
55
|
+
for (const line of current) wrapped.push(...wrapWhatsNewLine(line, 72))
|
|
52
56
|
return wrapped
|
|
53
57
|
}
|
|
54
58
|
return (
|
|
55
|
-
<box
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
<box
|
|
60
|
+
flexDirection="column"
|
|
61
|
+
borderStyle="rounded"
|
|
62
|
+
borderColor={props.warn ?? '#fba970'}
|
|
63
|
+
paddingLeft={2}
|
|
64
|
+
paddingRight={2}
|
|
65
|
+
paddingTop={1}
|
|
66
|
+
paddingBottom={1}
|
|
67
|
+
>
|
|
68
|
+
{/* Header with Title and close hint */}
|
|
69
|
+
<box flexDirection="row" alignItems="center" justifyContent="space-between">
|
|
70
|
+
<box flexDirection="row" alignItems="center">
|
|
71
|
+
<box
|
|
72
|
+
backgroundColor={props.warn ?? '#fba970'}
|
|
73
|
+
paddingLeft={1}
|
|
74
|
+
paddingRight={1}
|
|
75
|
+
marginRight={1}
|
|
76
|
+
>
|
|
77
|
+
<text fg="#000000" attributes={1}>
|
|
78
|
+
{'NOVIDADES'}
|
|
79
|
+
</text>
|
|
80
|
+
</box>
|
|
81
|
+
<text attributes={1} fg={props.fg}>
|
|
82
|
+
{props.data.title}
|
|
83
|
+
</text>
|
|
84
|
+
</box>
|
|
85
|
+
<box onMouseDown={() => props.onClose?.()}>
|
|
86
|
+
<text fg={props.muted}>{'[ Esc / Q ]'}</text>
|
|
87
|
+
</box>
|
|
88
|
+
</box>
|
|
89
|
+
|
|
90
|
+
{/* Divider */}
|
|
91
|
+
<box flexDirection="row" height={1} marginTop={1} marginBottom={1}>
|
|
92
|
+
<text fg={props.muted}>{'─'.repeat(72)}</text>
|
|
93
|
+
</box>
|
|
94
|
+
|
|
95
|
+
{/* Content items */}
|
|
96
|
+
<box flexDirection="column" minHeight={8}>
|
|
97
|
+
<For each={rows()}>
|
|
98
|
+
{(line: string) => {
|
|
99
|
+
const isBullet = line.startsWith('• ')
|
|
100
|
+
return (
|
|
101
|
+
<text fg={isBullet ? props.fg : props.muted} {...(isBullet ? { attributes: 1 } : {})}>
|
|
102
|
+
{line}
|
|
103
|
+
</text>
|
|
104
|
+
)
|
|
105
|
+
}}
|
|
106
|
+
</For>
|
|
107
|
+
</box>
|
|
108
|
+
|
|
109
|
+
{/* Divider before footer */}
|
|
110
|
+
<box flexDirection="row" height={1} marginTop={1}>
|
|
111
|
+
<text fg={props.muted}>{'─'.repeat(72)}</text>
|
|
112
|
+
</box>
|
|
113
|
+
|
|
114
|
+
{/* Bottom Action Bar: Pagination + Modern OK Button */}
|
|
115
|
+
<box flexDirection="row" alignItems="center" justifyContent="space-between" marginTop={1}>
|
|
116
|
+
<box flexDirection="row" alignItems="center">
|
|
117
|
+
<Show when={props.pageCount() > 1}>
|
|
118
|
+
<box
|
|
119
|
+
backgroundColor="#262626"
|
|
120
|
+
paddingLeft={1}
|
|
121
|
+
paddingRight={1}
|
|
122
|
+
marginRight={1}
|
|
123
|
+
onMouseDown={() => props.onPrev?.()}
|
|
124
|
+
>
|
|
125
|
+
<text fg="#ffffff">{'‹ Prev'}</text>
|
|
126
|
+
</box>
|
|
127
|
+
<text fg={props.muted} marginRight={1}>
|
|
128
|
+
{`${props.page() + 1} / ${props.pageCount()}`}
|
|
129
|
+
</text>
|
|
130
|
+
<box
|
|
131
|
+
backgroundColor="#262626"
|
|
132
|
+
paddingLeft={1}
|
|
133
|
+
paddingRight={1}
|
|
134
|
+
marginRight={1}
|
|
135
|
+
onMouseDown={() => props.onNext?.()}
|
|
136
|
+
>
|
|
137
|
+
<text fg="#ffffff">{'Next ›'}</text>
|
|
138
|
+
</box>
|
|
139
|
+
</Show>
|
|
140
|
+
<text fg={props.muted}>{'Enter / Esc / Q close'}</text>
|
|
141
|
+
</box>
|
|
142
|
+
|
|
143
|
+
{/* Prominent OK Button */}
|
|
144
|
+
<box
|
|
145
|
+
backgroundColor={props.warn ?? '#fba970'}
|
|
146
|
+
paddingLeft={2}
|
|
147
|
+
paddingRight={2}
|
|
148
|
+
onMouseDown={() => props.onClose?.()}
|
|
149
|
+
>
|
|
150
|
+
<text fg="#000000" attributes={1}>
|
|
151
|
+
{'OK, Got it'}
|
|
152
|
+
</text>
|
|
153
|
+
</box>
|
|
154
|
+
</box>
|
|
68
155
|
</box>
|
|
69
156
|
)
|
|
70
157
|
}
|
|
@@ -91,9 +178,19 @@ export async function maybeShowWhatsNewV2(context: Context): Promise<void> {
|
|
|
91
178
|
mode: 'global',
|
|
92
179
|
enabled: () => open(),
|
|
93
180
|
commands: [
|
|
181
|
+
{
|
|
182
|
+
id: 'pantheon.whats-new.confirm',
|
|
183
|
+
title: 'Confirm and close what is new',
|
|
184
|
+
bind: 'enter,space',
|
|
185
|
+
run: () => {
|
|
186
|
+
if (!open()) return false
|
|
187
|
+
dismiss()
|
|
188
|
+
return undefined
|
|
189
|
+
},
|
|
190
|
+
},
|
|
94
191
|
{
|
|
95
192
|
id: 'pantheon.whats-new.close',
|
|
96
|
-
title: '
|
|
193
|
+
title: 'Close what is new',
|
|
97
194
|
bind: 'escape,q',
|
|
98
195
|
run: () => {
|
|
99
196
|
if (!open()) return false
|
|
@@ -149,6 +246,7 @@ export async function maybeShowWhatsNewV2(context: Context): Promise<void> {
|
|
|
149
246
|
setOpen(true)
|
|
150
247
|
try {
|
|
151
248
|
const theme = context.theme?.text ?? {}
|
|
249
|
+
const warn = (theme?.feedback as any)?.warning?.base ?? '#fba970'
|
|
152
250
|
context.ui.dialog.show(
|
|
153
251
|
() => (
|
|
154
252
|
<WhatsNewContent
|
|
@@ -157,6 +255,10 @@ export async function maybeShowWhatsNewV2(context: Context): Promise<void> {
|
|
|
157
255
|
pageCount={pageCount}
|
|
158
256
|
fg={theme.base}
|
|
159
257
|
muted={theme.muted}
|
|
258
|
+
warn={warn}
|
|
259
|
+
onClose={dismiss}
|
|
260
|
+
onNext={() => setPage((current) => Math.min(current + 1, pageCount() - 1))}
|
|
261
|
+
onPrev={() => setPage((current) => Math.max(current - 1, 0))}
|
|
160
262
|
/>
|
|
161
263
|
),
|
|
162
264
|
close,
|
|
@@ -46,7 +46,7 @@ Route tasks to optimized agents based on category instead of specifying agents m
|
|
|
46
46
|
## Parallel Execution Declaration
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
|
|
49
|
+
PARALLEL EXECUTION — Phase 2
|
|
50
50
|
Running simultaneously:
|
|
51
51
|
- @hermes → backend tests → .tmp/IMPL-phase2-hermes.md
|
|
52
52
|
- @aphrodite → frontend → .tmp/IMPL-phase2-aphrodite.md
|
|
@@ -90,8 +90,8 @@ Model routing is handled by Prometheus and the platform configuration. Zeus dele
|
|
|
90
90
|
|
|
91
91
|
## Anti-Patterns
|
|
92
92
|
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
93
|
+
- Zeus doing implementation work (orchestrates, doesn't code)
|
|
94
|
+
- Skipping TDD cycle (RED → GREEN → REFACTOR)
|
|
95
|
+
- Auto-committing without user approval
|
|
96
|
+
- Parallel phases with dependencies (order matters)
|
|
97
|
+
- Ignoring Themis CRITICAL findings
|
|
@@ -1,62 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: artifact-management
|
|
3
|
-
description: "Structured artifacts for
|
|
3
|
+
description: "Structured high-density artifacts for architectural plans, deepwork, executive reports, and ADRs."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Artifact Management
|
|
7
7
|
|
|
8
|
-
Structured
|
|
8
|
+
Structured, high-density visual artifacts for planned, multi-phase, or materially risky implementation work. Artifacts are not a prerequisite for simple bounded fixes or read-only investigation.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## Artifact
|
|
12
|
+
## Artifact Storage Locations
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|--------|----------|------------|-------------|
|
|
16
|
-
| `PLAN-` | `.tmp/` | ✅ | Athena |
|
|
17
|
-
| `IMPL-` | `.tmp/` | ✅ | Hermes/Aphrodite/Demeter |
|
|
18
|
-
| `REVIEW-` | `.tmp/` | ✅ | Themis |
|
|
19
|
-
| `DISC-` | `.tmp/` | ✅ | Apollo |
|
|
20
|
-
| `ADR-` | `_notes/` | ❌ Permanent | Any → Mnemosyne |
|
|
14
|
+
Artifacts must not pollute the project root. The Pantheon ecosystem persists artifacts across three standard destinations:
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
| Artifact Type | Target Path | Produced By | Lifecycle |
|
|
17
|
+
|---|---|---|---|
|
|
18
|
+
| Architectural Plan & Deepwork | `.pantheon/deepwork/<slug>/PLAN.md` | @athena | Durable across task/sprint |
|
|
19
|
+
| Executive Report & Analysis | `.pantheon/reports/<YYYY-MM-DD>-<topic>.md` | @apollo / @themis | Permanent for audit/history |
|
|
20
|
+
| Architectural Decision Record (ADR) | `docs/adr/<NNN>-<slug>.md` | @mnemosyne | Permanent repository asset |
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
Note: Files in `.pantheon/deepwork/` are gitignored by default, while `.pantheon/reports/` and `docs/adr/` can be tracked in version control.
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|-----------|-------|----------|
|
|
28
|
-
| Planning | Athena | `PLAN-<feature>.md` |
|
|
29
|
-
| Implementation | Worker | `IMPL-phase<N>-<agent>.md` |
|
|
30
|
-
| Review | Themis | `REVIEW-<feature>.md` |
|
|
31
|
-
| Discovery | Apollo | `DISC-<topic>.md` |
|
|
32
|
-
| Decision | Any → Mnemosyne | `ADR-<topic>.md` |
|
|
24
|
+
---
|
|
33
25
|
|
|
34
|
-
|
|
26
|
+
## High-Density Visual Artifact Standard (5 Core Blocks)
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
When generating plans, executive reports, or ADRs, agents must format documents using high density, visual clarity, and concrete data:
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
30
|
+
### 1. GitHub-Flavored Markdown (GFM) Alerts
|
|
31
|
+
Use alerts to highlight background context, efficiency gains, and safety gates:
|
|
32
|
+
- `> [!NOTE]` Background context, technical assumptions, and architecture decisions.
|
|
33
|
+
- `> [!TIP]` Performance optimizations, token footprint savings, and latency wins.
|
|
34
|
+
- `> [!IMPORTANT]` Mandatory requirements, verification gates, and human approval checkpoints.
|
|
35
|
+
- `> [!WARNING]` Potential breaking changes, deprecation notices, or environment constraints.
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
### 2. Native Mermaid Diagrams
|
|
38
|
+
Include a visual flowchart (`flowchart TD` or `graph LR`) visualizing the execution graph, agent handoffs, and verification gates before code changes begin.
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
### 3. Quantitative Diagnostics & Comparison Tables
|
|
41
|
+
Provide real metrics rather than vague qualitative statements:
|
|
42
|
+
- Tokens / context footprint (before vs after)
|
|
43
|
+
- Test execution latency (e.g. global vs sliced test)
|
|
44
|
+
- File counts and lines affected
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
### 4. Sliced Actionable Phases
|
|
47
|
+
Every implementation phase lists:
|
|
48
|
+
- Assigned specialist (`@hermes`, `@aphrodite`, `@demeter`, etc.)
|
|
49
|
+
- Specific affected files (exact paths, no vague placeholders)
|
|
50
|
+
- Exact verification command (e.g. `node --test tests/foo.test.mjs`, `pytest -k ...`)
|
|
51
|
+
- Clear exit criteria and acceptance checklist
|
|
52
|
+
|
|
53
|
+
### 5. Risk & Contingency Matrix
|
|
54
|
+
Map concrete risks directly to their contingency actions:
|
|
55
|
+
- Specific technical risk -> immediate remediation action.
|
|
50
56
|
|
|
51
57
|
---
|
|
52
58
|
|
|
53
|
-
##
|
|
59
|
+
## Proportional Use
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
- Create PLAN/IMPL/REVIEW artifacts for planned multi-phase work or when risk, auditability, or an explicit request needs a durable phase trail.
|
|
62
|
+
- A bounded, reversible fix should be investigated only as far as needed, implemented, verified with focused checks, and returned as a concise summary. Do not create PLAN, IMPL, or REVIEW artifacts for it.
|
|
63
|
+
- Read-only lookup or trivial discovery needs no DISC artifact; use one only when findings are broad enough to be reused or drive a material decision.
|
|
64
|
+
- The absence of an artifact never waives Themis review or human approval for auth/security, data/schema/migrations, production-impacting work, or sensitive actions.
|
|
65
|
+
- Zeus does not implement or write artifacts directly; he coordinates the specialist agents who generate and review them.
|
|
60
66
|
|
|
61
67
|
---
|
|
62
68
|
|
|
@@ -64,6 +70,4 @@ Structured artifact trail for planned, multi-phase, or materially risky implemen
|
|
|
64
70
|
|
|
65
71
|
| Action / trigger | Reference |
|
|
66
72
|
|---|---|
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
A missing reference interrupts the action — read nothing in its place, never improvise from memory.
|
|
73
|
+
| Templates for PLAN, REPORT, and ADR | [references/artifact-templates.md](references/artifact-templates.md) |
|