forge-dev-framework 1.1.0 → 1.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/.claude/commands/forge/README.md +156 -189
- package/.claude/commands/forge/add-phase.md +4 -3
- package/.claude/commands/forge/complete-milestone.md +1 -1
- package/.claude/commands/forge/convert.md +31 -0
- package/.claude/commands/forge/debug.md +12 -154
- package/.claude/commands/forge/discuss.md +60 -107
- package/.claude/commands/forge/execute.md +67 -142
- package/.claude/commands/forge/generate.md +8 -107
- package/.claude/commands/forge/help.md +9 -114
- package/.claude/commands/forge/init.md +10 -74
- package/.claude/commands/forge/insert-phase.md +4 -3
- package/.claude/commands/forge/new-milestone.md +1 -1
- package/.claude/commands/forge/new-project.md +12 -91
- package/.claude/commands/forge/pause-work.md +2 -2
- package/.claude/commands/forge/plan.md +114 -129
- package/.claude/commands/forge/quick.md +17 -106
- package/.claude/commands/forge/remove-phase.md +3 -2
- package/.claude/commands/forge/resume.md +22 -0
- package/.claude/commands/forge/team-add.md +24 -0
- package/.claude/commands/forge/team-create.md +22 -0
- package/.claude/commands/forge/team-remove.md +24 -0
- package/.claude/commands/forge/team-start.md +22 -0
- package/.claude/commands/forge/team-view.md +18 -0
- package/.claude/commands/forge/verify.md +68 -147
- package/.claude/hooks/forge-context-cleanup.cjs +79 -0
- package/.claude/hooks/forge-event-guard.cjs +36 -0
- package/.claude/hooks/forge-size-guard.cjs +55 -0
- package/.claude/rules/api-patterns.md +13 -98
- package/.claude/rules/context-efficiency.md +10 -0
- package/.claude/rules/security-baseline.md +18 -204
- package/.claude/rules/testing-standards.md +16 -177
- package/.claude/rules/ui-conventions.md +17 -142
- package/bin/forge.js +5 -3
- package/dist/bin/forge.js +5 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +15 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/convert.d.ts +6 -0
- package/dist/commands/convert.d.ts.map +1 -0
- package/dist/commands/convert.js +132 -0
- package/dist/commands/convert.js.map +1 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +3 -2
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +4 -4
- package/dist/commands/index.js.map +1 -1
- package/dist/generators/gsd-converter.d.ts +100 -0
- package/dist/generators/gsd-converter.d.ts.map +1 -0
- package/dist/generators/gsd-converter.js +335 -0
- package/dist/generators/gsd-converter.js.map +1 -0
- package/dist/templates/.claude/rules/api-patterns.md.template +212 -0
- package/dist/templates/.claude/rules/security-baseline.md.template +322 -0
- package/dist/templates/.claude/rules/testing-standards.md.template +280 -0
- package/dist/templates/.claude/rules/ui-conventions.md.template +264 -0
- package/dist/templates/.planning/forge.config.json.template +75 -0
- package/dist/templates/CLAUDE.md.template +161 -0
- package/dist/templates/PLAN.md.template +177 -0
- package/dist/templates/PROJECT.md.template +156 -0
- package/dist/templates/REQUIREMENTS.md.template +221 -0
- package/dist/templates/ROADMAP.md.template +130 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -5
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/template-client.d.ts.map +1 -1
- package/dist/utils/template-client.js +3 -2
- package/dist/utils/template-client.js.map +1 -1
- package/package.json +6 -4
- package/.claude/commands/forge/resume-work.md +0 -122
- package/dist/git/__tests__/worktree.test.d.ts +0 -5
- package/dist/git/__tests__/worktree.test.d.ts.map +0 -1
- package/dist/git/__tests__/worktree.test.js +0 -121
- package/dist/git/__tests__/worktree.test.js.map +0 -1
- package/dist/git/codeowners.d.ts +0 -101
- package/dist/git/codeowners.d.ts.map +0 -1
- package/dist/git/codeowners.js +0 -216
- package/dist/git/codeowners.js.map +0 -1
- package/dist/git/commit.d.ts +0 -135
- package/dist/git/commit.d.ts.map +0 -1
- package/dist/git/commit.js +0 -223
- package/dist/git/commit.js.map +0 -1
- package/dist/git/hooks/commit-msg.d.ts +0 -8
- package/dist/git/hooks/commit-msg.d.ts.map +0 -1
- package/dist/git/hooks/commit-msg.js +0 -34
- package/dist/git/hooks/commit-msg.js.map +0 -1
- package/dist/git/hooks/pre-commit.d.ts +0 -8
- package/dist/git/hooks/pre-commit.d.ts.map +0 -1
- package/dist/git/hooks/pre-commit.js +0 -34
- package/dist/git/hooks/pre-commit.js.map +0 -1
- package/dist/git/pre-commit-hooks.d.ts +0 -117
- package/dist/git/pre-commit-hooks.d.ts.map +0 -1
- package/dist/git/pre-commit-hooks.js +0 -270
- package/dist/git/pre-commit-hooks.js.map +0 -1
- package/dist/git/wipe-protocol.d.ts +0 -281
- package/dist/git/wipe-protocol.d.ts.map +0 -1
- package/dist/git/wipe-protocol.js +0 -237
- package/dist/git/wipe-protocol.js.map +0 -1
- package/dist/git/worktree.d.ts +0 -69
- package/dist/git/worktree.d.ts.map +0 -1
- package/dist/git/worktree.js +0 -202
- package/dist/git/worktree.js.map +0 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Roadmap — {{projectName}}
|
|
2
|
+
|
|
3
|
+
> Current Status: {{currentStatus}} | Last Updated: {{timestamp}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Project Status
|
|
8
|
+
|
|
9
|
+
{{#if projectStatus}}
|
|
10
|
+
- **Current Milestone:** {{projectStatus.currentMilestone}}
|
|
11
|
+
- **Current Phase:** {{projectStatus.currentPhase}}
|
|
12
|
+
- **Overall Progress:** {{projectStatus.progress}}%
|
|
13
|
+
- **Estimated Completion:** {{projectStatus.estimatedCompletion}}
|
|
14
|
+
{{/if}}
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Milestone Overview
|
|
19
|
+
|
|
20
|
+
{{#each milestones}}
|
|
21
|
+
### {{this.name}}
|
|
22
|
+
{{this.description}}
|
|
23
|
+
|
|
24
|
+
- **Status:** {{this.status}}
|
|
25
|
+
- **Duration:** {{this.duration}}
|
|
26
|
+
- **Dependencies:** {{#if this.dependencies}}{{this.dependencies}}{{else}}None{{/if}}
|
|
27
|
+
- **Deliverables:**
|
|
28
|
+
{{#each this.deliverables}}
|
|
29
|
+
- {{this}}
|
|
30
|
+
{{/each}}
|
|
31
|
+
|
|
32
|
+
{{/each}}
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Phase Breakdown
|
|
37
|
+
|
|
38
|
+
{{#each phases}}
|
|
39
|
+
### Phase {{@index}}: {{this.name}}
|
|
40
|
+
|
|
41
|
+
{{this.description}}
|
|
42
|
+
|
|
43
|
+
**Duration:** {{this.duration}}
|
|
44
|
+
**Dependencies:** {{#if this.dependencies}}{{this.dependencies}}{{else}}None{{/if}}
|
|
45
|
+
|
|
46
|
+
#### Tasks
|
|
47
|
+
{{#each this.tasks}}
|
|
48
|
+
- **[{{this.status}}]** {{this.id}} — {{this.name}} ({{this.owner}})
|
|
49
|
+
{{/each}}
|
|
50
|
+
|
|
51
|
+
#### Deliverables
|
|
52
|
+
{{#each this.deliverables}}
|
|
53
|
+
- {{this}}
|
|
54
|
+
{{/each}}
|
|
55
|
+
|
|
56
|
+
{{#if this.notes}}
|
|
57
|
+
**Notes:**
|
|
58
|
+
{{this.notes}}
|
|
59
|
+
{{/if}}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
{{/each}}
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Dependency Graph
|
|
68
|
+
|
|
69
|
+
```mermaid
|
|
70
|
+
graph TD
|
|
71
|
+
{{#each dependencyGraph}}
|
|
72
|
+
{{this.from}}[{{this.fromLabel}}] --> {{this.to}}[{{this.toLabel}}]
|
|
73
|
+
{{/each}}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Risk Register
|
|
79
|
+
|
|
80
|
+
{{#if risks}}
|
|
81
|
+
| Risk | Impact | Probability | Mitigation | Owner |
|
|
82
|
+
|------|--------|-------------|------------|-------|
|
|
83
|
+
{{#each risks}}
|
|
84
|
+
| {{this.description}} | {{this.impact}} | {{this.probability}} | {{this.mitigation}} | {{this.owner}} |
|
|
85
|
+
{{/each}}
|
|
86
|
+
{{/if}}
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Upcoming Work
|
|
91
|
+
|
|
92
|
+
### Next Sprint
|
|
93
|
+
{{#if nextSprint}}
|
|
94
|
+
{{#each nextSprint}}
|
|
95
|
+
- **{{this.task}}** — {{this.description}} ({{this.owner}})
|
|
96
|
+
{{/each}}
|
|
97
|
+
{{/if}}
|
|
98
|
+
|
|
99
|
+
### Backlog
|
|
100
|
+
{{#if backlog}}
|
|
101
|
+
{{#each backlog}}
|
|
102
|
+
- **[{{this.priority}}]** {{this.name}} — {{this.description}}
|
|
103
|
+
{{/each}}
|
|
104
|
+
{{/if}}
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Definition of Done
|
|
109
|
+
|
|
110
|
+
A milestone is considered complete when:
|
|
111
|
+
|
|
112
|
+
{{#each definitionOfDone}}
|
|
113
|
+
{{@index}}. {{this}}
|
|
114
|
+
{{/each}}
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Changes & Decisions
|
|
119
|
+
|
|
120
|
+
{{#if changes}}
|
|
121
|
+
### Recent Changes
|
|
122
|
+
{{#each changes}}
|
|
123
|
+
- **[{{this.date}}]** {{this.description}} — *{{this.author}}*
|
|
124
|
+
{{/each}}
|
|
125
|
+
{{/if}}
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
> **Version:** {{version}}
|
|
130
|
+
> **Last Updated:** {{timestamp}}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FORGE Utility Exports
|
|
3
3
|
*/
|
|
4
|
-
export * from './config';
|
|
5
|
-
export * from './errors';
|
|
6
|
-
export * from './logger';
|
|
7
|
-
export * from './state-api';
|
|
8
|
-
export * from './template-client';
|
|
4
|
+
export * from './config.js';
|
|
5
|
+
export * from './errors.js';
|
|
6
|
+
export * from './logger.js';
|
|
7
|
+
export * from './state-api.js';
|
|
8
|
+
export * from './template-client.js';
|
|
9
9
|
export type { ForgeConfig, ForgeMode, ForgeDepth, GitStrategy, AgentProfile } from '../types/config.js';
|
|
10
10
|
export type { ForgeState, Task, TaskStatus, Contract, EventPayload, EventType } from '../types/state.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AAGrC,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxG,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FORGE Utility Exports
|
|
3
3
|
*/
|
|
4
|
-
export * from './config';
|
|
5
|
-
export * from './errors';
|
|
6
|
-
export * from './logger';
|
|
7
|
-
export * from './state-api';
|
|
8
|
-
export * from './template-client';
|
|
4
|
+
export * from './config.js';
|
|
5
|
+
export * from './errors.js';
|
|
6
|
+
export * from './logger.js';
|
|
7
|
+
export * from './state-api.js';
|
|
8
|
+
export * from './template-client.js';
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-client.d.ts","sourceRoot":"","sources":["../../src/utils/template-client.ts"],"names":[],"mappings":"AAAA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,EAAE,gBAAgB,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE;IAIrH;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,EAAE;IAIvD;;OAEG;IACG,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAiBpG;;OAEG;IACG,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBtH;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM;IAM9C;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAY/B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;OAEG;YACW,UAAU;IASxB;;OAEG;YACW,UAAU;IAMxB;;OAEG;YACW,aAAa;CAS5B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAEjF"}
|
|
@@ -20,9 +20,10 @@ export class TemplateClient {
|
|
|
20
20
|
this.projectRoot = config.projectRoot;
|
|
21
21
|
this.interactive = config.interactive ?? true;
|
|
22
22
|
this.outputDir = config.outputDir ?? config.projectRoot;
|
|
23
|
-
// Create template engine
|
|
23
|
+
// Create template engine — resolve templates from package install dir or project root
|
|
24
|
+
const packageTemplatesDir = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..', 'templates');
|
|
24
25
|
this.engine = createTemplateEngine({
|
|
25
|
-
templatesDir: config.templatesDir ??
|
|
26
|
+
templatesDir: config.templatesDir ?? packageTemplatesDir,
|
|
26
27
|
outputDir: this.outputDir,
|
|
27
28
|
tokenLimits: {
|
|
28
29
|
claude: 2000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-client.js","sourceRoot":"","sources":["../../src/utils/template-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAkF,MAAM,wBAAwB,CAAC;AAC9I,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAyB,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAYpC;;GAEG;AACH,MAAM,OAAO,cAAc;IACjB,MAAM,CAAiB;IACvB,WAAW,CAAS;IACpB,WAAW,CAAU;IACrB,SAAS,CAAS;IAE1B,YAAY,MAA4B;QACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC;QAC9C,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,WAAW,CAAC;QAExD,
|
|
1
|
+
{"version":3,"file":"template-client.js","sourceRoot":"","sources":["../../src/utils/template-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAkF,MAAM,wBAAwB,CAAC;AAC9I,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAyB,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAYpC;;GAEG;AACH,MAAM,OAAO,cAAc;IACjB,MAAM,CAAiB;IACvB,WAAW,CAAS;IACpB,WAAW,CAAU;IACrB,SAAS,CAAS;IAE1B,YAAY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C;QACtD,CAAC;QAED,qCAAqC;QACrC,2BAA2B;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAA4B;IAC/D,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-dev-framework",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Full Orchestration for Rapid Git Engineering - A multi-agent development framework for Claude Code Agent Teams",
|
|
5
5
|
"main": "dist/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,16 +8,18 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist/",
|
|
11
|
-
".claude/",
|
|
12
|
-
"
|
|
11
|
+
".claude/commands/",
|
|
12
|
+
".claude/hooks/",
|
|
13
|
+
".claude/rules/",
|
|
13
14
|
"bin/"
|
|
14
15
|
],
|
|
15
16
|
"type": "module",
|
|
16
17
|
"scripts": {
|
|
17
18
|
"prepublishOnly": "npm run build",
|
|
18
|
-
"build": "npm run build:ts && npm run build:bin",
|
|
19
|
+
"build": "npm run build:ts && npm run build:bin && npm run build:templates",
|
|
19
20
|
"build:ts": "tsc",
|
|
20
21
|
"build:bin": "mkdir -p dist/bin && cp bin/forge.js dist/bin/forge.js && chmod +x dist/bin/forge.js",
|
|
22
|
+
"build:templates": "mkdir -p dist/templates && rsync -a src/templates/ dist/templates/",
|
|
21
23
|
"dev": "tsx src/cli/index.ts",
|
|
22
24
|
"start": "node dist/cli/index.js",
|
|
23
25
|
"test": "vitest run",
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: forge:resume-work
|
|
3
|
-
description: Resume work from previous session with full context restoration
|
|
4
|
-
argument-hint: ""
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Bash
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<objective>
|
|
12
|
-
Resume work from a previous pause by loading the `.continue-here.md` handoff file.
|
|
13
|
-
|
|
14
|
-
Restores complete context including position, completed work, remaining work, decisions, and blockers.
|
|
15
|
-
</objective>
|
|
16
|
-
|
|
17
|
-
<execution_context>
|
|
18
|
-
@.continue-here.md
|
|
19
|
-
@state/STATE.json
|
|
20
|
-
@CLAUDE.md
|
|
21
|
-
</execution_context>
|
|
22
|
-
|
|
23
|
-
<context>
|
|
24
|
-
**Resume Work Workflow:**
|
|
25
|
-
1. Check for `.continue-here.md` file
|
|
26
|
-
2. Load and display handoff contents
|
|
27
|
-
3. Restore context from handoff
|
|
28
|
-
4. Identify next steps
|
|
29
|
-
5. Offer to continue work
|
|
30
|
-
</context>
|
|
31
|
-
|
|
32
|
-
<process>
|
|
33
|
-
**Execute resume-work workflow:**
|
|
34
|
-
|
|
35
|
-
1. **Check for Handoff File**
|
|
36
|
-
```bash
|
|
37
|
-
if [ -f .continue-here.md ]; then
|
|
38
|
-
echo "Found handoff file"
|
|
39
|
-
else
|
|
40
|
-
echo "No .continue-here.md found. Check STATE.json for last phase."
|
|
41
|
-
exit 1
|
|
42
|
-
fi
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
2. **Load Handoff**
|
|
46
|
-
- Read `.continue-here.md`
|
|
47
|
-
- Parse all sections
|
|
48
|
-
- Extract phase name and status
|
|
49
|
-
|
|
50
|
-
3. **Display Context**
|
|
51
|
-
```
|
|
52
|
-
════════════════════════════════════════════════════════
|
|
53
|
-
RESUMING WORK
|
|
54
|
-
════════════════════════════════════════════════════════
|
|
55
|
-
|
|
56
|
-
Phase: {phase-name}
|
|
57
|
-
Status: {status}
|
|
58
|
-
Paused: {timestamp}
|
|
59
|
-
|
|
60
|
-
───────────────────────────────────────────────────────────
|
|
61
|
-
POSITION
|
|
62
|
-
───────────────────────────────────────────────────────────
|
|
63
|
-
{current position}
|
|
64
|
-
|
|
65
|
-
───────────────────────────────────────────────────────────
|
|
66
|
-
COMPLETED WORK
|
|
67
|
-
───────────────────────────────────────────────────────────
|
|
68
|
-
✓ {completed item 1}
|
|
69
|
-
✓ {completed item 2}
|
|
70
|
-
|
|
71
|
-
───────────────────────────────────────────────────────────
|
|
72
|
-
REMAINING WORK
|
|
73
|
-
───────────────────────────────────────────────────────────
|
|
74
|
-
○ {remaining item 1}
|
|
75
|
-
○ {remaining item 2}
|
|
76
|
-
|
|
77
|
-
───────────────────────────────────────────────────────────
|
|
78
|
-
DECISIONS MADE
|
|
79
|
-
───────────────────────────────────────────────────────────
|
|
80
|
-
{decisions}
|
|
81
|
-
|
|
82
|
-
───────────────────────────────────────────────────────────
|
|
83
|
-
BLOCKERS
|
|
84
|
-
───────────────────────────────────────────────────────────
|
|
85
|
-
{blockers}
|
|
86
|
-
|
|
87
|
-
════════════════════════════════════════════════════════
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
4. **Confirm Ready to Continue**
|
|
91
|
-
- Ask: "Ready to continue work?"
|
|
92
|
-
- If yes: Proceed
|
|
93
|
-
- If no: Exit, handoff file preserved
|
|
94
|
-
|
|
95
|
-
5. **Submit Event**
|
|
96
|
-
- Event type: WORK_RESUMED
|
|
97
|
-
- Include: phaseId, handoffFile, timestamp
|
|
98
|
-
- Write to state/events/
|
|
99
|
-
|
|
100
|
-
6. **Route to Next Action**
|
|
101
|
-
- Suggest: `forge execute <phase>` to continue execution
|
|
102
|
-
- Or: Manual work based on next steps
|
|
103
|
-
- Or: `forge discuss <phase>` to gather more context
|
|
104
|
-
</process>
|
|
105
|
-
|
|
106
|
-
<deliverables>
|
|
107
|
-
- Context restored from .continue-here.md
|
|
108
|
-
- Event: WORK_RESUMED in state/events/
|
|
109
|
-
- STATE.json updated
|
|
110
|
-
</deliverables>
|
|
111
|
-
|
|
112
|
-
<next_steps>
|
|
113
|
-
- Continue execution: `forge execute <phase>`
|
|
114
|
-
- Update plan if needed: `forge plan <phase>`
|
|
115
|
-
- Or proceed with manual work based on next steps
|
|
116
|
-
</next_steps>
|
|
117
|
-
|
|
118
|
-
<cleanup>
|
|
119
|
-
After successfully resuming and completing work:
|
|
120
|
-
- Remove .continue-here.md
|
|
121
|
-
- Submit WORK_COMPLETED event
|
|
122
|
-
</cleanup>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.test.d.ts","sourceRoot":"","sources":["../../../src/git/__tests__/worktree.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for Git Worktree Management
|
|
3
|
-
*/
|
|
4
|
-
import { describe, it, before, after } from "node:test";
|
|
5
|
-
import assert from "node/assert";
|
|
6
|
-
import { execa } from "execa";
|
|
7
|
-
import { createWorktree, getWorktree, mergeWorktree, cleanupWorktree, listWorktrees, WorktreeError, } from "../worktree.js";
|
|
8
|
-
describe("Git Worktree Management", () => {
|
|
9
|
-
const testTaskId = "test-task-001";
|
|
10
|
-
const testBaseBranch = "main";
|
|
11
|
-
before(async () => {
|
|
12
|
-
// Initialize a test git repository if needed
|
|
13
|
-
try {
|
|
14
|
-
await execa("git", ["status"]);
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
// Not in a git repo, skip tests
|
|
18
|
-
console.log("Not in a git repository, skipping worktree tests");
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
describe("createWorktree", () => {
|
|
22
|
-
it("should create a new worktree with branch forge/{taskId}", async () => {
|
|
23
|
-
const result = await createWorktree({ taskId: testTaskId });
|
|
24
|
-
assert.ok(result.includes(".worktrees"));
|
|
25
|
-
assert.ok(result.includes(testTaskId));
|
|
26
|
-
});
|
|
27
|
-
it("should use custom branch name if provided", async () => {
|
|
28
|
-
const customBranch = "custom-branch";
|
|
29
|
-
const result = await createWorktree({
|
|
30
|
-
taskId: "custom-task",
|
|
31
|
-
branchName: customBranch,
|
|
32
|
-
});
|
|
33
|
-
assert.ok(result.includes("custom-task"));
|
|
34
|
-
});
|
|
35
|
-
it("should throw WorktreeError on failure", async () => {
|
|
36
|
-
try {
|
|
37
|
-
// Try to create duplicate worktree
|
|
38
|
-
await createWorktree({ taskId: testTaskId });
|
|
39
|
-
assert.fail("Should have thrown WorktreeError");
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
assert.ok(error instanceof WorktreeError);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
describe("getWorktree", () => {
|
|
47
|
-
it("should return worktree info for existing task", async () => {
|
|
48
|
-
const info = await getWorktree(testTaskId);
|
|
49
|
-
assert.ok(info);
|
|
50
|
-
assert.equal(info.taskId, testTaskId);
|
|
51
|
-
assert.ok(info.branchName);
|
|
52
|
-
assert.ok(info.path);
|
|
53
|
-
assert.ok(info.commit);
|
|
54
|
-
});
|
|
55
|
-
it("should return null for non-existent task", async () => {
|
|
56
|
-
const info = await getWorktree("non-existent-task");
|
|
57
|
-
assert.equal(info, null);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
describe("listWorktrees", () => {
|
|
61
|
-
it("should return array of worktree info", async () => {
|
|
62
|
-
const worktrees = await listWorktrees();
|
|
63
|
-
assert.ok(Array.isArray(worktrees));
|
|
64
|
-
assert.ok(worktrees.length > 0);
|
|
65
|
-
assert.ok(worktrees.some((w) => w.taskId === testTaskId));
|
|
66
|
-
});
|
|
67
|
-
it("should only include FORGE worktrees (.worktrees/)", async () => {
|
|
68
|
-
const worktrees = await listWorktrees();
|
|
69
|
-
for (const worktree of worktrees) {
|
|
70
|
-
assert.ok(worktree.path.includes(".worktrees"));
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
describe("cleanupWorktree", () => {
|
|
75
|
-
it("should remove an existing worktree", async () => {
|
|
76
|
-
await cleanupWorktree(testTaskId);
|
|
77
|
-
const info = await getWorktree(testTaskId);
|
|
78
|
-
assert.equal(info, null);
|
|
79
|
-
});
|
|
80
|
-
it("should not error when cleaning up non-existent worktree", async () => {
|
|
81
|
-
// Should not throw
|
|
82
|
-
await cleanupWorktree("non-existent-task");
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
describe("mergeWorktree", () => {
|
|
86
|
-
it("should merge worktree branch into target branch", async () => {
|
|
87
|
-
// Create a test worktree
|
|
88
|
-
const taskId = "merge-test-001";
|
|
89
|
-
await createWorktree({ taskId });
|
|
90
|
-
// Make a change in the worktree
|
|
91
|
-
// (This would require file operations, simplified here)
|
|
92
|
-
// Merge the worktree
|
|
93
|
-
try {
|
|
94
|
-
await mergeWorktree(taskId, "main");
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
// Merge might fail if no changes or conflicts, that's ok for test
|
|
98
|
-
assert.ok(error instanceof WorktreeError);
|
|
99
|
-
}
|
|
100
|
-
// Cleanup
|
|
101
|
-
await cleanupWorktree(taskId);
|
|
102
|
-
});
|
|
103
|
-
it("should throw WorktreeError for non-existent worktree", async () => {
|
|
104
|
-
try {
|
|
105
|
-
await mergeWorktree("non-existent-task");
|
|
106
|
-
assert.fail("Should have thrown WorktreeError");
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
assert.ok(error instanceof WorktreeError);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
after(async () => {
|
|
114
|
-
// Clean up test worktrees
|
|
115
|
-
try {
|
|
116
|
-
await cleanupWorktree(testTaskId);
|
|
117
|
-
}
|
|
118
|
-
catch { }
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
//# sourceMappingURL=worktree.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.test.js","sourceRoot":"","sources":["../../../src/git/__tests__/worktree.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,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cAAc,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YAEjC,gCAAgC;YAChC,wDAAwD;YAExD,qBAAqB;YACrB,IAAI,CAAC;gBACH,MAAM,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACtC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,kEAAkE;gBAClE,MAAM,CAAC,EAAE,CAAC,KAAK,YAAY,aAAa,CAAC,CAAC;YAC5C,CAAC;YAED,UAAU;YACV,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,sDAAsD,EAAE,KAAK,IAAI,EAAE;YACpE,IAAI,CAAC;gBACH,MAAM,aAAa,CAAC,mBAAmB,CAAC,CAAC;gBACzC,MAAM,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;YAClD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,EAAE,CAAC,KAAK,YAAY,aAAa,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,KAAK,IAAI,EAAE;QACf,0BAA0B;QAC1B,IAAI,CAAC;YACH,MAAM,eAAe,CAAC,UAAU,CAAC,CAAC;QACpC,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/git/codeowners.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate .github/CODEOWNERS from task ownership maps.
|
|
3
|
-
*
|
|
4
|
-
* The CODEOWNERS file defines canonical ownership for code paths.
|
|
5
|
-
* GitHub enforces this at merge time - changes require owner approval.
|
|
6
|
-
*
|
|
7
|
-
* Generated format:
|
|
8
|
-
* # Auto-generated by FORGE
|
|
9
|
-
* src/api/** @backend-agent
|
|
10
|
-
* src/ui/** @frontend-agent
|
|
11
|
-
* src/tests/** @qa-agent
|
|
12
|
-
* docs/** @docs-agent
|
|
13
|
-
*/
|
|
14
|
-
export interface TaskOwnership {
|
|
15
|
-
id: string;
|
|
16
|
-
ownerRole: string;
|
|
17
|
-
allowedPaths: string[];
|
|
18
|
-
}
|
|
19
|
-
export interface StateForCodeowners {
|
|
20
|
-
tasks: TaskOwnership[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Generate CODEOWNERS content from task ownership.
|
|
24
|
-
*
|
|
25
|
-
* Aggregates allowedPaths by owner role and formats for GitHub.
|
|
26
|
-
*
|
|
27
|
-
* @param state - FORGE state with task ownership
|
|
28
|
-
* @returns CODEOWNERS file content
|
|
29
|
-
*/
|
|
30
|
-
export declare function generateCodeownersContent(state: StateForCodeowners): string;
|
|
31
|
-
/**
|
|
32
|
-
* Write CODEOWNERS file to disk.
|
|
33
|
-
*
|
|
34
|
-
* @param state - FORGE state with task ownership
|
|
35
|
-
* @param basePath - Root of the FORGE project
|
|
36
|
-
* @param forceOverwrite - Whether to overwrite existing file
|
|
37
|
-
* @throws Error if file exists and forceOverwrite is false
|
|
38
|
-
*/
|
|
39
|
-
export declare function writeCodeowners(state: StateForCodeowners, basePath?: string, forceOverwrite?: boolean): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Parse existing CODEOWNERS file.
|
|
42
|
-
*
|
|
43
|
-
* Useful for validating or diffing against generated content.
|
|
44
|
-
*
|
|
45
|
-
* @param content - CODEOWNERS file content
|
|
46
|
-
* @returns Parsed entries
|
|
47
|
-
*/
|
|
48
|
-
export interface CodeownersEntry {
|
|
49
|
-
pattern: string;
|
|
50
|
-
owner: string;
|
|
51
|
-
}
|
|
52
|
-
export declare function parseCodeowners(content: string): CodeownersEntry[];
|
|
53
|
-
/**
|
|
54
|
-
* Validate CODEOWNERS entries.
|
|
55
|
-
*
|
|
56
|
-
* Checks for:
|
|
57
|
-
* - Overlapping patterns (conflicting ownership)
|
|
58
|
-
* - Invalid patterns
|
|
59
|
-
* - Missing owners
|
|
60
|
-
*
|
|
61
|
-
* @param entries - Parsed CODEOWNERS entries
|
|
62
|
-
* @returns Validation result with errors
|
|
63
|
-
*/
|
|
64
|
-
export interface ValidationError {
|
|
65
|
-
type: "overlap" | "invalid-pattern" | "missing-owner";
|
|
66
|
-
message: string;
|
|
67
|
-
entries?: CodeownersEntry[];
|
|
68
|
-
}
|
|
69
|
-
export declare function validateCodeowners(entries: CodeownersEntry[]): {
|
|
70
|
-
isValid: boolean;
|
|
71
|
-
errors: ValidationError[];
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Diff two CODEOWNERS configurations.
|
|
75
|
-
*
|
|
76
|
-
* Useful for showing what would change before regenerating.
|
|
77
|
-
*
|
|
78
|
-
* @param current - Current CODEOWNERS content
|
|
79
|
-
* @param proposed - Proposed CODEOWNERS content
|
|
80
|
-
* @returns Diff with additions, removals, and changes
|
|
81
|
-
*/
|
|
82
|
-
export interface CodeownersDiff {
|
|
83
|
-
added: CodeownersEntry[];
|
|
84
|
-
removed: CodeownersEntry[];
|
|
85
|
-
changed: Array<{
|
|
86
|
-
from: CodeownersEntry;
|
|
87
|
-
to: CodeownersEntry;
|
|
88
|
-
}>;
|
|
89
|
-
}
|
|
90
|
-
export declare function diffCodeowners(current: string, proposed: string): CodeownersDiff;
|
|
91
|
-
/**
|
|
92
|
-
* Generate CODEOWNERS from STATE.json file.
|
|
93
|
-
*
|
|
94
|
-
* This is the main entry point for CODEOWNERS generation.
|
|
95
|
-
*
|
|
96
|
-
* @param stateJsonPath - Path to STATE.json
|
|
97
|
-
* @param basePath - Root of the FORGE project
|
|
98
|
-
* @param forceOverwrite - Whether to overwrite existing file
|
|
99
|
-
*/
|
|
100
|
-
export declare function generateCodeownersFromState(stateJsonPath: string, basePath?: string, forceOverwrite?: boolean): Promise<void>;
|
|
101
|
-
//# sourceMappingURL=codeowners.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeowners.d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