@deftai/directive-core 0.98.1 → 0.100.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/dist/authz/actions.d.ts +6 -0
- package/dist/authz/actions.js +3 -0
- package/dist/authz/classify.js +401 -75
- package/dist/authz/decompose-apply.d.ts +67 -0
- package/dist/authz/decompose-apply.js +302 -0
- package/dist/authz/index.d.ts +3 -1
- package/dist/authz/index.js +3 -1
- package/dist/authz/store.d.ts +53 -0
- package/dist/authz/store.js +219 -1
- package/dist/authz/types.d.ts +19 -2
- package/dist/authz/types.js +5 -1
- package/dist/consumer-check-contract/evaluate.d.ts +40 -0
- package/dist/consumer-check-contract/evaluate.js +188 -3
- package/dist/consumer-check-contract/index.d.ts +1 -1
- package/dist/consumer-check-contract/index.js +1 -1
- package/dist/content-contracts/skills/greptile-detector.d.ts +42 -0
- package/dist/content-contracts/skills/greptile-detector.js +202 -4
- package/dist/decision/index.d.ts +17 -0
- package/dist/decision/index.js +35 -0
- package/dist/decision/list.d.ts +47 -0
- package/dist/decision/list.js +250 -0
- package/dist/decision/schema.d.ts +88 -0
- package/dist/decision/schema.js +293 -0
- package/dist/decision/write.d.ts +82 -0
- package/dist/decision/write.js +427 -0
- package/dist/doctor/checks.d.ts +44 -0
- package/dist/doctor/checks.js +428 -2
- package/dist/doctor/main.d.ts +6 -7
- package/dist/doctor/main.js +72 -79
- package/dist/doctor/which.d.ts +20 -1
- package/dist/doctor/which.js +67 -1
- package/dist/eval/report.d.ts +29 -0
- package/dist/eval/report.js +69 -0
- package/dist/eval/run.d.ts +9 -0
- package/dist/eval/run.js +40 -4
- package/dist/eval/version-pin.d.ts +99 -0
- package/dist/eval/version-pin.js +181 -0
- package/dist/finish-loop/pr-finish-loop.d.ts +13 -2
- package/dist/finish-loop/pr-finish-loop.js +116 -5
- package/dist/finish-loop/types.d.ts +1 -1
- package/dist/hooks/dispatcher.d.ts +9 -5
- package/dist/hooks/dispatcher.js +23 -15
- package/dist/hooks/readonly.d.ts +6 -3
- package/dist/hooks/readonly.js +44 -25
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/init-deposit/agent-hooks.d.ts +20 -0
- package/dist/init-deposit/agent-hooks.js +51 -31
- package/dist/intake/issue-ingest.js +29 -0
- package/dist/lifecycle/completed-consistency.d.ts +60 -0
- package/dist/lifecycle/completed-consistency.js +443 -0
- package/dist/lifecycle/completed-tracked-on-delivery.d.ts +47 -0
- package/dist/lifecycle/completed-tracked-on-delivery.js +415 -0
- package/dist/lifecycle/index.d.ts +2 -0
- package/dist/lifecycle/index.js +2 -0
- package/dist/literal-acceptance/capture.d.ts +52 -0
- package/dist/literal-acceptance/capture.js +658 -0
- package/dist/literal-acceptance/evaluate.d.ts +47 -0
- package/dist/literal-acceptance/evaluate.js +193 -0
- package/dist/literal-acceptance/index.d.ts +12 -0
- package/dist/literal-acceptance/index.js +12 -0
- package/dist/literal-acceptance/run.d.ts +38 -0
- package/dist/literal-acceptance/run.js +216 -0
- package/dist/literal-acceptance/safety.d.ts +24 -0
- package/dist/literal-acceptance/safety.js +251 -0
- package/dist/literal-acceptance/types.d.ts +82 -0
- package/dist/literal-acceptance/types.js +26 -0
- package/dist/platform/host-content-surface.d.ts +74 -0
- package/dist/platform/host-content-surface.js +214 -0
- package/dist/platform/index.d.ts +1 -0
- package/dist/platform/index.js +1 -0
- package/dist/policy/ceremony-dial.d.ts +289 -0
- package/dist/policy/ceremony-dial.js +980 -0
- package/dist/policy/deft-directive-disable.js +12 -2
- package/dist/policy/index.d.ts +2 -0
- package/dist/policy/index.js +16 -1
- package/dist/policy/merge-approval-head.d.ts +129 -0
- package/dist/policy/merge-approval-head.js +461 -0
- package/dist/policy/require-human-merge.d.ts +5 -0
- package/dist/policy/require-human-merge.js +5 -0
- package/dist/pr-merge-readiness/ci-gate.d.ts +20 -3
- package/dist/pr-merge-readiness/ci-gate.js +65 -5
- package/dist/pr-merge-readiness/compute.d.ts +13 -0
- package/dist/pr-merge-readiness/compute.js +99 -14
- package/dist/pr-merge-readiness/evaluate.js +10 -0
- package/dist/pr-merge-readiness/gh.d.ts +49 -0
- package/dist/pr-merge-readiness/gh.js +268 -0
- package/dist/pr-merge-readiness/index.d.ts +2 -2
- package/dist/pr-merge-readiness/index.js +2 -2
- package/dist/pr-merge-readiness/mergeability.js +5 -0
- package/dist/pr-merge-readiness/output.js +2 -0
- package/dist/pr-merge-readiness/parse.js +4 -0
- package/dist/pr-merge-readiness/test-gh-fixtures.helpers.js +4 -0
- package/dist/pr-merge-readiness/types.d.ts +6 -0
- package/dist/pr-wait-mergeable/cascade.d.ts +11 -0
- package/dist/pr-wait-mergeable/cascade.js +115 -1
- package/dist/pr-wait-mergeable/main.d.ts +4 -0
- package/dist/pr-wait-mergeable/main.js +4 -0
- package/dist/pr-wait-mergeable/types.d.ts +3 -1
- package/dist/pr-wait-mergeable/wrappers.d.ts +6 -1
- package/dist/pr-wait-mergeable/wrappers.js +7 -1
- package/dist/preflight/evaluate.d.ts +15 -1
- package/dist/preflight/evaluate.js +33 -2
- package/dist/render/framework-commands.js +4 -0
- package/dist/scope/acceptance-evidence.d.ts +76 -0
- package/dist/scope/acceptance-evidence.js +348 -0
- package/dist/scope/coverage-map.d.ts +98 -0
- package/dist/scope/coverage-map.js +558 -0
- package/dist/scope/decompose.js +125 -11
- package/dist/scope/effort-activate-gate.d.ts +28 -0
- package/dist/scope/effort-activate-gate.js +64 -0
- package/dist/scope/index.d.ts +4 -0
- package/dist/scope/index.js +4 -0
- package/dist/scope/parent-lineage.d.ts +125 -0
- package/dist/scope/parent-lineage.js +626 -0
- package/dist/scope/transition.d.ts +8 -0
- package/dist/scope/transition.js +69 -2
- package/dist/session/active-cli.d.ts +79 -0
- package/dist/session/active-cli.js +382 -0
- package/dist/session/effort-budget.d.ts +130 -0
- package/dist/session/effort-budget.js +334 -0
- package/dist/session/index.d.ts +2 -0
- package/dist/session/index.js +2 -0
- package/dist/session/session-start.d.ts +30 -1
- package/dist/session/session-start.js +234 -26
- package/dist/session/verify-session-ritual.d.ts +14 -0
- package/dist/session/verify-session-ritual.js +33 -0
- package/dist/story-ready/evaluate.d.ts +11 -0
- package/dist/story-ready/evaluate.js +41 -3
- package/dist/swarm/index.d.ts +2 -0
- package/dist/swarm/index.js +2 -0
- package/dist/swarm/pre-dispatch-cli.d.ts +19 -0
- package/dist/swarm/pre-dispatch-cli.js +143 -0
- package/dist/swarm/pre-dispatch.d.ts +87 -0
- package/dist/swarm/pre-dispatch.js +373 -0
- package/dist/triage/actions/candidates-log.d.ts +1 -2
- package/dist/triage/actions/candidates-log.js +37 -6
- package/dist/vbrief-activate/activate.js +6 -0
- package/dist/vbrief-validate/constants.d.ts +2 -0
- package/dist/vbrief-validate/constants.js +2 -0
- package/dist/vbrief-validate/schema.js +4 -1
- package/dist/xbrief-migrate/migrate-project.d.ts +4 -0
- package/dist/xbrief-migrate/migrate-project.js +92 -3
- package/package.json +19 -3
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ceremony dial (#3214 / #3263): ritual depth = f(task size × model tier × project shape).
|
|
3
|
+
*
|
|
4
|
+
* Selection policy over existing pieces — not a new subsystem.
|
|
5
|
+
* Composes:
|
|
6
|
+
* - strategies/rapid.md (light / rapid path)
|
|
7
|
+
* - #3014 minimal consumer AGENTS profile (research pointer; not yet a shipped deposit)
|
|
8
|
+
* - effort estimate (#1581), model routing (#1976/#818), host capability (#1461)
|
|
9
|
+
*
|
|
10
|
+
* Two-stage dial (#3214 design note / #1581 ordering) with tier-conditional cold-start (#3263):
|
|
11
|
+
* cold-start / incomplete size → **tier-conditional**:
|
|
12
|
+
* frontier (or unknown tier) → rapid; mid/low → standard (not rapid)
|
|
13
|
+
* escalate when evidence arrives (provisional M/L size, full matrix)
|
|
14
|
+
* Full matrix: S × frontier → rapid; non-project → minimal; else scales up.
|
|
15
|
+
* Override always available via plan.policy.ceremonyDial.override; audited on write.
|
|
16
|
+
*
|
|
17
|
+
* Audit path (#3263): session:start records depth + provisional reasons on
|
|
18
|
+
* `.deft/ritual-state.json` under `ceremony_dial` — use `readCeremonyDialAudit`.
|
|
19
|
+
*/
|
|
20
|
+
/** Canonical dotted policy field name. */
|
|
21
|
+
export declare const FIELD_CEREMONY_DIAL = "plan.policy.ceremonyDial";
|
|
22
|
+
/** Short alias for `policy:show --field=ceremonyDial`. */
|
|
23
|
+
export declare const FIELD_CEREMONY_DIAL_CLI_ALIAS = "ceremonyDial";
|
|
24
|
+
/** Depth ladder: less ceremony → more ceremony. */
|
|
25
|
+
export declare const CEREMONY_DEPTHS: readonly ["minimal", "rapid", "standard", "elevated"];
|
|
26
|
+
export type CeremonyDepth = (typeof CEREMONY_DEPTHS)[number];
|
|
27
|
+
/** Task size band (aligns with swarm size / effort estimate vocabulary). */
|
|
28
|
+
export declare const CEREMONY_TASK_SIZES: readonly ["S", "M", "L", "XL"];
|
|
29
|
+
export type CeremonyTaskSize = (typeof CEREMONY_TASK_SIZES)[number];
|
|
30
|
+
/**
|
|
31
|
+
* Model capability tier for dial selection.
|
|
32
|
+
* `frontier` = strongest class; `mid` benefits from structure; `low` needs more ceremony.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CEREMONY_MODEL_TIERS: readonly ["frontier", "mid", "low"];
|
|
35
|
+
export type CeremonyModelTier = (typeof CEREMONY_MODEL_TIERS)[number];
|
|
36
|
+
/** Whether the session is project-shaped (Directive repo/work) or ad-hoc non-project. */
|
|
37
|
+
export declare const CEREMONY_PROJECT_SHAPES: readonly ["project", "non-project"];
|
|
38
|
+
export type CeremonyProjectShape = (typeof CEREMONY_PROJECT_SHAPES)[number];
|
|
39
|
+
/** Pointers for composition (not loaded as a subsystem — discovery only). */
|
|
40
|
+
export declare const CEREMONY_RAPID_STRATEGY_POINTER = "content/strategies/rapid.md";
|
|
41
|
+
export declare const CEREMONY_MINIMAL_AGENTS_PROFILE_POINTER = "docs/analysis/2026-07-31-minimal-consumer-agents-profile-research.md (#3014)";
|
|
42
|
+
export interface CeremonyDialConfig {
|
|
43
|
+
/** When false, selection always returns standard (full ceremony). Default true. */
|
|
44
|
+
readonly enabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Force a depth regardless of inputs. Always wins when set.
|
|
47
|
+
* Use null/omit for matrix selection.
|
|
48
|
+
*/
|
|
49
|
+
readonly override?: CeremonyDepth | null;
|
|
50
|
+
}
|
|
51
|
+
export interface CeremonyDialInputs {
|
|
52
|
+
readonly taskSize?: CeremonyTaskSize | null;
|
|
53
|
+
readonly modelTier?: CeremonyModelTier | null;
|
|
54
|
+
readonly projectShape?: CeremonyProjectShape | null;
|
|
55
|
+
}
|
|
56
|
+
export interface CeremonyDialProfile {
|
|
57
|
+
readonly depth: CeremonyDepth;
|
|
58
|
+
/**
|
|
59
|
+
* Ritual steps auto-deferred at this depth (merged into session:start deferrals).
|
|
60
|
+
* Matches QUICK_STEPS / GATED_STEPS names in session-start.
|
|
61
|
+
*/
|
|
62
|
+
readonly autoDeferSteps: readonly string[];
|
|
63
|
+
/** Skip fat cold-path work (verify tools, triage welcome, release probe, tickler). */
|
|
64
|
+
readonly skipFatPath: boolean;
|
|
65
|
+
/** How much lifecycle / history write budget this depth intends. */
|
|
66
|
+
readonly lifecycleWrites: "minimal" | "light" | "full";
|
|
67
|
+
/**
|
|
68
|
+
* Literal acceptance-command verification is always required (#3267 / #3156).
|
|
69
|
+
* Ceremony dial never skips capture+verbatim run — including rapid/minimal.
|
|
70
|
+
*/
|
|
71
|
+
readonly literalAcceptanceRequired: true;
|
|
72
|
+
readonly label: string;
|
|
73
|
+
}
|
|
74
|
+
export type CeremonyDialSource = "override" | "matrix" | "default" | "disabled" | "typed" | "default-on-error";
|
|
75
|
+
export interface CeremonyDialComposition {
|
|
76
|
+
/** Set when depth is rapid (light path). */
|
|
77
|
+
readonly rapidStrategy: string | null;
|
|
78
|
+
/** Set when depth is minimal (non-project / #3014 direction). */
|
|
79
|
+
readonly minimalAgentsProfile: string | null;
|
|
80
|
+
}
|
|
81
|
+
export interface CeremonyDialSelection {
|
|
82
|
+
readonly depth: CeremonyDepth;
|
|
83
|
+
readonly source: CeremonyDialSource;
|
|
84
|
+
readonly inputs: {
|
|
85
|
+
readonly taskSize: CeremonyTaskSize | null;
|
|
86
|
+
readonly modelTier: CeremonyModelTier | null;
|
|
87
|
+
readonly projectShape: CeremonyProjectShape | null;
|
|
88
|
+
};
|
|
89
|
+
readonly profile: CeremonyDialProfile;
|
|
90
|
+
readonly composition: CeremonyDialComposition;
|
|
91
|
+
readonly config: CeremonyDialConfig;
|
|
92
|
+
readonly error: string | null;
|
|
93
|
+
}
|
|
94
|
+
export declare function ceremonyDialProfile(depth: CeremonyDepth): CeremonyDialProfile;
|
|
95
|
+
/** Validate a typed `plan.policy.ceremonyDial` payload. */
|
|
96
|
+
export declare function validateCeremonyDial(value: unknown): string[];
|
|
97
|
+
/**
|
|
98
|
+
* Normalize free-form size tokens (swarm size vocabulary) into dial bands.
|
|
99
|
+
* Accepts S|M|L|XL and small|medium|large|extra-large (case-insensitive).
|
|
100
|
+
*/
|
|
101
|
+
export declare function normalizeCeremonyTaskSize(raw: unknown): CeremonyTaskSize | null;
|
|
102
|
+
/**
|
|
103
|
+
* Normalize model tier tokens. Frontier covers high/strong; mid covers medium;
|
|
104
|
+
* low covers weak/economy.
|
|
105
|
+
*/
|
|
106
|
+
export declare function normalizeCeremonyModelTier(raw: unknown): CeremonyModelTier | null;
|
|
107
|
+
export declare function normalizeCeremonyProjectShape(raw: unknown): CeremonyProjectShape | null;
|
|
108
|
+
/**
|
|
109
|
+
* Tier-conditional cold-start depth when task size is incomplete (#3263).
|
|
110
|
+
*
|
|
111
|
+
* Mid/low models benefit from structure on hard tasks and should not cold-start
|
|
112
|
+
* at rapid (start-light / escalate-too-late signature). Frontier recovers from a
|
|
113
|
+
* light start. Unknown tier stays rapid (optimistic cold default; pass
|
|
114
|
+
* `--model-tier` / `DEFT_CEREMONY_MODEL_TIER` to unlock the mid/low floor).
|
|
115
|
+
*
|
|
116
|
+
* Escalate-on-evidence still applies when size later arrives (full matrix).
|
|
117
|
+
*/
|
|
118
|
+
export declare function selectCeremonyColdStartDepth(modelTier: CeremonyModelTier | null | undefined): CeremonyDepth;
|
|
119
|
+
/**
|
|
120
|
+
* Two-stage / partial-evidence selection when size or tier is missing
|
|
121
|
+
* (#3214 design note / #3263 tier-conditional cold-start).
|
|
122
|
+
*
|
|
123
|
+
* Cold incomplete size is tier-conditional (#3263): mid/low → standard, frontier
|
|
124
|
+
* or unknown → rapid. When size is known without tier, escalate on substantial
|
|
125
|
+
* size (apps-bank safety). Does not invent plan-item effort (#1581 post-planning only).
|
|
126
|
+
*/
|
|
127
|
+
export declare function selectCeremonyDepthFromPartialEvidence(inputs: {
|
|
128
|
+
readonly taskSize: CeremonyTaskSize | null;
|
|
129
|
+
readonly modelTier: CeremonyModelTier | null;
|
|
130
|
+
}): CeremonyDepth;
|
|
131
|
+
/**
|
|
132
|
+
* Pure default matrix (#3214 acceptance + #3263 tier-conditional cold-start):
|
|
133
|
+
* - non-project → minimal (#3014 direction)
|
|
134
|
+
* - S × frontier → rapid (strategies/rapid.md)
|
|
135
|
+
* - S × mid → standard (mid-tier gains from structure)
|
|
136
|
+
* - S × low → elevated
|
|
137
|
+
* - M × low → elevated; M otherwise → standard
|
|
138
|
+
* - L/XL → elevated (except L × frontier stays standard)
|
|
139
|
+
* - Incomplete size → tier-conditional cold-start (#3263): mid/low → standard; frontier/unknown → rapid
|
|
140
|
+
* - Size known, tier missing → escalate on M/L (partial evidence)
|
|
141
|
+
*/
|
|
142
|
+
export declare function selectCeremonyDepthFromMatrix(inputs: CeremonyDialInputs): CeremonyDepth;
|
|
143
|
+
export interface SelectCeremonyDepthOptions {
|
|
144
|
+
readonly config?: CeremonyDialConfig;
|
|
145
|
+
readonly inputs?: CeremonyDialInputs;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Deterministic depth selection (pure; no IO).
|
|
149
|
+
*
|
|
150
|
+
* Precedence: disabled → standard; override → forced depth; else matrix on inputs;
|
|
151
|
+
* empty inputs → **rapid** (unknown-tier cold default; #3263 mid/low need modelTier set).
|
|
152
|
+
*/
|
|
153
|
+
export declare function selectCeremonyDepth(options?: SelectCeremonyDepthOptions): CeremonyDialSelection;
|
|
154
|
+
export interface ResolveCeremonyDialOptions {
|
|
155
|
+
readonly inputs?: CeremonyDialInputs;
|
|
156
|
+
/** Explicit config bypasses PROJECT-DEFINITION load (tests). */
|
|
157
|
+
readonly config?: CeremonyDialConfig;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Resolve ceremony dial from PROJECT-DEFINITION policy + session inputs (#3214).
|
|
161
|
+
*/
|
|
162
|
+
export declare function resolveCeremonyDial(projectRoot: string, options?: ResolveCeremonyDialOptions): CeremonyDialSelection;
|
|
163
|
+
/** Human-readable status line for session:start / policy:show. */
|
|
164
|
+
export declare function formatCeremonyDialStatusLine(selection: CeremonyDialSelection): string;
|
|
165
|
+
/** JSON-serializable dial snapshot for ritual-state / session payload. */
|
|
166
|
+
export declare function ceremonyDialToDict(selection: CeremonyDialSelection): Record<string, unknown>;
|
|
167
|
+
export interface CeremonyDialPolicyField {
|
|
168
|
+
readonly name: typeof FIELD_CEREMONY_DIAL;
|
|
169
|
+
readonly current: CeremonyDialConfig & {
|
|
170
|
+
selectedDepth?: CeremonyDepth;
|
|
171
|
+
};
|
|
172
|
+
readonly default: CeremonyDialConfig;
|
|
173
|
+
readonly source: string;
|
|
174
|
+
}
|
|
175
|
+
/** Inspector row for `task policy:show --field=ceremonyDial`. */
|
|
176
|
+
export declare function inspectCeremonyDial(data: Record<string, unknown> | null, projectRoot?: string): CeremonyDialPolicyField;
|
|
177
|
+
export interface SetCeremonyDialOptions {
|
|
178
|
+
readonly enabled?: boolean;
|
|
179
|
+
readonly override?: CeremonyDepth | null;
|
|
180
|
+
readonly actor?: string;
|
|
181
|
+
readonly note?: string;
|
|
182
|
+
readonly confirm?: boolean;
|
|
183
|
+
}
|
|
184
|
+
export interface SetCeremonyDialResult {
|
|
185
|
+
readonly exitCode: 0 | 1 | 2;
|
|
186
|
+
readonly stdout: string;
|
|
187
|
+
readonly changed: boolean;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Persist plan.policy.ceremonyDial (override + enabled) with audit trail (#3214).
|
|
191
|
+
* Requires --confirm for override writes (capability-cost style disclosure).
|
|
192
|
+
*/
|
|
193
|
+
export declare function setCeremonyDial(projectRoot: string, options: SetCeremonyDialOptions): SetCeremonyDialResult;
|
|
194
|
+
/**
|
|
195
|
+
* Merge dial auto-defer steps into an existing deferrals map without clobbering
|
|
196
|
+
* operator-supplied reasons.
|
|
197
|
+
*/
|
|
198
|
+
export declare function mergeCeremonyDialDeferrals(existing: Readonly<Record<string, string>>, selection: CeremonyDialSelection): Record<string, string>;
|
|
199
|
+
/** Env keys for headless dial inputs (no operator confirmation). */
|
|
200
|
+
export declare const ENV_CEREMONY_TASK_SIZE = "DEFT_CEREMONY_TASK_SIZE";
|
|
201
|
+
export declare const ENV_CEREMONY_MODEL_TIER = "DEFT_CEREMONY_MODEL_TIER";
|
|
202
|
+
export declare const ENV_CEREMONY_PROJECT_SHAPE = "DEFT_CEREMONY_PROJECT_SHAPE";
|
|
203
|
+
/** Optional host model hint used when DEFT_CEREMONY_MODEL_TIER is unset. */
|
|
204
|
+
export declare const ENV_CEREMONY_MODEL_HINT = "DEFT_MODEL";
|
|
205
|
+
export interface ProvisionalCeremonyEstimateHints {
|
|
206
|
+
/** Free-text task / prompt (optional; headless may omit). */
|
|
207
|
+
readonly promptText?: string | null;
|
|
208
|
+
/** Closed-verb or action verb token when known. */
|
|
209
|
+
readonly verb?: string | null;
|
|
210
|
+
/** Paths in scope (files or dirs); used for file-count / multi-area signals. */
|
|
211
|
+
readonly filePaths?: readonly string[] | null;
|
|
212
|
+
/** Explicit file count when paths are not enumerated. */
|
|
213
|
+
readonly fileCount?: number | null;
|
|
214
|
+
/** Process env for headless size/tier/shape overrides. */
|
|
215
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
216
|
+
/** Project root for deposit-based project-shape detection. */
|
|
217
|
+
readonly projectRoot?: string | null;
|
|
218
|
+
}
|
|
219
|
+
export interface ProvisionalCeremonyEstimate {
|
|
220
|
+
readonly taskSize: CeremonyTaskSize | null;
|
|
221
|
+
readonly modelTier: CeremonyModelTier | null;
|
|
222
|
+
readonly projectShape: CeremonyProjectShape | null;
|
|
223
|
+
/** Why each filled field was chosen (headless diagnostics). */
|
|
224
|
+
readonly reasons: readonly string[];
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Detect project shape from deposit layout (headless, no prompts).
|
|
228
|
+
* Returns `project` when vanilla deposit markers exist; **null** when unknown
|
|
229
|
+
* (two-stage cold default stays rapid — do not invent non-project without evidence).
|
|
230
|
+
* Explicit `non-project` comes from CLI/env only.
|
|
231
|
+
*/
|
|
232
|
+
export declare function detectCeremonyProjectShape(projectRoot: string): CeremonyProjectShape | null;
|
|
233
|
+
/**
|
|
234
|
+
* Headless-safe provisional S/M/L (+ optional tier/shape) **before** ritual.
|
|
235
|
+
* No operator confirmation. Plan-item effort (#1581) later confirms/corrects.
|
|
236
|
+
*
|
|
237
|
+
* Signals (max-wins for size): env → verb class → file-scope count → prompt shape.
|
|
238
|
+
* Project shape: env, else deposit detection when projectRoot is set.
|
|
239
|
+
*/
|
|
240
|
+
export declare function estimateProvisionalCeremonyInputs(hints?: ProvisionalCeremonyEstimateHints): ProvisionalCeremonyEstimate;
|
|
241
|
+
/**
|
|
242
|
+
* Merge explicit dial inputs over provisional estimates. Explicit non-null wins.
|
|
243
|
+
* Used by session:start so vanilla deposit gets provisional fill without policy opt-in.
|
|
244
|
+
*/
|
|
245
|
+
export declare function mergeCeremonyDialInputsWithProvisional(explicit: CeremonyDialInputs | undefined, provisional: ProvisionalCeremonyEstimate): CeremonyDialInputs;
|
|
246
|
+
/**
|
|
247
|
+
* Resolve dial inputs for session:start: explicit CLI/options first, then
|
|
248
|
+
* headless provisional classifier (env / verb / files / prompt / deposit).
|
|
249
|
+
* ⊗ Does not read plan-item effort (#1581) — that lands post-planning only.
|
|
250
|
+
*/
|
|
251
|
+
export declare function resolveSessionCeremonyDialInputs(projectRoot: string, explicit?: CeremonyDialInputs, options?: Omit<ProvisionalCeremonyEstimateHints, "projectRoot">): {
|
|
252
|
+
readonly inputs: CeremonyDialInputs;
|
|
253
|
+
readonly provisional: ProvisionalCeremonyEstimate;
|
|
254
|
+
};
|
|
255
|
+
export interface CeremonyDialAuditProvisional {
|
|
256
|
+
readonly taskSize: CeremonyTaskSize | null;
|
|
257
|
+
readonly modelTier: CeremonyModelTier | null;
|
|
258
|
+
readonly projectShape: CeremonyProjectShape | null;
|
|
259
|
+
readonly reasons: readonly string[];
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Snapshot of dial selection recorded on `.deft/ritual-state.json` at session:start.
|
|
263
|
+
* Operators audit failed-task depth / provisional reasons without re-running ritual.
|
|
264
|
+
*/
|
|
265
|
+
export interface CeremonyDialAuditSnapshot {
|
|
266
|
+
readonly path: string;
|
|
267
|
+
readonly depth: CeremonyDepth | null;
|
|
268
|
+
readonly source: string | null;
|
|
269
|
+
readonly inputs: {
|
|
270
|
+
readonly taskSize: CeremonyTaskSize | null;
|
|
271
|
+
readonly modelTier: CeremonyModelTier | null;
|
|
272
|
+
readonly projectShape: CeremonyProjectShape | null;
|
|
273
|
+
} | null;
|
|
274
|
+
readonly provisional: CeremonyDialAuditProvisional | null;
|
|
275
|
+
readonly raw: Record<string, unknown> | null;
|
|
276
|
+
readonly error: string | null;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Read ceremony dial depth + provisional reasons from ritual-state (#3263 audit path).
|
|
280
|
+
* session:start already writes `ceremony_dial` (incl. provisional) — this is the
|
|
281
|
+
* operator/read path so failed runs can confirm start-light vs escalate timing.
|
|
282
|
+
*
|
|
283
|
+
* Returns `error` when ritual-state is missing/unreadable or lacks `ceremony_dial`;
|
|
284
|
+
* does not throw.
|
|
285
|
+
*/
|
|
286
|
+
export declare function readCeremonyDialAudit(projectRoot: string): CeremonyDialAuditSnapshot;
|
|
287
|
+
/** One-line operator summary for audit tooling / failed-task forensics (#3263). */
|
|
288
|
+
export declare function formatCeremonyDialAuditLine(audit: CeremonyDialAuditSnapshot): string;
|
|
289
|
+
//# sourceMappingURL=ceremony-dial.d.ts.map
|