specweave 1.0.255 → 1.0.256
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/CLAUDE.md +24 -24
- package/README.md +138 -203
- package/dist/src/core/ac-checkbox-formatter.d.ts +24 -0
- package/dist/src/core/ac-checkbox-formatter.d.ts.map +1 -0
- package/dist/src/core/ac-checkbox-formatter.js +35 -0
- package/dist/src/core/ac-checkbox-formatter.js.map +1 -0
- package/dist/src/core/ac-progress-sync.d.ts +116 -0
- package/dist/src/core/ac-progress-sync.d.ts.map +1 -0
- package/dist/src/core/ac-progress-sync.js +272 -0
- package/dist/src/core/ac-progress-sync.js.map +1 -0
- package/dist/src/core/fabric/registry-schema.d.ts +79 -0
- package/dist/src/core/fabric/registry-schema.d.ts.map +1 -0
- package/dist/src/core/fabric/registry-schema.js +6 -0
- package/dist/src/core/fabric/registry-schema.js.map +1 -0
- package/dist/src/core/fabric/security-scanner.d.ts +12 -0
- package/dist/src/core/fabric/security-scanner.d.ts.map +1 -0
- package/dist/src/core/fabric/security-scanner.js +219 -0
- package/dist/src/core/fabric/security-scanner.js.map +1 -0
- package/dist/src/core/types/sync-profile.d.ts +44 -0
- package/dist/src/core/types/sync-profile.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +4 -4
- package/plugins/{specweave-github/hooks/github-ac-sync-handler.sh → specweave/hooks/v2/handlers/ac-sync-dispatcher.sh} +96 -92
- package/plugins/specweave/skills/architect/SKILL.md +1 -1
- package/plugins/specweave/skills/auto/SKILL.md +1 -1
- package/plugins/specweave/skills/cancel-auto/SKILL.md +1 -1
- package/plugins/specweave/skills/code-simplifier/SKILL.md +1 -1
- package/plugins/specweave/skills/do/SKILL.md +1 -1
- package/plugins/specweave/skills/docs/SKILL.md +1 -1
- package/plugins/specweave/skills/docs-updater/SKILL.md +1 -1
- package/plugins/specweave/skills/done/SKILL.md +13 -70
- package/plugins/specweave/skills/framework/SKILL.md +1 -1
- package/plugins/specweave/skills/grill/SKILL.md +1 -1
- package/plugins/specweave/skills/increment/SKILL.md +1 -1
- package/plugins/specweave/skills/increment-planner/SKILL.md +1 -1
- package/plugins/specweave/skills/lsp/SKILL.md +1 -1
- package/plugins/specweave/skills/pm/SKILL.md +1 -1
- package/plugins/specweave/skills/progress/SKILL.md +1 -1
- package/plugins/specweave/skills/save/SKILL.md +1 -1
- package/plugins/specweave/skills/security/SKILL.md +1 -1
- package/plugins/specweave/skills/security-patterns/SKILL.md +1 -1
- package/plugins/specweave/skills/tdd-cycle/SKILL.md +1 -1
- package/plugins/specweave/skills/tdd-green/SKILL.md +1 -1
- package/plugins/specweave/skills/tdd-orchestrator/SKILL.md +1 -1
- package/plugins/specweave/skills/tdd-red/SKILL.md +1 -1
- package/plugins/specweave/skills/validate/SKILL.md +1 -1
- package/plugins/specweave-github/commands/sync.md +1 -22
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +0 -205
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +0 -685
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +0 -1
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +0 -12
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js +0 -28
- package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +0 -1
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +0 -21
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +0 -471
- package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +0 -1
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +0 -53
- package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/github-status-sync.js +0 -120
- package/dist/plugins/specweave-github/lib/github-status-sync.js.map +0 -1
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +0 -18
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +0 -297
- package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +0 -1
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +0 -94
- package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js +0 -385
- package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +0 -1
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +0 -611
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +0 -909
- package/plugins/specweave-github/lib/cli-sync-increment-changes.d.js +0 -1
- package/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +0 -12
- package/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +0 -1
- package/plugins/specweave-github/lib/cli-sync-increment-changes.js +0 -17
- package/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +0 -1
- package/plugins/specweave-github/lib/cli-sync-increment-changes.ts +0 -33
- package/plugins/specweave-github/lib/github-increment-sync-cli.js +0 -474
- package/plugins/specweave-github/lib/github-increment-sync-cli.ts +0 -616
- package/plugins/specweave-github/lib/github-status-sync.js +0 -107
- package/plugins/specweave-github/lib/github-status-sync.ts +0 -163
- package/plugins/specweave-github/lib/github-sync-increment-changes.d.js +0 -0
- package/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +0 -18
- package/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +0 -1
- package/plugins/specweave-github/lib/github-sync-increment-changes.js +0 -253
- package/plugins/specweave-github/lib/github-sync-increment-changes.js.map +0 -1
- package/plugins/specweave-github/lib/github-sync-increment-changes.ts +0 -391
- package/plugins/specweave-github/lib/increment-issue-builder.js +0 -402
- package/plugins/specweave-github/lib/increment-issue-builder.ts +0 -520
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { Octokit } from "@octokit/rest";
|
|
2
|
-
class GitHubStatusSync {
|
|
3
|
-
constructor(token, owner, repo) {
|
|
4
|
-
this.octokit = new Octokit({ auth: token });
|
|
5
|
-
this.owner = owner;
|
|
6
|
-
this.repo = repo;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Get current status from GitHub issue
|
|
10
|
-
*
|
|
11
|
-
* @param issueNumber - GitHub issue number
|
|
12
|
-
* @returns External status with state and labels
|
|
13
|
-
*/
|
|
14
|
-
async getStatus(issueNumber) {
|
|
15
|
-
const response = await this.octokit.rest.issues.get({
|
|
16
|
-
owner: this.owner,
|
|
17
|
-
repo: this.repo,
|
|
18
|
-
issue_number: issueNumber
|
|
19
|
-
});
|
|
20
|
-
const labels = response.data.labels.map((label) => typeof label === "string" ? label : label.name).filter(Boolean);
|
|
21
|
-
return {
|
|
22
|
-
state: response.data.state,
|
|
23
|
-
labels
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Update GitHub issue status
|
|
28
|
-
*
|
|
29
|
-
* Preserves existing labels that are not status-related.
|
|
30
|
-
* Only replaces labels that start with "status:" prefix.
|
|
31
|
-
*
|
|
32
|
-
* @param issueNumber - GitHub issue number
|
|
33
|
-
* @param status - New status (state and labels)
|
|
34
|
-
*/
|
|
35
|
-
async updateStatus(issueNumber, status) {
|
|
36
|
-
const updateData = {
|
|
37
|
-
owner: this.owner,
|
|
38
|
-
repo: this.repo,
|
|
39
|
-
issue_number: issueNumber,
|
|
40
|
-
state: status.state
|
|
41
|
-
};
|
|
42
|
-
if (status.labels && status.labels.length > 0) {
|
|
43
|
-
const currentLabels = await this.getCurrentLabels(issueNumber);
|
|
44
|
-
const preservedLabels = currentLabels.filter(
|
|
45
|
-
(label) => !label.startsWith("status:")
|
|
46
|
-
);
|
|
47
|
-
const newStatusLabels = status.labels.filter(
|
|
48
|
-
(label) => label.startsWith("status:")
|
|
49
|
-
);
|
|
50
|
-
const newOtherLabels = status.labels.filter(
|
|
51
|
-
(label) => !label.startsWith("status:")
|
|
52
|
-
);
|
|
53
|
-
const mergedLabels = [.../* @__PURE__ */ new Set([
|
|
54
|
-
...preservedLabels,
|
|
55
|
-
...newStatusLabels,
|
|
56
|
-
...newOtherLabels
|
|
57
|
-
])];
|
|
58
|
-
updateData.labels = mergedLabels;
|
|
59
|
-
}
|
|
60
|
-
await this.octokit.rest.issues.update(updateData);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Get current labels from GitHub issue
|
|
64
|
-
*
|
|
65
|
-
* @param issueNumber - GitHub issue number
|
|
66
|
-
* @returns Array of current label names
|
|
67
|
-
*/
|
|
68
|
-
async getCurrentLabels(issueNumber) {
|
|
69
|
-
try {
|
|
70
|
-
const response = await this.octokit.rest.issues.get({
|
|
71
|
-
owner: this.owner,
|
|
72
|
-
repo: this.repo,
|
|
73
|
-
issue_number: issueNumber
|
|
74
|
-
});
|
|
75
|
-
return response.data.labels.map((label) => typeof label === "string" ? label : label.name).filter(Boolean);
|
|
76
|
-
} catch {
|
|
77
|
-
return [];
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Post status change comment to GitHub issue
|
|
82
|
-
*
|
|
83
|
-
* @param issueNumber - GitHub issue number
|
|
84
|
-
* @param oldStatus - Previous SpecWeave status
|
|
85
|
-
* @param newStatus - New SpecWeave status
|
|
86
|
-
*/
|
|
87
|
-
async postStatusComment(issueNumber, oldStatus, newStatus) {
|
|
88
|
-
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
89
|
-
const body = `\u{1F504} **Status Update**
|
|
90
|
-
|
|
91
|
-
SpecWeave increment status changed:
|
|
92
|
-
- **From**: ${oldStatus}
|
|
93
|
-
- **To**: ${newStatus}
|
|
94
|
-
- **When**: ${timestamp}
|
|
95
|
-
|
|
96
|
-
This update was automatically synchronized by SpecWeave.`;
|
|
97
|
-
await this.octokit.rest.issues.createComment({
|
|
98
|
-
owner: this.owner,
|
|
99
|
-
repo: this.repo,
|
|
100
|
-
issue_number: issueNumber,
|
|
101
|
-
body
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
export {
|
|
106
|
-
GitHubStatusSync
|
|
107
|
-
};
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Status Sync
|
|
3
|
-
*
|
|
4
|
-
* Synchronizes SpecWeave increment statuses with GitHub issues.
|
|
5
|
-
*
|
|
6
|
-
* Responsibilities:
|
|
7
|
-
* - Get current status from GitHub issue
|
|
8
|
-
* - Update GitHub issue state and labels
|
|
9
|
-
* - Post status change comments
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { Octokit } from '@octokit/rest';
|
|
13
|
-
|
|
14
|
-
export interface ExternalStatus {
|
|
15
|
-
state: string;
|
|
16
|
-
labels?: string[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class GitHubStatusSync {
|
|
20
|
-
private octokit: Octokit;
|
|
21
|
-
private owner: string;
|
|
22
|
-
private repo: string;
|
|
23
|
-
|
|
24
|
-
constructor(token: string, owner: string, repo: string) {
|
|
25
|
-
this.octokit = new Octokit({ auth: token });
|
|
26
|
-
this.owner = owner;
|
|
27
|
-
this.repo = repo;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get current status from GitHub issue
|
|
32
|
-
*
|
|
33
|
-
* @param issueNumber - GitHub issue number
|
|
34
|
-
* @returns External status with state and labels
|
|
35
|
-
*/
|
|
36
|
-
public async getStatus(issueNumber: number): Promise<ExternalStatus> {
|
|
37
|
-
const response = await this.octokit.rest.issues.get({
|
|
38
|
-
owner: this.owner,
|
|
39
|
-
repo: this.repo,
|
|
40
|
-
issue_number: issueNumber
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const labels = response.data.labels
|
|
44
|
-
.map((label: any) => (typeof label === 'string' ? label : label.name))
|
|
45
|
-
.filter(Boolean);
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
state: response.data.state,
|
|
49
|
-
labels
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Update GitHub issue status
|
|
55
|
-
*
|
|
56
|
-
* Preserves existing labels that are not status-related.
|
|
57
|
-
* Only replaces labels that start with "status:" prefix.
|
|
58
|
-
*
|
|
59
|
-
* @param issueNumber - GitHub issue number
|
|
60
|
-
* @param status - New status (state and labels)
|
|
61
|
-
*/
|
|
62
|
-
public async updateStatus(
|
|
63
|
-
issueNumber: number,
|
|
64
|
-
status: ExternalStatus
|
|
65
|
-
): Promise<void> {
|
|
66
|
-
const updateData: {
|
|
67
|
-
owner: string;
|
|
68
|
-
repo: string;
|
|
69
|
-
issue_number: number;
|
|
70
|
-
state: 'open' | 'closed';
|
|
71
|
-
labels?: string[];
|
|
72
|
-
} = {
|
|
73
|
-
owner: this.owner,
|
|
74
|
-
repo: this.repo,
|
|
75
|
-
issue_number: issueNumber,
|
|
76
|
-
state: status.state as 'open' | 'closed'
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// Merge labels - preserve non-status labels, replace status labels
|
|
80
|
-
if (status.labels && status.labels.length > 0) {
|
|
81
|
-
// Fetch current labels to preserve non-status ones
|
|
82
|
-
const currentLabels = await this.getCurrentLabels(issueNumber);
|
|
83
|
-
|
|
84
|
-
// Filter out status-related labels (start with "status:")
|
|
85
|
-
const preservedLabels = currentLabels.filter(
|
|
86
|
-
label => !label.startsWith('status:')
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
// Get new status labels from the provided status
|
|
90
|
-
const newStatusLabels = status.labels.filter(
|
|
91
|
-
label => label.startsWith('status:')
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
// Get non-status labels from the provided status (e.g., priority, type)
|
|
95
|
-
const newOtherLabels = status.labels.filter(
|
|
96
|
-
label => !label.startsWith('status:')
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
// Combine: preserved non-status + new status + new other labels
|
|
100
|
-
const mergedLabels = [...new Set([
|
|
101
|
-
...preservedLabels,
|
|
102
|
-
...newStatusLabels,
|
|
103
|
-
...newOtherLabels
|
|
104
|
-
])];
|
|
105
|
-
|
|
106
|
-
updateData.labels = mergedLabels;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
await this.octokit.rest.issues.update(updateData);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Get current labels from GitHub issue
|
|
114
|
-
*
|
|
115
|
-
* @param issueNumber - GitHub issue number
|
|
116
|
-
* @returns Array of current label names
|
|
117
|
-
*/
|
|
118
|
-
private async getCurrentLabels(issueNumber: number): Promise<string[]> {
|
|
119
|
-
try {
|
|
120
|
-
const response = await this.octokit.rest.issues.get({
|
|
121
|
-
owner: this.owner,
|
|
122
|
-
repo: this.repo,
|
|
123
|
-
issue_number: issueNumber
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
return response.data.labels
|
|
127
|
-
.map((label: any) => (typeof label === 'string' ? label : label.name))
|
|
128
|
-
.filter(Boolean) as string[];
|
|
129
|
-
} catch {
|
|
130
|
-
return [];
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Post status change comment to GitHub issue
|
|
136
|
-
*
|
|
137
|
-
* @param issueNumber - GitHub issue number
|
|
138
|
-
* @param oldStatus - Previous SpecWeave status
|
|
139
|
-
* @param newStatus - New SpecWeave status
|
|
140
|
-
*/
|
|
141
|
-
public async postStatusComment(
|
|
142
|
-
issueNumber: number,
|
|
143
|
-
oldStatus: string,
|
|
144
|
-
newStatus: string
|
|
145
|
-
): Promise<void> {
|
|
146
|
-
const timestamp = new Date().toISOString();
|
|
147
|
-
const body = `🔄 **Status Update**
|
|
148
|
-
|
|
149
|
-
SpecWeave increment status changed:
|
|
150
|
-
- **From**: ${oldStatus}
|
|
151
|
-
- **To**: ${newStatus}
|
|
152
|
-
- **When**: ${timestamp}
|
|
153
|
-
|
|
154
|
-
This update was automatically synchronized by SpecWeave.`;
|
|
155
|
-
|
|
156
|
-
await this.octokit.rest.issues.createComment({
|
|
157
|
-
owner: this.owner,
|
|
158
|
-
repo: this.repo,
|
|
159
|
-
issue_number: issueNumber,
|
|
160
|
-
body
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
File without changes
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Sync for Increment Changes
|
|
3
|
-
*
|
|
4
|
-
* Handles syncing spec.md, plan.md, and tasks.md changes to GitHub issues.
|
|
5
|
-
* Detects scope changes, architecture updates, and task modifications.
|
|
6
|
-
*
|
|
7
|
-
* @module github-sync-increment-changes
|
|
8
|
-
*/
|
|
9
|
-
export interface SpecChanges {
|
|
10
|
-
added: string[];
|
|
11
|
-
removed: string[];
|
|
12
|
-
modified: string[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Sync increment file changes to GitHub
|
|
16
|
-
*/
|
|
17
|
-
export declare function syncIncrementChanges(incrementId: string, changedFile: 'spec.md' | 'plan.md' | 'tasks.md'): Promise<void>;
|
|
18
|
-
//# sourceMappingURL=github-sync-increment-changes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github-sync-increment-changes.d.ts","sourceRoot":"","sources":["github-sync-increment-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAC9C,OAAO,CAAC,IAAI,CAAC,CAwCf"}
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import * as fs from "../../../src/utils/fs-native.js";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { execSync } from "child_process";
|
|
4
|
-
import {
|
|
5
|
-
loadIncrementMetadata,
|
|
6
|
-
detectRepo,
|
|
7
|
-
postScopeChangeComment
|
|
8
|
-
} from "./github-issue-updater.js";
|
|
9
|
-
import { execFileNoThrow } from "../../../src/utils/execFileNoThrow.js";
|
|
10
|
-
import { getGitHubAuthFromProject } from "../../../src/utils/auth-helpers.js";
|
|
11
|
-
function getGhEnv() {
|
|
12
|
-
const { token } = getGitHubAuthFromProject(process.cwd());
|
|
13
|
-
return token ? { ...process.env, GH_TOKEN: token } : process.env;
|
|
14
|
-
}
|
|
15
|
-
async function syncIncrementChanges(incrementId, changedFile) {
|
|
16
|
-
console.log(`
|
|
17
|
-
\u{1F504} Syncing ${changedFile} changes to GitHub...`);
|
|
18
|
-
try {
|
|
19
|
-
const metadata = await loadIncrementMetadata(incrementId);
|
|
20
|
-
if (!metadata?.github?.issue) {
|
|
21
|
-
console.log("\u2139\uFE0F No GitHub issue linked, skipping sync");
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const repoInfo = await detectRepo();
|
|
25
|
-
if (!repoInfo) {
|
|
26
|
-
console.log("\u26A0\uFE0F Could not detect GitHub repository, skipping sync");
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const { owner, repo } = repoInfo;
|
|
30
|
-
const issueNumber = metadata.github.issue;
|
|
31
|
-
switch (changedFile) {
|
|
32
|
-
case "spec.md":
|
|
33
|
-
await syncSpecChanges(incrementId, issueNumber, owner, repo);
|
|
34
|
-
break;
|
|
35
|
-
case "plan.md":
|
|
36
|
-
await syncPlanChanges(incrementId, issueNumber, owner, repo);
|
|
37
|
-
break;
|
|
38
|
-
case "tasks.md":
|
|
39
|
-
await syncTasksChanges(incrementId, issueNumber, owner, repo);
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
console.log(`\u2705 ${changedFile} changes synced to issue #${issueNumber}`);
|
|
43
|
-
} catch (error) {
|
|
44
|
-
console.error(`\u274C Error syncing ${changedFile}:`, error);
|
|
45
|
-
console.error(" (Non-blocking - continuing...)");
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
async function syncSpecChanges(incrementId, issueNumber, owner, repo) {
|
|
49
|
-
const specPath = path.join(
|
|
50
|
-
process.cwd(),
|
|
51
|
-
".specweave/increments",
|
|
52
|
-
incrementId,
|
|
53
|
-
"spec.md"
|
|
54
|
-
);
|
|
55
|
-
const changes = await detectSpecChanges(specPath);
|
|
56
|
-
if (changes.added.length === 0 && changes.removed.length === 0 && changes.modified.length === 0) {
|
|
57
|
-
console.log("\u2139\uFE0F No significant spec changes detected");
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
await postScopeChangeComment(
|
|
61
|
-
issueNumber,
|
|
62
|
-
{
|
|
63
|
-
added: changes.added,
|
|
64
|
-
removed: changes.removed,
|
|
65
|
-
modified: changes.modified,
|
|
66
|
-
reason: "Spec updated",
|
|
67
|
-
impact: estimateImpact(changes)
|
|
68
|
-
},
|
|
69
|
-
owner,
|
|
70
|
-
repo
|
|
71
|
-
);
|
|
72
|
-
const title = await extractSpecTitle(specPath);
|
|
73
|
-
if (title) {
|
|
74
|
-
await updateIssueTitle(issueNumber, title, owner, repo);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
async function syncPlanChanges(incrementId, issueNumber, owner, repo) {
|
|
78
|
-
const comment = `
|
|
79
|
-
\u{1F3D7}\uFE0F **Architecture Plan Updated**
|
|
80
|
-
|
|
81
|
-
The implementation plan has been updated. See [\`plan.md\`](https://github.com/${owner}/${repo}/blob/develop/.specweave/increments/${incrementId}/plan.md) for details.
|
|
82
|
-
|
|
83
|
-
**Timestamp**: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
\u{1F916} Auto-updated by SpecWeave
|
|
87
|
-
`.trim();
|
|
88
|
-
await postComment(issueNumber, comment, owner, repo);
|
|
89
|
-
}
|
|
90
|
-
async function syncTasksChanges(incrementId, issueNumber, owner, repo) {
|
|
91
|
-
const tasksPath = path.join(
|
|
92
|
-
process.cwd(),
|
|
93
|
-
".specweave/increments",
|
|
94
|
-
incrementId,
|
|
95
|
-
"tasks.md"
|
|
96
|
-
);
|
|
97
|
-
const tasks = await extractTasks(tasksPath);
|
|
98
|
-
await updateIssueTaskChecklist(issueNumber, tasks, owner, repo);
|
|
99
|
-
const comment = `
|
|
100
|
-
\u{1F4CB} **Task List Updated**
|
|
101
|
-
|
|
102
|
-
Tasks have been updated. Total tasks: ${tasks.length}
|
|
103
|
-
|
|
104
|
-
**Timestamp**: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
\u{1F916} Auto-updated by SpecWeave
|
|
108
|
-
`.trim();
|
|
109
|
-
await postComment(issueNumber, comment, owner, repo);
|
|
110
|
-
}
|
|
111
|
-
async function detectSpecChanges(specPath) {
|
|
112
|
-
const changes = {
|
|
113
|
-
added: [],
|
|
114
|
-
removed: [],
|
|
115
|
-
modified: []
|
|
116
|
-
};
|
|
117
|
-
try {
|
|
118
|
-
const diff = execSync(`git diff HEAD~1 "${specPath}" 2>/dev/null || true`, {
|
|
119
|
-
encoding: "utf-8",
|
|
120
|
-
cwd: process.cwd()
|
|
121
|
-
});
|
|
122
|
-
if (!diff) {
|
|
123
|
-
return changes;
|
|
124
|
-
}
|
|
125
|
-
const lines = diff.split("\n");
|
|
126
|
-
for (const line of lines) {
|
|
127
|
-
if (line.startsWith("+") && line.includes("US-")) {
|
|
128
|
-
const match = line.match(/US-\d+:([^(]+)/);
|
|
129
|
-
if (match) {
|
|
130
|
-
changes.added.push(match[1].trim());
|
|
131
|
-
}
|
|
132
|
-
} else if (line.startsWith("-") && line.includes("US-")) {
|
|
133
|
-
const match = line.match(/US-\d+:([^(]+)/);
|
|
134
|
-
if (match) {
|
|
135
|
-
changes.removed.push(match[1].trim());
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
} catch (error) {
|
|
140
|
-
console.warn("\u26A0\uFE0F Could not detect spec changes:", error);
|
|
141
|
-
}
|
|
142
|
-
return changes;
|
|
143
|
-
}
|
|
144
|
-
async function extractSpecTitle(specPath) {
|
|
145
|
-
try {
|
|
146
|
-
const content = await fs.readFile(specPath, "utf-8");
|
|
147
|
-
const match = content.match(/^#\s+(.+)$/m);
|
|
148
|
-
return match ? match[1].trim() : null;
|
|
149
|
-
} catch (error) {
|
|
150
|
-
return null;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
async function extractTasks(tasksPath) {
|
|
154
|
-
try {
|
|
155
|
-
const content = await fs.readFile(tasksPath, "utf-8");
|
|
156
|
-
const tasks = [];
|
|
157
|
-
const lines = content.split("\n");
|
|
158
|
-
for (const line of lines) {
|
|
159
|
-
const match = line.match(/^##\s+(T-\d+):\s*(.+)$/);
|
|
160
|
-
if (match) {
|
|
161
|
-
tasks.push(`${match[1]}: ${match[2]}`);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return tasks;
|
|
165
|
-
} catch (error) {
|
|
166
|
-
return [];
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function estimateImpact(changes) {
|
|
170
|
-
const addedCount = changes.added.length;
|
|
171
|
-
const removedCount = changes.removed.length;
|
|
172
|
-
if (addedCount > removedCount) {
|
|
173
|
-
return `+${addedCount * 8} hours (${addedCount} user stories added)`;
|
|
174
|
-
} else if (removedCount > addedCount) {
|
|
175
|
-
return `-${removedCount * 8} hours (${removedCount} user stories removed)`;
|
|
176
|
-
} else {
|
|
177
|
-
return "Neutral (scope adjusted)";
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
async function updateIssueTitle(issueNumber, title, owner, repo) {
|
|
181
|
-
const result = await execFileNoThrow("gh", [
|
|
182
|
-
"issue",
|
|
183
|
-
"edit",
|
|
184
|
-
String(issueNumber),
|
|
185
|
-
"--repo",
|
|
186
|
-
`${owner}/${repo}`,
|
|
187
|
-
"--title",
|
|
188
|
-
title
|
|
189
|
-
], { env: getGhEnv() });
|
|
190
|
-
if (result.exitCode !== 0) {
|
|
191
|
-
console.warn(`\u26A0\uFE0F Could not update issue title: ${result.stderr}`);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
async function updateIssueTaskChecklist(issueNumber, tasks, owner, repo) {
|
|
195
|
-
const result = await execFileNoThrow("gh", [
|
|
196
|
-
"issue",
|
|
197
|
-
"view",
|
|
198
|
-
String(issueNumber),
|
|
199
|
-
"--repo",
|
|
200
|
-
`${owner}/${repo}`,
|
|
201
|
-
"--json",
|
|
202
|
-
"body",
|
|
203
|
-
"-q",
|
|
204
|
-
".body"
|
|
205
|
-
], { env: getGhEnv() });
|
|
206
|
-
if (result.exitCode !== 0) {
|
|
207
|
-
throw new Error(`Failed to get issue body: ${result.stderr}`);
|
|
208
|
-
}
|
|
209
|
-
const currentBody = result.stdout.trim();
|
|
210
|
-
const taskChecklist = tasks.map((task) => `- [ ] ${task}`).join("\n");
|
|
211
|
-
const taskSectionRegex = /## Tasks\n\n[\s\S]*?(?=\n## |$)/;
|
|
212
|
-
const newTaskSection = `## Tasks
|
|
213
|
-
|
|
214
|
-
Progress: 0/${tasks.length} tasks (0%)
|
|
215
|
-
|
|
216
|
-
${taskChecklist}
|
|
217
|
-
`;
|
|
218
|
-
let updatedBody;
|
|
219
|
-
if (taskSectionRegex.test(currentBody)) {
|
|
220
|
-
updatedBody = currentBody.replace(taskSectionRegex, newTaskSection);
|
|
221
|
-
} else {
|
|
222
|
-
updatedBody = currentBody + "\n\n" + newTaskSection;
|
|
223
|
-
}
|
|
224
|
-
const updateResult = await execFileNoThrow("gh", [
|
|
225
|
-
"issue",
|
|
226
|
-
"edit",
|
|
227
|
-
String(issueNumber),
|
|
228
|
-
"--repo",
|
|
229
|
-
`${owner}/${repo}`,
|
|
230
|
-
"--body",
|
|
231
|
-
updatedBody
|
|
232
|
-
], { env: getGhEnv() });
|
|
233
|
-
if (updateResult.exitCode !== 0) {
|
|
234
|
-
throw new Error(`Failed to update issue body: ${updateResult.stderr}`);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
async function postComment(issueNumber, comment, owner, repo) {
|
|
238
|
-
const result = await execFileNoThrow("gh", [
|
|
239
|
-
"issue",
|
|
240
|
-
"comment",
|
|
241
|
-
String(issueNumber),
|
|
242
|
-
"--repo",
|
|
243
|
-
`${owner}/${repo}`,
|
|
244
|
-
"--body",
|
|
245
|
-
comment
|
|
246
|
-
], { env: getGhEnv() });
|
|
247
|
-
if (result.exitCode !== 0) {
|
|
248
|
-
throw new Error(`Failed to post comment: ${result.stderr}`);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
export {
|
|
252
|
-
syncIncrementChanges
|
|
253
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github-sync-increment-changes.js","sourceRoot":"","sources":["github-sync-increment-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,sBAAsB,EACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAQxE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,WAAmB,EACnB,WAA+C;IAE/C,OAAO,CAAC,GAAG,CAAC,gBAAgB,WAAW,uBAAuB,CAAC,CAAC;IAEhE,IA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