pantheon-opencode 1.6.3-beta.23 → 1.6.3-beta.24

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
@@ -10,6 +10,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
10
10
  <!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
11
11
  move this section to a versioned entry and reset the template below. -->
12
12
 
13
+ ## [v1.6.3-beta.24] - 2026-11-06
14
+
15
+ ## 🆕 What's New
16
+ - Refinement is now DETERMINISTIC: the local router computes `refineRecommended` from pure text rules (multi-concern, no acceptance criteria — PT+EN; one-liners never refine; explicit criteria suppress). No Jev, no model judgment, zero cost — badly structured prompts get the refine signal before they can degrade processing, and zeus treats the signal as obligatory.
17
+
13
18
  ## [v1.6.3-beta.23] - 2026-11-06
14
19
 
15
20
  ## 🆕 What's New
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pantheon-opencode",
3
- "version": "1.6.3-beta.23",
3
+ "version": "1.6.3-beta.24",
4
4
  "description": "Multi-agent orchestration for OpenCode \u2014 14 specialized agents, TDD, Themis review gates.",
5
5
  "type": "module",
6
6
  "workspaces": [
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pantheon",
3
3
  "publisher": "ils15",
4
- "version": "1.6.3-beta.23",
4
+ "version": "1.6.3-beta.24",
5
5
  "displayName": "Pantheon",
6
6
  "description": "Conductor-Delegate orchestration platform with 14 specialized agents, 22 skills, and OpenCode support.",
7
7
  "agents": "./src/agents",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.backends._legacy:_Backend"
4
4
 
5
5
  [project]
6
6
  name = "pantheon"
7
- version = "1.6.3-beta.23"
7
+ version = "1.6.3-beta.24"
8
8
  description = "Multi-agent orchestration framework"
9
9
  requires-python = ">=3.11"
10
10
  # Python sources under src/mcp/ import fastmcp/pydantic at runtime, but those
@@ -110,7 +110,10 @@ criteria (refactor + fix + redesign in one paragraph), the FIRST turn is the
110
110
  refinement itself: NO reads, NO glob/grep, NO dispatches — load
111
111
  `skill: prompt-refinery` and produce the structured contract from the request
112
112
  text alone (objective, numbered scope slices, acceptance criteria per slice,
113
- deliverables, and open questions with your recommended defaults). Field
113
+ deliverables, and open questions with your recommended defaults). The local
114
+ layer computes this trigger deterministically (`refineRecommended` — no model
115
+ judgment, no Jev): when the turn carries the refine signal, refinement is
116
+ OBLIGATORY, not an opinion. Field
114
117
  evidence (beta.22): discovering first burned a delegation and still ended in
115
118
  the same questions — the contract does not need file access, the CONFIRMED
116
119
  slices do. Show the contract once for confirm-or-adjust — silence proceeds
@@ -30,6 +30,8 @@ export type PromptApplicationReason =
30
30
  | 'skills.synthetic.narrowed'
31
31
 
32
32
  export interface PromptApplicationResult {
33
+ /** Deterministic: this turn's request looks vague/multi-concern — refine first. */
34
+ refineRecommended?: boolean
33
35
  /** Always false since beta.10: the visible marker is suppressed. */
34
36
  markerApplied: boolean
35
37
  skillsFiltered: boolean
@@ -26,6 +26,9 @@ export interface TurnDecision {
26
26
  skillIds: string[]
27
27
  agent: string | null
28
28
  reasonCode: string
29
+ /** Deterministic refinement flag (no model judgment): the request looks
30
+ * multi-concern and without acceptance criteria — refine BEFORE executing. */
31
+ refineRecommended: boolean
29
32
  }
30
33
 
31
34
  export interface TurnDecisionInput {
@@ -44,6 +47,7 @@ function inactive(reasonCode: string): TurnDecision {
44
47
  skillIds: [],
45
48
  agent: null,
46
49
  reasonCode,
50
+ refineRecommended: false,
47
51
  }
48
52
  }
49
53
 
@@ -106,9 +110,77 @@ export function localDecisionForTest(
106
110
  skillIds,
107
111
  agent,
108
112
  reasonCode,
113
+ refineRecommended: shouldRefine(request),
109
114
  }
110
115
  }
