semantic-atlas 2.1.1 → 2.1.3
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/.agents/skills/semantic-atlas-maintenance/SKILL.md +111 -86
- package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +55 -0
- package/README.md +23 -9
- package/README.zh-CN.md +18 -9
- package/dist/cli/observation-commands.d.ts +2 -1
- package/dist/cli/observation-commands.d.ts.map +1 -1
- package/dist/cli/observation-commands.js +19 -1
- package/dist/cli/observation-commands.js.map +1 -1
- package/dist/cli/reconciliation-command.d.ts +2 -1
- package/dist/cli/reconciliation-command.d.ts.map +1 -1
- package/dist/cli/reconciliation-command.js +32 -8
- package/dist/cli/reconciliation-command.js.map +1 -1
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +20 -4
- package/dist/cli/run-cli.js.map +1 -1
- package/dist/contracts/cli.d.ts +10 -0
- package/dist/contracts/cli.d.ts.map +1 -1
- package/dist/contracts/observation.d.ts +110 -1
- package/dist/contracts/observation.d.ts.map +1 -1
- package/dist/contracts/observation.js +70 -0
- package/dist/contracts/observation.js.map +1 -1
- package/dist/contracts/reconciliation.d.ts +11 -1
- package/dist/contracts/reconciliation.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/observations/observation-application.d.ts +6 -0
- package/dist/observations/observation-application.d.ts.map +1 -1
- package/dist/observations/observation-application.js +34 -1
- package/dist/observations/observation-application.js.map +1 -1
- package/dist/observations/observation-store.d.ts +8 -1
- package/dist/observations/observation-store.d.ts.map +1 -1
- package/dist/observations/observation-store.js +22 -4
- package/dist/observations/observation-store.js.map +1 -1
- package/dist/reconciliation/reconciliation-service.d.ts +1 -0
- package/dist/reconciliation/reconciliation-service.d.ts.map +1 -1
- package/dist/reconciliation/reconciliation-service.js +56 -3
- package/dist/reconciliation/reconciliation-service.js.map +1 -1
- package/docs/architecture.md +49 -22
- package/docs/index.md +3 -3
- package/docs/observations.md +51 -19
- package/docs/product-contract.md +22 -8
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ObservationKind, RepositoryIdentity, ReviewObservation, TaskObservation } from "../contracts/observation.js";
|
|
1
|
+
import type { MaintenanceObservation, ObservationKind, RepositoryIdentity, ReviewObservation, TaskObservation } from "../contracts/observation.js";
|
|
2
2
|
export interface ObservationStoreOptions {
|
|
3
3
|
readonly userHome: string;
|
|
4
4
|
}
|
|
@@ -14,6 +14,11 @@ export interface ObservationWriteResult {
|
|
|
14
14
|
export interface RepositoryObservations {
|
|
15
15
|
readonly tasks: readonly TaskObservation[];
|
|
16
16
|
readonly reviews: readonly ReviewObservation[];
|
|
17
|
+
readonly maintenances: readonly MaintenanceObservation[];
|
|
18
|
+
}
|
|
19
|
+
export interface ReconciliationInputs {
|
|
20
|
+
readonly tasks: readonly TaskObservation[];
|
|
21
|
+
readonly maintenances: readonly MaintenanceObservation[];
|
|
17
22
|
}
|
|
18
23
|
export declare class ObservationConflictError extends Error {
|
|
19
24
|
readonly kind: ObservationKind;
|
|
@@ -30,8 +35,10 @@ export declare class ObservationStore {
|
|
|
30
35
|
constructor(options: ObservationStoreOptions, dependencies?: ObservationStoreDependencies);
|
|
31
36
|
writeTask(observation: TaskObservation): Promise<ObservationWriteResult>;
|
|
32
37
|
writeReview(observation: ReviewObservation): Promise<ObservationWriteResult>;
|
|
38
|
+
writeMaintenance(observation: MaintenanceObservation): Promise<ObservationWriteResult>;
|
|
33
39
|
readTask(repository: RepositoryIdentity, id: string): Promise<TaskObservation | undefined>;
|
|
34
40
|
readAll(repository: RepositoryIdentity): Promise<RepositoryObservations>;
|
|
41
|
+
readReconciliationInputs(repository: RepositoryIdentity): Promise<ReconciliationInputs>;
|
|
35
42
|
private write;
|
|
36
43
|
private acquireClaim;
|
|
37
44
|
private findExistingObservation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observation-store.d.ts","sourceRoot":"","sources":["../../src/observations/observation-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EAChB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"observation-store.d.ts","sourceRoot":"","sources":["../../src/observations/observation-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAerC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,YAAY,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC/C,QAAQ,CAAC,YAAY,EAAE,SAAS,sBAAsB,EAAE,CAAC;CAC1D;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAC3C,QAAQ,CAAC,YAAY,EAAE,SAAS,sBAAsB,EAAE,CAAC;CAC1D;AAED,qBAAa,wBAAyB,SAAQ,KAAK;aAE/B,IAAI,EAAE,eAAe;aACrB,EAAE,EAAE,MAAM;gBADV,IAAI,EAAE,eAAe,EACrB,EAAE,EAAE,MAAM;CAK7B;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAI3D;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyC;IAClE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;gBAGtD,OAAO,EAAE,uBAAuB,EAChC,YAAY,GAAE,4BAAyC;IAY5C,SAAS,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAIxE,WAAW,CAAC,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAI5E,gBAAgB,CAC3B,WAAW,EAAE,sBAAsB,GAClC,OAAO,CAAC,sBAAsB,CAAC;IAIrB,QAAQ,CACnB,UAAU,EAAE,kBAAkB,EAC9B,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAe1B,OAAO,CAClB,UAAU,EAAE,kBAAkB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;IAarB,wBAAwB,CACnC,UAAU,EAAE,kBAAkB,GAC7B,OAAO,CAAC,oBAAoB,CAAC;YAWlB,KAAK;YA4EL,YAAY;YA8BZ,uBAAuB;YAcvB,aAAa;IAsC3B,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,eAAe;CAUxB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { mkdir, open, readFile, readdir, rename, rm, } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { reviewObservationSchema, taskObservationSchema, } from "../contracts/observation.js";
|
|
4
|
+
import { maintenanceObservationSchema, reviewObservationSchema, taskObservationSchema, } from "../contracts/observation.js";
|
|
5
5
|
import { ObservationClaimManager } from "./observation-claim-manager.js";
|
|
6
6
|
const observationDirectoryNames = {
|
|
7
7
|
task: "tasks",
|
|
8
8
|
review: "reviews",
|
|
9
|
+
maintenance: "maintenances",
|
|
9
10
|
};
|
|
10
11
|
export class ObservationConflictError extends Error {
|
|
11
12
|
kind;
|
|
@@ -37,6 +38,9 @@ export class ObservationStore {
|
|
|
37
38
|
async writeReview(observation) {
|
|
38
39
|
return this.write("review", observation);
|
|
39
40
|
}
|
|
41
|
+
async writeMaintenance(observation) {
|
|
42
|
+
return this.write("maintenance", observation);
|
|
43
|
+
}
|
|
40
44
|
async readTask(repository, id) {
|
|
41
45
|
const observationPath = this.observationPath(repository, "task", id);
|
|
42
46
|
const document = await readExistingDocument(observationPath);
|
|
@@ -49,13 +53,25 @@ export class ObservationStore {
|
|
|
49
53
|
return parsed.data;
|
|
50
54
|
}
|
|
51
55
|
async readAll(repository) {
|
|
52
|
-
const [tasks, reviews] = await Promise.all([
|
|
56
|
+
const [tasks, reviews, maintenances] = await Promise.all([
|
|
53
57
|
this.readDirectory(repository, "task"),
|
|
54
58
|
this.readDirectory(repository, "review"),
|
|
59
|
+
this.readDirectory(repository, "maintenance"),
|
|
55
60
|
]);
|
|
56
61
|
return {
|
|
57
62
|
tasks: tasks,
|
|
58
63
|
reviews: reviews,
|
|
64
|
+
maintenances: maintenances,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
async readReconciliationInputs(repository) {
|
|
68
|
+
const [tasks, maintenances] = await Promise.all([
|
|
69
|
+
this.readDirectory(repository, "task"),
|
|
70
|
+
this.readDirectory(repository, "maintenance"),
|
|
71
|
+
]);
|
|
72
|
+
return {
|
|
73
|
+
tasks: tasks,
|
|
74
|
+
maintenances: maintenances,
|
|
59
75
|
};
|
|
60
76
|
}
|
|
61
77
|
async write(kind, observation) {
|
|
@@ -127,7 +143,7 @@ export class ObservationStore {
|
|
|
127
143
|
throw new ObservationStorageError(`${kind} observation '${id}' is still being recorded by another process`);
|
|
128
144
|
}
|
|
129
145
|
async findExistingObservation(repository, id) {
|
|
130
|
-
for (const kind of ["task", "review"]) {
|
|
146
|
+
for (const kind of ["task", "review", "maintenance"]) {
|
|
131
147
|
const observationPath = this.observationPath(repository, kind, id);
|
|
132
148
|
const document = await readExistingDocument(observationPath);
|
|
133
149
|
if (document !== undefined) {
|
|
@@ -154,7 +170,9 @@ export class ObservationStore {
|
|
|
154
170
|
const value = parseStoredDocument(await readFile(observationPath, "utf8"), observationPath);
|
|
155
171
|
const parsed = kind === "task"
|
|
156
172
|
? taskObservationSchema.safeParse(value)
|
|
157
|
-
:
|
|
173
|
+
: kind === "review"
|
|
174
|
+
? reviewObservationSchema.safeParse(value)
|
|
175
|
+
: maintenanceObservationSchema.safeParse(value);
|
|
158
176
|
if (!parsed.success || !sameRepository(parsed.data.repository, repository)) {
|
|
159
177
|
throw new ObservationStorageError(`Stored ${kind} observation '${fileName}' is invalid`);
|
|
160
178
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observation-store.js","sourceRoot":"","sources":["../../src/observations/observation-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,MAAM,EACN,EAAE,GACH,MAAM,kBAAkB,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"observation-store.js","sourceRoot":"","sources":["../../src/observations/observation-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,MAAM,EACN,EAAE,GACH,MAAM,kBAAkB,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,OAAO,EACL,4BAA4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C,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,YAAY,CAAC,KAAc,EAAE,IAAY;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ;WAC3B,KAAK,KAAK,IAAI;WACd,MAAM,IAAI,KAAK;WACf,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;AAC3B,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,CAAC;AAC/E,CAAC;AAED,SAAS,cAAc,CACrB,IAAwB,EACxB,KAAyB;IAEzB,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -6,5 +6,6 @@ export declare class ReconciliationService {
|
|
|
6
6
|
private readonly store;
|
|
7
7
|
constructor(repositoryResolver: RepositoryIdentityResolver, store: ObservationStore);
|
|
8
8
|
listCandidates(repositoryPath: string): Promise<ReconciliationCandidateReport>;
|
|
9
|
+
maintenanceRequired(repositoryPath: string): Promise<boolean>;
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=reconciliation-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconciliation-service.d.ts","sourceRoot":"","sources":["../../src/reconciliation/reconciliation-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,6BAA6B,
|
|
1
|
+
{"version":3,"file":"reconciliation-service.d.ts","sourceRoot":"","sources":["../../src/reconciliation/reconciliation-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,6BAA6B,EAI9B,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AASpF,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK;gBADL,kBAAkB,EAAE,0BAA0B,EAC9C,KAAK,EAAE,gBAAgB;IAG7B,cAAc,CACzB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,6BAA6B,CAAC;IAoC5B,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAgB3E"}
|
|
@@ -11,7 +11,9 @@ export class ReconciliationService {
|
|
|
11
11
|
const repository = (await this.repositoryResolver.resolve(repositoryPath)).identity;
|
|
12
12
|
const observations = await this.store.readAll(repository);
|
|
13
13
|
const reviewsByTask = groupReviewsByTask(observations.reviews);
|
|
14
|
-
const
|
|
14
|
+
const maintenanceByCandidate = groupMaintenanceByCandidate(observations.maintenances);
|
|
15
|
+
const groupedCandidates = groupCandidates(observations.tasks, reviewsByTask, maintenanceByCandidate);
|
|
16
|
+
const candidates = groupedCandidates.actionable;
|
|
15
17
|
const domains = groupByDomain(candidates);
|
|
16
18
|
const candidateGroups = domains.reduce((total, domain) => total + domain.candidates.length, 0);
|
|
17
19
|
const candidateOccurrences = candidates.reduce((total, candidate) => total + candidate.origins.length, 0);
|
|
@@ -22,10 +24,20 @@ export class ReconciliationService {
|
|
|
22
24
|
candidateGroups,
|
|
23
25
|
candidateOccurrences,
|
|
24
26
|
duplicateGroups: candidates.filter(({ origins }) => origins.length > 1).length,
|
|
27
|
+
waitingForEvidenceOccurrences: groupedCandidates.waitingForEvidenceOccurrences,
|
|
25
28
|
},
|
|
26
29
|
domains,
|
|
27
30
|
};
|
|
28
31
|
}
|
|
32
|
+
async maintenanceRequired(repositoryPath) {
|
|
33
|
+
const repository = (await this.repositoryResolver.resolve(repositoryPath)).identity;
|
|
34
|
+
const observations = await this.store.readReconciliationInputs(repository);
|
|
35
|
+
const maintenanceByCandidate = groupMaintenanceByCandidate(observations.maintenances);
|
|
36
|
+
return observations.tasks.some((task) => task.mapUpdateCandidates.some((_, candidateIndex) => {
|
|
37
|
+
const history = maintenanceByCandidate.get(candidateOriginKey(task.id, candidateIndex)) ?? [];
|
|
38
|
+
return candidateState(history) === "actionable";
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
29
41
|
}
|
|
30
42
|
function groupReviewsByTask(reviews) {
|
|
31
43
|
const grouped = new Map();
|
|
@@ -46,10 +58,14 @@ function groupReviewsByTask(reviews) {
|
|
|
46
58
|
}
|
|
47
59
|
return grouped;
|
|
48
60
|
}
|
|
49
|
-
function groupCandidates(tasks, reviewsByTask) {
|
|
61
|
+
function groupCandidates(tasks, reviewsByTask, maintenanceByCandidate) {
|
|
50
62
|
const grouped = new Map();
|
|
51
63
|
for (const task of tasks) {
|
|
52
64
|
task.mapUpdateCandidates.forEach((candidate, candidateIndex) => {
|
|
65
|
+
const maintenanceHistory = maintenanceByCandidate.get(candidateOriginKey(task.id, candidateIndex)) ?? [];
|
|
66
|
+
if (candidateState(maintenanceHistory) === "terminal") {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
53
69
|
const key = candidateKey(candidate.businessDomainId, candidate.kind, candidate.summary);
|
|
54
70
|
const current = grouped.get(key) ?? {
|
|
55
71
|
businessDomainId: candidate.businessDomainId,
|
|
@@ -67,6 +83,7 @@ function groupCandidates(tasks, reviewsByTask) {
|
|
|
67
83
|
evidence: candidate.evidence,
|
|
68
84
|
...(task.humanCorrection ? { humanCorrection: task.humanCorrection } : {}),
|
|
69
85
|
reviews: reviewsByTask.get(task.id) ?? [],
|
|
86
|
+
maintenanceHistory,
|
|
70
87
|
});
|
|
71
88
|
grouped.set(key, current);
|
|
72
89
|
});
|
|
@@ -75,7 +92,43 @@ function groupCandidates(tasks, reviewsByTask) {
|
|
|
75
92
|
for (const candidate of candidates) {
|
|
76
93
|
candidate.origins.sort(compareOrigins);
|
|
77
94
|
}
|
|
78
|
-
|
|
95
|
+
candidates.sort(compareCandidates);
|
|
96
|
+
const actionable = candidates.filter(({ origins }) => origins.some(({ maintenanceHistory }) => candidateState(maintenanceHistory) === "actionable"));
|
|
97
|
+
const waitingForEvidenceOccurrences = candidates
|
|
98
|
+
.filter(({ origins }) => origins.every(({ maintenanceHistory }) => candidateState(maintenanceHistory) === "waiting"))
|
|
99
|
+
.reduce((total, candidate) => total + candidate.origins.length, 0);
|
|
100
|
+
return { actionable, waitingForEvidenceOccurrences };
|
|
101
|
+
}
|
|
102
|
+
function candidateState(maintenanceHistory) {
|
|
103
|
+
if (maintenanceHistory.some(({ status }) => status !== "unresolved")) {
|
|
104
|
+
return "terminal";
|
|
105
|
+
}
|
|
106
|
+
return maintenanceHistory.length === 0 ? "actionable" : "waiting";
|
|
107
|
+
}
|
|
108
|
+
function groupMaintenanceByCandidate(maintenances) {
|
|
109
|
+
const grouped = new Map();
|
|
110
|
+
for (const observation of maintenances) {
|
|
111
|
+
for (const result of observation.results) {
|
|
112
|
+
const key = candidateOriginKey(result.candidate.taskObservationId, result.candidate.candidateIndex);
|
|
113
|
+
const history = grouped.get(key) ?? [];
|
|
114
|
+
history.push({
|
|
115
|
+
maintenanceObservationId: observation.id,
|
|
116
|
+
recordedAt: observation.recordedAt,
|
|
117
|
+
maintenance: observation.maintenance,
|
|
118
|
+
status: result.status,
|
|
119
|
+
reason: result.reason,
|
|
120
|
+
evidence: result.evidence,
|
|
121
|
+
});
|
|
122
|
+
grouped.set(key, history);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
for (const history of grouped.values()) {
|
|
126
|
+
history.sort((left, right) => compareText(left.maintenanceObservationId, right.maintenanceObservationId));
|
|
127
|
+
}
|
|
128
|
+
return grouped;
|
|
129
|
+
}
|
|
130
|
+
function candidateOriginKey(taskObservationId, candidateIndex) {
|
|
131
|
+
return JSON.stringify([taskObservationId, candidateIndex]);
|
|
79
132
|
}
|
|
80
133
|
function groupByDomain(candidates) {
|
|
81
134
|
const grouped = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconciliation-service.js","sourceRoot":"","sources":["../../src/reconciliation/reconciliation-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reconciliation-service.js","sourceRoot":"","sources":["../../src/reconciliation/reconciliation-service.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AASpF,MAAM,OAAO,qBAAqB;IAEb;IACA;IAFnB,YACmB,kBAA8C,EAC9C,KAAuB;QADvB,uBAAkB,GAAlB,kBAAkB,CAA4B;QAC9C,UAAK,GAAL,KAAK,CAAkB;IACvC,CAAC;IAEG,KAAK,CAAC,cAAc,CACzB,cAAsB;QAEtB,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC;QACpF,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,sBAAsB,GAAG,2BAA2B,CACxD,YAAY,CAAC,YAAY,CAC1B,CAAC;QACF,MAAM,iBAAiB,GAAG,eAAe,CACvC,YAAY,CAAC,KAAK,EAClB,aAAa,EACb,sBAAsB,CACvB,CAAC;QACF,MAAM,UAAU,GAAG,iBAAiB,CAAC,UAAU,CAAC;QAChD,MAAM,OAAO,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CACpC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,EACnD,CAAC,CACF,CAAC;QACF,MAAM,oBAAoB,GAAG,UAAU,CAAC,MAAM,CAC5C,CAAC,KAAK,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
package/docs/architecture.md
CHANGED
|
@@ -53,12 +53,12 @@ Independent review -----------+ v
|
|
|
53
53
|
|
|
|
54
54
|
v
|
|
55
55
|
ReconciliationService
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
/ \
|
|
57
|
+
v v
|
|
58
|
+
required boolean deterministic candidate report
|
|
59
|
+
| |
|
|
60
|
+
v v
|
|
61
|
+
task orchestrator Maintenance Agent Skill
|
|
62
62
|
|
|
|
63
63
|
v
|
|
64
64
|
current evidence + reviewed YAML
|
|
@@ -168,6 +168,12 @@ current evidence establishes its stable identity. Source confirmation, map
|
|
|
168
168
|
editing, validation, rendering, Git diff, and independent review remain Agent
|
|
169
169
|
and repository responsibilities rather than CLI side effects.
|
|
170
170
|
|
|
171
|
+
The Skill keeps Work, Review, and Integration as separate evidence stages. Work
|
|
172
|
+
prepares classifications and an observation document without consuming any
|
|
173
|
+
candidate. Integration adds the actual merged commit when a map changed and
|
|
174
|
+
records the reviewed result through `observe maintenance`. A no-map-change
|
|
175
|
+
discarded or unresolved result follows the same independent-review boundary.
|
|
176
|
+
|
|
171
177
|
### ManagedSkillsInstaller
|
|
172
178
|
|
|
173
179
|
Coordinates the package's `semantic-atlas` and `semantic-atlas-maintenance`
|
|
@@ -203,10 +209,12 @@ and exposes neither repository paths nor remote URLs in retained artifacts.
|
|
|
203
209
|
|
|
204
210
|
### ObservationApplication
|
|
205
211
|
|
|
206
|
-
Owns complete task and
|
|
207
|
-
boundary. It creates a repository-bound artifact only after
|
|
208
|
-
validation. Review recording additionally resolves the referenced
|
|
209
|
-
observation from the same repository partition before persistence.
|
|
212
|
+
Owns complete task, review, and maintenance input validation and the
|
|
213
|
+
accuracy-authority boundary. It creates a repository-bound artifact only after
|
|
214
|
+
strict schema validation. Review recording additionally resolves the referenced
|
|
215
|
+
task observation from the same repository partition before persistence.
|
|
216
|
+
Maintenance recording resolves every exact candidate position and verifies its
|
|
217
|
+
business domain before persistence.
|
|
210
218
|
|
|
211
219
|
### ObservationClaimManager
|
|
212
220
|
|
|
@@ -221,8 +229,8 @@ Owns immutable, versioned user-local observation files and composes the claim
|
|
|
221
229
|
manager around each write. The store writes and syncs a complete observation
|
|
222
230
|
staging file, atomically renames it into place, returns idempotency for an exact
|
|
223
231
|
replay, and reports a conflict for changed content under an existing ID. Its
|
|
224
|
-
write boundary accepts current task v2 and
|
|
225
|
-
boundary accepts
|
|
232
|
+
write boundary accepts current task v2, review v1, and maintenance v1 artifacts.
|
|
233
|
+
Its read boundary accepts those same contracts; unsupported stored
|
|
226
234
|
artifacts fail the read instead of being reinterpreted.
|
|
227
235
|
|
|
228
236
|
### InsightService
|
|
@@ -236,10 +244,18 @@ contradicted map knowledge.
|
|
|
236
244
|
|
|
237
245
|
Owns deterministic read-only grouping of retained map-update candidates. It
|
|
238
246
|
uses explicit business-domain ownership plus exact candidate kind and summary,
|
|
239
|
-
preserves each candidate occurrence, evidence disposition, task
|
|
240
|
-
human correction,
|
|
241
|
-
|
|
242
|
-
|
|
247
|
+
preserves each actionable candidate occurrence, evidence disposition, task
|
|
248
|
+
query record, human correction, linked independent review, and unresolved
|
|
249
|
+
maintenance history, and marks groups with multiple origins as duplicates.
|
|
250
|
+
Terminal maintenance results remove their exact origins. A group containing
|
|
251
|
+
only previously unresolved origins waits for a new origin before becoming
|
|
252
|
+
actionable again. The service reads repository identity and observations
|
|
253
|
+
without loading or editing the business map.
|
|
254
|
+
|
|
255
|
+
The service also owns the narrow maintenance-status projection used by task
|
|
256
|
+
orchestrators. That path reads task and maintenance observations only and
|
|
257
|
+
returns whether any exact origin remains actionable; Review joins and complete
|
|
258
|
+
candidate reports are deferred until a maintenance Agent requests them.
|
|
243
259
|
|
|
244
260
|
### Release Candidate Verification
|
|
245
261
|
|
|
@@ -279,7 +295,9 @@ rather than local build effects.
|
|
|
279
295
|
| Repository identity | One local repository across worktrees | Observation lookup | Re-derived from the Git common directory or selected directory |
|
|
280
296
|
| Task observation | User-local repository partition | Immutable retained evidence | Strict validation and one atomic file publication |
|
|
281
297
|
| Review observation | User-local repository partition | Immutable retained evidence | Existing task reference plus strict validation and atomic publication |
|
|
298
|
+
| Maintenance observation | User-local repository partition | Immutable retained evidence | Exact candidate validation after review and integration plus atomic publication |
|
|
282
299
|
| Accuracy summary | One CLI invocation | Read phase | Re-derived from retained task and review files |
|
|
300
|
+
| Reconciliation status | One CLI invocation | Read phase | Re-derived from retained task and maintenance files |
|
|
283
301
|
| Reconciliation candidate report | One CLI invocation | Read phase | Re-derived from retained candidate and review provenance |
|
|
284
302
|
| Packed npm candidate | One verified source revision | Release review | Rebuilt from the package allowlist |
|
|
285
303
|
| Public release identity | Annotated tag and immutable GitHub Release | Permanent remote history | Explicit release command after repository cutover and immutable-release enablement |
|
|
@@ -325,7 +343,9 @@ semantic-atlas setup
|
|
|
325
343
|
semantic-atlas upgrade
|
|
326
344
|
semantic-atlas observe task --stdin [--repo <path>]
|
|
327
345
|
semantic-atlas observe review --stdin [--repo <path>]
|
|
346
|
+
semantic-atlas observe maintenance --stdin [--repo <path>]
|
|
328
347
|
semantic-atlas insights summary [--repo <path>] [--period <duration>]
|
|
348
|
+
semantic-atlas reconcile status [--repo <path>]
|
|
329
349
|
semantic-atlas reconcile candidates [--repo <path>]
|
|
330
350
|
semantic-atlas --version
|
|
331
351
|
```
|
|
@@ -347,12 +367,16 @@ business map. Their results expose the package version and managed Skill paths
|
|
|
347
367
|
needed to verify one installed identity. Business repositories retain only
|
|
348
368
|
their Git-tracked map documents.
|
|
349
369
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
`
|
|
355
|
-
|
|
370
|
+
The three `observe` commands read one complete JSON object from standard input.
|
|
371
|
+
They derive a private repository identity, validate before publication, and
|
|
372
|
+
return recorded, idempotent, or explicit conflict results. Maintenance input
|
|
373
|
+
also verifies every candidate source and its business-domain ownership.
|
|
374
|
+
`insights summary` reads retained task and review files without changing them or
|
|
375
|
+
the business map. `reconcile status` reads only retained task and maintenance
|
|
376
|
+
files and returns whether any origin is actionable. `reconcile candidates`
|
|
377
|
+
derives actionable candidates and
|
|
378
|
+
unresolved waiting counts without changing observations, source, maps, rendered
|
|
379
|
+
artifacts, or Git state.
|
|
356
380
|
|
|
357
381
|
## Validation Boundary
|
|
358
382
|
|
|
@@ -399,6 +423,9 @@ Errors fall into stable categories:
|
|
|
399
423
|
versioned task or review contract and no observation is written.
|
|
400
424
|
- `TASK_OBSERVATION_NOT_FOUND`: a review references no task observation in the
|
|
401
425
|
selected repository partition.
|
|
426
|
+
- `MAINTENANCE_CANDIDATE_INVALID`: a maintenance result references no exact
|
|
427
|
+
candidate position in the selected repository or uses another business
|
|
428
|
+
domain.
|
|
402
429
|
- `OBSERVATION_CONFLICT`: an immutable ID already belongs to different content.
|
|
403
430
|
- `OBSERVATION_STORAGE_FAILED`: atomic publication could not complete and no
|
|
404
431
|
new final artifact is reported.
|
package/docs/index.md
CHANGED
|
@@ -15,9 +15,9 @@ verified gates.
|
|
|
15
15
|
dependency direction, collaboration model, and failure semantics.
|
|
16
16
|
- [Map format](map-format.md): tracked graph documents, concepts, relations,
|
|
17
17
|
anchors, validation, and query projections.
|
|
18
|
-
- [Accuracy observations](observations.md): task
|
|
19
|
-
evidence schemas, immutable local persistence, replay, privacy,
|
|
20
|
-
summaries, and read-only
|
|
18
|
+
- [Accuracy observations](observations.md): task, independent-review, and
|
|
19
|
+
maintenance evidence schemas, immutable local persistence, replay, privacy,
|
|
20
|
+
derived summaries, and read-only actionable candidate reports.
|
|
21
21
|
- [Evaluation](evaluation.md): real-task accuracy, stale-map recovery, code
|
|
22
22
|
quality, and human-intervention evidence.
|
|
23
23
|
- [Delivery plan](delivery-plan.md): integrated initial slices and the ordered,
|
package/docs/observations.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# Semantic Atlas Accuracy Observations
|
|
2
2
|
|
|
3
|
-
This page defines the versioned task
|
|
3
|
+
This page defines the versioned task, independent-review, and maintenance evidence retained
|
|
4
4
|
from real engineering work. The [product contract](product-contract.md#accuracy-observations)
|
|
5
5
|
owns why observations exist; this page owns their data, persistence, replay,
|
|
6
6
|
and summary contract.
|
|
7
7
|
|
|
8
|
-
**Status: implemented with
|
|
9
|
-
contract.**
|
|
8
|
+
**Status: implemented with current task, review, and maintenance contracts.**
|
|
10
9
|
|
|
11
10
|
## Authority Boundary
|
|
12
11
|
|
|
@@ -29,10 +28,15 @@ correct or complete, `requiredRework` is `false`, and `mapCausedRegression` is
|
|
|
29
28
|
`false`. A `changes_requested` review sets `requiredRework` to `true` and
|
|
30
29
|
records the affected dimensions.
|
|
31
30
|
|
|
31
|
+
A post-integration maintenance run produces one `MaintenanceObservation`. It
|
|
32
|
+
references exact task-candidate positions, records the reviewed classification
|
|
33
|
+
and current evidence, and includes the owning YAML plus real merged commit when
|
|
34
|
+
the canonical map changed. Work-stage proposals are not observations.
|
|
35
|
+
|
|
32
36
|
## Versioned Schemas
|
|
33
37
|
|
|
34
|
-
Current task artifacts use `schemaVersion: 2`; review
|
|
35
|
-
`schemaVersion: 1`.
|
|
38
|
+
Current task artifacts use `schemaVersion: 2`; review and maintenance artifacts
|
|
39
|
+
use `schemaVersion: 1`. All use an Agent-supplied immutable `id` and an RFC 3339
|
|
36
40
|
`recordedAt` value. The caller creates the ID and timestamp once and reuses the
|
|
37
41
|
complete document for an uncertain retry.
|
|
38
42
|
|
|
@@ -66,8 +70,17 @@ Review identity also contains `taskId` and `runId`, plus the referenced
|
|
|
66
70
|
`taskObservationId`. Review accuracy values explicitly distinguish correct,
|
|
67
71
|
incorrect, complete, incomplete, not applicable, and not assessed outcomes.
|
|
68
72
|
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
Maintenance identity contains its task and run ID plus one `businessDomainId`.
|
|
74
|
+
Each result references `taskObservationId` and zero-based `candidateIndex`, then
|
|
75
|
+
records `accepted`, `refined`, `discarded`, or `unresolved`, an evidence-based
|
|
76
|
+
reason, and current evidence. Accepted and refined results require one
|
|
77
|
+
`docs/business-map/*.yaml` path and hexadecimal `mergedCommit`; a document with
|
|
78
|
+
only discarded and unresolved results omits `mapChange`.
|
|
79
|
+
|
|
80
|
+
The understanding Skill's [observation reference](../.agents/skills/semantic-atlas/references/observations.md)
|
|
81
|
+
contains complete task and review JSON examples. The maintenance Skill's
|
|
82
|
+
[reconciliation reference](../.agents/skills/semantic-atlas-maintenance/references/reconciliation.md)
|
|
83
|
+
contains the maintenance result shape.
|
|
71
84
|
|
|
72
85
|
## Repository Identity And Privacy
|
|
73
86
|
|
|
@@ -82,7 +95,8 @@ Observations live under the user's local data boundary:
|
|
|
82
95
|
```text
|
|
83
96
|
~/.semantic-atlas/observations/v1/repositories/<repository-id>/
|
|
84
97
|
├── tasks/<observation-id>.json
|
|
85
|
-
|
|
98
|
+
├── reviews/<observation-id>.json
|
|
99
|
+
└── maintenances/<observation-id>.json
|
|
86
100
|
```
|
|
87
101
|
|
|
88
102
|
The directory `v1` identifies the private storage layout. Each artifact's own
|
|
@@ -100,11 +114,14 @@ The public write commands are:
|
|
|
100
114
|
```text
|
|
101
115
|
semantic-atlas observe task --stdin [--repo <path>]
|
|
102
116
|
semantic-atlas observe review --stdin [--repo <path>]
|
|
117
|
+
semantic-atlas observe maintenance --stdin [--repo <path>]
|
|
103
118
|
```
|
|
104
119
|
|
|
105
120
|
The CLI parses and strictly validates the current complete input before
|
|
106
121
|
resolving a write destination. Review recording then confirms that its task
|
|
107
|
-
observation already exists in the same repository partition.
|
|
122
|
+
observation already exists in the same repository partition. Maintenance
|
|
123
|
+
recording resolves every exact candidate position and verifies its explicit
|
|
124
|
+
business-domain ownership. The store reads
|
|
108
125
|
the same current task version that it writes. Before publication it writes and
|
|
109
126
|
syncs claim metadata, exposes the claim
|
|
110
127
|
through an atomic, non-overwriting link, then writes and syncs a private
|
|
@@ -149,24 +166,39 @@ because it was retained.
|
|
|
149
166
|
The candidate discovery command is:
|
|
150
167
|
|
|
151
168
|
```text
|
|
169
|
+
semantic-atlas reconcile status --repo <path>
|
|
152
170
|
semantic-atlas reconcile candidates --repo <path>
|
|
153
171
|
```
|
|
154
172
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
origins. Observations without a durable candidate remain outside the report.
|
|
173
|
+
`reconcile status` is the narrow orchestration boundary. It reads task and
|
|
174
|
+
maintenance observations only and returns `{ "required": boolean }`. It does
|
|
175
|
+
not load independent Review observations or expose candidate groups and
|
|
176
|
+
business-domain ownership to the caller. The actionable decision uses the same
|
|
177
|
+
exact-origin completion semantics as the full report.
|
|
161
178
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
179
|
+
`reconcile candidates` derives one deterministic v1 report from the selected
|
|
180
|
+
repository partition.
|
|
181
|
+
Exact domain, candidate kind, and candidate summary form a group. The report
|
|
182
|
+
contains only groups with a current actionable origin. Every returned task
|
|
183
|
+
occurrence remains visible with its candidate position, evidence disposition,
|
|
184
|
+
task query and evidence record, human correction, linked independent reviews,
|
|
185
|
+
and earlier unresolved maintenance history. Duplicate groups produce one
|
|
186
|
+
maintenance lead while preserving all origins. Accepted, refined, and discarded
|
|
187
|
+
results terminate their exact origins. When every remaining origin has only an
|
|
188
|
+
unresolved result, the group leaves `domains` and contributes to
|
|
189
|
+
`waitingForEvidenceOccurrences`; a new origin in the same group makes the full
|
|
190
|
+
unresolved-plus-new evidence set actionable again.
|
|
191
|
+
|
|
192
|
+
Both commands read repository identity and immutable observation files only.
|
|
193
|
+
They do not edit observations, source, `docs/business-map`, rendered artifacts,
|
|
194
|
+
or Git state. The bundled `semantic-atlas-maintenance` Skill selects one business
|
|
165
195
|
domain, rechecks current source and tracked product meaning, and submits any
|
|
166
196
|
accepted correction as a normal reviewed YAML change. Unresolved and
|
|
167
197
|
implementation-local observations remain outside the canonical map. When the
|
|
168
198
|
repository has no map, the maintenance Skill can turn a supported candidate
|
|
169
|
-
into one bounded initial business-domain YAML.
|
|
199
|
+
into one bounded initial business-domain YAML. After independent review and
|
|
200
|
+
integration, the Skill records the result through `observe maintenance` and
|
|
201
|
+
requires a recorded or idempotent response before reporting completion.
|
|
170
202
|
|
|
171
203
|
## Engineering Result Semantics
|
|
172
204
|
|