@telora/daemon 0.21.198 → 0.22.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/build-info.json +5 -3
- package/dist/queries/linear-linked.d.ts +53 -0
- package/dist/queries/linear-linked.d.ts.map +1 -0
- package/dist/queries/linear-linked.js +120 -0
- package/dist/queries/linear-linked.js.map +1 -0
- package/dist/resolvers/assembly-engine.d.ts.map +1 -1
- package/dist/resolvers/assembly-engine.js +1 -0
- package/dist/resolvers/assembly-engine.js.map +1 -1
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +2 -0
- package/dist/resolvers/index.js.map +1 -1
- package/dist/resolvers/linear-linked-issues.d.ts +40 -0
- package/dist/resolvers/linear-linked-issues.d.ts.map +1 -0
- package/dist/resolvers/linear-linked-issues.js +164 -0
- package/dist/resolvers/linear-linked-issues.js.map +1 -0
- 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/package.json +2 -2
package/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commitSha": "
|
|
3
|
-
"builtAt": "2026-09-
|
|
2
|
+
"commitSha": "81c66153f",
|
|
3
|
+
"builtAt": "2026-09-01T21:00:32.128Z",
|
|
4
4
|
"expectedMigrations": [
|
|
5
5
|
"20250829113330_create_org_nodes_table.sql",
|
|
6
6
|
"20250829113402_fix_function_security_search_path.sql",
|
|
@@ -773,6 +773,8 @@
|
|
|
773
773
|
"20260828212921_product_focuses_origin.sql",
|
|
774
774
|
"20260830202841_widen_git_state_check_conflict_states.sql",
|
|
775
775
|
"20260830204654_gate_focus_team_clear_on_review_window.sql",
|
|
776
|
-
"20260830230828_add_focus_first_armed_at.sql"
|
|
776
|
+
"20260830230828_add_focus_first_armed_at.sql",
|
|
777
|
+
"20260901190319_linear_adapter_unit_scoped_external_data_sources.sql",
|
|
778
|
+
"20260901193656_external_references_provenance.sql"
|
|
777
779
|
]
|
|
778
780
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Adapter type for a Linear connection in external_data_sources. */
|
|
2
|
+
export declare const LINEAR_ADAPTER = "linear";
|
|
3
|
+
/** The relation that marks "this Telora intent was shaped by this Linear issue". */
|
|
4
|
+
export declare const INFORMED_BY_RELATION = "informed_by";
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the product's Linear connection via the unit walk and return its
|
|
7
|
+
* external_data_source id, or null when no ancestor unit has a Linear source.
|
|
8
|
+
* Used to scope references to Linear-sourced ones only.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveLinearSourceId(productId: string): Promise<string | null>;
|
|
11
|
+
/** A structural informed_by reference from a Telora entity to a Linear issue. */
|
|
12
|
+
export interface InformedByReference {
|
|
13
|
+
externalIdentifier: string;
|
|
14
|
+
externalUrl: string | null;
|
|
15
|
+
note: string | null;
|
|
16
|
+
externalDataSourceId: string | null;
|
|
17
|
+
}
|
|
18
|
+
/** Entity types the resolver reads references from (focus + its deliveries). */
|
|
19
|
+
export type ReferenceEntityType = 'focus' | 'delivery';
|
|
20
|
+
/**
|
|
21
|
+
* List the informed_by references recorded on a single entity. Filters to
|
|
22
|
+
* relation === 'informed_by' -- the enum is open for later relations, but only
|
|
23
|
+
* informed_by feeds the executing team its source material.
|
|
24
|
+
*/
|
|
25
|
+
export declare function listInformedByReferences(entityType: ReferenceEntityType, entityId: string): Promise<InformedByReference[]>;
|
|
26
|
+
/** A read-model Linear issue as consumed by the resolver (verbatim description). */
|
|
27
|
+
export interface LinkedLinearIssue {
|
|
28
|
+
identifier: string;
|
|
29
|
+
title: string;
|
|
30
|
+
/** Verbatim Linear description ('' when Linear returns null). Never truncated. */
|
|
31
|
+
description: string;
|
|
32
|
+
url: string;
|
|
33
|
+
state: {
|
|
34
|
+
name: string;
|
|
35
|
+
type: string;
|
|
36
|
+
} | null;
|
|
37
|
+
teamName: string | null;
|
|
38
|
+
projectName: string | null;
|
|
39
|
+
projectDescription: string | null;
|
|
40
|
+
labels: string[];
|
|
41
|
+
comments: Array<{
|
|
42
|
+
author: string | null;
|
|
43
|
+
body: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Fetch verbatim read-model issues for exactly the given identifiers. The
|
|
49
|
+
* daemon passes only productId + identifiers -- never a Linear API key. Returns
|
|
50
|
+
* an empty array for an empty identifier set (no call is made).
|
|
51
|
+
*/
|
|
52
|
+
export declare function fetchLinkedLinearIssues(productId: string, identifiers: string[]): Promise<LinkedLinearIssue[]>;
|
|
53
|
+
//# sourceMappingURL=linear-linked.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-linked.d.ts","sourceRoot":"","sources":["../../src/queries/linear-linked.ts"],"names":[],"mappings":"AAwBA,qEAAqE;AACrE,eAAO,MAAM,cAAc,WAAW,CAAC;AAEvC,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAQlD;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOrF;AAID,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,UAAU,CAAC;AAgBvD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,mBAAmB,EAC/B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAWhC;AAID,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7E;AA6BD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAoB9B"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: none -- no test imports this module directly (baselined; see lint:pinned-by)
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* Typed product-api reads for the `linear.linked_issues` assembly resolver.
|
|
6
|
+
*
|
|
7
|
+
* The daemon never holds the Linear API key: every Linear fetch here goes
|
|
8
|
+
* through the product-api edge function, which resolves the unit-scoped Linear
|
|
9
|
+
* connection and dereferences the key server-side. These wrappers only pass
|
|
10
|
+
* ids/identifiers and validate the read-model shapes back with zod (no `any`),
|
|
11
|
+
* per the queries idiom.
|
|
12
|
+
*
|
|
13
|
+
* Three reads, composed by the resolver:
|
|
14
|
+
* 1. resolveLinearSourceId -- which external_data_source is the product's Linear connection
|
|
15
|
+
* 2. listInformedByReferences -- informed_by references on a focus / delivery
|
|
16
|
+
* 3. fetchLinkedLinearIssues -- verbatim read-model issues for a set of identifiers
|
|
17
|
+
*
|
|
18
|
+
* @module queries/linear-linked
|
|
19
|
+
*/
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
import { callApi } from './shared.js';
|
|
22
|
+
/** Adapter type for a Linear connection in external_data_sources. */
|
|
23
|
+
export const LINEAR_ADAPTER = 'linear';
|
|
24
|
+
/** The relation that marks "this Telora intent was shaped by this Linear issue". */
|
|
25
|
+
export const INFORMED_BY_RELATION = 'informed_by';
|
|
26
|
+
// ── external_data_source_resolve ──────────────────────────────────────
|
|
27
|
+
const ResolveSourceResponseSchema = z.object({
|
|
28
|
+
connection: z.object({ id: z.string() }).nullable().optional(),
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the product's Linear connection via the unit walk and return its
|
|
32
|
+
* external_data_source id, or null when no ancestor unit has a Linear source.
|
|
33
|
+
* Used to scope references to Linear-sourced ones only.
|
|
34
|
+
*/
|
|
35
|
+
export async function resolveLinearSourceId(productId) {
|
|
36
|
+
const resp = await callApi('external_data_source_resolve', {
|
|
37
|
+
productId,
|
|
38
|
+
adapterType: LINEAR_ADAPTER,
|
|
39
|
+
});
|
|
40
|
+
const parsed = ResolveSourceResponseSchema.parse(resp);
|
|
41
|
+
return parsed.connection?.id ?? null;
|
|
42
|
+
}
|
|
43
|
+
const RefListResponseSchema = z.object({
|
|
44
|
+
externalReferences: z
|
|
45
|
+
.array(z.object({
|
|
46
|
+
externalIdentifier: z.string(),
|
|
47
|
+
externalUrl: z.string().nullable().optional(),
|
|
48
|
+
note: z.string().nullable().optional(),
|
|
49
|
+
externalDataSourceId: z.string().nullable().optional(),
|
|
50
|
+
relation: z.string().nullable().optional(),
|
|
51
|
+
}))
|
|
52
|
+
.optional(),
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* List the informed_by references recorded on a single entity. Filters to
|
|
56
|
+
* relation === 'informed_by' -- the enum is open for later relations, but only
|
|
57
|
+
* informed_by feeds the executing team its source material.
|
|
58
|
+
*/
|
|
59
|
+
export async function listInformedByReferences(entityType, entityId) {
|
|
60
|
+
const resp = await callApi('external_reference_list', { entityType, entityId });
|
|
61
|
+
const parsed = RefListResponseSchema.parse(resp);
|
|
62
|
+
return (parsed.externalReferences ?? [])
|
|
63
|
+
.filter((r) => r.relation === INFORMED_BY_RELATION)
|
|
64
|
+
.map((r) => ({
|
|
65
|
+
externalIdentifier: r.externalIdentifier,
|
|
66
|
+
externalUrl: r.externalUrl ?? null,
|
|
67
|
+
note: r.note ?? null,
|
|
68
|
+
externalDataSourceId: r.externalDataSourceId ?? null,
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
const LinkedIssuesResponseSchema = z.object({
|
|
72
|
+
issues: z
|
|
73
|
+
.array(z.object({
|
|
74
|
+
identifier: z.string(),
|
|
75
|
+
title: z.string(),
|
|
76
|
+
description: z.string(),
|
|
77
|
+
url: z.string(),
|
|
78
|
+
state: z.object({ name: z.string(), type: z.string() }).nullable().optional(),
|
|
79
|
+
teamName: z.string().nullable().optional(),
|
|
80
|
+
projectName: z.string().nullable().optional(),
|
|
81
|
+
projectDescription: z.string().nullable().optional(),
|
|
82
|
+
labels: z.array(z.string()).optional(),
|
|
83
|
+
comments: z
|
|
84
|
+
.array(z.object({
|
|
85
|
+
author: z.string().nullable().optional(),
|
|
86
|
+
body: z.string(),
|
|
87
|
+
createdAt: z.string(),
|
|
88
|
+
}))
|
|
89
|
+
.optional(),
|
|
90
|
+
}))
|
|
91
|
+
.optional(),
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Fetch verbatim read-model issues for exactly the given identifiers. The
|
|
95
|
+
* daemon passes only productId + identifiers -- never a Linear API key. Returns
|
|
96
|
+
* an empty array for an empty identifier set (no call is made).
|
|
97
|
+
*/
|
|
98
|
+
export async function fetchLinkedLinearIssues(productId, identifiers) {
|
|
99
|
+
if (identifiers.length === 0)
|
|
100
|
+
return [];
|
|
101
|
+
const resp = await callApi('linear_issues_by_identifier', { productId, identifiers });
|
|
102
|
+
const parsed = LinkedIssuesResponseSchema.parse(resp);
|
|
103
|
+
return (parsed.issues ?? []).map((i) => ({
|
|
104
|
+
identifier: i.identifier,
|
|
105
|
+
title: i.title,
|
|
106
|
+
description: i.description,
|
|
107
|
+
url: i.url,
|
|
108
|
+
state: i.state ?? null,
|
|
109
|
+
teamName: i.teamName ?? null,
|
|
110
|
+
projectName: i.projectName ?? null,
|
|
111
|
+
projectDescription: i.projectDescription ?? null,
|
|
112
|
+
labels: i.labels ?? [],
|
|
113
|
+
comments: (i.comments ?? []).map((c) => ({
|
|
114
|
+
author: c.author ?? null,
|
|
115
|
+
body: c.body,
|
|
116
|
+
createdAt: c.createdAt,
|
|
117
|
+
})),
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=linear-linked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-linked.js","sourceRoot":"","sources":["../../src/queries/linear-linked.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB;AAEhB;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qEAAqE;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEvC,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC;AAElD,yEAAyE;AAEzE,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC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,EAAE,CAAC,CAAC,IAAI;YACZ,SAAS,EAAE,CAAC,CAAC,SAAS;SACvB,CAAC,CAAC;KACJ,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-engine.d.ts","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assembly-engine.d.ts","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,0EAA0E;AAC1E,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC3B,OAAO,CAAC,MAAM,CAAC,CAAC;AAErB;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,qFAAqF;AACrF,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,QAAQ,EAAE,qBAAqB,EAAE,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD;AAKD,0DAA0D;AAC1D,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CAEzF;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAelG;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iCAAiC,CACrD,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,gBAAgB,CAAC,CA0D3B"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
// packages/daemon/src/resolvers/focus-injections-resolver.test.ts,
|
|
14
14
|
// packages/daemon/src/resolvers/focus-last-review-report-resolver.test.ts,
|
|
15
15
|
// packages/daemon/src/resolvers/focus-reality-tree-resolver.test.ts,
|
|
16
|
+
// packages/daemon/src/resolvers/linear-linked-issues.test.ts,
|
|
16
17
|
// packages/daemon/src/resolvers/prd-resolvers.test.ts, packages/daemon/src/spawn/delivered-manifest.test.ts
|
|
17
18
|
// PINNED-BY-END
|
|
18
19
|
import { createLogger } from '../shell/log.js';
|
|
@@ -1 +1 @@
|
|
|
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,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,OAAO,GAAI,GAAa,CAAC,OAAO,CAAC;gBACvC,WAAW,GAAG,qCAAqC,GAAG,MAAM,OAAO,MAAM,CAAC;gBAC1E,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC3B,GAAG,CAAC,IAAI,CAAC,6BAA6B,GAAG,MAAM,OAAO,EAAE,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,GAAG;YACd,OAAO;YACP,SAAS;YACT,eAAe,EAAE,cAAc,CAAC,SAAS,CAAC;SAC3C,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAmHA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAgBxC;AAGD,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,EAClC,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrH,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
|
package/dist/resolvers/index.js
CHANGED
|
@@ -61,6 +61,7 @@ import { registerRealityTreeSnapshotResolver } from './reality-tree-snapshot.js'
|
|
|
61
61
|
import { registerPrdPersonaResolver } from './prd-persona.js';
|
|
62
62
|
import { registerPrdContextResolver } from './prd-context.js';
|
|
63
63
|
import { registerFocusEndpointCatalogResolver } from './focus-endpoint-catalog.js';
|
|
64
|
+
import { registerLinearLinkedIssuesResolver } from './linear-linked-issues.js';
|
|
64
65
|
// ── Explicit registration ─────────────────────────────────────────────
|
|
65
66
|
/** All register functions, in the order they historically registered. */
|
|
66
67
|
const REGISTER_FUNCTIONS = [
|
|
@@ -102,6 +103,7 @@ const REGISTER_FUNCTIONS = [
|
|
|
102
103
|
registerPrdPersonaResolver,
|
|
103
104
|
registerPrdContextResolver,
|
|
104
105
|
registerFocusEndpointCatalogResolver,
|
|
106
|
+
registerLinearLinkedIssuesResolver,
|
|
105
107
|
];
|
|
106
108
|
let initialized = false;
|
|
107
109
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wEAAwE;AACxE,iEAAiE;AACjE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,sB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AmC;IACnC,0BAA0B;IAC1B,0BAA0B;IAC1B,oCAAoC;IACpC,kCAAkC;CACnC,CAAC;AAEF,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,KAAK,MAAM,QAAQ,IAAI,kBAAkB,EAAE,CAAC;YAC1C,QAAQ,EAAE,CAAC;QACb,CAAC;QACD,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,MAAM,IAAI,GAAG,0BAA0B,EAAE,CAAC;IAC1C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,2EAA2E;YAC3E,mEAAmE;YACnE,kEAAkE,CACnE,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,yEAAyE;AACzE,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,EAClC,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* linear.linked_issues
|
|
3
|
+
*
|
|
4
|
+
* Composes into an executing team's prompt ONLY the Linear issues a
|
|
5
|
+
* human-and-agent session already linked (relation `informed_by`) to the focus
|
|
6
|
+
* being executed OR its deliveries -- fetched VERBATIM through the Server-Side
|
|
7
|
+
* Linear Read Model over product-api. This is the source material the agreed
|
|
8
|
+
* intent was distilled from (e.g. TIN-5's full description), so nuance lost in
|
|
9
|
+
* distillation is available to the work.
|
|
10
|
+
*
|
|
11
|
+
* It is deliberately NOT a general Linear source. Linear is a source for
|
|
12
|
+
* DETERMINING intent, not intent itself; the daemon never reads the backlog on
|
|
13
|
+
* its own initiative. The resolver fetches EXACTLY the referenced identifiers
|
|
14
|
+
* and nothing else, so no code path can surface an issue that was not chosen by
|
|
15
|
+
* a human-and-agent session.
|
|
16
|
+
*
|
|
17
|
+
* The daemon never holds the Linear API key: every fetch is a product-api call
|
|
18
|
+
* that resolves the unit-scoped connection and dereferences the key
|
|
19
|
+
* server-side. The daemon passes only ids/identifiers.
|
|
20
|
+
*
|
|
21
|
+
* SCOPING TO LINEAR (decision): external_references is a generic table, open to
|
|
22
|
+
* future adapter types. This resolver resolves the product's Linear
|
|
23
|
+
* external_data_source id once and keeps only references whose
|
|
24
|
+
* external_data_source_id matches it -- a reference to any non-Linear source is
|
|
25
|
+
* dropped rather than mis-fetched through the Linear read model.
|
|
26
|
+
*
|
|
27
|
+
* Degrades to an explicit empty-state section when the product has no resolved
|
|
28
|
+
* Linear connection or the focus/deliveries carry no informed_by Linear
|
|
29
|
+
* references. On any error it contributes nothing (returns '') -- a resolver
|
|
30
|
+
* never throws into assembly.
|
|
31
|
+
*/
|
|
32
|
+
/** Explicit empty-state section: no linked Linear issues to surface. */
|
|
33
|
+
export declare const LINKED_LINEAR_EMPTY_STATE = "## Linked Linear Issues\n\n_No Linear issues are linked (informed_by) to this focus or its deliveries._";
|
|
34
|
+
/** Max issues rendered -- prompt-assembly size bound (issue count). */
|
|
35
|
+
export declare const MAX_LINKED_LINEAR_ISSUES = 20;
|
|
36
|
+
/** Char budget for the rendered section -- prompt-assembly size bound. */
|
|
37
|
+
export declare const LINKED_LINEAR_BUDGET_CHARS = 12000;
|
|
38
|
+
/** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
|
|
39
|
+
export declare function registerLinearLinkedIssuesResolver(): void;
|
|
40
|
+
//# sourceMappingURL=linear-linked-issues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-linked-issues.d.ts","sourceRoot":"","sources":["../../src/resolvers/linear-linked-issues.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,wEAAwE;AACxE,eAAO,MAAM,yBAAyB,4GACqE,CAAC;AAE5G,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,QAAQ,CAAC;AA4EhD,oGAAoG;AACpG,wBAAgB,kCAAkC,IAAI,IAAI,CAqDzD"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: none -- no test imports this module directly (baselined; see lint:pinned-by)
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
import { registerSourceResolver } from './assembly-engine.js';
|
|
5
|
+
import { getFocusDeliveries } from '../queries/focuses.js';
|
|
6
|
+
import { resolveLinearSourceId, listInformedByReferences, fetchLinkedLinearIssues, } from '../queries/linear-linked.js';
|
|
7
|
+
import { createLogger } from '../shell/log.js';
|
|
8
|
+
const log = createLogger({ module: 'assembly-engine' });
|
|
9
|
+
/**
|
|
10
|
+
* linear.linked_issues
|
|
11
|
+
*
|
|
12
|
+
* Composes into an executing team's prompt ONLY the Linear issues a
|
|
13
|
+
* human-and-agent session already linked (relation `informed_by`) to the focus
|
|
14
|
+
* being executed OR its deliveries -- fetched VERBATIM through the Server-Side
|
|
15
|
+
* Linear Read Model over product-api. This is the source material the agreed
|
|
16
|
+
* intent was distilled from (e.g. TIN-5's full description), so nuance lost in
|
|
17
|
+
* distillation is available to the work.
|
|
18
|
+
*
|
|
19
|
+
* It is deliberately NOT a general Linear source. Linear is a source for
|
|
20
|
+
* DETERMINING intent, not intent itself; the daemon never reads the backlog on
|
|
21
|
+
* its own initiative. The resolver fetches EXACTLY the referenced identifiers
|
|
22
|
+
* and nothing else, so no code path can surface an issue that was not chosen by
|
|
23
|
+
* a human-and-agent session.
|
|
24
|
+
*
|
|
25
|
+
* The daemon never holds the Linear API key: every fetch is a product-api call
|
|
26
|
+
* that resolves the unit-scoped connection and dereferences the key
|
|
27
|
+
* server-side. The daemon passes only ids/identifiers.
|
|
28
|
+
*
|
|
29
|
+
* SCOPING TO LINEAR (decision): external_references is a generic table, open to
|
|
30
|
+
* future adapter types. This resolver resolves the product's Linear
|
|
31
|
+
* external_data_source id once and keeps only references whose
|
|
32
|
+
* external_data_source_id matches it -- a reference to any non-Linear source is
|
|
33
|
+
* dropped rather than mis-fetched through the Linear read model.
|
|
34
|
+
*
|
|
35
|
+
* Degrades to an explicit empty-state section when the product has no resolved
|
|
36
|
+
* Linear connection or the focus/deliveries carry no informed_by Linear
|
|
37
|
+
* references. On any error it contributes nothing (returns '') -- a resolver
|
|
38
|
+
* never throws into assembly.
|
|
39
|
+
*/
|
|
40
|
+
/** Explicit empty-state section: no linked Linear issues to surface. */
|
|
41
|
+
export const LINKED_LINEAR_EMPTY_STATE = '## Linked Linear Issues\n\n_No Linear issues are linked (informed_by) to this focus or its deliveries._';
|
|
42
|
+
/** Max issues rendered -- prompt-assembly size bound (issue count). */
|
|
43
|
+
export const MAX_LINKED_LINEAR_ISSUES = 20;
|
|
44
|
+
/** Char budget for the rendered section -- prompt-assembly size bound. */
|
|
45
|
+
export const LINKED_LINEAR_BUDGET_CHARS = 12000;
|
|
46
|
+
/**
|
|
47
|
+
* Collect informed_by references from the focus and each of its deliveries,
|
|
48
|
+
* keep only Linear-sourced ones, and dedupe by identifier (aggregating the
|
|
49
|
+
* human-authored notes that cite each issue). Order is stable: focus-level
|
|
50
|
+
* references first, then deliveries in rank order.
|
|
51
|
+
*/
|
|
52
|
+
function collectLinkedRefs(refGroups, linearSourceId) {
|
|
53
|
+
const byIdentifier = new Map();
|
|
54
|
+
const order = [];
|
|
55
|
+
for (const group of refGroups) {
|
|
56
|
+
for (const ref of group) {
|
|
57
|
+
if (ref.externalDataSourceId !== linearSourceId)
|
|
58
|
+
continue; // non-Linear -> drop
|
|
59
|
+
const id = ref.externalIdentifier;
|
|
60
|
+
let entry = byIdentifier.get(id);
|
|
61
|
+
if (!entry) {
|
|
62
|
+
entry = { identifier: id, url: ref.externalUrl, notes: [] };
|
|
63
|
+
byIdentifier.set(id, entry);
|
|
64
|
+
order.push(id);
|
|
65
|
+
}
|
|
66
|
+
if (!entry.url && ref.externalUrl)
|
|
67
|
+
entry.url = ref.externalUrl;
|
|
68
|
+
const note = (ref.note ?? '').trim();
|
|
69
|
+
if (note && !entry.notes.includes(note))
|
|
70
|
+
entry.notes.push(note);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return order.map((id) => byIdentifier.get(id));
|
|
74
|
+
}
|
|
75
|
+
/** Render one issue as markdown, given the notes that cited it. */
|
|
76
|
+
function renderIssue(issue, notes) {
|
|
77
|
+
const lines = [];
|
|
78
|
+
lines.push(`### ${issue.identifier}: ${issue.title}`);
|
|
79
|
+
const meta = [];
|
|
80
|
+
if (issue.state)
|
|
81
|
+
meta.push(`State: ${issue.state.name} (${issue.state.type})`);
|
|
82
|
+
if (issue.teamName)
|
|
83
|
+
meta.push(`Team: ${issue.teamName}`);
|
|
84
|
+
if (issue.projectName)
|
|
85
|
+
meta.push(`Project: ${issue.projectName}`);
|
|
86
|
+
if (issue.url)
|
|
87
|
+
meta.push(`URL: ${issue.url}`);
|
|
88
|
+
if (meta.length > 0)
|
|
89
|
+
lines.push(meta.join(' | '));
|
|
90
|
+
if (issue.projectDescription)
|
|
91
|
+
lines.push(`Project description: ${issue.projectDescription}`);
|
|
92
|
+
if (issue.labels.length > 0)
|
|
93
|
+
lines.push(`Labels: ${issue.labels.join(', ')}`);
|
|
94
|
+
if (notes.length > 0) {
|
|
95
|
+
lines.push('');
|
|
96
|
+
lines.push('Why it was linked:');
|
|
97
|
+
for (const note of notes)
|
|
98
|
+
lines.push(`- ${note}`);
|
|
99
|
+
}
|
|
100
|
+
lines.push('');
|
|
101
|
+
lines.push('Description (verbatim):');
|
|
102
|
+
lines.push(issue.description.length > 0 ? issue.description : '_(no description)_');
|
|
103
|
+
if (issue.comments.length > 0) {
|
|
104
|
+
lines.push('');
|
|
105
|
+
lines.push(`Comments (${issue.comments.length}):`);
|
|
106
|
+
for (const c of issue.comments) {
|
|
107
|
+
const who = c.author ?? 'unknown';
|
|
108
|
+
lines.push(`- ${who} (${c.createdAt}): ${c.body}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return lines.join('\n');
|
|
112
|
+
}
|
|
113
|
+
/** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
|
|
114
|
+
export function registerLinearLinkedIssuesResolver() {
|
|
115
|
+
registerSourceResolver('linear.linked_issues', async (context) => {
|
|
116
|
+
try {
|
|
117
|
+
const linearSourceId = await resolveLinearSourceId(context.productId);
|
|
118
|
+
if (!linearSourceId)
|
|
119
|
+
return LINKED_LINEAR_EMPTY_STATE;
|
|
120
|
+
const deliveries = await getFocusDeliveries(context.focusId);
|
|
121
|
+
const orderedDeliveries = [...deliveries].sort((a, b) => a.priorityRank - b.priorityRank);
|
|
122
|
+
const refGroups = await Promise.all([
|
|
123
|
+
listInformedByReferences('focus', context.focusId),
|
|
124
|
+
...orderedDeliveries.map((d) => listInformedByReferences('delivery', d.id)),
|
|
125
|
+
]);
|
|
126
|
+
const linkedRefs = collectLinkedRefs(refGroups, linearSourceId);
|
|
127
|
+
if (linkedRefs.length === 0)
|
|
128
|
+
return LINKED_LINEAR_EMPTY_STATE;
|
|
129
|
+
const capped = linkedRefs.slice(0, MAX_LINKED_LINEAR_ISSUES);
|
|
130
|
+
const identifiers = capped.map((r) => r.identifier);
|
|
131
|
+
const notesByIdentifier = new Map(capped.map((r) => [r.identifier, r.notes]));
|
|
132
|
+
const issues = await fetchLinkedLinearIssues(context.productId, identifiers);
|
|
133
|
+
if (issues.length === 0)
|
|
134
|
+
return LINKED_LINEAR_EMPTY_STATE;
|
|
135
|
+
const sections = [];
|
|
136
|
+
let used = 0;
|
|
137
|
+
let truncated = false;
|
|
138
|
+
for (const issue of issues) {
|
|
139
|
+
const rendered = renderIssue(issue, notesByIdentifier.get(issue.identifier) ?? []);
|
|
140
|
+
if (used + rendered.length > LINKED_LINEAR_BUDGET_CHARS && sections.length > 0) {
|
|
141
|
+
truncated = true;
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
sections.push(rendered);
|
|
145
|
+
used += rendered.length;
|
|
146
|
+
}
|
|
147
|
+
const omitted = linkedRefs.length - sections.length;
|
|
148
|
+
const header = '## Linked Linear Issues';
|
|
149
|
+
const preamble = 'Source material the agreed intent was distilled from. Linear is a SOURCE ' +
|
|
150
|
+
'for determining intent, not intent itself -- read-only, and only issues a ' +
|
|
151
|
+
'human-and-agent session chose are shown.';
|
|
152
|
+
const parts = [header, preamble, sections.join('\n\n')];
|
|
153
|
+
if (truncated || omitted > 0) {
|
|
154
|
+
parts.push(`_(${omitted > 0 ? omitted : 0} further linked issue(s) omitted for prompt size.)_`);
|
|
155
|
+
}
|
|
156
|
+
return parts.join('\n\n');
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
log.warn(`linear.linked_issues: failed: ${err.message}`);
|
|
160
|
+
return '';
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=linear-linked-issues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-linked-issues.js","sourceRoot":"","sources":["../../src/resolvers/linear-linked-issues.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0F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,CAAC;YACxD,IAAI,SAAS,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;gBAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,qDAAqD,CAAC,CAAC;YAClG,CAAC;YACD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,iCAAkC,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;YACpE,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,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**Routing is not activation.** \"Hand off to the daemon team\" answers WHICH\npath executes -- it is NOT a signal to arm the focus now. Arming (setting the\nfocus's `assignedAgentRoleId`, which spends real budget spawning a team) is a\nseparate, human-owned go-signal. Scoping ends at a named **scoped, un-armed**\nstate: you decompose the focus into deliveries and issues and then STOP. Do\nNOT arm a focus at the tail of scoping -- a human arms it (or has durably\ndelegated that go-signal). Choosing team-over-inline routing the moment\nscoping ends is NOT the same as deciding it is time to spend; keep the two\ndecisions separate. Activation is a third decision, owned by the human\nalongside intent and completion (see Human-vs-agent boundaries below).\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**Scoping reads open intent.** When you place a new unit of work, the first\nquestion -- \"does this belong in a focus that already exists?\" -- is asked\nagainst the OPEN set only: the active and proposed foci. A completed or\ncancelled focus is settled intent. It can no longer absorb new work, and\nconsulting one only re-litigates a decision already closed -- so a terminal\nfocus is neither a placement candidate nor a precedent to reason from. When\nno open focus fits, the answer is a new focus, never a closed one reopened\nin spirit.\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. Authoring STOPS there, at **scoped, un-armed** -- arming\nthe daemon PRD loop is a human go-signal (the activation decision above),\nnot the tail of authoring, unless that go-signal is durably delegated. All\nauthoring is harness+MCP; there 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## Commit attribution (MANDATORY: one trailer per commit)\n\nEvery delivery on a focus shares ONE branch, so their commits interleave.\nThe only way the verify gate can judge a delivery against ITS OWN work is a\nper-commit marker. On EVERY commit you make for a delivery, add a git trailer\nnaming the delivery the work belongs to:\n\n```\nTelora-Delivery: <deliveryId>\n```\n\nStamp it with git's own trailer machinery so an appended `Co-Authored-By`\ncannot void it:\n\n```\ngit commit --trailer \"Telora-Delivery: <deliveryId>\" -m \"<subject>\"\n```\n\nDo NOT pass it as its own `-m` paragraph (`-m \"Telora-Delivery: ...\"`): git\nparses only the last paragraph as trailers, so an appended `Co-Authored-By`\nsilently voids it. A `commit-msg` git hook in this worktree ENFORCES this --\na commit whose message lacks a well-formed `Telora-Delivery: <uuid>` trailer\nis REFUSED, with the exact line to add printed. Fix it and re-commit; do not\nescalate.\n\nA commit that genuinely belongs to NO delivery declares that explicitly: merge\ncommits are exempt by shape (git sets `MERGE_HEAD`), and any other\ndelivery-less housekeeping commit carries the non-delivery sentinel:\n\n```\ngit commit --trailer \"Telora-Delivery: none\" -m \"<subject>\"\n```\n\nNever borrow a real delivery id for a commit that is not that delivery's work.\nThat is false attribution -- it folds a commit that is not its own into the\nborrowed delivery's verify evidence. The sentinel is the sanctioned escape.\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**, **activation**, and **completion**.\n - Intent: what capability matters, what changes when. Pre-handoff.\n - Activation (arming): the go/no-go spend decision -- setting the focus's\n `assignedAgentRoleId` to hand it to the daemon team. Scoping ends\n **scoped, un-armed**; arming is a human go-signal unless durably\n delegated. Sits between intent and completion.\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. Scoping\n ENDS at **scoped, un-armed** -- it never arms the focus.\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**Routing is not activation.** \"Hand off to the daemon team\" answers WHICH\npath executes -- it is NOT a signal to arm the focus now. Arming (setting the\nfocus's `assignedAgentRoleId`, which spends real budget spawning a team) is a\nseparate, human-owned go-signal. Scoping ends at a named **scoped, un-armed**\nstate: you decompose the focus into deliveries and issues and then STOP. Do\nNOT arm a focus at the tail of scoping -- a human arms it (or has durably\ndelegated that go-signal). Choosing team-over-inline routing the moment\nscoping ends is NOT the same as deciding it is time to spend; keep the two\ndecisions separate. Activation is a third decision, owned by the human\nalongside intent and completion (see Human-vs-agent boundaries below).\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**Scoping reads open intent.** When you place a new unit of work, the first\nquestion -- \"does this belong in a focus that already exists?\" -- is asked\nagainst the OPEN set only: the active and proposed foci. A completed or\ncancelled focus is settled intent. It can no longer absorb new work, and\nconsulting one only re-litigates a decision already closed -- so a terminal\nfocus is neither a placement candidate nor a precedent to reason from. When\nno open focus fits, the answer is a new focus, never a closed one reopened\nin spirit.\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. Authoring STOPS there, at **scoped, un-armed** -- arming\nthe daemon PRD loop is a human go-signal (the activation decision above),\nnot the tail of authoring, unless that go-signal is durably delegated. All\nauthoring is harness+MCP; there 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## Commit attribution (MANDATORY: one trailer per commit)\n\nEvery delivery on a focus shares ONE branch, so their commits interleave.\nThe only way the verify gate can judge a delivery against ITS OWN work is a\nper-commit marker. On EVERY commit you make for a delivery, add a git trailer\nnaming the delivery the work belongs to:\n\n```\nTelora-Delivery: <deliveryId>\n```\n\nStamp it with git's own trailer machinery so an appended `Co-Authored-By`\ncannot void it:\n\n```\ngit commit --trailer \"Telora-Delivery: <deliveryId>\" -m \"<subject>\"\n```\n\nDo NOT pass it as its own `-m` paragraph (`-m \"Telora-Delivery: ...\"`): git\nparses only the last paragraph as trailers, so an appended `Co-Authored-By`\nsilently voids it. A `commit-msg` git hook in this worktree ENFORCES this --\na commit whose message lacks a well-formed `Telora-Delivery: <uuid>` trailer\nis REFUSED, with the exact line to add printed. Fix it and re-commit; do not\nescalate.\n\nA commit that genuinely belongs to NO delivery declares that explicitly: merge\ncommits are exempt by shape (git sets `MERGE_HEAD`), and any other\ndelivery-less housekeeping commit carries the non-delivery sentinel:\n\n```\ngit commit --trailer \"Telora-Delivery: none\" -m \"<subject>\"\n```\n\nNever borrow a real delivery id for a commit that is not that delivery's work.\nThat is false attribution -- it folds a commit that is not its own into the\nborrowed delivery's verify evidence. The sentinel is the sanctioned escape.\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**, **activation**, and **completion**.\n - Intent: what capability matters, what changes when. Pre-handoff.\n - Activation (arming): the go/no-go spend decision -- setting the focus's\n `assignedAgentRoleId` to hand it to the daemon team. Scoping ends\n **scoped, un-armed**; arming is a human go-signal unless durably\n delegated. Sits between intent and completion.\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. Scoping\n ENDS at **scoped, un-armed** -- it never arms the focus.\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## Provenance: record what informed your intent\n\nWhen you and the human set Telora intent after looking at an external\ntracker (e.g. a client's Linear workspace), record WHERE that intent came\nfrom. A connected tracker is a **source for determining intent, not intent\nitself**: Telora owns intent, it is read strictly one-way, and Telora's\nintent is never written back to the tracker.\n\n- To read the tracker in-session, use the integrations tools\n (`telora_external_data_source` resolve, then `telora_linear`). Pull the\n issue(s) the human points at, discuss them together, then set intent in\n Telora (a focus, delivery, issue, reality-tree node, loop question, or\n PRD node).\n- Whenever tracker content SHAPED one of those entities, record an\n `informed_by` reference with `telora_external_reference` create, naming\n the entity + the external identifier (e.g. TIN-5) + a one-line note on\n HOW it informed the entity. The reference is a POINTER, never a copy --\n so a later reader can trace agreed intent back to its source, and a\n change to the source can be surfaced to the intent that leaned on it.\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":"AAUA;;;;;;;;;;;;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":"AAUA;;;;;;;;;;;;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,k6bAuRrB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CASjE"}
|
|
@@ -285,6 +285,26 @@ declared intent; raw activity without intent reduction is noise.
|
|
|
285
285
|
A short corrective comment from the user is high-signal -- treat brief
|
|
286
286
|
pushback as the most important input in the session.
|
|
287
287
|
|
|
288
|
+
## Provenance: record what informed your intent
|
|
289
|
+
|
|
290
|
+
When you and the human set Telora intent after looking at an external
|
|
291
|
+
tracker (e.g. a client's Linear workspace), record WHERE that intent came
|
|
292
|
+
from. A connected tracker is a **source for determining intent, not intent
|
|
293
|
+
itself**: Telora owns intent, it is read strictly one-way, and Telora's
|
|
294
|
+
intent is never written back to the tracker.
|
|
295
|
+
|
|
296
|
+
- To read the tracker in-session, use the integrations tools
|
|
297
|
+
(\`telora_external_data_source\` resolve, then \`telora_linear\`). Pull the
|
|
298
|
+
issue(s) the human points at, discuss them together, then set intent in
|
|
299
|
+
Telora (a focus, delivery, issue, reality-tree node, loop question, or
|
|
300
|
+
PRD node).
|
|
301
|
+
- Whenever tracker content SHAPED one of those entities, record an
|
|
302
|
+
\`informed_by\` reference with \`telora_external_reference\` create, naming
|
|
303
|
+
the entity + the external identifier (e.g. TIN-5) + a one-line note on
|
|
304
|
+
HOW it informed the entity. The reference is a POINTER, never a copy --
|
|
305
|
+
so a later reader can trace agreed intent back to its source, and a
|
|
306
|
+
change to the source can be surfaced to the intent that leaned on it.
|
|
307
|
+
|
|
288
308
|
## Workflows and policies
|
|
289
309
|
|
|
290
310
|
- **Workflow**: stage directives shape agent behavior at discrete
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,uGAAuG;AACvG,8DAA8D;AAC9D,wDAAwD;AACxD,uEAAuE;AACvE,mEAAmE;AACnE,oEAAoE;AACpE,kEAAkE;AAClE,gBAAgB;AAEhB;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAE/D;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,8BAA8B,GACzC,qDAAqD,CAAC;AAExD,MAAM,CAAC,MAAM,SAAS,GAAG
|
|
1
|
+
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,uGAAuG;AACvG,8DAA8D;AAC9D,wDAAwD;AACxD,uEAAuE;AACvE,mEAAmE;AACnE,oEAAoE;AACpE,kEAAkE;AAClE,gBAAgB;AAEhB;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AACnE,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAE/D;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,8BAA8B,GACzC,qDAAqD,CAAC;AAExD,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuRxB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,WAA0B;IACvD,MAAM,WAAW,GAAG,WAAW;QAC7B,CAAC,CAAC,kCAAkC,WAAW,SAAS;QACxD,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,KAAK,GACT,GAAG,sBAAsB,IAAI;QAC7B,GAAG,WAAW,GAAG,SAAS,EAAE;QAC5B,GAAG,oBAAoB,IAAI,CAAC;IAC9B,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telora/daemon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"//testRunner": "Uses Node.js built-in test runner (node:test) via tsx for TypeScript support. The root package uses Vitest; this is a deliberate choice for the daemon package to avoid framework dependencies. Test files live beside the modules they exercise (owner-directory layout); the runner discovers them recursively.",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@telora/daemon-core": "^0.2.87",
|
|
41
|
-
"@telora/mcp-products": "^0.22.
|
|
41
|
+
"@telora/mcp-products": "^0.22.133",
|
|
42
42
|
"commander": "^14.0.3",
|
|
43
43
|
"yaml": "^2.4.0",
|
|
44
44
|
"zod": "^4.3.6"
|