111
116
 
117
+ /**
118
+ * DETERMINISTIC refinement trigger (field beta.22→23: the owner wants
119
+ * accessibility — badly structured prompts must not degrade processing, and
120
+ * deciding "should I refine?" via Jev is negative economics). Pure text
121
+ * signals, no model: (a) 2+ distinct action concerns, (b) long multi-clause
122
+ * text, AND (c) no acceptance-criteria markers. One positive concern OR the
123
+ * long-multi-clause shape plus absent criteria fires it.
124
+ */
125
+ const CONCERN_MARKERS: readonly string[] = [
126
+ // EN + PT: fix / improve / redesign / create / refactor / add
127
+ 'corrigir',
128
+ 'corrija',
129
+ 'arrumar',
130
+ 'consertar',
131
+ 'melhorar',
132
+ 'melhora',
133
+ 'refatorar',
134
+ 'refatora',
135
+ 'redesign',
136
+ 'redesenhar',
137
+ 'criar',
138
+ 'crie',
139
+ 'adicionar',
140
+ 'adicione',
141
+ 'implementar',
142
+ 'trocar',
143
+ 'fix',
144
+ 'improve',
145
+ 'refactor',
146
+ 'redesign',
147
+ 'create',
148
+ 'add',
149
+ 'rewrite',
150
+ 'restructure',
151
+ ]
152
+
153
+ const CRITERIA_MARKERS: readonly string[] = [
154
+ 'critério',
155
+ 'criterio',
156
+ 'critérios',
157
+ 'acceptance',
158
+ 'aceite',
159
+ 'testes de aceitação',
160
+ 'acceptance criteria',
161
+ 'done when',
162
+ 'pronto quando',
163
+ 'definition of done',
164
+ ]
165
+
166
+ export function shouldRefine(request: string): boolean {
167
+ if (typeof request !== 'string') return false
168
+ const text = request.trim()
169
+ if (text.length < 24) return false // a one-liner fix never refines
170
+ const lowered = text.toLowerCase()
171
+ if (CRITERIA_MARKERS.some((marker) => lowered.includes(marker))) return false
172
+ const concerns = CONCERN_MARKERS.filter((marker) =>
173
+ new RegExp(`(^|\\s|[^a-zà-ú])${marker}`, 'i').test(lowered),
174
+ ).length
175
+ if (concerns >= 2) return true
176
+ // Long multi-clause text with a single concern also refines (the shape of a
177
+ // vague brief): 3+ clauses via separators.
178
+ const clauses = text
179
+ .split(/[,;.]|(?:\s[eE]\s)|(?:\sy\s)/)
180
+ .filter((part) => part.trim().length > 8)
181
+ return concerns >= 1 && clauses.length >= 3
182
+ }
183
+
112
184
  /**
113
185
  * Produce the deterministic local recommendation without entering the
114
186
  * provider, consent, credential, permission, or transport path. The legacy
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pantheon-tui",
3
- "version": "1.6.3-beta.23",
3
+ "version": "1.6.3-beta.24",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pantheon-tui",
9
- "version": "1.6.3-beta.23",
9
+ "version": "1.6.3-beta.24",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@opencode-ai/plugin": "1.18.33",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pantheon-tui",
3
3
  "type": "module",
4
- "version": "1.6.3-beta.23",
4
+ "version": "1.6.3-beta.24",
5
5
  "description": "Pantheon TUI plugin — V1 rich sidebar and usage gauges; native V2 status, session and delegation sidebar",
6
6
  "license": "MIT",
7
7
  "engines": {