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.
Files changed (70) hide show
  1. package/AGENTS.global.md +2 -2
  2. package/AGENTS.md +8 -8
  3. package/CHANGELOG.md +54 -0
  4. package/README.md +2 -0
  5. package/README.pt-BR.md +2 -0
  6. package/bin/pantheon-init.mjs +13 -0
  7. package/commands/pantheon-audit.md +1 -1
  8. package/commands/pantheon-deepwork.md +1 -1
  9. package/commands/pantheon-optimize.md +41 -63
  10. package/package.json +4 -3
  11. package/plugin.json +1 -1
  12. package/prompts/optimize-database.prompt.md +5 -5
  13. package/prompts/plan-architecture.prompt.md +6 -6
  14. package/pyproject.toml +1 -1
  15. package/scripts/build-agents-md.mjs +10 -10
  16. package/scripts/build-plugin.mjs +26 -0
  17. package/scripts/install/opencode-version.mjs +17 -5
  18. package/scripts/install/opencode.mjs +8 -1
  19. package/scripts/optimize.mjs +322 -0
  20. package/scripts/prune.mjs +105 -14
  21. package/scripts/update.mjs +20 -15
  22. package/skills-lock.json +11 -11
  23. package/src/agents/aphrodite.md +15 -14
  24. package/src/agents/apollo.md +2 -1
  25. package/src/agents/athena.md +5 -5
  26. package/src/agents/demeter.md +2 -0
  27. package/src/agents/hephaestus.md +1 -0
  28. package/src/agents/hermes.md +19 -95
  29. package/src/agents/iris.md +3 -0
  30. package/src/agents/nyx.md +1 -0
  31. package/src/agents/prometheus.md +2 -0
  32. package/src/agents/talos.md +3 -0
  33. package/src/agents/themis.md +91 -87
  34. package/src/agents/zeus.md +41 -266
  35. package/src/instructions/agent-return-format.instructions.md +1 -1
  36. package/src/instructions/memory-protocol.instructions.md +1 -1
  37. package/src/instructions/zeus-anti-stall.instructions.md +3 -3
  38. package/src/instructions/zeus-communication-rules.instructions.md +1 -1
  39. package/src/instructions/zeus-council-synthesis.instructions.md +2 -2
  40. package/src/instructions/zeus-timeout-retry.instructions.md +10 -10
  41. package/src/pantheon/model-command.ts +12 -12
  42. package/src/pantheon/tools.ts +4 -0
  43. package/src/pantheon/tui-version-check.ts +1 -1
  44. package/src/pantheon/update-notifier.ts +13 -8
  45. package/src/pantheon/vision.ts +20 -20
  46. package/src/plugin/index.js +14594 -0
  47. package/src/plugins/tui/dist/tui.d.ts +3 -3
  48. package/src/plugins/tui/dist/tui.d.ts.map +1 -1
  49. package/src/plugins/tui/dist/tui.js +923 -340
  50. package/src/plugins/tui/dist/tui.js.map +1 -1
  51. package/src/plugins/tui/package-lock.json +2 -2
  52. package/src/plugins/tui/package.json +1 -1
  53. package/src/plugins/tui/src/autonomy-state.ts +27 -15
  54. package/src/plugins/tui/src/index.tsx +44 -23
  55. package/src/plugins/tui/src/pantheon-settings.tsx +461 -105
  56. package/src/plugins/tui/src/tui-prefs.ts +106 -4
  57. package/src/plugins/tui/src/update-notice.ts +9 -6
  58. package/src/plugins/tui/src/whats-new-open.ts +4 -4
  59. package/src/plugins/tui/src/whats-new.tsx +119 -17
  60. package/src/skills/agent-coordination/SKILL.md +6 -6
  61. package/src/skills/artifact-management/SKILL.md +43 -39
  62. package/src/skills/artifact-management/references/artifact-templates.md +103 -48
  63. package/src/skills/auto-continue/references/auto-continue-details.md +13 -13
  64. package/src/skills/code-review-checklist/SKILL.md +6 -6
  65. package/src/skills/incremental-implementation/SKILL.md +13 -13
  66. package/src/skills/memory-bank/references/anti-patterns.md +3 -3
  67. package/src/skills/spec-driven-development/SKILL.md +12 -14
  68. package/src/skills/tdd-with-agents/SKILL.md +6 -5
  69. package/src/skills/visual-review-pipeline/SKILL.md +1 -1
  70. 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 { SettingsRow, SettingsTab } from './pantheon-settings-state.ts'
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
- /** The live reactive prefs (read properties inside memos/JSX — tracked). */
55
- export function tuiPrefs(): TuiPrefs {
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 `$… gasto na sessão` line',
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]; betas sort before their release. */
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 = '', beta = ''] = match
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
- beta: beta === '' ? Number.POSITIVE_INFINITY : +beta,
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.beta - b.beta
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 (Portuguese, like the sidebar). */
28
- export const WHATS_NEW_CLOSE_HINT = 'esc/q fechar'
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 fechar · n próxima · p volta'
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 completo: CHANGELOG.md no pacote'
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 hint. */
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, 76))
55
+ for (const line of current) wrapped.push(...wrapWhatsNewLine(line, 72))
52
56
  return wrapped
