specweave 1.0.235 → 1.0.239
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/README.md +89 -193
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.d.ts +37 -0
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js +176 -0
- package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.d.ts +36 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.js +115 -0
- package/dist/plugins/specweave-github/lib/github-batch-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.d.ts +37 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.js +56 -0
- package/dist/plugins/specweave-github/lib/github-board-resolver-v2.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.d.ts +68 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.js +102 -0
- package/dist/plugins/specweave-github/lib/github-conflict-resolver.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.d.ts +64 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js +162 -0
- package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.d.ts +50 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.js +107 -0
- package/dist/plugins/specweave-github/lib/github-field-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts +53 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.js +138 -0
- package/dist/plugins/specweave-github/lib/github-graphql-client.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.d.ts +40 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.js +50 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-generator.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.d.ts +30 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.js +75 -0
- package/dist/plugins/specweave-github/lib/github-issue-body-parser.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.d.ts +94 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.js +232 -0
- package/dist/plugins/specweave-github/lib/github-pull-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.d.ts +50 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.js +114 -0
- package/dist/plugins/specweave-github/lib/github-push-sync.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.d.ts +53 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.js +109 -0
- package/dist/plugins/specweave-github/lib/github-rate-limiter.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.d.ts +21 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +161 -0
- package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts +46 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js +99 -0
- package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js.map +1 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.d.ts +43 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.d.ts.map +1 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.js +153 -0
- package/dist/plugins/specweave-github/lib/github-us-auto-closer.js.map +1 -0
- package/dist/plugins/specweave-github/lib/index.d.ts +1 -4
- package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/index.js +1 -4
- package/dist/plugins/specweave-github/lib/index.js.map +1 -1
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts +7 -0
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.js +15 -0
- package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.js.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts +10 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js +36 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.d.ts +25 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js +57 -0
- package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts +7 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts.map +1 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.js +17 -0
- package/dist/plugins/specweave-testing/lib/playwright-routing.js.map +1 -0
- package/dist/src/cli/commands/auto.d.ts.map +1 -1
- package/dist/src/cli/commands/auto.js +1 -2
- package/dist/src/cli/commands/auto.js.map +1 -1
- package/dist/src/cli/commands/cancel-auto.js +1 -2
- package/dist/src/cli/commands/cancel-auto.js.map +1 -1
- package/dist/src/cli/commands/living-docs.js +2 -2
- package/dist/src/cli/commands/living-docs.js.map +1 -1
- package/dist/src/cli/commands/update.d.ts.map +1 -1
- package/dist/src/cli/commands/update.js +1 -2
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/core/config/types.d.ts +8 -0
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js +3 -0
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/types/sync-profile.d.ts +72 -0
- package/dist/src/core/types/sync-profile.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.js +6 -0
- package/dist/src/core/types/sync-profile.js.map +1 -1
- package/package.json +2 -2
- package/plugins/specweave/hooks/hooks.json +2 -2
- package/plugins/specweave/hooks/startup-health-check.sh +1 -1
- package/plugins/specweave/hooks/stop-auto-v5.sh +166 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh +10 -0
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +21 -1
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +1 -1
- package/plugins/specweave/skills/auto/SKILL.md +71 -251
- package/plugins/specweave/skills/team-build/SKILL.md +370 -0
- package/plugins/specweave/skills/team-merge/SKILL.md +123 -0
- package/plugins/specweave/skills/team-orchestrate/SKILL.md +800 -0
- package/plugins/specweave/skills/team-status/SKILL.md +89 -0
- package/plugins/specweave-github/MULTI-PROJECT-SYNC-ARCHITECTURE.md +94 -8
- package/plugins/specweave-github/commands/sync.md +17 -3
- package/plugins/specweave-github/hooks/github-ac-sync-handler.sh +255 -0
- package/plugins/specweave-github/hooks/github-auto-create-handler.sh +455 -0
- package/plugins/specweave-github/lib/github-ac-comment-poster.js +150 -0
- package/plugins/specweave-github/lib/github-ac-comment-poster.ts +245 -0
- package/plugins/specweave-github/lib/github-batch-sync.js +93 -0
- package/plugins/specweave-github/lib/github-batch-sync.ts +152 -0
- package/plugins/specweave-github/lib/github-board-resolver-v2.js +47 -0
- package/plugins/specweave-github/lib/github-board-resolver-v2.ts +73 -0
- package/plugins/specweave-github/lib/github-conflict-resolver.js +90 -0
- package/plugins/specweave-github/lib/github-conflict-resolver.ts +154 -0
- package/plugins/specweave-github/lib/github-cross-repo-sync.js +168 -0
- package/plugins/specweave-github/lib/github-cross-repo-sync.ts +252 -0
- package/plugins/specweave-github/lib/github-field-sync.js +116 -0
- package/plugins/specweave-github/lib/github-field-sync.ts +165 -0
- package/plugins/specweave-github/lib/github-graphql-client.js +129 -0
- package/plugins/specweave-github/lib/github-graphql-client.ts +181 -0
- package/plugins/specweave-github/lib/github-issue-body-generator.js +30 -0
- package/plugins/specweave-github/lib/github-issue-body-generator.ts +76 -0
- package/plugins/specweave-github/lib/github-issue-body-parser.js +55 -0
- package/plugins/specweave-github/lib/github-issue-body-parser.ts +92 -0
- package/plugins/specweave-github/lib/github-pull-sync.js +185 -0
- package/plugins/specweave-github/lib/github-pull-sync.ts +343 -0
- package/plugins/specweave-github/lib/github-push-sync.js +119 -0
- package/plugins/specweave-github/lib/github-push-sync.ts +174 -0
- package/plugins/specweave-github/lib/github-rate-limiter.js +96 -0
- package/plugins/specweave-github/lib/github-rate-limiter.ts +143 -0
- package/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +117 -0
- package/plugins/specweave-github/lib/github-spec-frontmatter-updater.ts +180 -0
- package/plugins/specweave-github/lib/github-sync-orchestrator.js +84 -0
- package/plugins/specweave-github/lib/github-sync-orchestrator.ts +156 -0
- package/plugins/specweave-github/lib/github-us-auto-closer.js +134 -0
- package/plugins/specweave-github/lib/github-us-auto-closer.ts +226 -0
- package/plugins/specweave-github/lib/index.js +1 -7
- package/plugins/specweave-github/lib/index.ts +1 -4
- package/plugins/specweave-github/skills/github-sync/SKILL.md +76 -4
- package/plugins/specweave-testing/commands/e2e-setup.md +18 -0
- package/plugins/specweave-testing/commands/ui-automate.md +2 -0
- package/plugins/specweave-testing/commands/ui-inspect.md +8 -0
- package/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts +6 -0
- package/plugins/specweave-testing/lib/playwright-ci-defaults.js +14 -0
- package/plugins/specweave-testing/lib/playwright-ci-defaults.ts +24 -0
- package/plugins/specweave-testing/lib/playwright-cli-detector.js +33 -0
- package/plugins/specweave-testing/lib/playwright-cli-detector.ts +48 -0
- package/plugins/specweave-testing/lib/playwright-cli-runner.js +58 -0
- package/plugins/specweave-testing/lib/playwright-cli-runner.ts +80 -0
- package/plugins/specweave-testing/lib/playwright-routing.js +16 -0
- package/plugins/specweave-testing/lib/playwright-routing.ts +38 -0
- package/plugins/specweave-testing/skills/e2e-testing/SKILL.md +38 -0
- package/src/templates/CLAUDE.md.template +7 -0
- package/src/templates/config.json.template +9 -1
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +0 -51
- package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/subtask-sync.js +0 -147
- package/dist/plugins/specweave-github/lib/subtask-sync.js.map +0 -1
- package/dist/plugins/specweave-github/lib/task-parser.d.ts +0 -37
- package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/task-parser.js +0 -211
- package/dist/plugins/specweave-github/lib/task-parser.js.map +0 -1
- package/dist/plugins/specweave-github/lib/task-sync.d.ts +0 -56
- package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +0 -1
- package/dist/plugins/specweave-github/lib/task-sync.js +0 -375
- package/dist/plugins/specweave-github/lib/task-sync.js.map +0 -1
- package/plugins/specweave/hooks/validate-completion-conditions.sh +0 -474
- package/plugins/specweave-github/lib/subtask-sync.d.ts +0 -51
- package/plugins/specweave-github/lib/subtask-sync.d.ts.map +0 -1
- package/plugins/specweave-github/lib/subtask-sync.js +0 -154
- package/plugins/specweave-github/lib/subtask-sync.js.map +0 -1
- package/plugins/specweave-github/lib/subtask-sync.ts +0 -225
- package/plugins/specweave-github/lib/task-parser.d.js +0 -0
- package/plugins/specweave-github/lib/task-parser.d.ts +0 -37
- package/plugins/specweave-github/lib/task-parser.d.ts.map +0 -1
- package/plugins/specweave-github/lib/task-parser.js +0 -195
- package/plugins/specweave-github/lib/task-parser.js.map +0 -1
- package/plugins/specweave-github/lib/task-parser.ts +0 -246
- package/plugins/specweave-github/lib/task-sync.d.js +0 -0
- package/plugins/specweave-github/lib/task-sync.d.ts +0 -51
- package/plugins/specweave-github/lib/task-sync.d.ts.map +0 -1
- package/plugins/specweave-github/lib/task-sync.js +0 -415
- package/plugins/specweave-github/lib/task-sync.js.map +0 -1
- package/plugins/specweave-github/lib/task-sync.ts +0 -451
- package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +0 -496
- /package/plugins/specweave/hooks/{stop-auto.sh → _archive/stop-auto-v4-legacy.sh} +0 -0
- /package/plugins/{specweave-github/lib/subtask-sync.d.js → specweave-testing/lib/playwright-ci-defaults.d.js} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { detectPlaywrightCli } from './playwright-cli-detector.js';
|
|
2
|
+
|
|
3
|
+
export type PlaywrightMode = 'cli' | 'mcp';
|
|
4
|
+
|
|
5
|
+
export type TaskType =
|
|
6
|
+
| 'ui-automate'
|
|
7
|
+
| 'e2e-test-run'
|
|
8
|
+
| 'screenshot'
|
|
9
|
+
| 'form-automation'
|
|
10
|
+
| 'ci-testing'
|
|
11
|
+
| 'ui-inspect'
|
|
12
|
+
| 'page-exploration'
|
|
13
|
+
| 'self-healing-test';
|
|
14
|
+
|
|
15
|
+
export interface RoutingConfig {
|
|
16
|
+
preferCli?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Tasks that benefit from MCP's rich DOM introspection */
|
|
20
|
+
const MCP_PREFERRED_TASKS: ReadonlySet<TaskType> = new Set([
|
|
21
|
+
'ui-inspect',
|
|
22
|
+
'page-exploration',
|
|
23
|
+
'self-healing-test',
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
export function resolvePlaywrightMode(
|
|
27
|
+
task: TaskType,
|
|
28
|
+
config: RoutingConfig = {},
|
|
29
|
+
): PlaywrightMode {
|
|
30
|
+
const { preferCli = true } = config;
|
|
31
|
+
|
|
32
|
+
if (!preferCli) return 'mcp';
|
|
33
|
+
|
|
34
|
+
const detection = detectPlaywrightCli({ useCache: true });
|
|
35
|
+
if (!detection.installed) return 'mcp';
|
|
36
|
+
|
|
37
|
+
return MCP_PREFERRED_TASKS.has(task) ? 'mcp' : 'cli';
|
|
38
|
+
}
|
|
@@ -230,6 +230,44 @@ e2e/
|
|
|
230
230
|
└── playwright.config.ts
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
+
## Browser Automation Mode: CLI vs MCP
|
|
234
|
+
|
|
235
|
+
SpecWeave provides dual-mode browser automation for optimal token efficiency:
|
|
236
|
+
|
|
237
|
+
| Mode | Tool | Best For | Token Cost |
|
|
238
|
+
|------|------|----------|------------|
|
|
239
|
+
| **CLI** | `@playwright/cli` (Bash) | Test execution, automation, CI/CD | ~250 chars/action |
|
|
240
|
+
| **MCP** | Playwright MCP plugin | Interactive inspection, self-healing | ~5K+ chars/action |
|
|
241
|
+
|
|
242
|
+
### When to Use CLI Mode
|
|
243
|
+
- Running E2E test suites (`npx playwright test`)
|
|
244
|
+
- Generating automation scripts
|
|
245
|
+
- CI/CD pipelines (headless by default)
|
|
246
|
+
- Token-constrained sessions
|
|
247
|
+
- Network mocking and auth state management
|
|
248
|
+
|
|
249
|
+
### When to Use MCP Mode
|
|
250
|
+
- Interactive page exploration and debugging
|
|
251
|
+
- Self-healing test repair (needs full DOM reasoning)
|
|
252
|
+
- Element inspection with accessibility tree
|
|
253
|
+
|
|
254
|
+
### Install CLI
|
|
255
|
+
```bash
|
|
256
|
+
npm install -g @playwright/cli@latest
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Configuration
|
|
260
|
+
Set preference in `.specweave/config.json`:
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"testing": {
|
|
264
|
+
"playwright": { "preferCli": true }
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The `sw-testing` skill layer routes automatically based on task type.
|
|
270
|
+
|
|
233
271
|
## Related Skills
|
|
234
272
|
|
|
235
273
|
- `qa-engineer` - Overall test strategy
|
|
@@ -318,6 +318,13 @@ BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
|
|
|
318
318
|
const { mockFn } = vi.hoisted(() => ({ mockFn: vi.fn() }));
|
|
319
319
|
vi.mock('./module', () => ({ func: mockFn }));
|
|
320
320
|
```
|
|
321
|
+
|
|
322
|
+
### Browser Automation Mode
|
|
323
|
+
|
|
324
|
+
**Default**: `@playwright/cli` if installed (98% token reduction vs MCP)
|
|
325
|
+
**Fallback**: Playwright MCP plugin (rich DOM introspection)
|
|
326
|
+
**Config**: `testing.playwright.preferCli: true|false` in `.specweave/config.json`
|
|
327
|
+
**Install CLI**: `npm install -g @playwright/cli@latest`
|
|
321
328
|
<!-- /SECTION -->
|
|
322
329
|
|
|
323
330
|
<!-- SECTION:tdd -->
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"sync": {
|
|
6
6
|
"enabled": true,
|
|
7
7
|
"provider": "github",
|
|
8
|
+
"autoSync": true,
|
|
8
9
|
"includeStatus": true,
|
|
9
10
|
"autoApplyLabels": true,
|
|
10
11
|
"defaultProfile": "main",
|
|
@@ -13,7 +14,8 @@
|
|
|
13
14
|
"canUpsertInternalItems": true,
|
|
14
15
|
"canUpdateExternalItems": true,
|
|
15
16
|
"canUpdateStatus": true,
|
|
16
|
-
"autoSyncOnCompletion": true
|
|
17
|
+
"autoSyncOnCompletion": true,
|
|
18
|
+
"autoCreateOnIncrement": true
|
|
17
19
|
},
|
|
18
20
|
|
|
19
21
|
"github": {
|
|
@@ -42,6 +44,12 @@
|
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
|
|
47
|
+
"hooks": {
|
|
48
|
+
"post_increment_planning": {
|
|
49
|
+
"auto_create_github_issue": true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
45
53
|
"statusSync": {
|
|
46
54
|
"enabled": true,
|
|
47
55
|
"autoSync": true,
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Subtask synchronization with GitHub issue checkboxes
|
|
3
|
-
* Updates GitHub issue body when subtasks complete
|
|
4
|
-
*/
|
|
5
|
-
export declare class SubtaskSync {
|
|
6
|
-
private client;
|
|
7
|
-
private incrementPath;
|
|
8
|
-
constructor(incrementPath: string, repo?: string);
|
|
9
|
-
/**
|
|
10
|
-
* Update subtask status in GitHub issue
|
|
11
|
-
*/
|
|
12
|
-
updateSubtaskStatus(taskId: string, subtaskId: string, completed: boolean): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Sync all subtasks for a task
|
|
15
|
-
*/
|
|
16
|
-
syncAllSubtasks(taskId: string): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Update checkbox in issue body
|
|
19
|
-
*/
|
|
20
|
-
private updateSubtaskCheckbox;
|
|
21
|
-
/**
|
|
22
|
-
* Check if all subtasks are done
|
|
23
|
-
*/
|
|
24
|
-
private areAllSubtasksDone;
|
|
25
|
-
/**
|
|
26
|
-
* Escape special regex characters
|
|
27
|
-
*/
|
|
28
|
-
private escapeRegex;
|
|
29
|
-
/**
|
|
30
|
-
* Post task completion comment to GitHub issue
|
|
31
|
-
*/
|
|
32
|
-
postTaskCompletionComment(taskId: string, stats: {
|
|
33
|
-
filesModified?: number;
|
|
34
|
-
linesAdded?: number;
|
|
35
|
-
linesDeleted?: number;
|
|
36
|
-
testsAdded?: number;
|
|
37
|
-
actualDuration?: string;
|
|
38
|
-
estimatedDuration?: string;
|
|
39
|
-
summary?: string;
|
|
40
|
-
nextTask?: string;
|
|
41
|
-
progress?: {
|
|
42
|
-
completed: number;
|
|
43
|
-
total: number;
|
|
44
|
-
};
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Update epic issue progress
|
|
48
|
-
*/
|
|
49
|
-
updateEpicProgress(epicIssueNumber: number, completed: number, total: number): Promise<void>;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=subtask-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subtask-sync.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/subtask-sync.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,aAAa,CAAS;gBAElB,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAKhD;;OAEG;IACG,mBAAmB,CACvB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,IAAI,CAAC;IAuChB;;OAEG;IACG,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBpD;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAoB7B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAS1B;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;OAEG;IACG,yBAAyB,CAC7B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;QACL,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACjD,GACA,OAAO,CAAC,IAAI,CAAC;IAuChB;;OAEG;IACG,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAgCnG"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Subtask synchronization with GitHub issue checkboxes
|
|
3
|
-
* Updates GitHub issue body when subtasks complete
|
|
4
|
-
*/
|
|
5
|
-
import { GitHubClient } from './github-client';
|
|
6
|
-
import { TaskParser } from './task-parser';
|
|
7
|
-
export class SubtaskSync {
|
|
8
|
-
constructor(incrementPath, repo) {
|
|
9
|
-
this.incrementPath = incrementPath;
|
|
10
|
-
this.client = new GitHubClient(repo);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Update subtask status in GitHub issue
|
|
14
|
-
*/
|
|
15
|
-
async updateSubtaskStatus(taskId, subtaskId, completed) {
|
|
16
|
-
// 1. Parse tasks to get task info
|
|
17
|
-
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
18
|
-
const task = tasks.find(t => t.id === taskId);
|
|
19
|
-
if (!task) {
|
|
20
|
-
throw new Error(`Task ${taskId} not found`);
|
|
21
|
-
}
|
|
22
|
-
if (!task.githubIssue) {
|
|
23
|
-
console.warn(`Task ${taskId} not synced to GitHub. Skipping subtask sync.`);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
// 2. Get current issue
|
|
27
|
-
const issue = await this.client.getIssue(task.githubIssue);
|
|
28
|
-
// 3. Update subtask checkbox in issue body
|
|
29
|
-
const updatedBody = this.updateSubtaskCheckbox(issue.body, subtaskId, completed);
|
|
30
|
-
// 4. Update GitHub issue
|
|
31
|
-
await this.client.updateIssueBody(task.githubIssue, updatedBody);
|
|
32
|
-
// 5. Check if all subtasks done
|
|
33
|
-
const allDone = this.areAllSubtasksDone(updatedBody);
|
|
34
|
-
if (allDone) {
|
|
35
|
-
await this.client.addComment(task.githubIssue, '✅ All subtasks completed!');
|
|
36
|
-
}
|
|
37
|
-
console.log(`✅ Updated subtask ${subtaskId} in GitHub issue #${task.githubIssue}`);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Sync all subtasks for a task
|
|
41
|
-
*/
|
|
42
|
-
async syncAllSubtasks(taskId) {
|
|
43
|
-
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
44
|
-
const task = tasks.find(t => t.id === taskId);
|
|
45
|
-
if (!task || !task.githubIssue || !task.subtasks) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const issue = await this.client.getIssue(task.githubIssue);
|
|
49
|
-
let updatedBody = issue.body;
|
|
50
|
-
// Update all subtasks
|
|
51
|
-
for (const subtask of task.subtasks) {
|
|
52
|
-
updatedBody = this.updateSubtaskCheckbox(updatedBody, subtask.id, subtask.completed);
|
|
53
|
-
}
|
|
54
|
-
await this.client.updateIssueBody(task.githubIssue, updatedBody);
|
|
55
|
-
console.log(`✅ Synced all subtasks for ${taskId} to GitHub issue #${task.githubIssue}`);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Update checkbox in issue body
|
|
59
|
-
*/
|
|
60
|
-
updateSubtaskCheckbox(body, subtaskId, completed) {
|
|
61
|
-
const checkbox = completed ? '[x]' : '[ ]';
|
|
62
|
-
// Try to find by subtask ID
|
|
63
|
-
const idPattern = new RegExp(`^(- \\[[ x]\\]\\s+${this.escapeRegex(subtaskId)}:.+)$`, 'm');
|
|
64
|
-
if (idPattern.test(body)) {
|
|
65
|
-
return body.replace(idPattern, (match) => {
|
|
66
|
-
return match.replace(/\[[ x]\]/, checkbox);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
// Fallback: try to find by description (less reliable)
|
|
70
|
-
// This is a basic approach - could be enhanced
|
|
71
|
-
return body;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Check if all subtasks are done
|
|
75
|
-
*/
|
|
76
|
-
areAllSubtasksDone(body) {
|
|
77
|
-
const subtaskLines = body.match(/^- \[[ x]\] S-\d+-\d+:.+$/gm);
|
|
78
|
-
if (!subtaskLines || subtaskLines.length === 0) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
return subtaskLines.every(line => line.includes('[x]'));
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Escape special regex characters
|
|
85
|
-
*/
|
|
86
|
-
escapeRegex(str) {
|
|
87
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Post task completion comment to GitHub issue
|
|
91
|
-
*/
|
|
92
|
-
async postTaskCompletionComment(taskId, stats) {
|
|
93
|
-
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
94
|
-
const task = tasks.find(t => t.id === taskId);
|
|
95
|
-
if (!task || !task.githubIssue) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const { filesModified = 0, linesAdded = 0, linesDeleted = 0, testsAdded = 0, actualDuration = 'Unknown', estimatedDuration = task.estimate, summary = 'No summary provided', nextTask = 'None', progress } = stats;
|
|
99
|
-
const comment = `✅ **Task Completed**
|
|
100
|
-
|
|
101
|
-
**Files Modified**: ${filesModified} files (+${linesAdded}/-${linesDeleted} lines)
|
|
102
|
-
**Tests**: ${testsAdded > 0 ? `All passing (${testsAdded} new tests)` : 'All passing'}
|
|
103
|
-
**Duration**: ${actualDuration} (estimated: ${estimatedDuration})
|
|
104
|
-
|
|
105
|
-
**What Changed**:
|
|
106
|
-
${summary}
|
|
107
|
-
|
|
108
|
-
**Next Task**: ${nextTask}
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
${progress ? `Progress: ${progress.completed}/${progress.total} tasks (${Math.round(progress.completed / progress.total * 100)}%)` : ''}
|
|
112
|
-
🤖 Posted by SpecWeave`;
|
|
113
|
-
await this.client.addComment(task.githubIssue, comment);
|
|
114
|
-
console.log(`✅ Posted completion comment to issue #${task.githubIssue}`);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Update epic issue progress
|
|
118
|
-
*/
|
|
119
|
-
async updateEpicProgress(epicIssueNumber, completed, total) {
|
|
120
|
-
const epic = await this.client.getIssue(epicIssueNumber);
|
|
121
|
-
// Update checkboxes in epic body
|
|
122
|
-
const tasks = TaskParser.parseTasksFile(this.incrementPath);
|
|
123
|
-
let updatedBody = epic.body;
|
|
124
|
-
for (const task of tasks) {
|
|
125
|
-
if (task.status === 'completed') {
|
|
126
|
-
// Find and check the checkbox for this task
|
|
127
|
-
const taskPattern = new RegExp(`^(- \\[[ x]\\] \\[${this.escapeRegex(task.id)}\\].+)$`, 'm');
|
|
128
|
-
if (taskPattern.test(updatedBody)) {
|
|
129
|
-
updatedBody = updatedBody.replace(taskPattern, (match) => {
|
|
130
|
-
return match.replace(/\[[ x]\]/, '[x]');
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
await this.client.updateIssueBody(epicIssueNumber, updatedBody);
|
|
136
|
-
// Post progress comment
|
|
137
|
-
const progressComment = `📊 **Progress Update**
|
|
138
|
-
|
|
139
|
-
${completed}/${total} tasks completed (${Math.round(completed / total * 100)}%)
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
🤖 Updated by SpecWeave`;
|
|
143
|
-
await this.client.addComment(epicIssueNumber, progressComment);
|
|
144
|
-
console.log(`✅ Updated epic issue #${epicIssueNumber} progress`);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
//# sourceMappingURL=subtask-sync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5D,IAAI,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC;QAE5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBAChC,4CAA4C;gBAC5C,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,qBAAqB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;gBAC7F,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;oBAClC,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;wBACvD,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;oBAC1C,CAAC,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;QAEhE,wBAAwB;QACxB,MAAM,eAAe,GAAG;;EAE1B,SAAS,IAAI,KAAK,qBAAqB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,GAAG,GAAG,CAAC;;;wBAGpD,CAAC;QAErB,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,yBAAyB,eAAe,WAAW,CAAC,CAAC;IACnE,CAAC;CACF"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parser for tasks.md files
|
|
3
|
-
* Extracts task information for GitHub sync
|
|
4
|
-
*/
|
|
5
|
-
import { Task } from './types';
|
|
6
|
-
export declare class TaskParser {
|
|
7
|
-
/**
|
|
8
|
-
* Parse tasks.md file and extract all tasks
|
|
9
|
-
*/
|
|
10
|
-
static parseTasksFile(incrementPath: string): Task[];
|
|
11
|
-
/**
|
|
12
|
-
* Parse task content into structured Task objects
|
|
13
|
-
*/
|
|
14
|
-
static parseTasks(content: string): Task[];
|
|
15
|
-
/**
|
|
16
|
-
* Parse individual task section
|
|
17
|
-
*/
|
|
18
|
-
private static parseTask;
|
|
19
|
-
private static extractPriority;
|
|
20
|
-
private static extractEstimate;
|
|
21
|
-
private static extractStatus;
|
|
22
|
-
private static extractDescription;
|
|
23
|
-
private static extractGitHubIssue;
|
|
24
|
-
private static extractAssignee;
|
|
25
|
-
private static extractSubtasks;
|
|
26
|
-
private static extractFiles;
|
|
27
|
-
private static extractImplementation;
|
|
28
|
-
private static extractAcceptanceCriteria;
|
|
29
|
-
private static extractDependencies;
|
|
30
|
-
private static extractBlocks;
|
|
31
|
-
private static extractPhase;
|
|
32
|
-
/**
|
|
33
|
-
* Update tasks.md file with GitHub issue numbers
|
|
34
|
-
*/
|
|
35
|
-
static updateTasksWithGitHubIssues(incrementPath: string, taskIssueMap: Record<string, number>): void;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=task-parser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-parser.d.ts","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/task-parser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,IAAI,EAAW,MAAM,SAAS,CAAC;AAExC,qBAAa,UAAU;IACrB;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,EAAE;IAWpD;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE;IAwB1C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IA8BxB,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B,OAAO,CAAC,MAAM,CAAC,aAAa;IAS5B,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAKjC,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAKjC,OAAO,CAAC,MAAM,CAAC,eAAe;IAK9B,OAAO,CAAC,MAAM,CAAC,eAAe;IA6B9B,OAAO,CAAC,MAAM,CAAC,YAAY;IAS3B,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAKpC,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAQxC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAQlC,OAAO,CAAC,MAAM,CAAC,aAAa;IAQ5B,OAAO,CAAC,MAAM,CAAC,YAAY;IAe3B;;OAEG;IACH,MAAM,CAAC,2BAA2B,CAChC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,IAAI;CAuCR"}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parser for tasks.md files
|
|
3
|
-
* Extracts task information for GitHub sync
|
|
4
|
-
*/
|
|
5
|
-
import * as fs from 'fs';
|
|
6
|
-
import * as path from 'path';
|
|
7
|
-
export class TaskParser {
|
|
8
|
-
/**
|
|
9
|
-
* Parse tasks.md file and extract all tasks
|
|
10
|
-
*/
|
|
11
|
-
static parseTasksFile(incrementPath) {
|
|
12
|
-
const tasksPath = path.join(incrementPath, 'tasks.md');
|
|
13
|
-
if (!fs.existsSync(tasksPath)) {
|
|
14
|
-
throw new Error(`tasks.md not found at ${tasksPath}`);
|
|
15
|
-
}
|
|
16
|
-
const content = fs.readFileSync(tasksPath, 'utf-8');
|
|
17
|
-
return this.parseTasks(content);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Parse task content into structured Task objects
|
|
21
|
-
*/
|
|
22
|
-
static parseTasks(content) {
|
|
23
|
-
const tasks = [];
|
|
24
|
-
// Split by task headers (### T-XXX:)
|
|
25
|
-
const taskPattern = /###\s+(T-\d+(?:-[A-Z])?):\s+(.+?)$/gm;
|
|
26
|
-
const matches = [...content.matchAll(taskPattern)];
|
|
27
|
-
for (let i = 0; i < matches.length; i++) {
|
|
28
|
-
const match = matches[i];
|
|
29
|
-
const taskId = match[1];
|
|
30
|
-
const taskTitle = match[2].trim();
|
|
31
|
-
const startIndex = match.index;
|
|
32
|
-
const endIndex = i < matches.length - 1 ? matches[i + 1].index : content.length;
|
|
33
|
-
const taskContent = content.substring(startIndex, endIndex);
|
|
34
|
-
const task = this.parseTask(taskId, taskTitle, taskContent);
|
|
35
|
-
if (task) {
|
|
36
|
-
tasks.push(task);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return tasks;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Parse individual task section
|
|
43
|
-
*/
|
|
44
|
-
static parseTask(taskId, taskTitle, content) {
|
|
45
|
-
try {
|
|
46
|
-
const task = {
|
|
47
|
-
id: taskId,
|
|
48
|
-
title: taskTitle,
|
|
49
|
-
priority: this.extractPriority(content),
|
|
50
|
-
estimate: this.extractEstimate(content),
|
|
51
|
-
status: this.extractStatus(content),
|
|
52
|
-
description: this.extractDescription(content),
|
|
53
|
-
};
|
|
54
|
-
// Optional fields
|
|
55
|
-
task.githubIssue = this.extractGitHubIssue(content);
|
|
56
|
-
task.assignee = this.extractAssignee(content);
|
|
57
|
-
task.subtasks = this.extractSubtasks(content);
|
|
58
|
-
task.filesToCreate = this.extractFiles(content, 'Files to Create');
|
|
59
|
-
task.filesToModify = this.extractFiles(content, 'Files to Modify');
|
|
60
|
-
task.implementation = this.extractImplementation(content);
|
|
61
|
-
task.acceptanceCriteria = this.extractAcceptanceCriteria(content);
|
|
62
|
-
task.dependencies = this.extractDependencies(content);
|
|
63
|
-
task.blocks = this.extractBlocks(content);
|
|
64
|
-
task.phase = this.extractPhase(content);
|
|
65
|
-
return task;
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
console.error(`Error parsing task ${taskId}:`, error);
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
static extractPriority(content) {
|
|
73
|
-
const match = content.match(/\*\*Priority\*\*:\s+(P[0-3])/);
|
|
74
|
-
return match?.[1] || 'P1';
|
|
75
|
-
}
|
|
76
|
-
static extractEstimate(content) {
|
|
77
|
-
const match = content.match(/\*\*Estimate\*\*:\s+(.+?)$/m);
|
|
78
|
-
return match?.[1]?.trim() || 'Unknown';
|
|
79
|
-
}
|
|
80
|
-
static extractStatus(content) {
|
|
81
|
-
const match = content.match(/\*\*Status\*\*:\s+(\w+)/);
|
|
82
|
-
const status = match?.[1];
|
|
83
|
-
if (status === 'pending' || status === 'in_progress' || status === 'completed' || status === 'blocked') {
|
|
84
|
-
return status;
|
|
85
|
-
}
|
|
86
|
-
return 'pending';
|
|
87
|
-
}
|
|
88
|
-
static extractDescription(content) {
|
|
89
|
-
const match = content.match(/\*\*Description\*\*:\s*\n(.+?)(?=\n\*\*|$)/s);
|
|
90
|
-
return match?.[1]?.trim() || '';
|
|
91
|
-
}
|
|
92
|
-
static extractGitHubIssue(content) {
|
|
93
|
-
const match = content.match(/\*\*GitHub Issue\*\*:\s+#(\d+)/);
|
|
94
|
-
return match ? parseInt(match[1], 10) : undefined;
|
|
95
|
-
}
|
|
96
|
-
static extractAssignee(content) {
|
|
97
|
-
const match = content.match(/\*\*Assignee\*\*:\s+@?(\w+)/);
|
|
98
|
-
return match?.[1];
|
|
99
|
-
}
|
|
100
|
-
static extractSubtasks(content) {
|
|
101
|
-
const subtaskSection = content.match(/\*\*Subtasks\*\*:?\s*\n((?:- \[.\] .+\n?)+)/);
|
|
102
|
-
if (!subtaskSection)
|
|
103
|
-
return undefined;
|
|
104
|
-
const subtaskLines = subtaskSection[1].match(/- \[(x| )\] (.+?)(?:\((.+?)\))?$/gm);
|
|
105
|
-
if (!subtaskLines)
|
|
106
|
-
return undefined;
|
|
107
|
-
return subtaskLines.map(line => {
|
|
108
|
-
const match = line.match(/- \[(x| )\] (.+?)(?:\((.+?)\))?$/);
|
|
109
|
-
if (!match)
|
|
110
|
-
return null;
|
|
111
|
-
const completed = match[1] === 'x';
|
|
112
|
-
const description = match[2].trim();
|
|
113
|
-
const estimate = match[3]?.trim() || 'Unknown';
|
|
114
|
-
// Extract subtask ID if present (S-XXX-XX format)
|
|
115
|
-
const idMatch = description.match(/^(S-\d+-\d+):\s*(.+)/);
|
|
116
|
-
const id = idMatch ? idMatch[1] : `S-${Date.now()}`; // Fallback ID
|
|
117
|
-
const cleanDescription = idMatch ? idMatch[2] : description;
|
|
118
|
-
return {
|
|
119
|
-
id,
|
|
120
|
-
description: cleanDescription,
|
|
121
|
-
estimate,
|
|
122
|
-
completed
|
|
123
|
-
};
|
|
124
|
-
}).filter((st) => st !== null);
|
|
125
|
-
}
|
|
126
|
-
static extractFiles(content, section) {
|
|
127
|
-
const pattern = new RegExp(`\\*\\*${section}\\*\\*:?\\s*\\n((?:- \`.+?\`\\n?)+)`, 's');
|
|
128
|
-
const match = content.match(pattern);
|
|
129
|
-
if (!match)
|
|
130
|
-
return undefined;
|
|
131
|
-
const files = match[1].match(/- `(.+?)`/g);
|
|
132
|
-
return files?.map(f => f.replace(/- `(.+?)`/, '$1'));
|
|
133
|
-
}
|
|
134
|
-
static extractImplementation(content) {
|
|
135
|
-
const match = content.match(/\*\*Implementation\*\*:?\s*\n```[\w]*\n([\s\S]+?)\n```/);
|
|
136
|
-
return match?.[1]?.trim();
|
|
137
|
-
}
|
|
138
|
-
static extractAcceptanceCriteria(content) {
|
|
139
|
-
const match = content.match(/\*\*Acceptance Criteria\*\*:?\s*\n((?:- .+\n?)+)/);
|
|
140
|
-
if (!match)
|
|
141
|
-
return undefined;
|
|
142
|
-
const criteria = match[1].match(/- (.+)/g);
|
|
143
|
-
return criteria?.map(c => c.replace(/^- /, '').replace(/^✅\s*/, ''));
|
|
144
|
-
}
|
|
145
|
-
static extractDependencies(content) {
|
|
146
|
-
const match = content.match(/\*\*Dependencies\*\*:?\s*\n((?:- .+\n?)+)/);
|
|
147
|
-
if (!match)
|
|
148
|
-
return undefined;
|
|
149
|
-
const deps = match[1].match(/- (T-\d+(?:-[A-Z])?)/g);
|
|
150
|
-
return deps?.map(d => d.replace(/^- /, '').match(/(T-\d+(?:-[A-Z])?)/)?.[1]).filter((d) => !!d);
|
|
151
|
-
}
|
|
152
|
-
static extractBlocks(content) {
|
|
153
|
-
const match = content.match(/\*\*Blocks\*\*:?\s*\n((?:- .+\n?)+)/);
|
|
154
|
-
if (!match)
|
|
155
|
-
return undefined;
|
|
156
|
-
const blocks = match[1].match(/- (T-\d+(?:-[A-Z])?)/g);
|
|
157
|
-
return blocks?.map(b => b.replace(/^- /, '').match(/(T-\d+(?:-[A-Z])?)/)?.[1]).filter((b) => !!b);
|
|
158
|
-
}
|
|
159
|
-
static extractPhase(content) {
|
|
160
|
-
// Look backwards in content to find phase header
|
|
161
|
-
const lines = content.split('\n');
|
|
162
|
-
for (let i = 0; i < lines.length; i++) {
|
|
163
|
-
const line = lines[i];
|
|
164
|
-
if (line.startsWith('##') && !line.startsWith('###')) {
|
|
165
|
-
const phaseMatch = line.match(/##\s+(.+?)(?:\s+-\s+\d+\s+tasks)?$/);
|
|
166
|
-
if (phaseMatch) {
|
|
167
|
-
return phaseMatch[1].trim();
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return undefined;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Update tasks.md file with GitHub issue numbers
|
|
175
|
-
*/
|
|
176
|
-
static updateTasksWithGitHubIssues(incrementPath, taskIssueMap) {
|
|
177
|
-
const tasksPath = path.join(incrementPath, 'tasks.md');
|
|
178
|
-
let content = fs.readFileSync(tasksPath, 'utf-8');
|
|
179
|
-
for (const [taskId, issueNumber] of Object.entries(taskIssueMap)) {
|
|
180
|
-
// Find task section
|
|
181
|
-
const taskHeaderPattern = new RegExp(`(###\\s+${taskId}:.+?$)`, 'm');
|
|
182
|
-
const match = content.match(taskHeaderPattern);
|
|
183
|
-
if (!match)
|
|
184
|
-
continue;
|
|
185
|
-
const taskStart = match.index;
|
|
186
|
-
const nextTaskPattern = /###\s+T-\d+(?:-[A-Z])?:/g;
|
|
187
|
-
nextTaskPattern.lastIndex = taskStart + match[0].length;
|
|
188
|
-
const nextMatch = nextTaskPattern.exec(content);
|
|
189
|
-
const taskEnd = nextMatch ? nextMatch.index : content.length;
|
|
190
|
-
const taskSection = content.substring(taskStart, taskEnd);
|
|
191
|
-
// Check if GitHub Issue field already exists
|
|
192
|
-
if (taskSection.includes('**GitHub Issue**:')) {
|
|
193
|
-
// Update existing
|
|
194
|
-
const updatedSection = taskSection.replace(/\*\*GitHub Issue\*\*:.+$/m, `**GitHub Issue**: #${issueNumber}`);
|
|
195
|
-
content = content.substring(0, taskStart) + updatedSection + content.substring(taskEnd);
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
// Add after Status line
|
|
199
|
-
const statusLinePattern = /(\*\*Status\*\*:.+?$)/m;
|
|
200
|
-
const statusMatch = taskSection.match(statusLinePattern);
|
|
201
|
-
if (statusMatch) {
|
|
202
|
-
const insertPoint = taskStart + taskSection.indexOf(statusMatch[0]) + statusMatch[0].length;
|
|
203
|
-
const insertion = `\n**GitHub Issue**: #${issueNumber}`;
|
|
204
|
-
content = content.substring(0, insertPoint) + insertion + content.substring(insertPoint);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
fs.writeFileSync(tasksPath, content, 'utf-8');
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
//# sourceMappingURL=task-parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-parser.js","sourceRoot":"","sources":["../../../../plugins/specweave-github/lib/task-parser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,MAAM,OAAO,UAA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AAW,CAAC,CAAC;gBAC3F,CAAC;YACH,CAAC;QACH,CAAC;QAED,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Task-level GitHub synchronization
|
|
3
|
-
* Orchestrates syncing tasks.md to GitHub issues
|
|
4
|
-
*/
|
|
5
|
-
import { SyncResult, GitHubSyncOptions } from './types';
|
|
6
|
-
export declare class TaskSync {
|
|
7
|
-
private client;
|
|
8
|
-
private incrementPath;
|
|
9
|
-
constructor(incrementPath: string, repo?: string);
|
|
10
|
-
/**
|
|
11
|
-
* Sync all tasks to GitHub (main entry point)
|
|
12
|
-
*/
|
|
13
|
-
syncTasks(options?: GitHubSyncOptions): Promise<SyncResult>;
|
|
14
|
-
/**
|
|
15
|
-
* Generate epic issue body
|
|
16
|
-
*/
|
|
17
|
-
private generateEpicBody;
|
|
18
|
-
/**
|
|
19
|
-
* Generate task issue body
|
|
20
|
-
*/
|
|
21
|
-
private generateTaskBody;
|
|
22
|
-
/**
|
|
23
|
-
* Load increment metadata
|
|
24
|
-
*/
|
|
25
|
-
private loadIncrementMetadata;
|
|
26
|
-
/**
|
|
27
|
-
* Save increment metadata
|
|
28
|
-
*/
|
|
29
|
-
private saveIncrementMetadata;
|
|
30
|
-
/**
|
|
31
|
-
* Get issue prefix from metadata.json (with created date)
|
|
32
|
-
* Returns FS-YY-MM-DD format or fallback to FS-UNKNOWN
|
|
33
|
-
*/
|
|
34
|
-
private getIssuePrefix;
|
|
35
|
-
/**
|
|
36
|
-
* Save sync mapping
|
|
37
|
-
*/
|
|
38
|
-
private saveSyncMapping;
|
|
39
|
-
/**
|
|
40
|
-
* Get milestone title from metadata
|
|
41
|
-
*/
|
|
42
|
-
private getMilestoneTitle;
|
|
43
|
-
/**
|
|
44
|
-
* Get GitHub file URL
|
|
45
|
-
*/
|
|
46
|
-
private getGitHubFileURL;
|
|
47
|
-
/**
|
|
48
|
-
* Convert string to slug
|
|
49
|
-
*/
|
|
50
|
-
private slugify;
|
|
51
|
-
/**
|
|
52
|
-
* Print dry run summary
|
|
53
|
-
*/
|
|
54
|
-
private printDryRunSummary;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=task-sync.d.ts.map
|