@telora/daemon 0.20.60 → 0.20.89
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/build-info.json +4 -3
- package/dist/ai-inspection-context.d.ts.map +1 -1
- package/dist/ai-inspection-context.js +4 -2
- package/dist/ai-inspection-context.js.map +1 -1
- package/dist/audit-phase.d.ts +12 -18
- package/dist/audit-phase.d.ts.map +1 -1
- package/dist/audit-phase.js +17 -60
- package/dist/audit-phase.js.map +1 -1
- package/dist/audit-prompt.d.ts +44 -0
- package/dist/audit-prompt.d.ts.map +1 -0
- package/dist/audit-prompt.js +198 -0
- package/dist/audit-prompt.js.map +1 -0
- package/dist/ci-sensor-loop.d.ts +38 -1
- package/dist/ci-sensor-loop.d.ts.map +1 -1
- package/dist/ci-sensor-loop.js +49 -5
- package/dist/ci-sensor-loop.js.map +1 -1
- package/dist/completion/completion-decision.d.ts +3 -29
- package/dist/completion/completion-decision.d.ts.map +1 -1
- package/dist/completion/completion-decision.js +3 -15
- package/dist/completion/completion-decision.js.map +1 -1
- package/dist/completion/event-phases.d.ts +0 -8
- package/dist/completion/event-phases.d.ts.map +1 -1
- package/dist/completion/event-phases.js +4 -52
- package/dist/completion/event-phases.js.map +1 -1
- package/dist/completion/event.d.ts +1 -11
- package/dist/completion/event.d.ts.map +1 -1
- package/dist/completion/event.js +1 -3
- package/dist/completion/event.js.map +1 -1
- package/dist/delivery-artifacts.d.ts.map +1 -1
- package/dist/delivery-artifacts.js +9 -8
- package/dist/delivery-artifacts.js.map +1 -1
- package/dist/delivery-reconciler.d.ts +3 -0
- package/dist/delivery-reconciler.d.ts.map +1 -1
- package/dist/delivery-reconciler.js +16 -0
- package/dist/delivery-reconciler.js.map +1 -1
- package/dist/focus-engine.d.ts.map +1 -1
- package/dist/focus-engine.js +12 -1
- package/dist/focus-engine.js.map +1 -1
- package/dist/focus-executor.d.ts.map +1 -1
- package/dist/focus-executor.js +4 -1
- package/dist/focus-executor.js.map +1 -1
- package/dist/focus-merge.d.ts.map +1 -1
- package/dist/focus-merge.js +37 -3
- package/dist/focus-merge.js.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +9 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/listener-auto-advance.d.ts.map +1 -1
- package/dist/listener-auto-advance.js +58 -10
- package/dist/listener-auto-advance.js.map +1 -1
- package/dist/merge-back-loop.d.ts +8 -2
- package/dist/merge-back-loop.d.ts.map +1 -1
- package/dist/merge-back-loop.js +17 -11
- package/dist/merge-back-loop.js.map +1 -1
- package/dist/merge-failure-classify.d.ts +39 -0
- package/dist/merge-failure-classify.d.ts.map +1 -0
- package/dist/merge-failure-classify.js +58 -0
- package/dist/merge-failure-classify.js.map +1 -0
- package/dist/prompt-sections/execution-sections.d.ts +20 -14
- package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
- package/dist/prompt-sections/execution-sections.js +97 -141
- package/dist/prompt-sections/execution-sections.js.map +1 -1
- package/dist/prompt-sections/scoping-sections.d.ts +30 -0
- package/dist/prompt-sections/scoping-sections.d.ts.map +1 -0
- package/dist/prompt-sections/scoping-sections.js +187 -0
- package/dist/prompt-sections/scoping-sections.js.map +1 -0
- package/dist/prompt-sections/shared.d.ts +7 -0
- package/dist/prompt-sections/shared.d.ts.map +1 -1
- package/dist/prompt-sections/shared.js.map +1 -1
- package/dist/queries/agent-resolvable-promotion.d.ts +87 -0
- package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -0
- package/dist/queries/agent-resolvable-promotion.js +152 -0
- package/dist/queries/agent-resolvable-promotion.js.map +1 -0
- package/dist/queries/cause-key.d.ts +64 -0
- package/dist/queries/cause-key.d.ts.map +1 -0
- package/dist/queries/cause-key.js +79 -0
- package/dist/queries/cause-key.js.map +1 -0
- package/dist/queries/deliveries.d.ts +20 -153
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js +26 -0
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/delivery-gate-state.d.ts +192 -0
- package/dist/queries/delivery-gate-state.d.ts.map +1 -0
- package/dist/queries/delivery-gate-state.js +23 -0
- package/dist/queries/delivery-gate-state.js.map +1 -0
- package/dist/queries/escalation-suppression.d.ts +89 -0
- package/dist/queries/escalation-suppression.d.ts.map +1 -0
- package/dist/queries/escalation-suppression.js +98 -0
- package/dist/queries/escalation-suppression.js.map +1 -0
- package/dist/queries/holds.d.ts +52 -59
- package/dist/queries/holds.d.ts.map +1 -1
- package/dist/queries/holds.js +60 -68
- package/dist/queries/holds.js.map +1 -1
- package/dist/queries/issues.d.ts +40 -2
- package/dist/queries/issues.d.ts.map +1 -1
- package/dist/queries/issues.js +55 -2
- package/dist/queries/issues.js.map +1 -1
- package/dist/queries/verification.d.ts +11 -0
- package/dist/queries/verification.d.ts.map +1 -1
- package/dist/queries/verification.js.map +1 -1
- package/dist/reality-pole.d.ts +5 -3
- package/dist/reality-pole.d.ts.map +1 -1
- package/dist/reality-pole.js +13 -4
- package/dist/reality-pole.js.map +1 -1
- package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
- package/dist/resolvers/git-diff-against-base.js +12 -5
- package/dist/resolvers/git-diff-against-base.js.map +1 -1
- package/dist/resolvers/index.d.ts +1 -1
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -1
- package/dist/resolvers/index.js.map +1 -1
- package/dist/resolvers/shared/git-diff.d.ts +152 -10
- package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
- package/dist/resolvers/shared/git-diff.js +292 -14
- package/dist/resolvers/shared/git-diff.js.map +1 -1
- package/dist/spawn/prompt-assembly.d.ts +3 -0
- package/dist/spawn/prompt-assembly.d.ts.map +1 -1
- package/dist/spawn/prompt-assembly.js +2 -1
- package/dist/spawn/prompt-assembly.js.map +1 -1
- package/dist/spawn/worktree-session.d.ts +2 -0
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +20 -1
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/staleness-sensor.d.ts +24 -1
- package/dist/staleness-sensor.d.ts.map +1 -1
- package/dist/staleness-sensor.js +31 -4
- package/dist/staleness-sensor.js.map +1 -1
- package/dist/stall-detectors.d.ts +13 -9
- package/dist/stall-detectors.d.ts.map +1 -1
- package/dist/stall-detectors.js +14 -13
- package/dist/stall-detectors.js.map +1 -1
- package/dist/team-prompt-base.d.ts +1 -1
- package/dist/team-prompt-base.d.ts.map +1 -1
- package/dist/team-prompt-base.js +4 -2
- package/dist/team-prompt-base.js.map +1 -1
- package/dist/templates/claude-md.d.ts +1 -1
- package/dist/templates/claude-md.d.ts.map +1 -1
- package/dist/templates/claude-md.js +20 -0
- package/dist/templates/claude-md.js.map +1 -1
- package/dist/verification-default-on.d.ts.map +1 -1
- package/dist/verification-default-on.js +5 -0
- package/dist/verification-default-on.js.map +1 -1
- package/dist/verification-deps.d.ts +151 -0
- package/dist/verification-deps.d.ts.map +1 -0
- package/dist/verification-deps.js +19 -0
- package/dist/verification-deps.js.map +1 -0
- package/dist/verification-engine.d.ts +18 -112
- package/dist/verification-engine.d.ts.map +1 -1
- package/dist/verification-engine.js +90 -103
- package/dist/verification-engine.js.map +1 -1
- package/dist/verification-evidence.d.ts +106 -0
- package/dist/verification-evidence.d.ts.map +1 -0
- package/dist/verification-evidence.js +158 -0
- package/dist/verification-evidence.js.map +1 -0
- package/dist/verification-feedback.d.ts +31 -26
- package/dist/verification-feedback.d.ts.map +1 -1
- package/dist/verification-feedback.js +77 -76
- package/dist/verification-feedback.js.map +1 -1
- package/dist/verify-restatement.d.ts +12 -9
- package/dist/verify-restatement.d.ts.map +1 -1
- package/dist/verify-restatement.js +11 -9
- package/dist/verify-restatement.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-assembly.js","sourceRoot":"","sources":["../../src/spawn/prompt-assembly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-assembly.js","sourceRoot":"","sources":["../../src/spawn/prompt-assembly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,EAC7B,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,iCAAiC,EAAoD,MAAM,uBAAuB,CAAC;AAE5H,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAGvD;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAiBvC;IACC,MAAM,EACJ,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EACjF,cAAc,EAAE,yBAAyB,EAAE,QAAQ,EAAE,WAAW,EAChE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,GACrD,GAAG,IAAI,CAAC;IACT,OAAO;QACL,OAAO;QACP,SAAS;QACT,gBAAgB;QAChB,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,UAAU;QACV,MAAM;QACN,eAAe;QACf,cAAc;QACd,yBAAyB;QACzB,QAAQ;QACR,WAAW;QACX,oBAAoB;QACpB,QAAQ;QACR,oBAAoB;KACrB,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,M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E,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;SAC/C,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;QACxB,OAAO,KAAK,GAAG,CAAC,KAAK,QAAQ,CAAC,IAAI,EAAE;QACpC,kBAAkB,QAAQ,CAAC,EAAE,EAAE;QAC/B,oBAAoB,QAAQ,CAAC,YAAY,EAAE;QAC3C,EAAE;QACF,iBAAiB;QACjB,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,QAAQ;QACxC,EAAE;QACF,yBAAyB;QACzB,QAAQ,CAAC,kBAAkB,EAAE,IAAI,EAAE,IAAI,QAAQ;QAC/C,EAAE;QACF,uBAAuB;QACvB,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,QAAQ;KACzC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACZ,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhB,OAAO;QACL,gDAAgD;QAChD,EAAE;QACF,sCAAsC,IAAI,CAAC,OAAO,eAAe,IAAI,CAAC,SAAS,iIAAiI;QAChN,EAAE;QACF,mYAAmY;QACnY,EAAE;QACF,kLAAkL;QAClL,EAAE;QACF,gBAAgB;KACjB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type { DaemonConfig, AgentRole, FocusTeamState, PipelineConfig } from '../types.js';
|
|
14
14
|
import { createSession, type SessionType } from '../supabase.js';
|
|
15
15
|
import { getFocusIssues } from '../queries/focuses.js';
|
|
16
|
+
import { type AgentResolvableItem } from '../queries/issues.js';
|
|
16
17
|
import { resolveLineageSpec } from '../session-lineage.js';
|
|
17
18
|
import { resolveBackend, type AgentBackend, type EngineOverride, type EnginePass } from '../backends/index.js';
|
|
18
19
|
import type { DirectiveResolution } from './shared.js';
|
|
@@ -80,6 +81,7 @@ export declare function resolveReviewContext(args: {
|
|
|
80
81
|
reviewFiledOpenCount: number;
|
|
81
82
|
priorFindings: Awaited<ReturnType<typeof getFocusIssues>>;
|
|
82
83
|
focusDescription: string | null;
|
|
84
|
+
agentResolvableItems: AgentResolvableItem[];
|
|
83
85
|
}>;
|
|
84
86
|
/**
|
|
85
87
|
* Phase B: resolve the session lineage (pass) and the engine backend for it,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-session.d.ts","sourceRoot":"","sources":["../../src/spawn/worktree-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,EAAc,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE3H,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMvD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACnD,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAoCjB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,MAAM,EAAE,YAAY,CAAC;IACrB,O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|
|
15
15
|
import { installReadOnlyAuditGuards } from '../audit-hooks.js';
|
|
16
16
|
import { getFocusWorktree, setFocusWorktree } from '../focus-worktree-state.js';
|
|
17
|
+
import { reconcileAgentResolvableForFocus } from '../queries/agent-resolvable-promotion.js';
|
|
17
18
|
import { resolveLineageSpec } from '../session-lineage.js';
|
|
18
19
|
import { recordFocusTeardown } from '../spawn-cooldown.js';
|
|
19
20
|
import { markSessionPersisted } from '../telemetry-writer.js';
|
|
@@ -179,6 +180,7 @@ export async function resolveReviewContext(args) {
|
|
|
179
180
|
let reviewFiledOpenCount = 0;
|
|
180
181
|
let priorFindings = [];
|
|
181
182
|
let focusDescription = null;
|
|
183
|
+
let agentResolvableItems = [];
|
|
182
184
|
try {
|
|
183
185
|
const activeFocuses = await fetchActiveFocusesForReviewState(config.organizationId, config.productId);
|
|
184
186
|
const current = activeFocuses.find(f => f.focus_id === focusId);
|
|
@@ -192,7 +194,24 @@ export async function resolveReviewContext(args) {
|
|
|
192
194
|
catch (err) {
|
|
193
195
|
log.debug(`[focus-executor] Could not compute review-filed open count for "${focusName}":`, err.message);
|
|
194
196
|
}
|
|
195
|
-
|
|
197
|
+
// Open agent_resolvable filings for this focus ride into the spawn so the team
|
|
198
|
+
// resolves them (the machine consuming an agent_resolvable filing). The
|
|
199
|
+
// reconcile also PROMOTES any that have stayed open past the age bound to a
|
|
200
|
+
// needs_operator escalation (so a filing the machine cannot clear reaches the
|
|
201
|
+
// human inbox) and returns only the ones that should still ride. Best-effort +
|
|
202
|
+
// independent of the review-state fetch: a failure leaves the list empty (no
|
|
203
|
+
// section rendered), never blocks the spawn.
|
|
204
|
+
try {
|
|
205
|
+
agentResolvableItems = await reconcileAgentResolvableForFocus({
|
|
206
|
+
organizationId: config.organizationId,
|
|
207
|
+
focusId,
|
|
208
|
+
productId: config.productId,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
catch (err) {
|
|
212
|
+
log.debug(`[focus-executor] Could not list agent_resolvable filings for "${focusName}":`, err.message);
|
|
213
|
+
}
|
|
214
|
+
return { reviewFiledOpenCount, priorFindings, focusDescription, agentResolvableItems };
|
|
196
215
|
}
|
|
197
216
|
/**
|
|
198
217
|
* Phase B: resolve the session lineage (pass) and the engine backend for it,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktree-session.js","sourceRoot":"","sources":["../../src/spawn/worktree-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,OAAO,EACL,aAAa,GAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"worktree-session.js","sourceRoot":"","sources":["../../src/spawn/worktree-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAQH,OAAO,EACL,aAAa,GAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGhF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,gBAAgB,IAAI,gCAAgC,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,E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AAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE7E,MAAM,UAAU,GAAe,SAAS,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IACpF,MAAM,cAAc,GAAG,cAAc,CAAC;QACpC,aAAa,EAAE,cAAc;QAC7B,IAAI,EAAE,UAAU;QAChB,aAAa,EAAE,oBAAoB;QACnC,cAAc,EAAE,MAAM,CAAC,mBAAmB;QAC1C,UAAU,EAAE,gBAAgB;KAC7B,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACpD,GAAG,CAAC,IAAI,CACN,gCAAgC,SAAS,UAAU,UAAU,IAAI;QACjE,GAAG,cAAc,CAAC,QAAQ,aAAa,cAAc,CAAC,MAAM,GAAG,CAChE,CAAC;IACF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -107,6 +107,25 @@ export type StalenessAction = 'delegate' | 'hand-over' | 'resolve' | 'none';
|
|
|
107
107
|
* never acts -- it is handled as a trace by the tick.
|
|
108
108
|
*/
|
|
109
109
|
export declare function decideStalenessAction(diff: StalenessDifferential | null, hasOpen: boolean, canMachineClose: boolean): StalenessAction;
|
|
110
|
+
/** Minimal open-escalation row shape the sensor's dedup / resolve reads. */
|
|
111
|
+
interface StalenessEscalationRow {
|
|
112
|
+
id: string;
|
|
113
|
+
status?: string | null;
|
|
114
|
+
escalationKind?: string | null;
|
|
115
|
+
metadata?: Record<string, unknown> | null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Pure suppression predicate over already-fetched rows. A re-file for THIS
|
|
119
|
+
* version gap is suppressed when an open/dismissed row carries its cause key
|
|
120
|
+
* (dismissal memory -- the incident pattern where a dismissed handover re-filed
|
|
121
|
+
* every tick), or a legacy OPEN propagation_stale row with no cause_key exists
|
|
122
|
+
* (deployment-window back-compat). A catch-up stops the signal entirely; a NEW
|
|
123
|
+
* `newest` is a different cause key and re-files. Exported for direct unit test.
|
|
124
|
+
*/
|
|
125
|
+
export declare function isStalenessRefileSuppressed(rows: readonly StalenessEscalationRow[], params: {
|
|
126
|
+
running: string;
|
|
127
|
+
newest: string;
|
|
128
|
+
}): boolean;
|
|
110
129
|
/** Injected IO for the sensor tick. Defaults reach for the real implementations. */
|
|
111
130
|
export interface StalenessSensorDeps {
|
|
112
131
|
readRunningVersion: () => string | null;
|
|
@@ -118,7 +137,10 @@ export interface StalenessSensorDeps {
|
|
|
118
137
|
* when false the operator opted out and the machine genuinely cannot act.
|
|
119
138
|
*/
|
|
120
139
|
canMachineCloseGap: () => boolean;
|
|
121
|
-
hasOpenStalenessEscalation: (
|
|
140
|
+
hasOpenStalenessEscalation: (params: {
|
|
141
|
+
running: string;
|
|
142
|
+
newest: string;
|
|
143
|
+
}) => Promise<boolean>;
|
|
122
144
|
/** Hand a human a READY ACTION when (and only when) the machine cannot act. */
|
|
123
145
|
handOverReadyAction: (params: {
|
|
124
146
|
organizationId: string;
|
|
@@ -150,4 +172,5 @@ export interface StalenessSensorTickCounts {
|
|
|
150
172
|
* Every path emits a trace so an absent signal means "measured and in sync".
|
|
151
173
|
*/
|
|
152
174
|
export declare function runStalenessSensorTick(config: DaemonConfig, deps?: StalenessSensorDeps): Promise<StalenessSensorTickCounts>;
|
|
175
|
+
export {};
|
|
153
176
|
//# sourceMappingURL=staleness-sensor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staleness-sensor.d.ts","sourceRoot":"","sources":["../src/staleness-sensor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"staleness-sensor.d.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AE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,YAAY,EACpB,IAAI,GAAE,mBAAiC,GACtC,OAAO,CAAC,yBAAyB,CAAC,CAyFpC"}
|
package/dist/staleness-sensor.js
CHANGED
|
@@ -55,6 +55,7 @@ import { readDaemonMeta } from './daemon-process.js';
|
|
|
55
55
|
import { isNewerVersion, parseVersionCore } from './version-check.js';
|
|
56
56
|
import { createEscalation, markEscalationResolved } from './queries/issues.js';
|
|
57
57
|
import { callApi } from './queries/shared.js';
|
|
58
|
+
import { daemonStalenessCauseKey } from './queries/cause-key.js';
|
|
58
59
|
import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS } from '@telora/daemon-core';
|
|
59
60
|
import { createLogger } from './log.js';
|
|
60
61
|
const log = createLogger({ module: 'staleness-sensor' });
|
|
@@ -147,17 +148,40 @@ function defaultCanMachineCloseGap() {
|
|
|
147
148
|
return meta.autoUpdateEnabled !== false;
|
|
148
149
|
}
|
|
149
150
|
const OPEN_STATUSES = new Set(['pending', 'in_review']);
|
|
151
|
+
/** Statuses whose cause_key suppresses a re-file: open (idempotency) + dismissed (memory). */
|
|
152
|
+
const SUPPRESSING_STATUSES = new Set(['pending', 'in_review', 'dismissed']);
|
|
150
153
|
function isOpenPropagationStale(e) {
|
|
151
154
|
if (e.status && !OPEN_STATUSES.has(e.status))
|
|
152
155
|
return false;
|
|
153
156
|
return e.escalationKind === PROPAGATION_STALE_ESCALATION_KIND;
|
|
154
157
|
}
|
|
155
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Pure suppression predicate over already-fetched rows. A re-file for THIS
|
|
160
|
+
* version gap is suppressed when an open/dismissed row carries its cause key
|
|
161
|
+
* (dismissal memory -- the incident pattern where a dismissed handover re-filed
|
|
162
|
+
* every tick), or a legacy OPEN propagation_stale row with no cause_key exists
|
|
163
|
+
* (deployment-window back-compat). A catch-up stops the signal entirely; a NEW
|
|
164
|
+
* `newest` is a different cause key and re-files. Exported for direct unit test.
|
|
165
|
+
*/
|
|
166
|
+
export function isStalenessRefileSuppressed(rows, params) {
|
|
167
|
+
const causeKey = daemonStalenessCauseKey(params.running, params.newest);
|
|
168
|
+
return rows.some((e) => {
|
|
169
|
+
if (SUPPRESSING_STATUSES.has(e.status ?? '')) {
|
|
170
|
+
const meta = e.metadata ?? null;
|
|
171
|
+
if (typeof meta?.cause_key === 'string' && meta.cause_key === causeKey)
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
// Legacy back-compat: an OPEN propagation_stale row with no cause_key suppresses.
|
|
175
|
+
return isOpenPropagationStale(e);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
async function defaultHasOpenStalenessEscalation(params) {
|
|
156
179
|
const result = await callApi('escalation_list', {
|
|
157
|
-
|
|
180
|
+
// Include 'dismissed' so a dismissed handover keeps the same gap silent.
|
|
181
|
+
fields: { statuses: ['pending', 'in_review', 'dismissed'] },
|
|
158
182
|
limit: 500,
|
|
159
183
|
});
|
|
160
|
-
return (result.escalations ?? [])
|
|
184
|
+
return isStalenessRefileSuppressed(result.escalations ?? [], params);
|
|
161
185
|
}
|
|
162
186
|
async function defaultResolveStalenessEscalations() {
|
|
163
187
|
const result = await callApi('escalation_list', {
|
|
@@ -207,6 +231,9 @@ async function defaultHandOverReadyAction(params) {
|
|
|
207
231
|
ready_command: readyCommand,
|
|
208
232
|
reason: 'auto_update_disabled',
|
|
209
233
|
product_id: params.productId,
|
|
234
|
+
// cause_key (running+newest) suppresses a re-file for the SAME gap across
|
|
235
|
+
// ticks AND after an operator dismissal; a new `newest` is a new cause key.
|
|
236
|
+
cause_key: daemonStalenessCauseKey(diff.running, diff.newest),
|
|
210
237
|
},
|
|
211
238
|
});
|
|
212
239
|
}
|
|
@@ -259,7 +286,7 @@ export async function runStalenessSensorTick(config, deps = defaultDeps) {
|
|
|
259
286
|
}
|
|
260
287
|
const pc = configForProduct(config, anchor);
|
|
261
288
|
const canMachineClose = deps.canMachineCloseGap();
|
|
262
|
-
const hasOpen = await deps.hasOpenStalenessEscalation();
|
|
289
|
+
const hasOpen = await deps.hasOpenStalenessEscalation({ running: diff.running, newest: diff.newest });
|
|
263
290
|
const action = decideStalenessAction(diff, hasOpen, canMachineClose);
|
|
264
291
|
if (diff.beyondThreshold && canMachineClose) {
|
|
265
292
|
counts.delegatedToAutoUpdate = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staleness-sensor.js","sourceRoot":"","sources":["../src/staleness-sensor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAGzD;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,mBAAmB,CAAC;AAErE,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAqBnD,qEAAqE;AACrE,SAAS,eAAe,CAAC,OAAe,EAAE,MAAc;IACtD,MA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AAE,CAAC;YACjC,GAAG,CAAC,IAAI,CACN,gDAAgD,IAAI,CAAC,OAAO,cAAc,IAAI,CAAC,MAAM,IAAI;gBACvF,UAAU,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,+CAA+C;gBACtF,wCAAwC,CAC3C,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,mBAAmB,IAAI,MAAM,IAAI,CAAC,2BAA2B,EAAE,CAAC;YACvE,GAAG,CAAC,IAAI,CACN,IAAI,CAAC,eAAe;gBAClB,CAAC,CAAC,qDAAqD,IAAI,CAAC,OAAO,qBAAqB;oBACtF,gDAAgD;gBAClD,CAAC,CAAC,mDAAmD,IAAI,CAAC,OAAO,KAAK;oBACpE,gCAAgC,CACrC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,wEAAwE;YACxE,oEAAoE;YACpE,cAAc;YACd,GAAG,CAAC,IAAI,CACN,kCAAkC,IAAI,CAAC,OAAO,eAAe,IAAI,CAAC,MAAM,MAAM;gBAC5E,CAAC,IAAI,CAAC,MAAM;oBACV,CAAC,CAAC,aAAa,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,sBAAsB;oBAClE,CAAC,CAAC,UAAU,CAAC,CAClB,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,4BAA6B,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* Supabase/MCP.
|
|
35
35
|
*/
|
|
36
36
|
import type { FocusDeliveryInfo } from './types.js';
|
|
37
|
-
import { type
|
|
37
|
+
import { type FileEscalationIdempotentParams, type FileEscalationIdempotentResult } from './queries/escalation-suppression.js';
|
|
38
38
|
/**
|
|
39
39
|
* escalation_kind discriminators for the two stall detectors. Declared as
|
|
40
40
|
* daemon-local string constants (not imported from @telora/daemon-core's
|
|
@@ -55,10 +55,12 @@ export interface FocusStallContext {
|
|
|
55
55
|
focusName: string;
|
|
56
56
|
}
|
|
57
57
|
export interface VerifyFailedCapDeps {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
/**
|
|
59
|
+
* File the verify_gate_unclearable escalation through the cause-keyed idempotent
|
|
60
|
+
* gate: at most one open row per delivery, and a dismissed one keeps the same
|
|
61
|
+
* unclearable delivery silent (dismissal memory) until it moves on.
|
|
62
|
+
*/
|
|
63
|
+
fileEscalation: (params: FileEscalationIdempotentParams) => Promise<FileEscalationIdempotentResult>;
|
|
62
64
|
/** Override the cap for tests; defaults to the resolved env-config value. */
|
|
63
65
|
cap?: number;
|
|
64
66
|
}
|
|
@@ -106,10 +108,12 @@ export declare function exceedsVerifyFailedCap(delivery: Pick<FocusDeliveryInfo,
|
|
|
106
108
|
*/
|
|
107
109
|
export declare function checkVerifyFailedCapForFocus(ctx: FocusStallContext, deliveries: FocusDeliveryInfo[], deps?: VerifyFailedCapDeps): Promise<void>;
|
|
108
110
|
export interface ReviewWindowDeps {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
/**
|
|
112
|
+
* File the review_window_stalled escalation through the cause-keyed idempotent
|
|
113
|
+
* gate: at most one open row per focus, and a dismissed one keeps the same stale
|
|
114
|
+
* review window silent (dismissal memory) until the focus's review state changes.
|
|
115
|
+
*/
|
|
116
|
+
fileEscalation: (params: FileEscalationIdempotentParams) => Promise<FileEscalationIdempotentResult>;
|
|
113
117
|
/** Focus IDs that currently have an active REVIEW team. Defaults to live teams. */
|
|
114
118
|
activeReviewFocusIds: () => Set<string>;
|
|
115
119
|
/** Current epoch ms; injectable for tests. Defaults to Date.now. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stall-detectors.d.ts","sourceRoot":"","sources":["../src/stall-detectors.ts"],"names":[],"m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AAO,CAAC,IAAI,CAAC,CAiEf;AAID,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACpG,mFAAmF;IACnF,oBAAoB,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;IACxC,oEAAoE;IACpE,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,CAAC,CAMlD;AAQD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,eAAe,EAAE,OAAO,EACxB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,OAAO,CAMT;AAED;;;;;GAKG;AACH,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,iBAAiB,EACtB,iBAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,IAAI,GAAE,gBAA0C,GAC/C,OAAO,CAAC,IAAI,CAAC,CA+Df"}
|
package/dist/stall-detectors.js
CHANGED
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
* Supabase/MCP.
|
|
35
35
|
*/
|
|
36
36
|
import { ESCALATION_REASONS, ESCALATION_DISPOSITIONS, withRetry, } from '@telora/daemon-core';
|
|
37
|
-
import {
|
|
37
|
+
import { fileEscalationIdempotent as defaultFileEscalationIdempotent, } from './queries/escalation-suppression.js';
|
|
38
|
+
import { deliveryGuardCauseKey, focusBlockageCauseKey } from './queries/cause-key.js';
|
|
38
39
|
import { getActiveTeams } from './focus-executor.js';
|
|
39
40
|
import { isStatusTerminal } from './stage-classifier.js';
|
|
40
41
|
import { resolveVerifyFailedCap, resolveReviewWindowStaleHours } from './stall-detector-config.js';
|
|
@@ -82,8 +83,7 @@ function blockingGuardNames(gateState) {
|
|
|
82
83
|
.filter((n) => n !== null);
|
|
83
84
|
}
|
|
84
85
|
const defaultVerifyFailedCapDeps = {
|
|
85
|
-
|
|
86
|
-
createEscalation: defaultCreateEscalation,
|
|
86
|
+
fileEscalation: defaultFileEscalationIdempotent,
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
89
|
* True when `gateState.blocking` carries at least one guard verdict -- i.e. a
|
|
@@ -149,11 +149,12 @@ export async function checkVerifyFailedCapForFocus(ctx, deliveries, deps = defau
|
|
|
149
149
|
const guardClause = guards.length
|
|
150
150
|
? `The verify gate is currently blocking on: ${guards.join(', ')}.`
|
|
151
151
|
: `The verify gate is currently blocking (see gate_state).`;
|
|
152
|
+
// Per-delivery cause key (guard-less): one open row per stuck delivery, and a
|
|
153
|
+
// dismissed one stays silent -- the cause is the delivery, not the guard name.
|
|
154
|
+
const causeKey = deliveryGuardCauseKey(VERIFY_GATE_UNCLEARABLE_KIND, delivery.id);
|
|
152
155
|
try {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
await withRetry(() => deps.createEscalation({
|
|
156
|
+
await withRetry(() => deps.fileEscalation({
|
|
157
|
+
causeKey,
|
|
157
158
|
organizationId: ctx.organizationId,
|
|
158
159
|
sessionId: '',
|
|
159
160
|
issueId: null,
|
|
@@ -203,8 +204,7 @@ export function activeReviewFocusIds() {
|
|
|
203
204
|
return ids;
|
|
204
205
|
}
|
|
205
206
|
const defaultReviewWindowDeps = {
|
|
206
|
-
|
|
207
|
-
createEscalation: defaultCreateEscalation,
|
|
207
|
+
fileEscalation: defaultFileEscalationIdempotent,
|
|
208
208
|
activeReviewFocusIds,
|
|
209
209
|
now: () => Date.now(),
|
|
210
210
|
};
|
|
@@ -239,12 +239,13 @@ export async function checkReviewWindowStaleForFocus(ctx, reviewRequestedAt, dep
|
|
|
239
239
|
if (!isReviewWindowStale(reviewRequestedAt, hasActiveReview, nowMs, thresholdMs)) {
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
|
+
// Per-focus cause key: one open row per focus for a stale review window, and a
|
|
243
|
+
// dismissed one keeps it silent (dismissal memory) until the review state changes.
|
|
244
|
+
const causeKey = focusBlockageCauseKey(REVIEW_WINDOW_STALLED_KIND, ctx.focusId, 'stale_review_window');
|
|
242
245
|
try {
|
|
243
|
-
if (await deps.hasOpenFocusEscalation(ctx.focusId, REVIEW_WINDOW_STALLED_KIND)) {
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
246
|
const ageHours = Math.floor((nowMs - Date.parse(reviewRequestedAt)) / 3_600_000);
|
|
247
|
-
await withRetry(() => deps.
|
|
247
|
+
await withRetry(() => deps.fileEscalation({
|
|
248
|
+
causeKey,
|
|
248
249
|
organizationId: ctx.organizationId,
|
|
249
250
|
sessionId: '',
|
|
250
251
|
issueId: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stall-detectors.js","sourceRoot":"","sources":["../src/stall-detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"stall-detectors.js","sourceRoot":"","sources":["../src/stall-detectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,IAAI,+BAA+B,GAG5D,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,sBAAs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BAAyB,QAAQ,QAAQ;gBAChE,cAAc,cAAc,qDAAqD;gBACjF,8EAA8E;gBAC9E,gFAAgF;gBAChF,mBAAmB;gBACnB,cAAc,GAAG,CAAC,SAAS,IAAI;gBAC/B,iBAAiB,GAAG,CAAC,OAAO,IAAI;gBAChC,4BAA4B,iBAAiB,MAAM;gBACnD,mFAAmF;gBACnF,wEAAwE;YAC1E,YAAY,EACV,0DAA0D,QAAQ,gBAAgB;gBAClF,kFAAkF;YACpF,UAAU,EACR,+DAA+D;gBAC/D,iFAAiF;gBACjF,oBAAoB;YACtB,QAAQ,EAAE;gBACR,KAAK,EAAE,0BAA0B;gBACjC,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,iBAAiB;gBACjB,QAAQ;gBACR,cAAc;aACf;SACF,CAAC,EACF,EAAE,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,oCAAoC,GAAG,CAAC,OAAO,EAAE,EAAE,CAC7E,CAAC;QACF,GAAG,CAAC,IAAI,CACN,uEAAuE,GAAG,CAAC,SAAS,IAAI;YACxF,yBAAyB,QAAQ,WAAW,cAAc,IAAI,CAC/D,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CACN,yEAAyE,GAAG,CAAC,SAAS,IAAI,EACzF,GAAa,CAAC,OAAO,CACvB,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -14,7 +14,7 @@ export type { DeploymentProfileSnapshotContext, FocusTeamPromptContext, } from '
|
|
|
14
14
|
import type { FocusTeamPromptContext } from './prompt-sections/shared.js';
|
|
15
15
|
export { buildRoleSection, buildDomainBoundariesSection, buildTeamLeadRoleSection, buildReadOnlyAuditSection, } from './prompt-sections/role-sections.js';
|
|
16
16
|
export { buildFocusContextSection, buildProductContextSection, buildDeploymentProfileSection, buildLoopContextSection, buildExecutionConfigSection, } from './prompt-sections/context-sections.js';
|
|
17
|
-
export { buildPlanningSection, buildExecutionPolaritySection, buildDeliveryListingSection, buildStatusUpdateRulesSection, buildExecutionInstructionsSection, buildSessionConstraintsSection, buildWorkerManagementSection, buildDeliveryStageProgressionSection, buildScopingMandateSection, buildRescopingSection, buildNewWorkDeliverySection, buildErrorHandlingSection, buildMergeConflictSection, buildCompletionSection, } from './prompt-sections/execution-sections.js';
|
|
17
|
+
export { buildPlanningSection, buildExecutionPolaritySection, buildDeliveryListingSection, buildStatusUpdateRulesSection, buildExecutionInstructionsSection, buildSessionConstraintsSection, buildWorkerManagementSection, buildDeliveryStageProgressionSection, buildScopingMandateSection, buildRescopingSection, buildNewWorkDeliverySection, buildAgentResolvableInboxSection, buildErrorHandlingSection, buildMergeConflictSection, buildCompletionSection, } from './prompt-sections/execution-sections.js';
|
|
18
18
|
export { buildRemediationDirectiveSection, buildReviewOutcomeStampingSection, buildReviewSensorAuditSection, LAST_REVIEW_REPORT_HEADING, buildRemediationFramingSection, buildLoopMaintenanceSection, buildCloseLoopBookkeeperPersona, buildCloseLoopDriftCheckSection, buildResumeDeltaMessage, } from './prompt-sections/persona-sections.js';
|
|
19
19
|
export type { ResumeDeltaContext } from './prompt-sections/persona-sections.js';
|
|
20
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-prompt-base.d.ts","sourceRoot":"","sources":["../src/team-prompt-base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,YAAY,EACV,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAG1E,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAS5C,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,u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B,EAAE,MAAM,uCAAuC,CAAC;AAWhF;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,sBAAsB,GAC9B,MAAM,CAkCR;AAMD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,sBAAsB,GAC9B,MAAM,CAwCR"}
|
package/dist/team-prompt-base.js
CHANGED
|
@@ -16,8 +16,8 @@ import { buildRoleSection, buildDomainBoundariesSection, buildTeamLeadRoleSectio
|
|
|
16
16
|
export { buildFocusContextSection, buildProductContextSection, buildDeploymentProfileSection, buildLoopContextSection, buildExecutionConfigSection, } from './prompt-sections/context-sections.js';
|
|
17
17
|
import { buildFocusContextSection, buildProductContextSection, buildDeploymentProfileSection, buildLoopContextSection, buildExecutionConfigSection, } from './prompt-sections/context-sections.js';
|
|
18
18
|
// Execution sections.
|
|
19
|
-
export { buildPlanningSection, buildExecutionPolaritySection, buildDeliveryListingSection, buildStatusUpdateRulesSection, buildExecutionInstructionsSection, buildSessionConstraintsSection, buildWorkerManagementSection, buildDeliveryStageProgressionSection, buildScopingMandateSection, buildRescopingSection, buildNewWorkDeliverySection, buildErrorHandlingSection, buildMergeConflictSection, buildCompletionSection, } from './prompt-sections/execution-sections.js';
|
|
20
|
-
import { buildPlanningSection, buildExecutionPolaritySection, buildDeliveryListingSection, buildStatusUpdateRulesSection, buildExecutionInstructionsSection, buildSessionConstraintsSection, buildWorkerManagementSection, buildDeliveryStageProgressionSection, buildScopingMandateSection, buildRescopingSection, buildNewWorkDeliverySection, buildErrorHandlingSection, buildMergeConflictSection, buildCompletionSection, } from './prompt-sections/execution-sections.js';
|
|
19
|
+
export { buildPlanningSection, buildExecutionPolaritySection, buildDeliveryListingSection, buildStatusUpdateRulesSection, buildExecutionInstructionsSection, buildSessionConstraintsSection, buildWorkerManagementSection, buildDeliveryStageProgressionSection, buildScopingMandateSection, buildRescopingSection, buildNewWorkDeliverySection, buildAgentResolvableInboxSection, buildErrorHandlingSection, buildMergeConflictSection, buildCompletionSection, } from './prompt-sections/execution-sections.js';
|
|
20
|
+
import { buildPlanningSection, buildExecutionPolaritySection, buildDeliveryListingSection, buildStatusUpdateRulesSection, buildExecutionInstructionsSection, buildSessionConstraintsSection, buildWorkerManagementSection, buildDeliveryStageProgressionSection, buildScopingMandateSection, buildRescopingSection, buildNewWorkDeliverySection, buildAgentResolvableInboxSection, buildErrorHandlingSection, buildMergeConflictSection, buildCompletionSection, } from './prompt-sections/execution-sections.js';
|
|
21
21
|
// Persona / framing sections + resume-delta message.
|
|
22
22
|
export { buildRemediationDirectiveSection, buildReviewOutcomeStampingSection, buildReviewSensorAuditSection, LAST_REVIEW_REPORT_HEADING, buildRemediationFramingSection, buildLoopMaintenanceSection, buildCloseLoopBookkeeperPersona, buildCloseLoopDriftCheckSection, buildResumeDeltaMessage, } from './prompt-sections/persona-sections.js';
|
|
23
23
|
import { buildRemediationDirectiveSection, buildLoopMaintenanceSection, buildCloseLoopDriftCheckSection, } from './prompt-sections/persona-sections.js';
|
|
@@ -53,6 +53,7 @@ export function buildRoleFrameworkPrompt(role, context) {
|
|
|
53
53
|
buildScopingMandateSection(),
|
|
54
54
|
buildRescopingSection(context.focusId, context.productId),
|
|
55
55
|
buildNewWorkDeliverySection(),
|
|
56
|
+
buildAgentResolvableInboxSection(context.agentResolvableItems ?? []),
|
|
56
57
|
buildErrorHandlingSection(),
|
|
57
58
|
buildMergeConflictSection(),
|
|
58
59
|
buildLoopMaintenanceSection(),
|
|
@@ -103,6 +104,7 @@ export function buildFocusTeamPrompt(role, context) {
|
|
|
103
104
|
buildScopingMandateSection(),
|
|
104
105
|
buildRescopingSection(context.focusId, context.productId),
|
|
105
106
|
buildNewWorkDeliverySection(),
|
|
107
|
+
buildAgentResolvableInboxSection(context.agentResolvableItems ?? []),
|
|
106
108
|
buildErrorHandlingSection(),
|
|
107
109
|
buildMergeConflictSection(),
|
|
108
110
|
buildLoopMaintenanceSection(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-prompt-base.js","sourceRoot":"","sources":["../src/team-prompt-base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,2BAA2B;AAC3B,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C,oBAAoB;AACpB,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,uCAAuC,CAAC;AAE/C,sBAAsB;AACtB,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,iCAAiC,EACjC,8BAA8B,EAC9B,4BAA4B,EAC5B,oCAAoC,EACpC,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,iCAAiC,EACjC,8BAA8B,EAC9B,4BAA4B,EAC5B,oCAAoC,EACpC,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,yCAAyC,CAAC;AAEjD,qDAAqD;AACrD,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,E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OAAO,CAAC,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC;QAClF,oCAAoC,EAAE;QACtC,6BAA6B,EAAE;QAC/B,0BAA0B,EAAE;QAC5B,qBAAqB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;QACzD,2BAA2B,EAAE;QAC7B,gCAAgC,CAAC,OAAO,CAAC,oBAAoB,IAAI,EAAE,CAAC;QACpE,yBAAyB,EAAE;QAC3B,yBAAyB,EAAE;QAC3B,2BAA2B,EAAE;QAC7B,+BAA+B,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACzD,sBAAsB,EAAE;KACzB,CAAC;IAEF,+DAA+D;IAC/D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -29,7 +29,7 @@ export declare const TELORA_CLAUDE_MD_END = "<!-- END TELORA SEED -->";
|
|
|
29
29
|
* For Codex: the MCP server is registered in `~/.codex/config.toml` (global).
|
|
30
30
|
*/
|
|
31
31
|
export declare const SEED_MCP_REGISTRATION_SENTENCE = "The Telora MCP server is registered in `.mcp.json`.";
|
|
32
|
-
export declare const SEED_BODY = "# Telora workstation context\n\nThis repo is connected to Telora -- a differential control plane for\nsoftware delivery. Intent and reality are paired signals; the meaningful\nwork happens at the difference.\n\n## Before you write any code (read this first)\n\nDEFAULT: on a Telora-connected workstation, a new capability starts as\n**declared intent** before any code. When the user says \"I want to build\nX\", your first move is NOT to scaffold X -- it is to declare it: create\n(or select) a Focus -> delivery -> issue and move an issue to **In\nProgress**. Code is written only after intent is anchored above it.\n\nThis polarity is deliberate and easy to get backwards. Building directly\nin the working tree -- scaffolding, installing dependencies, starting a\ndev server, writing application files -- is the **exception**, taken ONLY\nwhen the user explicitly asks for it. Recognized bypass phrases:\n\"build locally\", \"just write it\", \"skip Telora\", \"don't track this\",\n\"throwaway\". Absent an explicit signal like these, treat any build\nrequest as a request to declare intent in Telora first.\n\nAsking good clarifying questions about stack, scope, or dependencies is\nNOT a substitute for this step -- that is execution-layer scoping, and it\ncomes *after* the capability is declared, not instead of it. Scoping is\nagent work; declaring that a capability matters is the part that must\nland in Telora first.\n\n**Surface the fork; do not silently pick it.** The common failure is\nresolving an ambiguous request toward the path of least resistance --\ne.g. reading \"a web app I run locally on my LAN\" (a deployment target) as\n\"build locally\" (skip Telora). When intent is not already explicit, your\nFIRST response to a build request names the choice rather than assuming\nit: \"I'll scope this in Telora unless you want it built locally -- which?\"\nOne question, once, at the start. Let the user pick; never pick for them\nby starting to type code.\n\n**First action rule.** On a build / new-capability request, your first\ntool call is a Telora planning call (telora_product_focus / _delivery /\n_issue) OR the fork question above -- never Write, Edit, or a code-running\nBash command. If the first move cannot be code, building-before-intent\ncannot happen.\n\nWhy: an artifact with no declared intent above it is reality moving with\nnothing to measure it against -- pure noise to the differential loop. The\nwhole system is built to compute intent-minus-reality; code that skips\nthe intent half defeats the instrument.\n\n## Execution polarity (which path executes this?)\n\nOnce intent is declared, a second polarity governs HOW it executes -- and it\nhas the same default-and-exception shape as the intent polarity above. A\ndeclared focus is handed to the **daemon team + review loop** by default.\nTeam execution IS THE DEFAULT; building it inline yourself in this interactive\nsession is the **explicit, named bypass**, taken ONLY when the user says so.\n\nThree execution forks recur. On each, the left side is the default and the\nright side is the effortful, must-be-named bypass:\n\n- **Daemon team + review vs. inline coding.** Default: hand the focus to the\n daemon team, which executes and runs it through the review gate. Bypass:\n build it inline in this session -- only on an explicit signal.\n- **Tree-anchored delivery vs. unanchored delivery.** Default: anchor each\n delivery to a reality-tree injection. Bypass: an unanchored delivery\n (`allowUnanchored`) -- a deliberate, reason-bearing act, not a silent flag.\n- **Review-gated Done vs. self-marked Done.** Default: work is confirmed Done\n by the review gate. Bypass: marking your own work Done without review.\n\nThe recognized signal that switches execution to inline is an explicit\n\"build it now\" (and the same throwaway phrases that bypass the intent step:\n\"build locally\", \"just write it\", \"skip Telora\", \"don't track this\",\n\"throwaway\"). Absent such a signal, hand off to the team -- do not fill the\nchoice with the lowest-resistance path (typing code yourself).\n\n**Surface the fork; do not silently pick it.** When the execution path is not\nalready explicit, your response NAMES the choice rather than assuming it:\n\"I'll hand this to the daemon team + review unless you want it built inline\nnow -- which?\" One question, once. Let the user pick; never default to inline\nby starting to type code.\n\n## Planning hierarchy\n\n- **Focus** = the context that defines an area of work -- not \"one\n capability.\" All phases of building within that area belong in one\n focus; if a \"focus\" is really just one phase, fold it back in.\n- **Delivery** = a shippable phase or major component of a capability.\n- **Context Group** = optional grouping of related issues that share\n meaningful context (relevant files, architectural notes). A CG earns its\n existence by carrying context, not by being a folder.\n- **Task** = one discrete implementable unit. Bounded files, focused\n session. Multiple \"and\" clauses across different concerns means split.\n\nScope by purpose, not count. The right number of deliveries is however\nmany phases the work naturally has.\n\n## PRD: \"build a working app in one run\"\n\nA **PRD** sits one altitude above Focus (Product -> PRD -> Focus): a\nbounded, verifiable, retire-able milestone carrying a **Prerequisite Tree**\nof `goal` / `obstacle` / `overcome` nodes. Each `overcome` materializes\nas a focus; the daemon progressively arms the **frontier** of foci as\nupstream obstacles clear. This is the entry point a user means by \"build a\nfully working app in one go.\"\n\nIt is NOT big-bang generation: you author the tree once, commit a path,\nand the differential loop walks the frontier to completion -- the execution\nunderneath is still the normal focus -> delivery -> issue + review loop.\n\nThe PRD tools are **lazy-loaded** -- they do not exist until you load the\ndomain. If you don't see `telora_prd` / `telora_prd_tree`, run:\n\n```\ntelora_discover { action: \"load\", domain: \"prd\" }\n```\n\nThen: `telora_prd` create (referencing a Vision) -> `telora_prd_tree`\nauthor nodes (an obstacle's `clearancePredicate` is OPTIONAL and advisory --\nthe frontier advances as upstream obstacles clear via focus-completion, i.e.\neach overcome's focus finishing its deliveries' verify gates, not via a\nper-obstacle predicate) + edges -> commit a pathway -> `materialize_overcome`\neach into a focus -> arm the daemon PRD loop. All authoring is harness+MCP;\nthere is no Telora authoring UI.\n\n## Issue workflow\n\n`To Do` -> `In Progress` -> `In Review` / `Blocked` -> `Done`.\n\nIssue types: **Context Group**, **Task**, **Bug**.\n\nMovement rules:\n\n- An issue MUST be set to `In Progress` before any work begins on it.\n- Never skip `In Progress`. Never move directly from `To Do` to `Done`.\n- Set status with `telora_product_issue` action=update.\n\nDelivery and focus stages advance automatically based on issue\nactivity. Agents never set delivery executionStatus directly.\n\n## MCP tool surface (what's available in this session)\n\nThe Telora MCP server is registered in `.mcp.json`. Core tool families:\n\n- `telora_product` -- list/get/create/update products\n- `telora_product_focus` -- focuses under a product\n- `telora_product_delivery` -- deliveries under a focus\n- `telora_product_issue` -- issues (Context Groups, Tasks, Bugs) under a delivery\n- `telora_agent` -- agent roles, escalation requests\n- `telora_loop_*` -- loop documents, questions, answers\n- `telora_discover` -- on-demand registration of deferred tool domains\n\nResolve the live tool list at runtime via `telora_discover` rather than\nhard-coding a list that drifts.\n\n## Human-vs-agent boundaries\n\n- Humans own **intent** and **completion**.\n - Intent: what capability matters, what changes when. Pre-handoff.\n - Completion: closing the loop on whether a focus is done. Post-handoff.\n- Agents own **scoping** and **execution**.\n - Scoping: decomposing a focus into deliveries, deliveries into\n issues, restructuring mid-flight as the agent learns more.\n - Execution: writing code, running tests, committing, reporting.\n\nDo not ask humans for operational details they expect the agent to figure\nout. Do not silently complete a focus on the human's behalf. Escalate\nwhen stuck via `telora_agent` action=escalate.\n\nWhen communicating with a human, refer to focuses, deliveries, and issues\nby their **title**, never their UUID. UUIDs are for tool calls only and must\nnot be surfaced in chat. MCP tool results carry both, so this is a\ncommunication choice, not a data-availability problem: keep the id in the\ntool call, name the work by its title in the conversation.\n\n## Differential signaling\n\nTelora is asymmetric: it moves reality toward intent, never the reverse.\nAgents do not lower the bar to make signals look better -- they escalate.\nEvery artifact (commit, work summary, gate result) is signal toward the\ndeclared intent; raw activity without intent reduction is noise.\n\nA short corrective comment from the user is high-signal -- treat brief\npushback as the most important input in the session.\n\n## Workflows and policies\n\n- **Workflow**: stage directives shape agent behavior at discrete\n transitions. What context the agent sees (assembly recipes), what tools\n it can use, how it thinks (prompt + model). Live in Telora's\n `workflow_stages.agent_directive` JSONB.\n- **Policy** (organizational, deferred): cross-cutting constraints that\n feed into stage directives.\n\nWhen you cross a stage transition, the daemon may inject context or spawn\na fresh sub-agent per the directive. Don't override that flow without a\nclear reason.\n";
|
|
32
|
+
export declare const SEED_BODY = "# Telora workstation context\n\nThis repo is connected to Telora -- a differential control plane for\nsoftware delivery. Intent and reality are paired signals; the meaningful\nwork happens at the difference.\n\n## Before you write any code (read this first)\n\nDEFAULT: on a Telora-connected workstation, a new capability starts as\n**declared intent** before any code. When the user says \"I want to build\nX\", your first move is NOT to scaffold X -- it is to declare it: create\n(or select) a Focus -> delivery -> issue and move an issue to **In\nProgress**. Code is written only after intent is anchored above it.\n\nThis polarity is deliberate and easy to get backwards. Building directly\nin the working tree -- scaffolding, installing dependencies, starting a\ndev server, writing application files -- is the **exception**, taken ONLY\nwhen the user explicitly asks for it. Recognized bypass phrases:\n\"build locally\", \"just write it\", \"skip Telora\", \"don't track this\",\n\"throwaway\". Absent an explicit signal like these, treat any build\nrequest as a request to declare intent in Telora first.\n\nAsking good clarifying questions about stack, scope, or dependencies is\nNOT a substitute for this step -- that is execution-layer scoping, and it\ncomes *after* the capability is declared, not instead of it. Scoping is\nagent work; declaring that a capability matters is the part that must\nland in Telora first.\n\n**Surface the fork; do not silently pick it.** The common failure is\nresolving an ambiguous request toward the path of least resistance --\ne.g. reading \"a web app I run locally on my LAN\" (a deployment target) as\n\"build locally\" (skip Telora). When intent is not already explicit, your\nFIRST response to a build request names the choice rather than assuming\nit: \"I'll scope this in Telora unless you want it built locally -- which?\"\nOne question, once, at the start. Let the user pick; never pick for them\nby starting to type code.\n\n**First action rule.** On a build / new-capability request, your first\ntool call is a Telora planning call (telora_product_focus / _delivery /\n_issue) OR the fork question above -- never Write, Edit, or a code-running\nBash command. If the first move cannot be code, building-before-intent\ncannot happen.\n\nWhy: an artifact with no declared intent above it is reality moving with\nnothing to measure it against -- pure noise to the differential loop. The\nwhole system is built to compute intent-minus-reality; code that skips\nthe intent half defeats the instrument.\n\n## Execution polarity (which path executes this?)\n\nOnce intent is declared, a second polarity governs HOW it executes -- and it\nhas the same default-and-exception shape as the intent polarity above. A\ndeclared focus is handed to the **daemon team + review loop** by default.\nTeam execution IS THE DEFAULT; building it inline yourself in this interactive\nsession is the **explicit, named bypass**, taken ONLY when the user says so.\n\nThree execution forks recur. On each, the left side is the default and the\nright side is the effortful, must-be-named bypass:\n\n- **Daemon team + review vs. inline coding.** Default: hand the focus to the\n daemon team, which executes and runs it through the review gate. Bypass:\n build it inline in this session -- only on an explicit signal.\n- **Tree-anchored delivery vs. unanchored delivery.** Default: anchor each\n delivery to a reality-tree injection. Bypass: an unanchored delivery\n (`allowUnanchored`) -- a deliberate, reason-bearing act, not a silent flag.\n- **Review-gated Done vs. self-marked Done.** Default: work is confirmed Done\n by the review gate. Bypass: marking your own work Done without review.\n\nThe recognized signal that switches execution to inline is an explicit\n\"build it now\" (and the same throwaway phrases that bypass the intent step:\n\"build locally\", \"just write it\", \"skip Telora\", \"don't track this\",\n\"throwaway\"). Absent such a signal, hand off to the team -- do not fill the\nchoice with the lowest-resistance path (typing code yourself).\n\n**Surface the fork; do not silently pick it.** When the execution path is not\nalready explicit, your response NAMES the choice rather than assuming it:\n\"I'll hand this to the daemon team + review unless you want it built inline\nnow -- which?\" One question, once. Let the user pick; never default to inline\nby starting to type code.\n\n## Planning hierarchy\n\n- **Focus** = the context that defines an area of work -- not \"one\n capability.\" All phases of building within that area belong in one\n focus; if a \"focus\" is really just one phase, fold it back in.\n- **Delivery** = a shippable phase or major component of a capability.\n- **Context Group** = optional grouping of related issues that share\n meaningful context (relevant files, architectural notes). A CG earns its\n existence by carrying context, not by being a folder.\n- **Task** = one discrete implementable unit. Bounded files, focused\n session. Multiple \"and\" clauses across different concerns means split.\n\nScope by purpose, not count. The right number of deliveries is however\nmany phases the work naturally has.\n\n## PRD: \"build a working app in one run\"\n\nA **PRD** sits one altitude above Focus (Product -> PRD -> Focus): a\nbounded, verifiable, retire-able milestone carrying a **Prerequisite Tree**\nof `goal` / `obstacle` / `overcome` nodes. Each `overcome` materializes\nas a focus; the daemon progressively arms the **frontier** of foci as\nupstream obstacles clear. This is the entry point a user means by \"build a\nfully working app in one go.\"\n\nIt is NOT big-bang generation: you author the tree once, commit a path,\nand the differential loop walks the frontier to completion -- the execution\nunderneath is still the normal focus -> delivery -> issue + review loop.\n\nThe PRD tools are **lazy-loaded** -- they do not exist until you load the\ndomain. If you don't see `telora_prd` / `telora_prd_tree`, run:\n\n```\ntelora_discover { action: \"load\", domain: \"prd\" }\n```\n\nThen: `telora_prd` create (referencing a Vision) -> `telora_prd_tree`\nauthor nodes (an obstacle's `clearancePredicate` is OPTIONAL and advisory --\nthe frontier advances as upstream obstacles clear via focus-completion, i.e.\neach overcome's focus finishing its deliveries' verify gates, not via a\nper-obstacle predicate) + edges -> commit a pathway -> `materialize_overcome`\neach into a focus -> arm the daemon PRD loop. All authoring is harness+MCP;\nthere is no Telora authoring UI.\n\n## Issue workflow\n\n`To Do` -> `In Progress` -> `In Review` / `Blocked` -> `Done`.\n\nIssue types: **Context Group**, **Task**, **Bug**.\n\nMovement rules:\n\n- An issue MUST be set to `In Progress` before any work begins on it.\n- Never skip `In Progress`. Never move directly from `To Do` to `Done`.\n- Set status with `telora_product_issue` action=update.\n\nDelivery and focus stages advance automatically based on issue\nactivity. Agents never set delivery executionStatus directly.\n\n## MCP tool surface (what's available in this session)\n\nThe Telora MCP server is registered in `.mcp.json`. Core tool families:\n\n- `telora_product` -- list/get/create/update products\n- `telora_product_focus` -- focuses under a product\n- `telora_product_delivery` -- deliveries under a focus\n- `telora_product_issue` -- issues (Context Groups, Tasks, Bugs) under a delivery\n- `telora_agent` -- agent roles, escalation requests\n- `telora_loop_*` -- loop documents, questions, answers\n- `telora_discover` -- on-demand registration of deferred tool domains\n\nResolve the live tool list at runtime via `telora_discover` rather than\nhard-coding a list that drifts.\n\n## Human-vs-agent boundaries\n\n- Humans own **intent** and **completion**.\n - Intent: what capability matters, what changes when. Pre-handoff.\n - Completion: closing the loop on whether a focus is done. Post-handoff.\n- Agents own **scoping** and **execution**.\n - Scoping: decomposing a focus into deliveries, deliveries into\n issues, restructuring mid-flight as the agent learns more.\n - Execution: writing code, running tests, committing, reporting.\n\nDo not ask humans for operational details they expect the agent to figure\nout. Do not silently complete a focus on the human's behalf. Escalate\nwhen stuck via `telora_agent` action=escalate.\n\nWhen communicating with a human, refer to focuses, deliveries, and issues\nby their **title**, never their UUID. UUIDs are for tool calls only and must\nnot be surfaced in chat. MCP tool results carry both, so this is a\ncommunication choice, not a data-availability problem: keep the id in the\ntool call, name the work by its title in the conversation.\n\n## Commit attribution\n\nDeliveries on a focus share one branch, so their commits interleave. Every\ncommit you make for a delivery MUST carry a git trailer naming that delivery:\n\n```\nTelora-Delivery: <deliveryId>\n```\n\n- `<deliveryId>` is the delivery UUID whose work the commit advances (not the\n issue id, not the focus id). E.g.\n `git commit -m \"<subject>\" -m \"Telora-Delivery: <deliveryId>\"`.\n- One delivery per commit; split a change that spans two deliveries.\n- Merge-resolution / housekeeping commits carry no trailer.\n\nThe verify gate partitions the recorded commit set by this trailer to judge each\ndelivery against its OWN work and to prove its evidence is complete. A missing\ntrailer never corrupts a sibling -- at worst this delivery's evidence becomes\nunvouchable and the gate re-queues it instead of rendering a verdict.\n\n## Differential signaling\n\nTelora is asymmetric: it moves reality toward intent, never the reverse.\nAgents do not lower the bar to make signals look better -- they escalate.\nEvery artifact (commit, work summary, gate result) is signal toward the\ndeclared intent; raw activity without intent reduction is noise.\n\nA short corrective comment from the user is high-signal -- treat brief\npushback as the most important input in the session.\n\n## Workflows and policies\n\n- **Workflow**: stage directives shape agent behavior at discrete\n transitions. What context the agent sees (assembly recipes), what tools\n it can use, how it thinks (prompt + model). Live in Telora's\n `workflow_stages.agent_directive` JSONB.\n- **Policy** (organizational, deferred): cross-cutting constraints that\n feed into stage directives.\n\nWhen you cross a stage transition, the daemon may inject context or spawn\na fresh sub-agent per the directive. Don't override that flow without a\nclear reason.\n";
|
|
33
33
|
/**
|
|
34
34
|
* Render a fresh-repo CLAUDE.md.
|
|
35
35
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAE/D;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,wDACY,CAAC;AAExD,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAE/D;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,wDACY,CAAC;AAExD,eAAO,MAAM,SAAS,y4UAuNrB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CASjE"}
|