@sublang/playbook 17.10.1 → 17.11.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.
@@ -304,6 +304,22 @@ files, so keep their locations available for resumed runs. Ordinary Captain
304
304
  routing, judging and replies receive `skills: []`; bounded recovery preparation
305
305
  can use the Captain's configured skills.
306
306
 
307
+ Agents also find skills by themselves in their project and user skill folders,
308
+ such as `.claude/skills` and `.agents/skills`. Captain routing, judging and
309
+ replies turn that discovery off as far as the agent allows, so a skill
310
+ installed there no longer steers them; what an agent keeps regardless stays,
311
+ such as OpenCode's configuration-directory skills and plugin or extension
312
+ skills. Kimi Code has no switch for this, so a Kimi Captain still reads those
313
+ folders. Working players and recovery preparation keep them.
314
+
315
+ A session whose Captain conversation began before Captain control turned this
316
+ discovery off, with the Playbook release that requires Cligent 0.36.0, keeps the
317
+ skill listings already in that conversation; start a new session for full
318
+ isolation. A Captain whose agent offers the switch but cannot apply it where it
319
+ runs now fails its control calls with an error, for example a Gemini CLI Captain
320
+ under its native sandbox or run from the home directory, or a Codex Captain with
321
+ an unreadable skill root.
322
+
307
323
  ## Browser capability
308
324
 
309
325
  A Captain or player agent block may set `browser: true` to make Cligent's managed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sublang/playbook",
3
- "version": "17.10.1",
3
+ "version": "17.11.0",
4
4
  "type": "module",
5
5
  "description": "Composable XState v5 playbook runtime with compiled Captain, CODE, REVIEW, DECIDE, DEV, BRANCH, PR, and INSPECT workflows driven by GEARS specs.",
6
6
  "license": "Apache-2.0",
@@ -280,7 +280,7 @@
280
280
  "provenance": true
281
281
  },
