@use-the-fork/spindle 0.1.0 → 0.2.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/Assets/Blueprints/Catalog.js +7 -2
- package/build/Assets/Blueprints/agents/sdd-implementer.agent.md +6 -6
- package/build/Assets/Blueprints/agents/sdd-orchestrator.agent.md +4 -7
- package/build/Assets/Blueprints/skills/author-agent/SKILL.md +2 -2
- package/build/Assets/Blueprints/skills/author-instruction/SKILL.md +2 -2
- package/build/Assets/Blueprints/skills/author-skill/SKILL.md +2 -2
- package/build/Assets/Blueprints/skills/int-subagent-driven-dev/SKILL.md +13 -9
- package/build/Assets/Blueprints/skills/int-subagent-driven-dev/assets/implementer-prompt.md +2 -2
- package/build/Assets/Blueprints/skills/int-subagent-driven-dev/references/example-workflow.md +11 -9
- package/build/Assets/Blueprints/skills/int-subagent-driven-dev/references/full-spec.md +33 -13
- package/build/Assets/Blueprints/skills/int-subagent-driven-dev/references/review-inputs.md +7 -7
- package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/SKILL.md +1 -1
- package/build/Assets/Blueprints/skills/sdd-author-design/SKILL.md +2 -2
- package/build/Assets/Blueprints/skills/sdd-implement-spec/SKILL.md +4 -6
- package/build/Assets/Templates/project/ticket-tracker.md +10 -2
- package/build/SubagentDrivenDevelopment/Commands/ChecksRecordCommand.js +27 -5
- package/build/SubagentDrivenDevelopment/Commands/ChecksRequireCommand.js +31 -7
- package/build/SubagentDrivenDevelopment/Commands/CorrectCommand.js +0 -1
- package/build/SubagentDrivenDevelopment/Commands/FinishCommand.js +2 -1
- package/build/SubagentDrivenDevelopment/Commands/ImplementCommand.js +2 -0
- package/build/SubagentDrivenDevelopment/Commands/{ClaimCommand.js → IntegrateCommand.js} +8 -7
- package/build/SubagentDrivenDevelopment/Commands/ReviewCommand.js +9 -9
- package/build/SubagentDrivenDevelopment/Commands/StartCommand.js +23 -0
- package/build/SubagentDrivenDevelopment/Commands/StatusCommand.js +5 -0
- package/build/SubagentDrivenDevelopment/Commands/groups.js +3 -2
- package/build/SubagentDrivenDevelopment/Evidence/GitEvidence.js +188 -37
- package/build/SubagentDrivenDevelopment/Models/Workflow.js +0 -2
- package/build/SubagentDrivenDevelopment/Persistence/AssignmentSchema.js +4 -0
- package/build/SubagentDrivenDevelopment/Persistence/CheckSchema.js +4 -13
- package/build/SubagentDrivenDevelopment/Persistence/LedgerRepository.js +66 -5
- package/build/SubagentDrivenDevelopment/Persistence/ProgressSchema.js +54 -4
- package/build/SubagentDrivenDevelopment/Persistence/ReviewSchema.js +4 -0
- package/build/SubagentDrivenDevelopment/Policies/AssignmentPolicy.js +0 -3
- package/build/SubagentDrivenDevelopment/Policies/CheckPolicy.js +6 -3
- package/build/SubagentDrivenDevelopment/Policies/ReadinessPolicy.js +16 -6
- package/build/SubagentDrivenDevelopment/Policies/ReviewPolicy.js +16 -2
- package/build/SubagentDrivenDevelopment/Policies/WorkflowPolicy.js +8 -8
- package/build/SubagentDrivenDevelopment/Services/AssignmentService.js +73 -51
- package/build/SubagentDrivenDevelopment/Services/ChecksService.js +376 -21
- package/build/SubagentDrivenDevelopment/Services/CorrectionService.js +83 -14
- package/build/SubagentDrivenDevelopment/Services/DeliveryCorrectionService.js +3 -7
- package/build/SubagentDrivenDevelopment/Services/DeliveryService.js +43 -38
- package/build/SubagentDrivenDevelopment/Services/FeatureCreationService.js +1 -1
- package/build/SubagentDrivenDevelopment/Services/FeatureFinalizationService.js +1202 -0
- package/build/SubagentDrivenDevelopment/Services/FeatureInspectionService.js +41 -49
- package/build/SubagentDrivenDevelopment/Services/FeatureWorktreeService.js +544 -0
- package/build/SubagentDrivenDevelopment/Services/ReadinessService.js +2 -2
- package/build/SubagentDrivenDevelopment/Services/ReviewService.js +39 -3
- package/build/SubagentDrivenDevelopment/Services/SubmissionService.js +4 -1
- package/build/SubagentDrivenDevelopment/Services/TicketIntegrationService.js +621 -0
- package/build/SubagentDrivenDevelopment/Services/TicketService.js +3 -0
- package/build/SubagentDrivenDevelopment/Services/TicketWorktreeService.js +317 -0
- package/build/SubagentDrivenDevelopment/Services/WorkflowRecordsCommitter.js +336 -0
- package/build/SubagentDrivenDevelopment/SubagentDrivenDevelopmentServiceProvider.js +18 -8
- package/build/TemplateRendering/Computed/Providers/AuthoringFlowchartProvider.js +1 -1
- package/package.json +2 -2
- package/build/SubagentDrivenDevelopment/Services/IntegrationService.js +0 -258
- /package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/CREDITS.MD +0 -0
- /package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/examples/before-after.md +0 -0
- /package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/references/writing-rules.md +0 -0
|
@@ -44,19 +44,15 @@ export class DeliveryCorrectionService extends Service {
|
|
|
44
44
|
].includes(options.reason ?? "")) {
|
|
45
45
|
throw new Error("--reason is required for a pause and must identify the adjudication category.");
|
|
46
46
|
}
|
|
47
|
-
if (options.assessment
|
|
47
|
+
if (options.assessment) {
|
|
48
48
|
throw new Error("--assessment is only valid with --decision continue.");
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
else if (options.reason) {
|
|
52
52
|
throw new Error("--reason is only valid with --decision pause.");
|
|
53
53
|
}
|
|
54
|
-
if (options.decision === "continue" &&
|
|
55
|
-
(
|
|
56
|
-
throw new Error("--assessment and --assessment-result productive are required with --decision continue.");
|
|
57
|
-
}
|
|
58
|
-
if (options.assessmentResult && options.decision !== "continue") {
|
|
59
|
-
throw new Error("--assessment-result is only valid with --decision continue.");
|
|
54
|
+
if (options.decision === "continue" && !options.assessment?.trim()) {
|
|
55
|
+
throw new Error("--assessment is required with --decision continue.");
|
|
60
56
|
}
|
|
61
57
|
const feature = this.featureInspectionService.resolveFeature(options.spec);
|
|
62
58
|
return this.workspaceTransaction.run(feature.workspace, () => {
|
|
@@ -14,7 +14,8 @@ export class DeliveryService extends Service {
|
|
|
14
14
|
findingPolicy;
|
|
15
15
|
reviewPolicy;
|
|
16
16
|
featureInspectionService;
|
|
17
|
-
|
|
17
|
+
finalization;
|
|
18
|
+
constructor(app, gitEvidence, reportEvidence, ticketRepository, ledgerRepository, workspaceTransaction, checkPolicy, findingPolicy, reviewPolicy, featureInspectionService, finalization) {
|
|
18
19
|
super(app);
|
|
19
20
|
this.gitEvidence = gitEvidence;
|
|
20
21
|
this.reportEvidence = reportEvidence;
|
|
@@ -25,12 +26,17 @@ export class DeliveryService extends Service {
|
|
|
25
26
|
this.findingPolicy = findingPolicy;
|
|
26
27
|
this.reviewPolicy = reviewPolicy;
|
|
27
28
|
this.featureInspectionService = featureInspectionService;
|
|
29
|
+
this.finalization = finalization;
|
|
28
30
|
}
|
|
29
31
|
finish(options) {
|
|
30
32
|
validateAuthor(options.author);
|
|
31
|
-
const feature = this.
|
|
33
|
+
const feature = this.finalization.recordedFeature(options.spec) ??
|
|
34
|
+
this.featureInspectionService.resolveFeature(options.spec);
|
|
35
|
+
return this.finalization.finish(feature, options, (ledger) => this.assertReady(feature, options, ledger));
|
|
36
|
+
}
|
|
37
|
+
assertReady(feature, options, approvedLedger) {
|
|
32
38
|
return this.workspaceTransaction.run(feature.workspace, () => {
|
|
33
|
-
const ledger = this.ledgerRepository.readLedger(feature);
|
|
39
|
+
const ledger = approvedLedger ?? this.ledgerRepository.readLedger(feature);
|
|
34
40
|
const delivery = ledger.delivery;
|
|
35
41
|
if (ledger.tickets.length === 0) {
|
|
36
42
|
throw new Error("Cannot finish; the feature must contain at least one ticket.");
|
|
@@ -42,9 +48,39 @@ export class DeliveryService extends Service {
|
|
|
42
48
|
if (missing.length > 0) {
|
|
43
49
|
throw new Error(`Cannot finish; every feature ticket must be closed: ${missing.join(", ")}.`);
|
|
44
50
|
}
|
|
51
|
+
const unintegrated = ledger.tickets
|
|
52
|
+
.filter((progress) => progress.execution !== "integrated" || !progress.integration)
|
|
53
|
+
.map((progress) => progress.id);
|
|
54
|
+
if (unintegrated.length > 0) {
|
|
55
|
+
throw new Error(`Cannot finish; every ticket must be integrated: ${unintegrated.join(", ")}.`);
|
|
56
|
+
}
|
|
57
|
+
if (ledger.tickets.some((progress) => !progress.worktree ||
|
|
58
|
+
progress.integration?.postMerge?.status !== "passed" ||
|
|
59
|
+
!progress.integration.postMerge.checks ||
|
|
60
|
+
progress.integration.postMerge.mergeSha !== progress.integration.mergeSha ||
|
|
61
|
+
progress.integration.postMerge.checks.required.length === 0 ||
|
|
62
|
+
progress.integration.postMerge.checks.required.some((requirement) => {
|
|
63
|
+
const latest = progress
|
|
64
|
+
.integration.postMerge.checks.records.filter((record) => record.command === requirement.command)
|
|
65
|
+
.at(-1);
|
|
66
|
+
return (latest?.result !== "passed" || latest.headSha !== progress.integration.mergeSha);
|
|
67
|
+
}))) {
|
|
68
|
+
throw new Error("Cannot finish; every ticket needs recorded worktree ownership and passing exact post-merge validation.");
|
|
69
|
+
}
|
|
45
70
|
if (tickets.length !== ledger.tickets.length) {
|
|
46
71
|
throw new Error("Cannot finish; one or more feature ticket documents are missing.");
|
|
47
72
|
}
|
|
73
|
+
for (const progress of ledger.tickets) {
|
|
74
|
+
if (!progress.acceptedEvidence || progress.adjudication?.status === "pending") {
|
|
75
|
+
throw new Error(`Cannot finish; ticket ${progress.id} has no frozen acceptance evidence or awaits adjudication.`);
|
|
76
|
+
}
|
|
77
|
+
const blockers = this.findingPolicy.findingBlockers(progress, {
|
|
78
|
+
...progress.acceptedEvidence,
|
|
79
|
+
headSha: progress.integration.commitSha,
|
|
80
|
+
});
|
|
81
|
+
if (blockers.length)
|
|
82
|
+
throw new Error(`Cannot finish; ticket findings remain blocking:\n${blockers.join("\n")}`);
|
|
83
|
+
}
|
|
48
84
|
if (delivery.adjudication?.status === "pending") {
|
|
49
85
|
throw new Error(`Cannot finish; delivery correction is paused for adjudication (${delivery.adjudication.reason}).`);
|
|
50
86
|
}
|
|
@@ -101,49 +137,18 @@ export class DeliveryService extends Service {
|
|
|
101
137
|
reportSha256: createHash("sha256").update(content).digest("hex"),
|
|
102
138
|
};
|
|
103
139
|
}
|
|
104
|
-
if (delivery.finished) {
|
|
105
|
-
const same = delivery.finished.report === retrospective?.report &&
|
|
106
|
-
delivery.finished.reportSha256 === retrospective?.reportSha256;
|
|
107
|
-
if (!same) {
|
|
108
|
-
throw new Error("Full-spec delivery is already finished with different retrospective evidence.");
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
scope: "delivery",
|
|
112
|
-
finished: true,
|
|
113
|
-
idempotent: true,
|
|
114
|
-
retrospectiveRequired: ledger.retrospectiveRequired,
|
|
115
|
-
...(retrospective ? { retrospective } : {}),
|
|
116
|
-
...identity,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
140
|
const confirmed = this.gitEvidence.deliveryIdentity(feature, ledger, this.ticketRepository.readTickets(feature.workspace));
|
|
120
141
|
if (confirmed.snapshot !== identity.snapshot ||
|
|
121
142
|
this.checkPolicy.deliveryCheckBlockers(delivery, confirmed).length > 0) {
|
|
122
143
|
throw new Error("Aggregate content or check evidence changed while finishing; resume and revalidate delivery.");
|
|
123
144
|
}
|
|
124
|
-
|
|
125
|
-
delivery.finished = {
|
|
126
|
-
at: new Date().toISOString(),
|
|
127
|
-
author: options.author.trim(),
|
|
128
|
-
...retrospective,
|
|
129
|
-
};
|
|
130
|
-
delivery.status = "complete";
|
|
131
|
-
delivery.history.push({
|
|
132
|
-
at: delivery.finished.at,
|
|
133
|
-
author: delivery.finished.author,
|
|
134
|
-
action: "delivery-finished",
|
|
135
|
-
});
|
|
136
|
-
this.workspaceTransaction.writeLedger(feature, ledger);
|
|
137
|
-
return {
|
|
138
|
-
scope: "delivery",
|
|
139
|
-
finished: true,
|
|
140
|
-
retrospectiveRequired: ledger.retrospectiveRequired,
|
|
141
|
-
...(retrospective ? { retrospective } : {}),
|
|
142
|
-
...identity,
|
|
143
|
-
};
|
|
145
|
+
return { ledger, identity, retrospective };
|
|
144
146
|
});
|
|
145
147
|
}
|
|
146
148
|
next(options) {
|
|
149
|
+
const recorded = this.finalization.recordedFeature(options.spec);
|
|
150
|
+
if (recorded)
|
|
151
|
+
return this.finalization.status(recorded.feature);
|
|
147
152
|
const status = this.featureInspectionService.status(options);
|
|
148
153
|
return {
|
|
149
154
|
feature: status.feature,
|
|
@@ -97,7 +97,7 @@ export class FeatureCreationService extends Service {
|
|
|
97
97
|
retrospectiveRequired: options.requireRetrospective ?? false,
|
|
98
98
|
reviewPolicy: {
|
|
99
99
|
version: 1,
|
|
100
|
-
ticket: ["sdd-reviewer"],
|
|
100
|
+
ticket: ["sdd-task-reviewer"],
|
|
101
101
|
delivery: ["sdd-reviewer"],
|
|
102
102
|
},
|
|
103
103
|
tickets: [],
|