@granular-software/fractory 0.0.0-stage → 0.1.24
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/LICENSE +4 -0
- package/README.md +28 -2
- package/dist/activity-volume.d.ts +18 -0
- package/dist/activity-volume.js +94 -0
- package/dist/annotations.d.ts +118 -0
- package/dist/annotations.js +304 -0
- package/dist/benchmark-cli.d.ts +1 -0
- package/dist/benchmark-cli.js +95 -0
- package/dist/benchmark-worker.d.ts +2 -0
- package/dist/benchmark-worker.js +22 -0
- package/dist/benchmarks.d.ts +19 -0
- package/dist/benchmarks.js +414 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +63 -0
- package/dist/block-cli.d.ts +1 -0
- package/dist/block-cli.js +88 -0
- package/dist/block-documents.d.ts +35 -0
- package/dist/block-documents.js +84 -0
- package/dist/change-impact.d.ts +55 -0
- package/dist/change-impact.js +223 -0
- package/dist/check-source.d.ts +2 -0
- package/dist/check-source.js +66 -0
- package/dist/checks-model.d.ts +64 -0
- package/dist/checks-model.js +36 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +359 -0
- package/dist/code-model.d.ts +38 -0
- package/dist/code-model.js +94 -0
- package/dist/code-store.d.ts +9 -0
- package/dist/code-store.js +79 -0
- package/dist/compare-artifact.d.ts +6 -0
- package/dist/compare-artifact.js +277 -0
- package/dist/compare.d.ts +81 -0
- package/dist/compare.js +291 -0
- package/dist/compiler.d.ts +10 -0
- package/dist/compiler.js +1083 -0
- package/dist/compose.d.ts +9 -0
- package/dist/compose.js +72 -0
- package/dist/core.d.ts +86 -0
- package/dist/core.js +206 -0
- package/dist/coverage-cli.d.ts +1 -0
- package/dist/coverage-cli.js +42 -0
- package/dist/declaration-sources.d.ts +3 -0
- package/dist/declaration-sources.js +51 -0
- package/dist/declared-graph.d.ts +3 -0
- package/dist/declared-graph.js +66 -0
- package/dist/display-name.d.ts +2 -0
- package/dist/display-name.js +8 -0
- package/dist/error-heat.d.ts +58 -0
- package/dist/error-heat.js +96 -0
- package/dist/evidence.d.ts +3 -0
- package/dist/evidence.js +68 -0
- package/dist/factory-graph.d.ts +4 -0
- package/dist/factory-graph.js +318 -0
- package/dist/factory-model.d.ts +97 -0
- package/dist/factory-model.js +1 -0
- package/dist/git-code.d.ts +47 -0
- package/dist/git-code.js +352 -0
- package/dist/git-refs.d.ts +4 -0
- package/dist/git-refs.js +37 -0
- package/dist/history-activity.d.ts +4 -0
- package/dist/history-activity.js +129 -0
- package/dist/history-churn.d.ts +36 -0
- package/dist/history-churn.js +302 -0
- package/dist/history-git.d.ts +21 -0
- package/dist/history-git.js +125 -0
- package/dist/history-ledger.d.ts +43 -0
- package/dist/history-ledger.js +450 -0
- package/dist/history-ownership.d.ts +10 -0
- package/dist/history-ownership.js +75 -0
- package/dist/history-source.d.ts +13 -0
- package/dist/history-source.js +100 -0
- package/dist/integrations-cli.d.ts +2 -0
- package/dist/integrations-cli.js +159 -0
- package/dist/issue-cache.d.ts +9 -0
- package/dist/issue-cache.js +68 -0
- package/dist/issue-cli.d.ts +1 -0
- package/dist/issue-cli.js +89 -0
- package/dist/issue-links.d.ts +15 -0
- package/dist/issue-links.js +125 -0
- package/dist/linear-issues.d.ts +19 -0
- package/dist/linear-issues.js +124 -0
- package/dist/local-runtime.d.ts +8 -0
- package/dist/local-runtime.js +59 -0
- package/dist/map-activity.d.ts +73 -0
- package/dist/map-activity.js +234 -0
- package/dist/map-model.d.ts +5 -0
- package/dist/map-model.js +166 -0
- package/dist/map-quality.d.ts +14 -0
- package/dist/map-quality.js +56 -0
- package/dist/mapping-coverage.d.ts +87 -0
- package/dist/mapping-coverage.js +404 -0
- package/dist/model.d.ts +182 -0
- package/dist/model.js +66 -0
- package/dist/operation-benchmark-worker.d.ts +2 -0
- package/dist/operation-benchmark-worker.js +60 -0
- package/dist/operation-benchmark.d.ts +29 -0
- package/dist/operation-benchmark.js +1 -0
- package/dist/otel-metrics.d.ts +21 -0
- package/dist/otel-metrics.js +146 -0
- package/dist/performance-model.d.ts +185 -0
- package/dist/performance-model.js +396 -0
- package/dist/product-map.d.ts +69 -0
- package/dist/product-map.js +168 -0
- package/dist/provider-access.cjs +207 -0
- package/dist/provider-access.d.cts +14 -0
- package/dist/reports-cli.d.ts +1 -0
- package/dist/reports-cli.js +111 -0
- package/dist/reports-model.d.ts +27 -0
- package/dist/reports-model.js +39 -0
- package/dist/reports.d.ts +23 -0
- package/dist/reports.js +223 -0
- package/dist/repository-map.d.ts +22 -0
- package/dist/repository-map.js +151 -0
- package/dist/resource-cache.d.ts +17 -0
- package/dist/resource-cache.js +65 -0
- package/dist/review-cli.d.ts +19 -0
- package/dist/review-cli.js +224 -0
- package/dist/review.d.ts +48 -0
- package/dist/review.js +289 -0
- package/dist/runtime-metrics.d.ts +26 -0
- package/dist/runtime-metrics.js +290 -0
- package/dist/scope.d.ts +12 -0
- package/dist/scope.js +94 -0
- package/dist/sentry-activity.d.ts +39 -0
- package/dist/sentry-activity.js +174 -0
- package/dist/sentry.d.ts +130 -0
- package/dist/sentry.js +369 -0
- package/dist/service-release.d.ts +16 -0
- package/dist/service-release.js +14 -0
- package/dist/setup-cli.d.ts +2 -0
- package/dist/setup-cli.js +52 -0
- package/dist/setup-kit.cjs +163 -0
- package/dist/setup-kit.d.cts +32 -0
- package/dist/source-index.d.ts +37 -0
- package/dist/source-index.js +166 -0
- package/dist/source-review-git.d.ts +7 -0
- package/dist/source-review-git.js +103 -0
- package/dist/source-review.d.ts +16 -0
- package/dist/source-review.js +493 -0
- package/dist/telemetry.d.ts +17 -0
- package/dist/telemetry.js +51 -0
- package/dist/time-window.d.ts +9 -0
- package/dist/time-window.js +35 -0
- package/dist/trace-evidence.d.ts +23 -0
- package/dist/trace-evidence.js +55 -0
- package/dist/trace-model.d.ts +26 -0
- package/dist/trace-model.js +1 -0
- package/dist/tracing.d.ts +44 -0
- package/dist/tracing.js +123 -0
- package/dist/work-check.d.ts +17 -0
- package/dist/work-check.js +110 -0
- package/dist/work-cli.d.ts +1 -0
- package/dist/work-cli.js +148 -0
- package/dist/work-context.d.ts +57 -0
- package/dist/work-context.js +568 -0
- package/dist/work-intents.d.ts +6 -0
- package/dist/work-intents.js +140 -0
- package/dist/work-items.d.ts +58 -0
- package/dist/work-items.js +86 -0
- package/dist/work-model.d.ts +110 -0
- package/dist/work-model.js +261 -0
- package/dist/work-review-git.d.ts +8 -0
- package/dist/work-review-git.js +111 -0
- package/dist/work-review.d.ts +26 -0
- package/dist/work-review.js +426 -0
- package/dist/work-switcher-model.d.ts +43 -0
- package/dist/work-switcher-model.js +79 -0
- package/dist/work-switcher.d.ts +6 -0
- package/dist/work-switcher.js +171 -0
- package/dist/working-cli.d.ts +1 -0
- package/dist/working-cli.js +33 -0
- package/dist/working-code.d.ts +74 -0
- package/dist/working-code.js +421 -0
- package/dist/workspace-notes.d.ts +71 -0
- package/dist/workspace-notes.js +177 -0
- package/dist/workspace-tests.d.ts +21 -0
- package/dist/workspace-tests.js +573 -0
- package/package.json +547 -4
- package/src/activity-volume.ts +149 -0
- package/src/annotations.ts +481 -0
- package/src/benchmark-cli.ts +118 -0
- package/src/benchmark-worker.ts +22 -0
- package/src/benchmarks.ts +493 -0
- package/src/bin.ts +54 -0
- package/src/block-cli.ts +106 -0
- package/src/block-documents.ts +117 -0
- package/src/change-impact.ts +280 -0
- package/src/check-source.ts +82 -0
- package/src/checks-model.ts +108 -0
- package/src/cli.ts +440 -0
- package/src/code-model.ts +159 -0
- package/src/code-store.ts +98 -0
- package/src/compare-artifact.ts +314 -0
- package/src/compare.ts +440 -0
- package/src/compiler.ts +1326 -0
- package/src/compose.ts +94 -0
- package/src/core.ts +357 -0
- package/src/coverage-cli.ts +52 -0
- package/src/declaration-sources.ts +69 -0
- package/src/declared-graph.ts +74 -0
- package/src/display-name.ts +8 -0
- package/src/error-heat.ts +161 -0
- package/src/evidence.ts +94 -0
- package/src/factory-graph.ts +378 -0
- package/src/factory-model.ts +73 -0
- package/src/git-code.ts +461 -0
- package/src/git-refs.ts +43 -0
- package/src/history-activity.ts +146 -0
- package/src/history-churn.ts +416 -0
- package/src/history-git.ts +163 -0
- package/src/history-ledger.ts +636 -0
- package/src/history-ownership.ts +116 -0
- package/src/history-source.ts +117 -0
- package/src/integrations-cli.ts +187 -0
- package/src/issue-cache.ts +96 -0
- package/src/issue-cli.ts +137 -0
- package/src/issue-links.ts +153 -0
- package/src/linear-issues.ts +154 -0
- package/src/local-runtime.ts +70 -0
- package/src/map-activity.ts +309 -0
- package/src/map-model.ts +213 -0
- package/src/map-quality.ts +61 -0
- package/src/mapping-coverage.ts +570 -0
- package/src/model.ts +221 -0
- package/src/operation-benchmark-worker.ts +60 -0
- package/src/operation-benchmark.ts +28 -0
- package/src/otel-metrics.ts +176 -0
- package/src/performance-model.ts +575 -0
- package/src/product-map.ts +236 -0
- package/src/provider-access.cjs +207 -0
- package/src/provider-access.d.cts +14 -0
- package/src/reports-cli.ts +125 -0
- package/src/reports-model.ts +73 -0
- package/src/reports.ts +276 -0
- package/src/repository-map.ts +189 -0
- package/src/resource-cache.ts +76 -0
- package/src/review-cli.ts +256 -0
- package/src/review.ts +376 -0
- package/src/runtime-metrics.ts +386 -0
- package/src/scope.ts +103 -0
- package/src/sentry-activity.ts +234 -0
- package/src/sentry.ts +545 -0
- package/src/service-release.ts +18 -0
- package/src/setup-cli.ts +58 -0
- package/src/setup-kit.cjs +163 -0
- package/src/setup-kit.d.cts +32 -0
- package/src/source-index.ts +205 -0
- package/src/source-review-git.ts +129 -0
- package/src/source-review.ts +637 -0
- package/src/telemetry.ts +68 -0
- package/src/time-window.ts +51 -0
- package/src/trace-evidence.ts +80 -0
- package/src/trace-model.ts +26 -0
- package/src/tracing.ts +165 -0
- package/src/work-check.ts +143 -0
- package/src/work-cli.ts +195 -0
- package/src/work-context.ts +713 -0
- package/src/work-intents.ts +196 -0
- package/src/work-items.ts +151 -0
- package/src/work-model.ts +400 -0
- package/src/work-review-git.ts +130 -0
- package/src/work-review.ts +573 -0
- package/src/work-switcher-model.ts +121 -0
- package/src/work-switcher.ts +191 -0
- package/src/working-cli.ts +38 -0
- package/src/working-code.ts +582 -0
- package/src/workspace-notes.ts +203 -0
- package/src/workspace-tests.ts +654 -0
- package/toolkit/GUIDE.md +305 -0
- package/toolkit/SKILL.md +131 -0
- package/toolkit/bin/fractory +2 -0
- package/toolkit/build.json +1 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** Local confirmation records: current source evidence, never inferred completion or test coverage. */
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { readFileSync, statSync } from "node:fs";
|
|
4
|
+
import { checkedPath } from "./workspace-notes.js";
|
|
5
|
+
const hash = (value) => createHash("sha256").update(value).digest("hex");
|
|
6
|
+
const stable = (value) => JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item)
|
|
7
|
+
? Object.fromEntries(Object.keys(item)
|
|
8
|
+
.sort()
|
|
9
|
+
.map((key) => [key, item[key]]))
|
|
10
|
+
: item);
|
|
11
|
+
const files = new Map();
|
|
12
|
+
function fingerprint(root, file) {
|
|
13
|
+
const path = checkedPath(root, file), stat = statSync(path);
|
|
14
|
+
if (!stat.isFile() || stat.size > 2 * 1024 * 1024)
|
|
15
|
+
throw Error("Choose a smaller implementation block to confirm.");
|
|
16
|
+
const stamp = `${stat.ino}:${stat.size}:${stat.mtimeMs}:${stat.ctimeMs}`;
|
|
17
|
+
let saved = files.get(path);
|
|
18
|
+
if (saved?.stamp !== stamp) {
|
|
19
|
+
saved = { stamp, digest: hash(readFileSync(path)), bytes: stat.size };
|
|
20
|
+
files.set(path, saved);
|
|
21
|
+
if (files.size > 2048)
|
|
22
|
+
files.delete(files.keys().next().value);
|
|
23
|
+
}
|
|
24
|
+
return saved;
|
|
25
|
+
}
|
|
26
|
+
export function intentTarget(graph, proposal) {
|
|
27
|
+
const id = proposal.implementation ||
|
|
28
|
+
(proposal.kind === "annotation" ? proposal.target : undefined);
|
|
29
|
+
return (id &&
|
|
30
|
+
(proposal.kind === "connection"
|
|
31
|
+
? graph.connections.find((e) => e.id === id && e.provenance !== "proposed")
|
|
32
|
+
: graph.elements.find((n) => n.id === id && n.provenance !== "proposed") ||
|
|
33
|
+
(proposal.kind === "annotation"
|
|
34
|
+
? graph.connections.find((e) => e.id === id && e.provenance !== "proposed")
|
|
35
|
+
: undefined)));
|
|
36
|
+
}
|
|
37
|
+
/** No fuzzy match: an agent/developer chooses the implementation identity explicitly. */
|
|
38
|
+
export function intentEvidence(root, graph, proposal, baseline) {
|
|
39
|
+
const target = intentTarget(graph, proposal);
|
|
40
|
+
const removed = proposal.kind === "annotation" &&
|
|
41
|
+
proposal.change === "remove" &&
|
|
42
|
+
!target &&
|
|
43
|
+
proposal.target &&
|
|
44
|
+
[...(baseline?.elements || []), ...(baseline?.connections || [])].find((n) => n.id === proposal.target);
|
|
45
|
+
if (!target && !removed)
|
|
46
|
+
throw Error("Link the real implementation on the map first.");
|
|
47
|
+
if (proposal.change === "remove" && target)
|
|
48
|
+
throw Error("This block or connection is still on the map.");
|
|
49
|
+
const nodes = target
|
|
50
|
+
? [target]
|
|
51
|
+
: [removed];
|
|
52
|
+
if (target && "kind" in target) {
|
|
53
|
+
const ids = new Set([target.id]);
|
|
54
|
+
for (let i = 0, changed = true; changed && i < graph.elements.length; i++) {
|
|
55
|
+
changed = false;
|
|
56
|
+
for (const n of graph.elements)
|
|
57
|
+
if (n.parent && ids.has(n.parent) && !ids.has(n.id)) {
|
|
58
|
+
ids.add(n.id);
|
|
59
|
+
nodes.push(n);
|
|
60
|
+
changed = true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const refs = nodes.flatMap((n) => [
|
|
65
|
+
...("kind" in n && n.source ? [n.source] : []),
|
|
66
|
+
...("sourceRef" in n && n.sourceRef ? [n.sourceRef] : []),
|
|
67
|
+
...(n.sources || []),
|
|
68
|
+
]);
|
|
69
|
+
if (!refs.length)
|
|
70
|
+
throw Error("Map this implementation to real source code before marking it done.");
|
|
71
|
+
const paths = new Set(refs.map((r) => r.file));
|
|
72
|
+
for (const n of nodes)
|
|
73
|
+
if ("attachments" in n) {
|
|
74
|
+
for (const path of [
|
|
75
|
+
...(n.attachments?.docs || []),
|
|
76
|
+
...(n.attachments?.tests || []),
|
|
77
|
+
])
|
|
78
|
+
paths.add(path);
|
|
79
|
+
}
|
|
80
|
+
if (paths.size > 256)
|
|
81
|
+
throw Error("Choose a smaller implementation block to confirm.");
|
|
82
|
+
let bytes = 0;
|
|
83
|
+
const evidence = [];
|
|
84
|
+
for (const path of [...paths].sort()) {
|
|
85
|
+
let source;
|
|
86
|
+
try {
|
|
87
|
+
source = fingerprint(root, path);
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (refs.some((r) => r.file === path) && !removed)
|
|
91
|
+
throw Error("The implementation source is missing or unavailable. Refresh its map before confirming.");
|
|
92
|
+
evidence.push([path, "missing"]);
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
bytes += source.bytes;
|
|
96
|
+
if (bytes > 16 * 1024 * 1024)
|
|
97
|
+
throw Error("Choose a smaller implementation block to confirm.");
|
|
98
|
+
if (!removed &&
|
|
99
|
+
refs.some((r) => r.file === path &&
|
|
100
|
+
(!/^(?:[a-f0-9]{16}|[a-f0-9]{64})$/.test(r.digest) ||
|
|
101
|
+
!source.digest.startsWith(r.digest))))
|
|
102
|
+
throw Error("The map’s source references are stale. Regenerate the map before confirming.");
|
|
103
|
+
evidence.push([path, source.digest]);
|
|
104
|
+
}
|
|
105
|
+
const { outcome: _outcome, position: _position, resolved: _resolved, createdAt: _createdAt, ...request } = proposal;
|
|
106
|
+
return hash(stable({
|
|
107
|
+
request,
|
|
108
|
+
nodes: nodes.sort((a, b) => a.id.localeCompare(b.id)),
|
|
109
|
+
removed: !!removed,
|
|
110
|
+
files: evidence,
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
export function workIntentStates(root, graph, plan, baseline) {
|
|
114
|
+
return Object.fromEntries((plan?.proposals || []).map((p) => {
|
|
115
|
+
const implementation = p.implementation || (p.kind === "annotation" ? p.target : undefined);
|
|
116
|
+
let state = {
|
|
117
|
+
status: p.outcome?.status || "planned",
|
|
118
|
+
implementation,
|
|
119
|
+
};
|
|
120
|
+
if (p.outcome?.status === "done")
|
|
121
|
+
try {
|
|
122
|
+
if (intentEvidence(root, graph, p, baseline) !== p.outcome.evidence)
|
|
123
|
+
state = {
|
|
124
|
+
status: "changed",
|
|
125
|
+
implementation,
|
|
126
|
+
reason: "The request or implementation changed after it was marked done.",
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
catch (e) {
|
|
130
|
+
state = {
|
|
131
|
+
status: "changed",
|
|
132
|
+
implementation,
|
|
133
|
+
reason: e instanceof Error
|
|
134
|
+
? e.message
|
|
135
|
+
: "Implementation evidence is unavailable.",
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
return [p.id, state];
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { DefinitionGraph } from "./model.js";
|
|
2
|
+
export type WorkState = "todo" | "in_progress" | "done" | "archived" | "canceled" | "unknown";
|
|
3
|
+
export interface LinearWorkIssue {
|
|
4
|
+
id: string;
|
|
5
|
+
identifier: string;
|
|
6
|
+
title: string;
|
|
7
|
+
url: string;
|
|
8
|
+
state: {
|
|
9
|
+
name: string;
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
checkedAt: string;
|
|
14
|
+
archivedAt?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface IssueLink {
|
|
17
|
+
issue: string;
|
|
18
|
+
identifier?: string;
|
|
19
|
+
blocks: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface IssueLinks {
|
|
22
|
+
schema: "fractal.issues.v1";
|
|
23
|
+
workspace?: {
|
|
24
|
+
id?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
url: string;
|
|
27
|
+
};
|
|
28
|
+
links: IssueLink[];
|
|
29
|
+
}
|
|
30
|
+
export interface WorkItem extends IssueLink {
|
|
31
|
+
metadata?: LinearWorkIssue;
|
|
32
|
+
state: WorkState;
|
|
33
|
+
}
|
|
34
|
+
export interface WorkView {
|
|
35
|
+
_cache?: {
|
|
36
|
+
at: string;
|
|
37
|
+
stale: boolean;
|
|
38
|
+
refreshing: boolean;
|
|
39
|
+
failed: boolean;
|
|
40
|
+
};
|
|
41
|
+
revision: string;
|
|
42
|
+
registry: IssueLinks;
|
|
43
|
+
items: WorkItem[];
|
|
44
|
+
connection: {
|
|
45
|
+
configured: boolean;
|
|
46
|
+
notice?: string;
|
|
47
|
+
source: "linear" | "recorded" | "unavailable";
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export declare function issueReference(value: string): {
|
|
51
|
+
key: string;
|
|
52
|
+
workspace?: string;
|
|
53
|
+
url?: string;
|
|
54
|
+
};
|
|
55
|
+
export declare function workState(issue?: LinearWorkIssue): WorkState;
|
|
56
|
+
/** Use the provider's typed state; do not guess progress from a title or an assignee. */
|
|
57
|
+
export declare function workItems(registry: IssueLinks, metadata: LinearWorkIssue[], includeUnlinked?: boolean): WorkItem[];
|
|
58
|
+
export declare function workForScope(graph: DefinitionGraph, items: WorkItem[], scope: string): WorkItem[];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export function issueReference(value) {
|
|
2
|
+
value = value.trim();
|
|
3
|
+
if (/^https:\/\//i.test(value)) {
|
|
4
|
+
const url = new URL(value), parts = url.pathname.split("/").filter(Boolean);
|
|
5
|
+
if (url.hostname !== "linear.app" ||
|
|
6
|
+
url.port ||
|
|
7
|
+
url.username ||
|
|
8
|
+
url.password ||
|
|
9
|
+
parts[1] !== "issue")
|
|
10
|
+
throw Error("Use a Linear issue URL or identifier");
|
|
11
|
+
const key = parts[2]?.toUpperCase();
|
|
12
|
+
if (!/^[A-Z][A-Z0-9]{0,15}-[1-9][0-9]{0,9}$/.test(key || ""))
|
|
13
|
+
throw Error("Invalid Linear issue identifier");
|
|
14
|
+
return {
|
|
15
|
+
key,
|
|
16
|
+
workspace: parts[0],
|
|
17
|
+
url: `https://linear.app/${parts[0]}/issue/${key}`,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
if (/^[A-Z][A-Z0-9]{0,15}-[1-9][0-9]{0,9}$/i.test(value))
|
|
21
|
+
return { key: value.toUpperCase() };
|
|
22
|
+
if (/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i.test(value))
|
|
23
|
+
return { key: value.toLowerCase() };
|
|
24
|
+
throw Error("Enter a Linear issue identifier, UUID or URL");
|
|
25
|
+
}
|
|
26
|
+
export function workState(issue) {
|
|
27
|
+
if (!issue)
|
|
28
|
+
return "unknown";
|
|
29
|
+
if (issue.archivedAt)
|
|
30
|
+
return "archived";
|
|
31
|
+
if (issue.state.type === "started")
|
|
32
|
+
return "in_progress";
|
|
33
|
+
if (issue.state.type === "completed")
|
|
34
|
+
return "done";
|
|
35
|
+
if (["canceled", "duplicate"].includes(issue.state.type))
|
|
36
|
+
return "canceled";
|
|
37
|
+
return ["triage", "backlog", "unstarted"].includes(issue.state.type)
|
|
38
|
+
? "todo"
|
|
39
|
+
: "unknown";
|
|
40
|
+
}
|
|
41
|
+
/** Use the provider's typed state; do not guess progress from a title or an assignee. */
|
|
42
|
+
export function workItems(registry, metadata, includeUnlinked = false) {
|
|
43
|
+
const byId = new Map(metadata.flatMap((issue) => [
|
|
44
|
+
[issue.id, issue],
|
|
45
|
+
[issue.identifier, issue],
|
|
46
|
+
]));
|
|
47
|
+
const items = new Map();
|
|
48
|
+
for (const link of registry.links) {
|
|
49
|
+
const issue = byId.get(link.issue) ||
|
|
50
|
+
(link.identifier ? byId.get(link.identifier) : undefined);
|
|
51
|
+
const key = issue?.id || link.issue, prior = items.get(key);
|
|
52
|
+
items.set(key, {
|
|
53
|
+
...link,
|
|
54
|
+
blocks: [...new Set([...(prior?.blocks || []), ...link.blocks])],
|
|
55
|
+
metadata: issue,
|
|
56
|
+
state: workState(issue),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (includeUnlinked)
|
|
60
|
+
for (const issue of metadata)
|
|
61
|
+
if (!items.has(issue.id))
|
|
62
|
+
items.set(issue.id, {
|
|
63
|
+
issue: issue.id,
|
|
64
|
+
identifier: issue.identifier,
|
|
65
|
+
blocks: [],
|
|
66
|
+
metadata: issue,
|
|
67
|
+
state: workState(issue),
|
|
68
|
+
});
|
|
69
|
+
return [...items.values()];
|
|
70
|
+
}
|
|
71
|
+
export function workForScope(graph, items, scope) {
|
|
72
|
+
if (scope === graph.id)
|
|
73
|
+
return items;
|
|
74
|
+
const descendants = new Set([scope]);
|
|
75
|
+
for (let changed = true; changed;) {
|
|
76
|
+
changed = false;
|
|
77
|
+
for (const node of graph.elements)
|
|
78
|
+
if (node.parent &&
|
|
79
|
+
descendants.has(node.parent) &&
|
|
80
|
+
!descendants.has(node.id)) {
|
|
81
|
+
descendants.add(node.id);
|
|
82
|
+
changed = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return items.filter((item) => item.blocks.some((block) => descendants.has(graph.aliases?.[block] || block)));
|
|
86
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { DefinitionGraph } from "./model.js";
|
|
2
|
+
export interface WorkProposal {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: "block" | "connection" | "annotation";
|
|
5
|
+
label: string;
|
|
6
|
+
note: string;
|
|
7
|
+
parent?: string;
|
|
8
|
+
source?: string;
|
|
9
|
+
target?: string;
|
|
10
|
+
change?: "change" | "remove";
|
|
11
|
+
blockKind?: "block" | "interface" | "process";
|
|
12
|
+
position?: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
resolved?: boolean;
|
|
18
|
+
/** An explicit link from this intention to an actual mapped block or connection. */
|
|
19
|
+
implementation?: string;
|
|
20
|
+
outcome?: {
|
|
21
|
+
status: "done" | "dropped";
|
|
22
|
+
checkedAt: string;
|
|
23
|
+
/** Source/request fingerprint at confirmation; never a test or compatibility claim. */
|
|
24
|
+
evidence?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface WorkIntentState {
|
|
28
|
+
status: "planned" | "done" | "dropped" | "changed";
|
|
29
|
+
implementation?: string;
|
|
30
|
+
reason?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface WorkPlan {
|
|
33
|
+
schema: "fractory.work.v1";
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
branch: string;
|
|
37
|
+
baseRef: string;
|
|
38
|
+
baseCommit: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
scope: string[];
|
|
41
|
+
/** Explicit subtree exceptions. The nearest include/exclude rule wins. */
|
|
42
|
+
excluded?: string[];
|
|
43
|
+
proposals: WorkProposal[];
|
|
44
|
+
bootstrapRevision?: string;
|
|
45
|
+
pullRequest?: {
|
|
46
|
+
url: string;
|
|
47
|
+
title: string;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface WorkContext {
|
|
51
|
+
id: string;
|
|
52
|
+
mode: "main" | "work" | "branch";
|
|
53
|
+
title: string;
|
|
54
|
+
branch: string;
|
|
55
|
+
root: string;
|
|
56
|
+
head: string;
|
|
57
|
+
baseRef: string;
|
|
58
|
+
baseCommit: string;
|
|
59
|
+
plan?: WorkPlan;
|
|
60
|
+
revision?: string;
|
|
61
|
+
mapBasis: "committed" | "checkout" | "baseline";
|
|
62
|
+
/** Map evidence and presence of an editable checkout are independent. */
|
|
63
|
+
hasCheckout?: boolean;
|
|
64
|
+
notice?: string;
|
|
65
|
+
}
|
|
66
|
+
/** Verified GitHub identity, read from the provider rather than a pasted URL. */
|
|
67
|
+
export interface WorkPullRequest {
|
|
68
|
+
number: number;
|
|
69
|
+
title: string;
|
|
70
|
+
url: string;
|
|
71
|
+
state: "open" | "draft" | "merged" | "closed";
|
|
72
|
+
base: string;
|
|
73
|
+
head: string;
|
|
74
|
+
}
|
|
75
|
+
export type WorkPullRequestResult = {
|
|
76
|
+
status: "matched";
|
|
77
|
+
pullRequest: WorkPullRequest;
|
|
78
|
+
} | {
|
|
79
|
+
status: "ambiguous";
|
|
80
|
+
pullRequests: WorkPullRequest[];
|
|
81
|
+
} | {
|
|
82
|
+
status: "none";
|
|
83
|
+
} | {
|
|
84
|
+
status: "unavailable";
|
|
85
|
+
message: string;
|
|
86
|
+
};
|
|
87
|
+
export interface WorkTarget {
|
|
88
|
+
id: string;
|
|
89
|
+
title: string;
|
|
90
|
+
branch: string;
|
|
91
|
+
path?: string;
|
|
92
|
+
current: boolean;
|
|
93
|
+
managed: boolean;
|
|
94
|
+
head: string;
|
|
95
|
+
scope?: string[];
|
|
96
|
+
plannedAt?: string;
|
|
97
|
+
pullRequest?: WorkPlan["pullRequest"];
|
|
98
|
+
}
|
|
99
|
+
export declare function workTargetLabel(graph: DefinitionGraph, proposals: WorkProposal[], id: string): string;
|
|
100
|
+
export declare function scopeBlocks(graph: DefinitionGraph, scope: string[], excluded?: string[]): Set<string>;
|
|
101
|
+
/** Preserve nested exceptions without repeating rules already inherited from a parent. */
|
|
102
|
+
export declare function normalizeWorkScope(graph: DefinitionGraph, scope: string[], excluded?: string[]): {
|
|
103
|
+
scope: string[];
|
|
104
|
+
excluded: string[];
|
|
105
|
+
};
|
|
106
|
+
/** Selecting a parent includes its children; do not repeat children in a work's scope. */
|
|
107
|
+
export declare function compactScope(graph: DefinitionGraph, scope: string[]): string[];
|
|
108
|
+
export declare function validateProposals(graph: DefinitionGraph, proposals: unknown, previous?: WorkProposal[]): WorkProposal[];
|
|
109
|
+
/** Display composition only. Proposed elements never enter the compiler's output. */
|
|
110
|
+
export declare function workDisplayGraph(graph: DefinitionGraph, plan?: WorkPlan, states?: Record<string, WorkIntentState>): DefinitionGraph;
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
export function workTargetLabel(graph, proposals, id) {
|
|
2
|
+
const block = graph.elements.find((node) => node.id === id) ||
|
|
3
|
+
proposals.find((p) => p.kind === "block" && p.id === id);
|
|
4
|
+
if (block)
|
|
5
|
+
return block.label;
|
|
6
|
+
const connection = graph.connections.find((edge) => edge.id === id) ||
|
|
7
|
+
proposals.find((p) => p.kind === "connection" && p.id === id);
|
|
8
|
+
return connection?.label || id;
|
|
9
|
+
}
|
|
10
|
+
export function scopeBlocks(graph, scope, excluded = []) {
|
|
11
|
+
const byId = new Map(graph.elements.map((node) => [node.id, node]));
|
|
12
|
+
const selected = new Set(scope);
|
|
13
|
+
const omitted = new Set(excluded);
|
|
14
|
+
const ids = new Set();
|
|
15
|
+
for (const node of graph.elements) {
|
|
16
|
+
let cursor = node;
|
|
17
|
+
const seen = new Set();
|
|
18
|
+
while (cursor && !seen.has(cursor.id)) {
|
|
19
|
+
if (omitted.has(cursor.id))
|
|
20
|
+
break;
|
|
21
|
+
if (selected.has(cursor.id)) {
|
|
22
|
+
ids.add(node.id);
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
seen.add(cursor.id);
|
|
26
|
+
cursor = byId.get(cursor.parent || "");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return ids;
|
|
30
|
+
}
|
|
31
|
+
/** Preserve nested exceptions without repeating rules already inherited from a parent. */
|
|
32
|
+
export function normalizeWorkScope(graph, scope, excluded = []) {
|
|
33
|
+
const byId = new Map(graph.elements.map((node) => [node.id, node]));
|
|
34
|
+
if (!Array.isArray(scope) ||
|
|
35
|
+
!Array.isArray(excluded) ||
|
|
36
|
+
scope.length + excluded.length > graph.elements.length * 2)
|
|
37
|
+
throw Error("Select mapped blocks for this work.");
|
|
38
|
+
const rules = new Map();
|
|
39
|
+
for (const [values, include] of [
|
|
40
|
+
[scope, true],
|
|
41
|
+
[excluded, false],
|
|
42
|
+
])
|
|
43
|
+
for (const id of values) {
|
|
44
|
+
if (!byId.has(id))
|
|
45
|
+
throw Error(`Unknown scope block: ${id}`);
|
|
46
|
+
if (rules.has(id) && rules.get(id) !== include)
|
|
47
|
+
throw Error("A block cannot be both selected and excluded.");
|
|
48
|
+
rules.set(id, include);
|
|
49
|
+
}
|
|
50
|
+
const result = { scope: [], excluded: [] };
|
|
51
|
+
for (const [id, include] of rules) {
|
|
52
|
+
let parent = byId.get(id)?.parent;
|
|
53
|
+
let inherited = false;
|
|
54
|
+
const seen = new Set();
|
|
55
|
+
while (parent && !seen.has(parent)) {
|
|
56
|
+
if (rules.has(parent)) {
|
|
57
|
+
inherited = rules.get(parent);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
seen.add(parent);
|
|
61
|
+
parent = byId.get(parent)?.parent;
|
|
62
|
+
}
|
|
63
|
+
if (include !== inherited)
|
|
64
|
+
result[include ? "scope" : "excluded"].push(id);
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
/** Selecting a parent includes its children; do not repeat children in a work's scope. */
|
|
69
|
+
export function compactScope(graph, scope) {
|
|
70
|
+
const unique = [...new Set(scope)];
|
|
71
|
+
if (!unique.length)
|
|
72
|
+
throw Error("Select at least one block.");
|
|
73
|
+
const byId = new Map(graph.elements.map((node) => [node.id, node]));
|
|
74
|
+
for (const id of unique)
|
|
75
|
+
if (!byId.has(id))
|
|
76
|
+
throw Error(`Unknown scope block: ${id}`);
|
|
77
|
+
return unique.filter((id) => {
|
|
78
|
+
let parent = byId.get(id)?.parent;
|
|
79
|
+
const seen = new Set();
|
|
80
|
+
while (parent && !seen.has(parent)) {
|
|
81
|
+
if (unique.includes(parent))
|
|
82
|
+
return false;
|
|
83
|
+
seen.add(parent);
|
|
84
|
+
parent = byId.get(parent)?.parent;
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export function validateProposals(graph, proposals, previous = []) {
|
|
90
|
+
if (!Array.isArray(proposals) || proposals.length > 200)
|
|
91
|
+
throw Error("Keep a plan below 200 proposals.");
|
|
92
|
+
const ids = new Set(graph.elements.map((node) => node.id));
|
|
93
|
+
const connections = new Set(graph.connections.map((edge) => edge.id));
|
|
94
|
+
const own = new Set();
|
|
95
|
+
for (const item of proposals) {
|
|
96
|
+
if (!item ||
|
|
97
|
+
typeof item !== "object" ||
|
|
98
|
+
typeof item.id !== "string" ||
|
|
99
|
+
!/^proposal:[a-zA-Z0-9-]{1,70}$/.test(item.id) ||
|
|
100
|
+
own.has(item.id))
|
|
101
|
+
throw Error("Every proposal needs a unique proposal identity.");
|
|
102
|
+
if (!["block", "connection", "annotation"].includes(item.kind))
|
|
103
|
+
throw Error("Unknown proposal kind.");
|
|
104
|
+
if (typeof item.label !== "string" ||
|
|
105
|
+
item.label.length > 160 ||
|
|
106
|
+
typeof item.note !== "string" ||
|
|
107
|
+
item.note.length > 12000)
|
|
108
|
+
throw Error("Keep proposal names and notes concise.");
|
|
109
|
+
own.add(item.id);
|
|
110
|
+
if (item.kind === "block")
|
|
111
|
+
ids.add(item.id);
|
|
112
|
+
if (item.kind === "connection")
|
|
113
|
+
connections.add(item.id);
|
|
114
|
+
}
|
|
115
|
+
const result = proposals.map((item) => {
|
|
116
|
+
// Keep historical references editable after real code disappears. New dangling references are still rejected.
|
|
117
|
+
const known = (field, ids) => typeof item[field] === "string" &&
|
|
118
|
+
!!item[field] &&
|
|
119
|
+
(ids.has(item[field]) ||
|
|
120
|
+
previous.some((p) => p.id === item.id &&
|
|
121
|
+
p.kind === item.kind &&
|
|
122
|
+
p[field] === item[field]));
|
|
123
|
+
const value = {
|
|
124
|
+
id: item.id,
|
|
125
|
+
kind: item.kind,
|
|
126
|
+
label: item.label.trim(),
|
|
127
|
+
note: item.note,
|
|
128
|
+
};
|
|
129
|
+
if (item.implementation !== undefined) {
|
|
130
|
+
if (typeof item.implementation !== "string" ||
|
|
131
|
+
!item.implementation ||
|
|
132
|
+
item.implementation.length > 4096 ||
|
|
133
|
+
item.implementation.startsWith("proposal:"))
|
|
134
|
+
throw Error("Link an actual mapped block or connection.");
|
|
135
|
+
value.implementation = item.implementation;
|
|
136
|
+
}
|
|
137
|
+
if (item.outcome !== undefined) {
|
|
138
|
+
if (!item.outcome ||
|
|
139
|
+
!["done", "dropped"].includes(item.outcome.status) ||
|
|
140
|
+
typeof item.outcome.checkedAt !== "string" ||
|
|
141
|
+
!Number.isFinite(Date.parse(item.outcome.checkedAt)) ||
|
|
142
|
+
(item.outcome.status === "done" &&
|
|
143
|
+
!/^[a-f0-9]{64}$/.test(item.outcome.evidence || "")))
|
|
144
|
+
throw Error("Use a valid intention outcome.");
|
|
145
|
+
value.outcome = {
|
|
146
|
+
status: item.outcome.status,
|
|
147
|
+
checkedAt: item.outcome.checkedAt,
|
|
148
|
+
...(item.outcome.status === "done"
|
|
149
|
+
? { evidence: item.outcome.evidence }
|
|
150
|
+
: {}),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
if (item.kind === "block") {
|
|
154
|
+
if (!value.label || !known("parent", ids) || item.parent === item.id)
|
|
155
|
+
throw Error("Choose a containing block for the proposed block.");
|
|
156
|
+
value.parent = item.parent;
|
|
157
|
+
value.blockKind = ["block", "interface", "process"].includes(item.blockKind)
|
|
158
|
+
? item.blockKind
|
|
159
|
+
: "block";
|
|
160
|
+
}
|
|
161
|
+
else if (item.kind === "connection") {
|
|
162
|
+
if (!value.label || !known("source", ids) || !known("target", ids))
|
|
163
|
+
throw Error("Connect two existing or proposed blocks.");
|
|
164
|
+
value.source = item.source;
|
|
165
|
+
value.target = item.target;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
if (!known("target", new Set([...ids, ...connections])))
|
|
169
|
+
throw Error("Attach the note to an existing block or connection.");
|
|
170
|
+
value.target = item.target;
|
|
171
|
+
value.change = item.change === "remove" ? "remove" : "change";
|
|
172
|
+
if (item.createdAt !== undefined) {
|
|
173
|
+
if (typeof item.createdAt !== "string" ||
|
|
174
|
+
item.createdAt.length > 40 ||
|
|
175
|
+
!Number.isFinite(Date.parse(item.createdAt)))
|
|
176
|
+
throw Error("Use a valid comment timestamp.");
|
|
177
|
+
value.createdAt = item.createdAt;
|
|
178
|
+
}
|
|
179
|
+
if (item.resolved !== undefined) {
|
|
180
|
+
if (typeof item.resolved !== "boolean")
|
|
181
|
+
throw Error("Invalid comment state.");
|
|
182
|
+
value.resolved = item.resolved;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (item.position) {
|
|
186
|
+
if (![item.position.x, item.position.y].every((n) => Number.isFinite(n) && Math.abs(n) <= 100000))
|
|
187
|
+
throw Error("Invalid proposal position.");
|
|
188
|
+
value.position = { x: item.position.x, y: item.position.y };
|
|
189
|
+
}
|
|
190
|
+
return value;
|
|
191
|
+
});
|
|
192
|
+
const parents = new Map(result.filter((p) => p.kind === "block").map((p) => [p.id, p.parent]));
|
|
193
|
+
for (const id of parents.keys()) {
|
|
194
|
+
let cursor = id;
|
|
195
|
+
const seen = new Set();
|
|
196
|
+
while (cursor && parents.has(cursor)) {
|
|
197
|
+
if (seen.has(cursor))
|
|
198
|
+
throw Error("Proposed blocks cannot contain each other in a cycle.");
|
|
199
|
+
seen.add(cursor);
|
|
200
|
+
cursor = parents.get(cursor);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return result;
|
|
204
|
+
}
|
|
205
|
+
/** Display composition only. Proposed elements never enter the compiler's output. */
|
|
206
|
+
export function workDisplayGraph(graph, plan, states) {
|
|
207
|
+
const proposals = plan?.proposals || [];
|
|
208
|
+
const status = (p) => states?.[p.id]?.status ||
|
|
209
|
+
(p.outcome?.status === "dropped" ? "dropped" : "planned");
|
|
210
|
+
const active = proposals.filter((p) => !["done", "dropped"].includes(status(p)));
|
|
211
|
+
// An unfinished nested sketch retains its containing proposal. It never floats out of its parent.
|
|
212
|
+
const needed = new Set(active.map((p) => p.id));
|
|
213
|
+
for (const p of active) {
|
|
214
|
+
let parent = p.parent, count = 0;
|
|
215
|
+
while (parent?.startsWith("proposal:") && count++ < proposals.length) {
|
|
216
|
+
needed.add(parent);
|
|
217
|
+
parent = proposals.find((a) => a.id === parent)?.parent;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
const target = (id) => {
|
|
221
|
+
const p = proposals.find((p) => p.id === id);
|
|
222
|
+
return p && !needed.has(id) && status(p) === "done" && p.implementation
|
|
223
|
+
? p.implementation
|
|
224
|
+
: id;
|
|
225
|
+
};
|
|
226
|
+
const visual = proposals.filter((p) => p.kind !== "annotation" && needed.has(p.id));
|
|
227
|
+
if (!visual.length)
|
|
228
|
+
return graph;
|
|
229
|
+
return {
|
|
230
|
+
...graph,
|
|
231
|
+
revision: `${graph.revision}:plan:${JSON.stringify(visual)}`,
|
|
232
|
+
elements: [
|
|
233
|
+
...graph.elements,
|
|
234
|
+
...visual
|
|
235
|
+
.filter((p) => p.kind === "block")
|
|
236
|
+
.map((p) => ({
|
|
237
|
+
id: p.id,
|
|
238
|
+
parent: p.parent,
|
|
239
|
+
kind: p.blockKind || "block",
|
|
240
|
+
label: p.label,
|
|
241
|
+
description: p.note,
|
|
242
|
+
provenance: "proposed",
|
|
243
|
+
})),
|
|
244
|
+
],
|
|
245
|
+
connections: [
|
|
246
|
+
...graph.connections,
|
|
247
|
+
...visual
|
|
248
|
+
.filter((p) => p.kind === "connection")
|
|
249
|
+
.map((p) => ({
|
|
250
|
+
id: p.id,
|
|
251
|
+
source: target(p.source),
|
|
252
|
+
target: target(p.target),
|
|
253
|
+
label: p.label,
|
|
254
|
+
relation: "calls",
|
|
255
|
+
provenance: "proposed",
|
|
256
|
+
}))
|
|
257
|
+
.filter((edge) => [edge.source, edge.target].every((id) => graph.elements.some((n) => n.id === id) ||
|
|
258
|
+
visual.some((p) => p.kind === "block" && p.id === id))),
|
|
259
|
+
],
|
|
260
|
+
};
|
|
261
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type WorkReview } from "./work-review.js";
|
|
2
|
+
import type { DefinitionGraph } from "./model.js";
|
|
3
|
+
/** Repeated polls reuse immutable Git blobs and the unchanged review. No full compiler pass. */
|
|
4
|
+
export declare function workingConcepts(root: string, base: string, before: DefinitionGraph, after: DefinitionGraph, files: {
|
|
5
|
+
path: string;
|
|
6
|
+
digest?: string;
|
|
7
|
+
status: string;
|
|
8
|
+
}[], historicalOwnership: boolean): WorkReview;
|