53
57
  }
54
58
  return (
55
- <box flexDirection="column" paddingLeft={1} paddingRight={1} paddingTop={1}>
56
- <text attributes={1} fg={props.fg}>
57
- {props.data.title}
58
- </text>
59
- <text fg={props.muted}>{'─'.repeat(38)}</text>
60
- <For each={rows()}>
61
- {(line: string) => <text fg={line.startsWith('• ') ? props.fg : props.muted}>{line}</text>}
62
- </For>
63
- <box height={1} />
64
- <text fg={props.muted}>
65
- {props.pageCount() > 1 ? `${props.page() + 1}/${props.pageCount()} · ` : ''}
66
- {props.data.hint}
67
- </text>
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: 'Fechar o que há de novo',
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
- 🔀 PARALLEL EXECUTION — Phase 2
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
- - ❌ 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
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 planned, multi-phase, or materially risky implementation work."
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 artifact trail for planned, multi-phase, or materially risky implementation work. Artifacts are not a prerequisite for simple fixes or read-only investigation.
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 Types
12
+ ## Artifact Storage Locations
13
13
 
14
- | Prefix | Location | Ephemeral? | Produced by |
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
- ## Who Generates
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
- | Situation | Agent | Artifact |
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
- > **Zeus does NOT generate artifacts.** He orchestrates agents that generate them.
26
+ ## High-Density Visual Artifact Standard (5 Core Blocks)
35
27
 
36
- ## Proportional Use
28
+ When generating plans, executive reports, or ADRs, agents must format documents using high density, visual clarity, and concrete data:
37
29
 
38
- - Create PLAN/IMPL/REVIEW artifacts for planned multi-phase work or when risk, auditability, or an explicit request needs a durable phase trail.
39
- - 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.
40
- - 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.
41
- - The absence of an artifact never waives Themis review or human approval for auth/security, data/schema/migrations, production-impacting work, or sensitive actions.
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
- ## Human Pause Points
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
- 1. **After a required PLAN** → pause only when a material scope/risk decision needs approval.
48
- 2. **After required REVIEW** → preserve auth/security/data/schema and other sensitive approval gates.
49
- 3. **Before commit/push/merge/deploy or destructive/global action** → require explicit human approval.
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
- ## Cleanup
59
+ ## Proportional Use
54
60
 
55
- ```
56
- @mnemosyne Close sprint # Wipes entire .tmp/
57
- @mnemosyne Clean tmp # Wipes .tmp/ without closing sprint
58
- @mnemosyne List artifacts # Check what's in .tmp/
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
- | Creating an artifact: the `.tmp/` layout or the PLAN/IMPL/REVIEW templates | [references/artifact-templates.md](references/artifact-templates.md) |
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) |