@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.
Files changed (60) hide show
  1. package/build/Assets/Blueprints/Catalog.js +7 -2
  2. package/build/Assets/Blueprints/agents/sdd-implementer.agent.md +6 -6
  3. package/build/Assets/Blueprints/agents/sdd-orchestrator.agent.md +4 -7
  4. package/build/Assets/Blueprints/skills/author-agent/SKILL.md +2 -2
  5. package/build/Assets/Blueprints/skills/author-instruction/SKILL.md +2 -2
  6. package/build/Assets/Blueprints/skills/author-skill/SKILL.md +2 -2
  7. package/build/Assets/Blueprints/skills/int-subagent-driven-dev/SKILL.md +13 -9
  8. package/build/Assets/Blueprints/skills/int-subagent-driven-dev/assets/implementer-prompt.md +2 -2
  9. package/build/Assets/Blueprints/skills/int-subagent-driven-dev/references/example-workflow.md +11 -9
  10. package/build/Assets/Blueprints/skills/int-subagent-driven-dev/references/full-spec.md +33 -13
  11. package/build/Assets/Blueprints/skills/int-subagent-driven-dev/references/review-inputs.md +7 -7
  12. package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/SKILL.md +1 -1
  13. package/build/Assets/Blueprints/skills/sdd-author-design/SKILL.md +2 -2
  14. package/build/Assets/Blueprints/skills/sdd-implement-spec/SKILL.md +4 -6
  15. package/build/Assets/Templates/project/ticket-tracker.md +10 -2
  16. package/build/SubagentDrivenDevelopment/Commands/ChecksRecordCommand.js +27 -5
  17. package/build/SubagentDrivenDevelopment/Commands/ChecksRequireCommand.js +31 -7
  18. package/build/SubagentDrivenDevelopment/Commands/CorrectCommand.js +0 -1
  19. package/build/SubagentDrivenDevelopment/Commands/FinishCommand.js +2 -1
  20. package/build/SubagentDrivenDevelopment/Commands/ImplementCommand.js +2 -0
  21. package/build/SubagentDrivenDevelopment/Commands/{ClaimCommand.js → IntegrateCommand.js} +8 -7
  22. package/build/SubagentDrivenDevelopment/Commands/ReviewCommand.js +9 -9
  23. package/build/SubagentDrivenDevelopment/Commands/StartCommand.js +23 -0
  24. package/build/SubagentDrivenDevelopment/Commands/StatusCommand.js +5 -0
  25. package/build/SubagentDrivenDevelopment/Commands/groups.js +3 -2
  26. package/build/SubagentDrivenDevelopment/Evidence/GitEvidence.js +188 -37
  27. package/build/SubagentDrivenDevelopment/Models/Workflow.js +0 -2
  28. package/build/SubagentDrivenDevelopment/Persistence/AssignmentSchema.js +4 -0
  29. package/build/SubagentDrivenDevelopment/Persistence/CheckSchema.js +4 -13
  30. package/build/SubagentDrivenDevelopment/Persistence/LedgerRepository.js +66 -5
  31. package/build/SubagentDrivenDevelopment/Persistence/ProgressSchema.js +54 -4
  32. package/build/SubagentDrivenDevelopment/Persistence/ReviewSchema.js +4 -0
  33. package/build/SubagentDrivenDevelopment/Policies/AssignmentPolicy.js +0 -3
  34. package/build/SubagentDrivenDevelopment/Policies/CheckPolicy.js +6 -3
  35. package/build/SubagentDrivenDevelopment/Policies/ReadinessPolicy.js +16 -6
  36. package/build/SubagentDrivenDevelopment/Policies/ReviewPolicy.js +16 -2
  37. package/build/SubagentDrivenDevelopment/Policies/WorkflowPolicy.js +8 -8
  38. package/build/SubagentDrivenDevelopment/Services/AssignmentService.js +73 -51
  39. package/build/SubagentDrivenDevelopment/Services/ChecksService.js +376 -21
  40. package/build/SubagentDrivenDevelopment/Services/CorrectionService.js +83 -14
  41. package/build/SubagentDrivenDevelopment/Services/DeliveryCorrectionService.js +3 -7
  42. package/build/SubagentDrivenDevelopment/Services/DeliveryService.js +43 -38
  43. package/build/SubagentDrivenDevelopment/Services/FeatureCreationService.js +1 -1
  44. package/build/SubagentDrivenDevelopment/Services/FeatureFinalizationService.js +1202 -0
  45. package/build/SubagentDrivenDevelopment/Services/FeatureInspectionService.js +41 -49
  46. package/build/SubagentDrivenDevelopment/Services/FeatureWorktreeService.js +544 -0
  47. package/build/SubagentDrivenDevelopment/Services/ReadinessService.js +2 -2
  48. package/build/SubagentDrivenDevelopment/Services/ReviewService.js +39 -3
  49. package/build/SubagentDrivenDevelopment/Services/SubmissionService.js +4 -1
  50. package/build/SubagentDrivenDevelopment/Services/TicketIntegrationService.js +621 -0
  51. package/build/SubagentDrivenDevelopment/Services/TicketService.js +3 -0
  52. package/build/SubagentDrivenDevelopment/Services/TicketWorktreeService.js +317 -0
  53. package/build/SubagentDrivenDevelopment/Services/WorkflowRecordsCommitter.js +336 -0
  54. package/build/SubagentDrivenDevelopment/SubagentDrivenDevelopmentServiceProvider.js +18 -8
  55. package/build/TemplateRendering/Computed/Providers/AuthoringFlowchartProvider.js +1 -1
  56. package/package.json +2 -2
  57. package/build/SubagentDrivenDevelopment/Services/IntegrationService.js +0 -258
  58. /package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/CREDITS.MD +0 -0
  59. /package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/examples/before-after.md +0 -0
  60. /package/build/Assets/Blueprints/skills/{asd-ste100 → ref-asd-ste100}/references/writing-rules.md +0 -0