282
282
  "dependencies": {
283
- "@sublang/cligent": "^0.34.0",
283
+ "@sublang/cligent": "^0.36.0",
284
284
  "@sublang/spex": "^3.0.0",
285
285
  "p-queue": "^9.3.1",
286
286
  "xstate": "^5.19.4",
@@ -91,7 +91,6 @@ Every new-intent phase has two semantic outcomes: direct implementation and new
91
91
  Every IR-task phase, including the first phase for an existing IR, identifies the IR and the implemented task, and has two semantic outcomes: more tasks and final task.
92
92
  The first phase therefore has four semantic outcomes — direct implementation, new IR, more tasks, and final task — plus the Boss question when the continued IR is ambiguous.
93
93
  Each semantic outcome requires affirmative support in Coder's result, but no phase transition shall depend on a fixed presentation format of Coder's reply.
94
- The Boss-question outcome means that, at the end of this call, Coder has an unanswered clarifying question for Boss whose answer is required to complete the current coding phase. Earlier interim questions resolved or superseded by later affirmative current-phase completion, and prerequisites only for later review, acceptance or release stages, do not establish this outcome.
95
94
  A commit statement alone does not establish semantic completion, and contradictory or insufficient evidence supports no forced commit outcome.
96
95
  Captain shall use the repository-effect receipt as the authoritative identity of the phase's new commit.
97
96
 
@@ -84,7 +84,7 @@ const REVIEW_IR_TASK_PHASE_TEMPLATE = [
84
84
  '',
85
85
  '> Current IR task: <ir-task>',
86
86
  ].join('\n');
87
- const NEEDS_BOSS_REPLY_DESCRIPTION = "At the end of this call, Coder has an unanswered clarifying question for Boss whose answer is required to complete the current coding phase. Earlier interim questions resolved or superseded by later affirmative current-phase completion, and prerequisites only for later review, acceptance or release stages, do not establish this outcome. Output shall include `question: <verbatim question text from the acting agent's prose>`.";
87
+ const NEEDS_BOSS_REPLY_DESCRIPTION = "The acting agent's prose surfaces a clarifying question for Boss that the agent cannot answer alone. Output shall include `question: <verbatim question text from the acting agent's prose>`.";
88
88
  const FIRST_PHASE_RESULT = {
89
89
  directCommit: "Coder completed the new coding intent as one direct implementation phase and made its one new commit; Coder's result affirmatively supports this outcome, and no fixed presentation format of the reply is required. Output shall include `coderOutput: <verbatim final text>` and `latestCommit: <commit identity>`.",
90
90
  irCommit: "Coder decomposed the new coding intent into a new IR, implemented no IR task, and made its one new commit; Coder's result affirmatively supports this outcome, and no fixed presentation format of the reply is required. Output shall include `coderOutput: <verbatim final text>`, `latestCommit: <commit identity>`, and `irNumber` identifying the created IR.",
@@ -326,7 +326,7 @@ const REVIEW_IR_TASK_PHASE_TEMPLATE = [
326
326
  ].join('\n');
327
327
 
328
328
  const NEEDS_BOSS_REPLY_DESCRIPTION =
329
- "At the end of this call, Coder has an unanswered clarifying question for Boss whose answer is required to complete the current coding phase. Earlier interim questions resolved or superseded by later affirmative current-phase completion, and prerequisites only for later review, acceptance or release stages, do not establish this outcome. Output shall include `question: <verbatim question text from the acting agent's prose>`.";
329
+ "The acting agent's prose surfaces a clarifying question for Boss that the agent cannot answer alone. Output shall include `question: <verbatim question text from the acting agent's prose>`.";
330
330
 
331
331
  const FIRST_PHASE_RESULT = {
332
332
  directCommit:
@@ -5,6 +5,7 @@ import { posix, win32 } from 'node:path';
5
5
  import { isDeepStrictEqual } from 'node:util';
6
6
  import PQueue from 'p-queue';
7
7
  import { isAgentCallSettingsError, } from '@sublang/cligent/tmux-play';
8
+ import { getNativeSkillSupport } from '@sublang/cligent';
8
9
  import { assertPlaybookFailureCause } from '@sublang/playbook/runtime';
9
10
  import { assertPlaybookRuntimeSnapshot, assertPlaybookEffectLedger, emptyPlaybookEffectLedger, hiddenControlEnvelope, isPlaybookEffectLedgerMonotonicExtension, normalizeError, parseJudgeJson, registerPlaybookAbortCleanup, snapshotJsonValue, validatePlayerResult, } from '../../../src/xstate-runtime.js';
10
11
  import createDefaultCaptainRuntime from '../captain.playbook/captain.playbook.js';
@@ -2395,7 +2396,23 @@ function callSettings(agent, tuning = agent) {
2395
2396
  };
2396
2397
  }
2397
2398
  function controlCallSettings(agent) {
2398
- return { ...callSettings(agent), browser: false, skills: [], mcpServers: {} };
2399
+ return {
2400
+ ...callSettings(agent),
2401
+ browser: false,
2402
+ skills: [],
2403
+ mcpServers: {},
2404
+ ...controlNativeSkills(agent.adapter),
2405
+ };
2406
+ }
2407
+ // The native-skill half of a decision, Judge or reporting call's settings
2408
+ // (playbook-captain-88). Only an adapter Cligent reports can honor the switch
2409
+ // is asked to; tmux-play rejects `false` for any other, so a Kimi Captain
2410
+ // keeps its runtime's own skills rather than failing every control call
2411
+ // (DR-093). Working calls never carry it.
2412
+ function controlNativeSkills(adapter) {
2413
+ return getNativeSkillSupport(adapter)?.disableSupported === true
2414
+ ? { nativeSkills: false }
2415
+ : {};
2399
2416
  }
2400
2417
  function promptIdentity(binding) {
2401
2418
  return binding.model.kind === 'value'
@@ -16,6 +16,7 @@ import {
16
16
  type PlayerAdapterName,
17
17
  type TuningSelection,
18
18
  } from '@sublang/cligent/tmux-play';
19
+ import { getNativeSkillSupport } from '@sublang/cligent';
19
20
  import type { Effort, PermissionPolicy } from '@sublang/cligent';
20
21
  import type {
21
22
  JsonValue,
@@ -4173,7 +4174,24 @@ function callSettings(
4173
4174
  }
4174
4175
 
4175
4176
  function controlCallSettings(agent: SessionAgent): AgentCallSettings {
4176
- return { ...callSettings(agent), browser: false, skills: [], mcpServers: {} };
4177
+ return {
4178
+ ...callSettings(agent),
4179
+ browser: false,
4180
+ skills: [],
4181
+ mcpServers: {},
4182
+ ...controlNativeSkills(agent.adapter),
4183
+ };
4184
+ }
4185
+
4186
+ // The native-skill half of a decision, Judge or reporting call's settings
4187
+ // (playbook-captain-88). Only an adapter Cligent reports can honor the switch
4188
+ // is asked to; tmux-play rejects `false` for any other, so a Kimi Captain
4189
+ // keeps its runtime's own skills rather than failing every control call
4190
+ // (DR-093). Working calls never carry it.
4191
+ function controlNativeSkills(adapter: string): { nativeSkills?: false } {
4192
+ return getNativeSkillSupport(adapter)?.disableSupported === true
4193
+ ? { nativeSkills: false }
4194
+ : {};
4177
4195
  }
4178
4196
 
4179
4197
  function promptIdentity(binding: EffectivePlayerBinding): string {
package/slc/text2gears.md CHANGED
@@ -229,7 +229,7 @@ The annotation makes the field runtime-owned: the adjudicator selects the result
229
229
  A distinct typed field extracted from that response remains judge-authored even when a later prompt quotes its exact value; quoting a field does not turn it into the player's whole final response.
230
230
  One property name shall not be annotated as verbatim in one result contract and judge-authored in another; text2gears shall choose distinct properties or report that the Source cannot be represented by the current contract.
231
231
 
232
- A Source statement that qualifies an outcome's evidence — what affirmatively
232
+ A Source statement that qualifies an authored domain outcome's evidence — what affirmatively
233
233
  supports it, what supports no outcome, such as "a progress report, status
234
234
  update, or promise of a later result supports no review outcome" — shall be
235
235
  carried in that outcome's result description, the only text the adjudicator
@@ -244,7 +244,10 @@ explicitly requires the acting agent to show that machine syntax to the user.
244
244
  It shall move Source's outcome contract into `Results:` while preserving the
245
245
  human domain instructions in the blockquote.
246
246
  It shall not emit the framework-owned `needsBossReply` result; gears2fsm adds
247
- that universal result for every Captain- or player-invoking state.
247
+ that universal result with its standard description for every Captain- or player-invoking state.
248
+ The framework-owned question is interpreted under the runtime's current-call
249
+ adjudication rule; it is not an authored domain outcome whose description
250
+ Source overrides.
248
251
 
249
252
  Where Source restricts an initial Captain to routing, text2gears shall preserve
250
253
  only the authored question and delegation outcomes and shall not infer a
@@ -255,7 +258,7 @@ outcome Source leaves unqualified carries no `Results:` label; downstream,
255
258
  [gears2fsm](gears2fsm.md#setup) gives its state the default single-outcome
256
259
  contract, so text2gears shall not invent a one-bullet `Results:` block for it.
257
260
  When a later item does consume its output, the produced-value rule above
258
- applies instead; when Source qualifies the one outcome's evidence — what
261
+ applies instead; when Source qualifies the one authored domain outcome's evidence — what
259
262
  affirmatively supports it, what supports no outcome — the behavior carries
260
263
  exactly one `Results:` bullet naming that outcome and carrying the
261
264
  qualification, with an output property only where a consumer requires one,