harness-everything 0.30.4 → 0.30.6

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 (71) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +38 -0
  4. package/README.md +17 -7
  5. package/bin/cli.js +5 -0
  6. package/ci/fable-mode-test.js +112 -51
  7. package/ci/mechanism-2t-workspace-identity.test.js +3 -1
  8. package/ci/mechanism-2w-platform-compatibility.test.js +39 -0
  9. package/ci/mechanism-2z-claude-plugin-manifest.test.js +12 -0
  10. package/ci/router-workflow-plan.test.js +92 -7
  11. package/docs/platform-capabilities.md +14 -1
  12. package/docs/troubleshooting.md +31 -1
  13. package/docs/workflows/fable-mode.md +10 -9
  14. package/evals/fable-mode/tasks/negative-tier2-no-model.yaml +3 -3
  15. package/evals/fable-mode/tasks/positive-haiku-mode.yaml +1 -1
  16. package/evals/fable-mode/tasks/positive-opus-mode.yaml +1 -1
  17. package/evals/fable-mode/tasks/positive-sonnet-mode.yaml +1 -1
  18. package/evals/fable-mode/tasks/positive-trigger.yaml +1 -1
  19. package/fable-mode/SKILL.md +18 -12
  20. package/fable-mode/agents/fable-orchestrator.md +7 -6
  21. package/fable-mode/agents/fable-verifier.md +1 -1
  22. package/fable-mode/agents/fable-worker-haiku.md +5 -4
  23. package/fable-mode/agents/fable-worker-sonnet.md +5 -4
  24. package/fable-mode/behavior-profile-matrix.json +36 -0
  25. package/fable-mode/execution-guardrails/SKILL.md +3 -6
  26. package/fable-mode/execution-guardrails/references/guardrail-rules.md +8 -9
  27. package/fable-mode/fable-haiku/SKILL.md +7 -5
  28. package/fable-mode/fable-haiku/references/routing-notes.md +2 -1
  29. package/fable-mode/fable-opus/SKILL.md +8 -6
  30. package/fable-mode/fable-sonnet/SKILL.md +8 -6
  31. package/fable-mode/model-matrix.json +7 -30
  32. package/fable-mode/references/model-matrix.md +35 -30
  33. package/fable-mode/references/profile-lookup.md +19 -0
  34. package/fable-mode/runtime-model-floor-matrix.json +47 -0
  35. package/fable-mode/scripts/model-selector.js +106 -60
  36. package/fable-mode/scripts/workflow-plan-consumer.js +1 -1
  37. package/harness-everything/SKILL.md +11 -14
  38. package/harness-everything/references/router-workflow-plan.md +2 -2
  39. package/harness-everything/schemas/router-task-shape.schema.json +3 -2
  40. package/harness-everything/schemas/router-workflow-plan.schema.json +6 -5
  41. package/harness-everything/scripts/router-contract-core.js +19 -12
  42. package/harness-everything/scripts/tier-router.js +100 -12
  43. package/opencode-plugin/plugin.json +1 -1
  44. package/package.json +1 -1
  45. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  46. package/plugins/harness-everything/plugin.json +1 -1
  47. package/plugins/harness-everything/skills/fable-mode/SKILL.md +18 -12
  48. package/plugins/harness-everything/skills/fable-mode/agents/fable-orchestrator.md +7 -6
  49. package/plugins/harness-everything/skills/fable-mode/agents/fable-verifier.md +1 -1
  50. package/plugins/harness-everything/skills/fable-mode/agents/fable-worker-haiku.md +5 -4
  51. package/plugins/harness-everything/skills/fable-mode/agents/fable-worker-sonnet.md +5 -4
  52. package/plugins/harness-everything/skills/fable-mode/behavior-profile-matrix.json +36 -0
  53. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +3 -6
  54. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/references/guardrail-rules.md +8 -9
  55. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +7 -5
  56. package/plugins/harness-everything/skills/fable-mode/fable-haiku/references/routing-notes.md +2 -1
  57. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +8 -6
  58. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +8 -6
  59. package/plugins/harness-everything/skills/fable-mode/model-matrix.json +7 -30
  60. package/plugins/harness-everything/skills/fable-mode/references/model-matrix.md +35 -30
  61. package/plugins/harness-everything/skills/fable-mode/references/profile-lookup.md +19 -0
  62. package/plugins/harness-everything/skills/fable-mode/runtime-model-floor-matrix.json +47 -0
  63. package/plugins/harness-everything/skills/fable-mode/scripts/model-selector.js +106 -60
  64. package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +1 -1
  65. package/plugins/harness-everything/skills/harness-everything/SKILL.md +11 -14
  66. package/plugins/harness-everything/skills/harness-everything/references/router-workflow-plan.md +2 -2
  67. package/plugins/harness-everything/skills/harness-everything/schemas/router-task-shape.schema.json +3 -2
  68. package/plugins/harness-everything/skills/harness-everything/schemas/router-workflow-plan.schema.json +6 -5
  69. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +19 -12
  70. package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +100 -12
  71. package/sbom.cdx.json +7 -7
@@ -46,11 +46,88 @@ function matchKeyword(prompt, keyword) {
46
46
  return new RegExp(`\\b${escaped}\\b`, 'i').test(prompt);
47
47
  }