@@ -9,18 +9,16 @@ export class FeatureInspectionService extends Service {
9
9
  reportEvidence;
10
10
  featureWorkspace;
11
11
  ticketRepository;
12
- acceptancePolicy;
13
12
  assignmentPolicy;
14
13
  checkPolicy;
15
14
  findingPolicy;
16
15
  reviewPolicy;
17
- constructor(app, gitEvidence, reportEvidence, featureWorkspace, ticketRepository, acceptancePolicy, assignmentPolicy, checkPolicy, findingPolicy, reviewPolicy) {
16
+ constructor(app, gitEvidence, reportEvidence, featureWorkspace, ticketRepository, assignmentPolicy, checkPolicy, findingPolicy, reviewPolicy) {
18
17
  super(app);
19
18
  this.gitEvidence = gitEvidence;
20
19
  this.reportEvidence = reportEvidence;
21
20
  this.featureWorkspace = featureWorkspace;
22
21
  this.ticketRepository = ticketRepository;
23
- this.acceptancePolicy = acceptancePolicy;
24
22
  this.assignmentPolicy = assignmentPolicy;
25
23
  this.checkPolicy = checkPolicy;
26
24
  this.findingPolicy = findingPolicy;
@@ -32,13 +30,6 @@ export class FeatureInspectionService extends Service {
32
30
  this.ticketRepository.validateDependencyGraph(tickets);
33
31
  const byId = new Map(tickets.map((ticket) => [ticket.id, ticket]));
34
32
  const progressById = new Map(feature.state.tickets.map((item) => [item.id, item]));
35
- let checkoutChanges;
36
- try {
37
- checkoutChanges = this.gitEvidence.gitChangeSummary(feature);
38
- }
39
- catch {
40
- checkoutChanges = undefined;
41
- }
42
33
  const actions = [];
43
34
  const snapshots = [];
44
35
  const findings = [];
@@ -51,10 +42,29 @@ export class FeatureInspectionService extends Service {
51
42
  blockers.push({ ticket: progress.id, reason: "Ticket Markdown is missing." });
52
43
  continue;
53
44
  }
54
- const identity = this.gitEvidence.contentIdentity(feature, ticket, progress.baseSha, progress.checks);
45
+ let identity;
46
+ try {
47
+ identity = this.gitEvidence.contentIdentity(feature, ticket, progress.baseSha, progress.checks);
48
+ }
49
+ catch (error) {
50
+ blockers.push({
51
+ ticket: progress.id,
52
+ reason: `Ticket evidence is unavailable: ${error instanceof Error ? error.message : String(error)}`,
53
+ });
54
+ continue;
55
+ }
55
56
  snapshots.push({ ticket: progress.id, ...identity });
56
- if (ticket.status === "closed")
57
+ if (ticket.status === "closed") {
58
+ if (progress.execution === "integrated" &&
59
+ progress.integration?.postMerge?.status === "passed") {
60
+ continue;
61
+ }
62
+ blockers.push({
63
+ ticket: progress.id,
64
+ reason: "Ticket closure requires integrated changes and passing post-merge checks.",
65
+ });
57
66
  continue;
67
+ }
58
68
  for (const finding of progress.findings ?? []) {
59
69
  findings.push({ ticket: progress.id, finding });
60
70
  }
@@ -92,41 +102,22 @@ export class FeatureInspectionService extends Service {
92
102
  }
93
103
  const unmet = ticket.blocked_by.filter((dependency) => {
94
104
  const dependencyTicket = byId.get(dependency);
95
- return (!dependencyTicket || dependencyTicket.status !== "closed" || !!dependencyTicket.blocker);
105
+ const dependencyProgress = progressById.get(dependency);
106
+ return (!dependencyTicket ||
107
+ dependencyTicket.status !== "closed" ||
108
+ !!dependencyTicket.blocker ||
109
+ dependencyProgress?.status !== "closed" ||
110
+ dependencyProgress.execution !== "integrated" ||
111
+ dependencyProgress.integration?.postMerge?.status !== "passed");
96
112
  });
97
113
  if (unmet.length > 0) {
98
114
  blockers.push({
99
115
  ticket: progress.id,
100
- reason: `Dependencies are not closed: ${unmet.join(", ")}.`,
116
+ reason: `Dependencies must be closed, integrated, and post-merge validated: ${unmet.join(", ")}.`,
101
117
  });
102
118
  continue;
103
119
  }
104
- if (checkoutChanges === undefined) {
105
- blockers.push({
106
- ticket: progress.id,
107
- reason: "Checkout cleanliness could not be verified; claim is unavailable.",
108
- });
109
- continue;
110
- }
111
- if (checkoutChanges) {
112
- blockers.push({
113
- ticket: progress.id,
114
- reason: `Checkout is dirty; claim requires no staged, unstaged, or untracked changes: ${checkoutChanges}`,
115
- });
116
- continue;
117
- }
118
- actions.push({ ticket: progress.id, action: "claim" });
119
- }
120
- else if (progress.execution === "claimed") {
121
- if (progress.owner && progress.baseSha) {
122
- actions.push({ ticket: progress.id, action: "implement" });
123
- }
124
- else {
125
- blockers.push({
126
- ticket: progress.id,
127
- reason: "Claim has no recorded owner or baseline; implementation is unavailable.",
128
- });
129
- }
120
+ actions.push({ ticket: progress.id, action: "implement" });
130
121
  }
131
122
  else if (progress.execution === "implementing") {
132
123
  if (progress.assignment) {
@@ -199,7 +190,7 @@ export class FeatureInspectionService extends Service {
199
190
  ticket: progress.id,
200
191
  action: this.findingPolicy.findingBlockers(progress, identity).length > 0
201
192
  ? "resolve-findings"
202
- : "accept",
193
+ : "integrate",
203
194
  });
204
195
  }
205
196
  }
@@ -226,15 +217,16 @@ export class FeatureInspectionService extends Service {
226
217
  else if (progress.execution === "blocked") {
227
218
  blockers.push({ ticket: progress.id, reason: "Ticket execution is blocked." });
228
219
  }
229
- else if (progress.execution === "accepted") {
230
- const acceptanceBlockers = this.acceptancePolicy.acceptBlockers(feature, feature.state, ticket, progress, identity);
231
- for (const reason of acceptanceBlockers) {
232
- if (!blockers.some((blocker) => blocker.ticket === progress.id && blocker.reason === reason)) {
233
- blockers.push({ ticket: progress.id, reason });
234
- }
220
+ else if (progress.execution === "integrated") {
221
+ if (progress.integration?.postMerge?.status !== "passed") {
222
+ actions.push({ ticket: progress.id, action: "post-merge-checks" });
223
+ }
224
+ else {
225
+ blockers.push({
226
+ ticket: progress.id,
227
+ reason: "Post-merge checks passed but the ticket is not recorded closed.",
228
+ });
235
229
  }
236
- if (acceptanceBlockers.length === 0)
237
- actions.push({ ticket: progress.id, action: "integrate" });
238
230
  }
239
231
  }
240
232
  for (const ticket of tickets) {