48
48
 
49
+ const FABLE_PROFILE_INVOCATION = /\bfable(?:[- ]mode)?\s+(?:on|with)\s+(haiku|sonnet|sonnect|opus)\b|\bfable-(haiku|sonnet|opus)\b/i;
50
+ const PROFILE_LOOKUP_FIELDS = /\b(?:requestedProfile|effectiveProfile|profileAlias|assignedRole|runtimeModel|runtimeEffort)\b/gi;
51
+
49
52
  function detectFableModel(prompt) {
50
- const match = prompt.match(/\bfable(?:[- ]mode)?\s+(?:on|with)\s+(haiku|sonnet|sonnect|opus)\b|\bfable-(haiku|sonnet|opus)\b/i);
53
+ const match = prompt.match(FABLE_PROFILE_INVOCATION);
51
54
  if (!match) return null;
52
- const requested = (match[1] || match[2]).toLowerCase();
53
- return requested === 'sonnect' ? 'sonnet' : requested;
55
+ return (match[1] || match[2]).toLowerCase();
56
+ }
57
+
58
+ // A profile mention is data in a lookup, not an instruction to start Fable.
59
+ // Validate the whole clause, not just its prefix. Unknown prose conservatively
60
+ // retains execution routing; format field lists are recognized separately.
61
+ function containsOnlyLookupTerms(text, operation) {
62
+ const terms = {
63
+ explanation: /\b(?:please|help|me|explain|resolve|define|what|is|does|mean|means|meaning|the|a|an|of|to|into|in|for|behavior|behaviour|profile|profiles|selection|json|record|alias|role|runtime|model|effort|floor|fableprofile)\b/gi,
64
+ output: /\b(?:return|respond|output|show|provide|only|a|an|small|compact|json|record|selection|profile|result|with|fields|containing|include|including)\b/gi,
65
+ };
66
+ const chineseTerms = {
67
+ explanation: /(?:請|幫我|解釋|說明|解析|的意思|意思|含義|意義|是什麼|設定檔|行為|角色)/g,
68
+ output: /(?:只|僅|回傳|返回|輸出|顯示|提供|包含|含|的|欄位|記錄|紀錄|結果|設定檔)/g,
69
+ };
70
+ return text.replace(PROFILE_LOOKUP_FIELDS, '').replace(terms[operation], '')
71
+ .replace(chineseTerms[operation], '').replace(/[\s"'`“”‘’?::?]/g, '') === '';
72
+ }
73
+
74
+ // A negation scopes only its own noun/verb list. Vocabulary-only matching would
75
+ // let "no delegation, do execution" pass, so English negations follow a grammar
76
+ // and an un-negated continuation may only extend the noun list. Chinese nouns
77
+ // and verbs share forms, so Chinese lists must stay inside the negated clause.
78
+ const negatedList = unit => `${unit}(?:\\s+or\\s+${unit})*`;
79
+ const NEGATED_ITEM = '(?:orchestration|delegation|stages?|staging|execution|model[- ]switch(?:ing)?)';
80
+ const NEGATED_ACTION = '(?:switch(?:ing)?\\s+(?:the\\s+)?models?|delegate|orchestrate|stage|execute)';
81
+ const ENGLISH_NEGATION = new RegExp(`^(?:(?:no|without)\\s+${negatedList(NEGATED_ITEM)}|(?:do not|don't)\\s+${negatedList(NEGATED_ACTION)})$`, 'i');
82
+ const ENGLISH_NEGATION_CONTINUATION = new RegExp(`^(?:or\\s+)?${negatedList(NEGATED_ITEM)}$`, 'i');
83
+ const CHINESE_NEGATION_TERMS = /(?:不要|不需要|無需|不|或|編排|委派|階段|執行|切換模型)/g;
84
+
85
+ function isBoundedNegation(clause, continuation) {
86
+ const text = clause.replace(/’/g, "'").replace(/[“”"`?::?]/g, '').replace(/\s+/g, ' ').trim();
87
+ if (/^(?:不要|不需要|無需|不)/.test(text)) {
88
+ return !continuation && text.replace(CHINESE_NEGATION_TERMS, '').replace(/\s/g, '') === '';
89
+ }
90
+ return (continuation ? ENGLISH_NEGATION_CONTINUATION : ENGLISH_NEGATION).test(text);
91
+ }
92
+
93
+ function isFableProfileLookup(prompt, hasMacroSignal) {
94
+ if (!detectFableModel(prompt) || hasMacroSignal) return false;
95
+ if (/\b(?:direct[- ]single|iterative[- ]single|fable[- ](?:staged|parallel|multi[- ]agent[- ]workspace))\b/i.test(prompt)) return false;
96
+
97
+ const clauses = prompt
98
+ .split(/(?:[;,.,;。、]|\b(?:and|then|also|plus|afterwards|additionally)\b|(?:並且?|以及|接著|然後|另外))/i)
99
+ .map(part => part.trim())
100
+ .filter(Boolean);
101
+ if (clauses.length === 0) return false;
102
+
103
+ const [lookupClause, ...continuations] = clauses;
104
+ const quotedInvocation = new RegExp(`(["'\x60])(?:run|use|enter)\\s+(?:${FABLE_PROFILE_INVOCATION.source})\\1`, 'gi');
105
+ const normalizedLookup = lookupClause.replace(/[“”]/g, '"').replace(/[‘’]/g, "'")
106
+ .replace(quotedInvocation, 'fableprofile')
107
+ .replace(new RegExp(FABLE_PROFILE_INVOCATION.source, 'gi'), 'fableprofile');
108
+ const isLookupLead = /^(?:(?:please|help me)\s+|(?:請|幫我)\s*)?(?:explain|resolve|define|what (?:is|does)|解釋|說明|解析)/i.test(lookupClause)
109
+ && Boolean(detectFableModel(lookupClause));
110
+ if (!isLookupLead || !containsOnlyLookupTerms(normalizedLookup, 'explanation')) return false;
111
+
112
+ let continuationOperation = null;
113
+ for (const clause of continuations) {
114
+ const output = /^(?:please\s+)?(?:return|respond|output|show|provide)\b|^(?:請\s*)?(?:只|僅)?(?:回傳|返回|輸出|顯示|提供)/i.test(clause);
115
+ const negative = /^(?:please\s+)?(?:no|without|do not|don't)\b|^(?:請\s*)?(?:不要|不需要|無需|不)/i.test(clause);
116
+ if (output || negative) {
117
+ continuationOperation = output ? 'output' : 'negative';
118
+ const normalizedContinuation = clause.replace(/^(?:please\s+|請\s*)/i, '');
119
+ const bounded = output ? containsOnlyLookupTerms(normalizedContinuation, 'output')
120
+ : isBoundedNegation(normalizedContinuation, false);
121
+ if (!bounded) return false;
122
+ } else if (continuationOperation === 'output') {
123
+ // Only named canonical fields may continue a comma/and-separated list.
124
+ const remainder = clause.replace(PROFILE_LOOKUP_FIELDS, '').replace(/^(?:包含|欄位)/, '').replace(/[\s"'`“”‘’]/g, '');
125
+ if (remainder || !new RegExp(PROFILE_LOOKUP_FIELDS.source, 'i').test(clause)) return false;
126
+ } else if (continuationOperation !== 'negative' || !isBoundedNegation(clause, true)) {
127
+ return false;
128
+ }
129
+ }
130
+ return true;
54
131
  }
55
132
 
56
133
  function detectExplicitStrategy(prompt, requestedFableModel) {
@@ -250,6 +327,7 @@ function run(userPrompt, context, options = {}) {
250
327
  /(?:評估|稽核|基準|壓力測試|比較).*(?:每個|所有|全部|整個|全套|技能|skill|檔案|版本)/i,
251
328
  ];
252
329
  const hasMacroSignal = macroSignals.some(signal => signal.test(userPrompt));
330
+ const profileLookup = isFableProfileLookup(userPrompt, hasMacroSignal);
253
331
  const hasTrivialEditVerb = /^(?:(?:please|help me)\s+)?(?:fix|update|correct|change)\b/i.test(userPrompt.trim());
254
332
  const hasDocsTarget = /\b(?:readme|documentation|docs?)\b/i.test(userPrompt);
255
333
  const hasTinyEditSignal = /\b(?:typo|spelling|wording|one line|single line)\b/i.test(userPrompt);
@@ -262,7 +340,12 @@ function run(userPrompt, context, options = {}) {
262
340
  let rationale = 'No structural/testing signals matched; unclassified is not equivalent to trivial.';
263
341
  const reasonCodes = [...loadedConfig.reasonCodes, 'no-classification-signal'];
264
342
 
265
- if (memoryPersistenceRequested && !hasMacroSignal && !hasTier3Keyword && !hasTier2Keyword) {
343
+ if (profileLookup) {
344
+ recommendedTier = 'Tier 1 (Trivial)';
345
+ rationale = 'Bounded behavior-profile lookup; select compact reference before execution.';
346
+ reasonCodes.splice(loadedConfig.reasonCodes.length);
347
+ addReason(reasonCodes, 'fable-profile-lookup');
348
+ } else if (memoryPersistenceRequested && !hasMacroSignal && !hasTier3Keyword && !hasTier2Keyword) {
266
349
  recommendedTier = 'Tier 1 (Trivial)';
267
350
  rationale = 'Explicit bounded self-evolve memory persistence request.';
268
351
  reasonCodes.splice(loadedConfig.reasonCodes.length);
@@ -292,7 +375,7 @@ function run(userPrompt, context, options = {}) {
292
375
  const hasQuestionMarks = /\?|?/.test(userPrompt);
293
376
  const hasMultipleSentences = sentenceCount > 2;
294
377
 
295
- if (!hasMacroSignal && !isTrivialDocsEdit && hasMultipleTasks && hasMultipleSentences) {
378
+ if (!profileLookup && !hasMacroSignal && !isTrivialDocsEdit && hasMultipleTasks && hasMultipleSentences) {
296
379
  if (recommendedTier === 'Unclassified' || recommendedTier.startsWith('Tier 1')) {
297
380
  recommendedTier = 'Tier 2 (Standard Task)';
298
381
  rationale = 'Multiple tasks detected with structural complexity - upgraded to Tier 2 for TDD validation.';
@@ -320,7 +403,7 @@ function run(userPrompt, context, options = {}) {
320
403
  const structuralFloor = hasMacroSignal ? 'tier3'
321
404
  : !isTrivialDocsEdit && hasMultipleTasks && hasMultipleSentences ? 'tier2' : null;
322
405
  const semantic = selectTier({ prompt: userPrompt, tier: recommendedTier, floor: structuralFloor,
323
- explicit: Boolean(detectExplicitStrategy(userPrompt, detectFableModel(userPrompt))) }, process.env, options.systemOneScorer || undefined);
406
+ explicit: profileLookup || Boolean(detectExplicitStrategy(userPrompt, detectFableModel(userPrompt))) }, process.env, options.systemOneScorer || undefined);
324
407
  if (semantic.diagnostic) console.log(`\n=> SYSTEM ONE: ${JSON.stringify(semantic.diagnostic)}`);
325
408
  if (semantic.diagnostic?.applied) {
326
409
  recommendedTier = semantic.tier;
@@ -334,13 +417,18 @@ function run(userPrompt, context, options = {}) {
334
417
 
335
418
  const requestedFableModel = detectFableModel(promptLower);
336
419
  if (requestedFableModel) {
337
- console.log(`\n=> REQUESTED FABLE MODEL MODE: ${requestedFableModel}`);
338
- console.log(`=> ROUTE: fable-mode/fable-${requestedFableModel}/SKILL.md`);
339
- console.log(` Resolve availability and record fallback status with fable-mode/scripts/model-selector.js.`);
420
+ console.log(`\n=> REQUESTED FABLE PROFILE: ${requestedFableModel}`);
421
+ console.log(`=> ROUTE: fable-mode/SKILL.md`);
422
+ if (profileLookup) {
423
+ console.log('=> FABLE OPERATION: profile-lookup');
424
+ console.log('=> REFERENCES: fable-mode/references/profile-lookup.md only; no stage state or delegation.');
425
+ } else {
426
+ console.log(` Profile alias: ${requestedFableModel}; resolve behavior role plus advisory host runtime floor with fable-mode/scripts/model-selector.js.`);
427
+ }
340
428
  }
341
429
 
342
430
  const allRecommendedGuides = [];
343
- for (const group of routingConfig.guideGroups) {
431
+ for (const group of profileLookup ? [] : routingConfig.guideGroups) {
344
432
  let matched = false;
345
433
  if (typeof group.regex === 'string') {
346
434
  matched = new RegExp(group.regex, 'i').test(promptLower);
@@ -366,7 +454,7 @@ function run(userPrompt, context, options = {}) {
366
454
  });
367
455
  }
368
456
 
369
- emitDynamicSkills(promptLower, context, recommendedGuides);
457
+ if (!profileLookup) emitDynamicSkills(promptLower, context, recommendedGuides);
370
458
 
371
459
  const externalClaimTriggers = routingConfig.factAudit.externalClaim || [];
372
460
  const estimateTriggers = routingConfig.factAudit.estimate || [];
@@ -397,7 +485,7 @@ function run(userPrompt, context, options = {}) {
397
485
  const actionGateReasonCodes = detectActionGateReasons(userPrompt);
398
486
  const irreversibleAction = actionGateReasonCodes.includes('irreversible-action');
399
487
  const externalSideEffect = actionGateReasonCodes.includes('external-side-effect');
400
- const requestedStrategy = detectExplicitStrategy(userPrompt, requestedFableModel);
488
+ const requestedStrategy = profileLookup ? null : detectExplicitStrategy(userPrompt, requestedFableModel);
401
489
  const prohibitions = detectProhibitions(userPrompt);
402
490
  const plannerInputs = plannerInputsFromContext(context, promptLower);
403
491
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-enforcement",
3
3
  "description": "Repository inventory for the opencode enforcement plugin and its standalone helper",
4
- "version": "0.30.4",
4
+ "version": "0.30.6",
5
5
  "runtime": "index.mjs",
6
6
  "hooks": {
7
7
  "verify": "hooks/verify.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.30.4",
3
+ "version": "0.30.6",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.30.4",
3
+ "version": "0.30.6",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "harness-everything",
4
- "version": "0.30.4",
4
+ "version": "0.30.6",
5
5
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
6
6
  "author": {
7
7
  "name": "Miya Daniel",
@@ -1,39 +1,45 @@
1
1
  ---
2
2
  name: fable-mode
3
- description: "Stage large, multi-source or multi-session tasks through a written plan, named fable agents, failable per-stage checks, and skeptical delivery review; use fable-opus, fable-sonnet, or fable-haiku for explicit model selection."
3
+ description: "Stage large tasks through plans, named fable agents, failable checks, and skeptical review; fable on opus|sonnet|haiku selects a behavior profile, not a runtime model."
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.2
7
+ version: 0.30.6
8
8
  ---
9
9
 
10
- # Fable Mode (v3)
10
+ # Fable Mode
11
11
 
12
12
  ## Skill Contract
13
13
 
14
14
  | Component | Specification |
15
15
  | :--- | :--- |
16
- | **Trigger / Input** | Tier 3 work spanning multiple files, sources, or sessions. |
17
- | **Expected Output** | Stage map, named-agent briefs, failable checks, and skeptical review. |
18
- | **State Mutations** | Native host TODO tracker or a Markdown checklist; one JSON audit record per stage. |
19
- | **Enforcement Gate** | `<this-skill-dir>/scripts/model-selector.js`, stage contracts, and `<skills-repo-root>/harness-everything/scripts/verify-gate.js`. |
16
+ | **Trigger / Input** | Profile lookup or Tier 3 execution. |
17
+ | **Expected Output** | Profile record or verified stages. |
18
+ | **State Mutations** | Execution only: stage checklist and audit records. |
19
+ | **Enforcement Gate** | Execution: `<this-skill-dir>/scripts/model-selector.js`, stage contracts, and `<skills-repo-root>/harness-everything/scripts/verify-gate.js`. |
20
20
 
21
21
  ## USE FOR:
22
22
  - Large multi-file, multi-source, or multi-session work
23
- - Explicit `fable on haiku`, `fable on sonnet`, or `fable on opus` requests
23
+ - Fable profile explanations or explicit Fable execution requests
24
24
  - Work needing named delegation and cold verification
25
25
 
26
26
  ## DO NOT USE FOR:
27
27
  - One obvious single-pass edit
28
28
  - Ordinary Tier 2 implementation or bugfix work
29
29
 
30
+ ## Select Operation First
31
+
32
+ For explanation/profile-only lookup, read only `<this-skill-dir>/references/profile-lookup.md` and answer. No stage state, delegation, or selector source reads. Quoted aliases do not start Fable. Mixed execution retains its topology.
33
+
34
+ Execution follows the workflow below.
35
+
30
36
  ## Workflow
31
37
 
32
38
  1. Discover the runtime and lock the authorized file scope before edits.
33
39
  2. Write a numbered stage map with one artifact and pass condition per stage; allow at most two full replans.
34
- 3. Resolve the requested model with `model-selector.js`; never silently downgrade.
35
- 4. Delegate by named agent where available: Opus orchestrates, Sonnet reasons, Haiku handles mechanical work, and workers never spawn workers.
36
- 5. Write a stage contract, run its named check, then cold-review high-stakes artifacts with `fable-verifier`.
37
- 6. Record requested/effective model, fallback reason, stage brief, pass condition, verification command, and verifier result for every stage. Escalate unresolved blockers.
40
+ 3. Resolve the requested behavior profile with `model-selector.js`; `opus`, `sonnet`/`sonnect`, and `haiku` are compatibility aliases, not model bindings.
41
+ 4. Delegate by profile: orchestrator coordinates, reasoning handles bounded judgment, mechanical handles low-ambiguity work, and workers never spawn workers.
42
+ 5. Treat the host runtime-model floor as advisory; record its status without blocking Fable solely for model choice.
43
+ 6. Run each stage check, cold-review high-stakes artifacts, and audit profile/runtime/fallback fields.
38
44
 
39
45
  Deep dive: <this-skill-dir>/references/model-matrix.md
@@ -2,7 +2,7 @@
2
2
  name: fable-orchestrator
3
3
  description: Staged-execution orchestrator for large, multi-part, or multi-session tasks. Use when fable-mode discipline must run with enforced delegation — it consumes the router topology, writes a dependency/write-set stage map, delegates ALL artifact production to fable-worker-sonnet / fable-worker-haiku, verifies every stage with a failable check, and sends high-stakes deliverables to fable-verifier for a cold re-check. It has no Write or Edit tool, so it cannot do the work itself.
4
4
  tools: Read, Grep, Glob, Bash, Task, TodoWrite
5
- model: opus
5
+ model: inherit
6
6
  ---
7
7
 
8
8
  You are the fable orchestrator. You coordinate; you do not produce. You have no
@@ -18,7 +18,7 @@ and delegate.
18
18
  When a structured Harness workflow plan is supplied, consume it; do not rebuild
19
19
  its topology from tier labels or keywords. Fable may consume only the selected
20
20
  strategy, parallelism constraints, verifier requirement, workspace/memory hints,
21
- limits, and requested-model metadata. The router does not spawn workers and
21
+ limits, and requested-profile metadata. The router does not spawn workers and
22
22
  Fable does not reclassify the task.
23
23
 
24
24
  - `fable-staged` — execute validated stages sequentially.
@@ -31,11 +31,12 @@ Fable does not reclassify the task.
31
31
  If the plan is blocked, deferred, direct-single, or iterative-single, do not
32
32
  silently coerce it into Fable. Return control to the caller with the plan reason.
33
33
 
34
- Before the first stage, resolve the requested model with
34
+ Before the first stage, resolve the requested behavior profile with
35
35
  `fable-mode/scripts/model-selector.js`. Carry its JSON record into every stage
36
- brief. The workflow-plan consumer must never substitute a branded model. A
37
- missing model must produce the model selector's explicit `fallback` or `blocked`
38
- status. Every brief and handoff names requested versus effective model.
36
+ brief. Profile aliases never pin a branded model. Host runtime-model floors are
37
+ advisory metadata: below-floor or unknown remains visible but does not change or
38
+ block the profile. Agent availability still uses explicit `inline`/`stop`
39
+ fallback. Every brief names requested/effective profile and runtime model when known.
39
40
 
40
41
  ## Core loop
41
42
 
@@ -2,7 +2,7 @@
2
2
  name: fable-verifier
3
3
  description: Cold verifier for finished fable deliverables. Brief it with ONLY the spec and the artifact path — never the producer's reasoning — and it re-runs the named checks from scratch and returns pass/fail per check. Read-only by design; it cannot fix anything, only judge it. Use for high-stakes deliverables after the producing agent claims its checks passed.
4
4
  tools: Read, Grep, Glob, Bash
5
- model: haiku
5
+ model: inherit
6
6
  ---
7
7
 
8
8
  You are a cold verifier. You receive a spec and an artifact. You were
@@ -2,7 +2,7 @@
2
2
  name: fable-worker-haiku
3
3
  description: Fable stage worker for bulk mechanical work — file processing, format conversion, boilerplate, structured extraction, batch edits. Cheap and parallelizable. Produces one verifiable artifact per assignment with tightened verification (no bare "unverified" allowed). Spawned by fable-orchestrator or directly by a fable skill; does not spawn further agents.
4
4
  tools: Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch
5
- model: haiku
5
+ model: inherit
6
6
  ---
7
7
 
8
8
  You are a fable stage worker for mechanical tasks. You receive one bounded
@@ -27,9 +27,10 @@ Rules, in order:
27
27
  5. **Report format:** artifact path, check command, check output, blockers.
28
28
  Short.
29
29
 
30
- Include the mode audit fields in the report: requested model, effective model,
31
- fallback reason, stage brief, pass condition, verification command, and verifier
32
- result. A fallback or blocker must remain visible in the report.
30
+ Include the audit fields in the report: requested/effective profile, profile alias,
31
+ runtime model/effort, runtime-floor status, fallback reason, stage brief, pass
32
+ condition, verification command, and verifier result. A fallback or blocker must
33
+ remain visible in the report.
33
34
 
34
35
  Do not spawn subagents.
35
36
 
@@ -2,7 +2,7 @@
2
2
  name: fable-worker-sonnet
3
3
  description: Fable stage worker for tasks needing real reasoning — research synthesis, nontrivial code, analysis, document drafting. Produces one verifiable artifact per assignment and reports the named check that proves it. Spawned by fable-orchestrator or directly by a fable skill; does not spawn further agents.
4
4
  tools: Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch
5
- model: sonnet
5
+ model: inherit
6
6
  ---
7
7
 
8
8
  You are a fable stage worker. You receive one bounded assignment: a specific
@@ -26,9 +26,10 @@ Rules of the loop, in order:
26
26
  4. **Report format:** artifact path, check command, check output, confirmed
27
27
  facts vs. inferences (labeled), leftovers/recommendations. Keep it short.
28
28
 
29
- Include the mode audit fields in the report: requested model, effective model,
30
- fallback reason, stage brief, pass condition, verification command, and verifier
31
- result. Preserve any `fallback` or `blocked` status from the selector.
29
+ Include the audit fields in the report: requested/effective profile, profile alias,
30
+ runtime model/effort, runtime-floor status, fallback reason, stage brief, pass
31
+ condition, verification command, and verifier result. Preserve any agent
32
+ `fallback` or `blocked` status from the selector.
32
33
 
33
34
  Do not spawn subagents. Escalate rather than guess: if the assignment needs
34
35
  synthesis beyond you or its requirements are contradictory, stop and return the
@@ -0,0 +1,36 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "profiles": {
4
+ "mechanical": {
5
+ "legacyAlias": "haiku",
6
+ "aliases": [
7
+ "mechanical",
8
+ "haiku"
9
+ ],
10
+ "role": "mechanical-worker",
11
+ "useFor": "bulk mechanical work, format conversion, boilerplate, structured extraction, and other low-ambiguity tasks",
12
+ "agent": "fable-worker-haiku"
13
+ },
14
+ "reasoning": {
15
+ "legacyAlias": "sonnet",
16
+ "aliases": [
17
+ "reasoning",
18
+ "sonnet",
19
+ "sonnect"
20
+ ],
21
+ "role": "reasoning-worker",
22
+ "useFor": "non-trivial implementation, research synthesis, analysis, document drafting, and bounded design reasoning",
23
+ "agent": "fable-worker-sonnet"
24
+ },
25
+ "orchestrator": {
26
+ "legacyAlias": "opus",
27
+ "aliases": [
28
+ "orchestrator",
29
+ "opus"
30
+ ],
31
+ "role": "orchestrator",
32
+ "useFor": "stage decomposition, dependency management, cross-stage synthesis, architecture, and high-stakes final decisions",
33
+ "agent": "fable-orchestrator"
34
+ }
35
+ }
36
+ }
@@ -1,13 +1,10 @@
1
1
  ---
2
2
  name: execution-guardrails
3
- description: >-
4
- Always-on guardrails: verify findings before flagging warnings, batch
5
- minor caveats, and anchor search-and-replace edits with post-write checks.
6
- Use when raising warnings or performing search-and-replace file edits.
3
+ description: "Reference guardrails for verified warnings and safe replacements; active carriers must inject them explicitly."
7
4
  license: Apache-2.0
8
5
  metadata:
9
6
  author: Miya Daniel
10
- version: 0.30.2
7
+ version: 0.30.6
11
8
  ---
12
9
 
13
10
  # Execution Guardrails
@@ -40,6 +37,6 @@ metadata:
40
37
 
41
38
  Repeated matching execution failures remain governed by Rule-of-3 / `zoom-out`; warning batching never substitutes for that recovery path.
42
39
 
43
- These rules are always-on, even when `fable-mode`'s staged loop is not running.
40
+ This nested file is reference-only, not an always-on carrier; rules apply only when an active carrier injects them.
44
41
 
45
42
  Deep dive: <this-skill-dir>/references/guardrail-rules.md
@@ -1,9 +1,8 @@
1
1
  # Guardrail Rules — Full Detail
2
2
 
3
- Three rules extracted from fable-mode's operational section so they apply everywhere,
4
- not only inside the staged loop. A frontier model doesn't need a stage map for a simple
5
- task, but it still needs these — they encode the user's preferences, and no model ships
6
- knowing them.
3
+ Three rules extracted from fable-mode's operational section so active carriers can reuse
4
+ them outside the staged loop. A frontier model doesn't need a stage map for a simple task,
5
+ but any carrier that relies on these rules must load, copy, or inject them explicitly.
7
6
 
8
7
  ## 1. Verify before flag
9
8
 
@@ -53,8 +52,8 @@ Preferred order of tools: IDE native structured replace tool (`replace_string_in
53
52
 
54
53
  ## Relationship to fable-mode
55
54
 
56
- fable-mode's staged loop is optional and gated on task size. These guardrails are not
57
- optional and not gated. When fable-mode runs, its step 4 (self-critique) and all file
58
- edits inherit these rules. When fable-mode doesn't run, these rules apply anyway. In v3
59
- the per-model runners route to frontmatter-defined agents (`agents/*.md`) whose system
60
- prompts carry these rules inline, because spawned agents cannot see this skill.
55
+ fable-mode's staged loop is optional and gated on task size. These rules are intended as
56
+ baseline execution guidance wherever an active carrier loads them, but this nested
57
+ reference is not itself automatically discovered or always-on. In v3 the per-model
58
+ flow routes to frontmatter-defined agents (`agents/*.md`) whose system prompts carry
59
+ the required rules inline, because spawned agents cannot see this reference file.
@@ -1,14 +1,16 @@
1
1
  ---
2
2
  name: fable-haiku
3
- description: "Run staged fable work on Haiku for bulk mechanical tasks with explicit pass conditions, visible fallback handling, and a cold verifier pass."
3
+ description: "Reference mechanical behavior profile (legacy alias haiku) for bulk low-ambiguity work with explicit checks and cold verification; runtime model choice is separate."
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.2
7
+ version: 0.30.6
8
8
  ---
9
9
 
10
10
  # Fable Mode — Haiku
11
11
 
12
+ > **Reference profile, not a standalone plugin skill.** Invoke this profile through `fable-mode` with `fable on haiku`; plugin manifests do not register this nested directory independently.
13
+
12
14
  ## Skill Contract
13
15
 
14
16
  | Component | Specification |
@@ -28,9 +30,9 @@ metadata:
28
30
 
29
31
  ## Run it
30
32
 
31
- 1. Resolve `haiku` through `<this-skill-dir>/../scripts/model-selector.js`.
32
- 2. Spawn `fable-worker-haiku` when available; otherwise use an inline fallback only when the audit record says so.
33
+ 1. Resolve legacy alias `haiku` to the `mechanical` behavior profile through `<this-skill-dir>/../scripts/model-selector.js`.
34
+ 2. Spawn `fable-worker-haiku` when available; otherwise use the explicit inline/stop agent fallback. The runtime-model floor is advisory and never changes the profile.
33
35
  3. Brief one bounded output path and a named check; workers do not spawn workers.
34
36
  4. Route synthesis blockers to Sonnet/Opus and cold-review unsupervised delivery with `fable-verifier`.
35
37
 
36
- Use `<this-skill-dir>/../references/model-matrix.md` for the audit fields and fallback policy.
38
+ Use `<this-skill-dir>/../references/model-matrix.md` for behavior-profile aliases, runtime floors, audit fields, and fallback policy.
@@ -6,7 +6,8 @@ Details moved from SKILL.md.
6
6
 
7
7
  The worker is a real agent definition (`../agents/fable-worker-haiku.md`)
8
8
  invoked by name. Its system prompt carries the loop, the tightened verification
9
- rule, and the operational rules; this skill only routes.
9
+ rule, and the operational rules; this reference profile documents the route used after
10
+ `fable-mode` selects Haiku.
10
11
 
11
12
  ## Full run procedure
12
13
 
@@ -1,14 +1,16 @@
1
1
  ---
2
2
  name: fable-opus
3
- description: "Run staged fable orchestration on Opus for cross-stage synthesis, high-stakes architecture, and final decisions with named workers, cold verification, and visible fallback handling."
3
+ description: "Reference orchestrator behavior profile (legacy alias opus) for staged synthesis, architecture, named delegation, and cold verification; runtime model choice is separate."
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.2
7
+ version: 0.30.6
8
8
  ---
9
9
 
10
10
  # Fable Mode — Opus
11
11
 
12
+ > **Reference profile, not a standalone plugin skill.** Invoke this profile through `fable-mode` with `fable on opus`; plugin manifests do not register this nested directory independently.
13
+
12
14
  ## Skill Contract
13
15
 
14
16
  | Component | Specification |
@@ -24,13 +26,13 @@ metadata:
24
26
 
25
27
  ## DO NOT USE FOR:
26
28
  - One obvious single-pass task
27
- - Bulk mechanical work (use `fable-haiku`) or bounded reasoning (use `fable-sonnet`)
29
+ - Bulk mechanical work (select `fable on haiku`) or bounded reasoning (select `fable on sonnet`)
28
30
 
29
31
  ## Run it
30
32
 
31
- 1. Resolve `opus` through `<this-skill-dir>/../scripts/model-selector.js`.
32
- 2. Spawn `fable-orchestrator` when the runtime exposes it; otherwise report the inline fallback explicitly.
33
+ 1. Resolve legacy alias `opus` to the `orchestrator` behavior profile through `<this-skill-dir>/../scripts/model-selector.js`.
34
+ 2. Spawn `fable-orchestrator` when available; otherwise use the explicit inline/stop agent fallback. The runtime-model floor is advisory and never changes the profile.
33
35
  3. The orchestrator owns scope lock, at most two replans, stage contracts, named worker delegation, and escalation; it never produces artifacts itself.
34
36
  4. Cold-review high-stakes deliverables with `fable-verifier`; report every unverified stage.
35
37
 
36
- Use `<this-skill-dir>/../references/model-matrix.md` for the audit fields and fallback policy.
38
+ Use `<this-skill-dir>/../references/model-matrix.md` for behavior-profile aliases, runtime floors, audit fields, and fallback policy.
@@ -1,14 +1,16 @@
1
1
  ---
2
2
  name: fable-sonnet
3
- description: "Run staged fable work on Sonnet for non-trivial implementation, research synthesis, or bounded reasoning with explicit pass conditions and visible fallback handling."
3
+ description: "Reference reasoning behavior profile (legacy alias sonnet/sonnect) for non-trivial implementation, synthesis, and bounded judgment; runtime model choice is separate."
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.2
7
+ version: 0.30.6
8
8
  ---
9
9
 
10
10
  # Fable Mode — Sonnet
11
11
 
12
+ > **Reference profile, not a standalone plugin skill.** Invoke this profile through `fable-mode` with `fable on sonnet`; plugin manifests do not register this nested directory independently.
13
+
12
14
  ## Skill Contract
13
15
 
14
16
  | Component | Specification |
@@ -24,13 +26,13 @@ metadata:
24
26
 
25
27
  ## DO NOT USE FOR:
26
28
  - One obvious single-pass task
27
- - Macro orchestration or final high-stakes decisions (use `fable-opus`)
29
+ - Macro orchestration or final high-stakes decisions (select `fable on opus`)
28
30
 
29
31
  ## Run it
30
32
 
31
- 1. Resolve `sonnet` through `<this-skill-dir>/../scripts/model-selector.js`; normalize `sonnect` to Sonnet.
32
- 2. Spawn `fable-worker-sonnet` when available, otherwise use a visible inline fallback.
33
+ 1. Resolve `sonnet` or `sonnect` to the `reasoning` behavior profile through `<this-skill-dir>/../scripts/model-selector.js`.
34
+ 2. Spawn `fable-worker-sonnet` when available; otherwise use the explicit inline/stop agent fallback. The runtime-model floor is advisory and never changes the profile.
33
35
  3. Brief the exact artifact path, context, and pass condition; workers do not spawn workers.
34
36
  4. Send high-stakes artifacts to `fable-verifier` and escalate contradictions instead of guessing.
35
37
 
36
- Use `<this-skill-dir>/../references/model-matrix.md` for the audit fields and fallback policy.
38
+ Use `<this-skill-dir>/../references/model-matrix.md` for behavior-profile aliases, runtime floors, audit fields, and fallback policy.
@@ -1,32 +1,9 @@
1
1
  {
2
- "schemaVersion": 1,
3
- "modes": {
4
- "haiku": {
5
- "role": "bulk mechanical / format conversion",
6
- "agent": "fable-worker-haiku",
7
- "aliases": ["haiku"]
8
- },
9
- "sonnet": {
10
- "role": "non-trivial implementation / research synthesis / bounded stage reasoning",
11
- "agent": "fable-worker-sonnet",
12
- "aliases": ["sonnet", "sonnect"]
13
- },
14
- "opus": {
15
- "role": "macro orchestration / cross-stage synthesis / high-stakes architecture and final decision",
16
- "agent": "fable-orchestrator",
17
- "aliases": ["opus"]
18
- }
19
- },
20
- "fallbacks": {
21
- "inline": {
22
- "status": "fallback",
23
- "effectiveModel": "host-model",
24
- "reason": "requested model is unavailable; run inline on the declared host model"
25
- },
26
- "stop": {
27
- "status": "blocked",
28
- "effectiveModel": null,
29
- "reason": "requested model is unavailable and inline fallback was not authorized"
30
- }
31
- }
2
+ "schemaVersion": 2,
3
+ "deprecated": true,
4
+ "replacedBy": [
5
+ "behavior-profile-matrix.json",
6
+ "runtime-model-floor-matrix.json"
7
+ ],
8
+ "note": "Fable profiles define behavior and role assignment. Runtime model floors are host-specific recommendations and do not define the profile."
32
9
  }