@bicorne/task-flow 0.1.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/LICENSE +21 -0
- package/README.md +252 -0
- package/SKILL.md +250 -0
- package/assets/.harnessrc +10 -0
- package/assets/PHASE-task.json.example +50 -0
- package/assets/design.md +69 -0
- package/assets/hooks.json +15 -0
- package/assets/product-requirement.md +82 -0
- package/assets/schema.json +127 -0
- package/assets/tasks.md +26 -0
- package/dist/commands/analyze.d.ts +32 -0
- package/dist/commands/analyze.js +338 -0
- package/dist/commands/archive.d.ts +11 -0
- package/dist/commands/archive.js +53 -0
- package/dist/commands/design.d.ts +38 -0
- package/dist/commands/design.js +492 -0
- package/dist/commands/extract.d.ts +31 -0
- package/dist/commands/extract.js +477 -0
- package/dist/commands/init.d.ts +24 -0
- package/dist/commands/init.js +165 -0
- package/dist/commands/merge/index.d.ts +17 -0
- package/dist/commands/merge/index.js +322 -0
- package/dist/commands/merge/merger.d.ts +18 -0
- package/dist/commands/merge/merger.js +151 -0
- package/dist/commands/merge/types.d.ts +67 -0
- package/dist/commands/merge/types.js +6 -0
- package/dist/commands/merge/validators.d.ts +14 -0
- package/dist/commands/merge/validators.js +147 -0
- package/dist/commands/merge.d.ts +7 -0
- package/dist/commands/merge.js +15 -0
- package/dist/commands/start.d.ts +32 -0
- package/dist/commands/start.js +265 -0
- package/dist/commands/status.d.ts +15 -0
- package/dist/commands/status.js +143 -0
- package/dist/commands/sync.d.ts +11 -0
- package/dist/commands/sync.js +58 -0
- package/dist/commands/tasks-gen/doc-parser.d.ts +7 -0
- package/dist/commands/tasks-gen/doc-parser.js +259 -0
- package/dist/commands/tasks-gen/generators.d.ts +33 -0
- package/dist/commands/tasks-gen/generators.js +141 -0
- package/dist/commands/tasks-gen/index.d.ts +30 -0
- package/dist/commands/tasks-gen/index.js +345 -0
- package/dist/commands/tasks-gen/parsers.d.ts +29 -0
- package/dist/commands/tasks-gen/parsers.js +272 -0
- package/dist/commands/tasks-gen/templates.d.ts +8 -0
- package/dist/commands/tasks-gen/templates.js +37 -0
- package/dist/commands/tasks-gen/types.d.ts +71 -0
- package/dist/commands/tasks-gen/types.js +17 -0
- package/dist/commands/tasks-gen/validators.d.ts +14 -0
- package/dist/commands/tasks-gen/validators.js +54 -0
- package/dist/commands/tasks.d.ts +9 -0
- package/dist/commands/tasks.js +22 -0
- package/dist/commands/worktree.d.ts +28 -0
- package/dist/commands/worktree.js +275 -0
- package/dist/hooks/check-prd-exists.d.ts +20 -0
- package/dist/hooks/check-prd-exists.js +61 -0
- package/dist/hooks/check-worktree-conflict.d.ts +34 -0
- package/dist/hooks/check-worktree-conflict.js +107 -0
- package/dist/hooks/hook-runner/executor.d.ts +18 -0
- package/dist/hooks/hook-runner/executor.js +143 -0
- package/dist/hooks/hook-runner/index.d.ts +64 -0
- package/dist/hooks/hook-runner/index.js +220 -0
- package/dist/hooks/hook-runner/loader.d.ts +23 -0
- package/dist/hooks/hook-runner/loader.js +126 -0
- package/dist/hooks/hook-runner/types.d.ts +59 -0
- package/dist/hooks/hook-runner/types.js +6 -0
- package/dist/hooks/hook-runner.d.ts +9 -0
- package/dist/hooks/hook-runner.js +30 -0
- package/dist/hooks/phase-complete-detector.d.ts +35 -0
- package/dist/hooks/phase-complete-detector.js +203 -0
- package/dist/hooks/phase-gate-validator.d.ts +76 -0
- package/dist/hooks/phase-gate-validator.js +407 -0
- package/dist/hooks/save-checkpoint.d.ts +43 -0
- package/dist/hooks/save-checkpoint.js +144 -0
- package/dist/hooks/start-mcp-servers.d.ts +50 -0
- package/dist/hooks/start-mcp-servers.js +75 -0
- package/dist/hooks/stop-mcp-servers.d.ts +40 -0
- package/dist/hooks/stop-mcp-servers.js +58 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +238 -0
- package/dist/lib/archive.d.ts +31 -0
- package/dist/lib/archive.js +226 -0
- package/dist/lib/config.d.ts +93 -0
- package/dist/lib/config.js +251 -0
- package/dist/lib/constants.d.ts +222 -0
- package/dist/lib/constants.js +247 -0
- package/dist/lib/interactive.d.ts +31 -0
- package/dist/lib/interactive.js +166 -0
- package/dist/lib/mcp-client.d.ts +156 -0
- package/dist/lib/mcp-client.js +370 -0
- package/dist/lib/state.d.ts +119 -0
- package/dist/lib/state.js +293 -0
- package/dist/slash/executor.d.ts +22 -0
- package/dist/slash/executor.js +259 -0
- package/dist/slash/index.d.ts +11 -0
- package/dist/slash/index.js +45 -0
- package/dist/slash/parser.d.ts +24 -0
- package/dist/slash/parser.js +101 -0
- package/dist/slash/registry.d.ts +22 -0
- package/dist/slash/registry.js +155 -0
- package/dist/spec/openspec-to-task/builders.d.ts +107 -0
- package/dist/spec/openspec-to-task/builders.js +138 -0
- package/dist/spec/openspec-to-task/index.d.ts +20 -0
- package/dist/spec/openspec-to-task/index.js +182 -0
- package/dist/spec/openspec-to-task/parsers.d.ts +65 -0
- package/dist/spec/openspec-to-task/parsers.js +232 -0
- package/dist/spec/openspec-to-task/types.d.ts +49 -0
- package/dist/spec/openspec-to-task/types.js +6 -0
- package/dist/spec/sync-openspec-to-task.d.ts +7 -0
- package/dist/spec/sync-openspec-to-task.js +21 -0
- package/dist/spec/sync-task-to-openspec.d.ts +27 -0
- package/dist/spec/sync-task-to-openspec.js +288 -0
- package/dist/types/ai-context.d.ts +108 -0
- package/dist/types/ai-context.js +9 -0
- package/package.json +66 -0
- package/references/AI-CONVERSATION-TUTORIAL.md +270 -0
- package/references/CLI-TUTORIAL.md +447 -0
- package/references/GIT-WORKTREE-SOP.md +109 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Git Worktree SOP
|
|
2
|
+
|
|
3
|
+
Standard Operating Procedure for git worktree management in task-flow.
|
|
4
|
+
|
|
5
|
+
## Applicable Scope
|
|
6
|
+
|
|
7
|
+
This SOP applies to development workflows under task-flow, covering:
|
|
8
|
+
- Main worktree (main branch) Git management
|
|
9
|
+
- Worktree (task branch) Git management
|
|
10
|
+
- Operation boundaries during phase transitions
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Role Boundaries
|
|
15
|
+
|
|
16
|
+
- **Main worktree**: Only for process-level management actions, not task code implementation
|
|
17
|
+
- **Worktree**: Only for corresponding task code changes, verification, and commit preparation
|
|
18
|
+
- **Merge actions**: Executed in the main worktree
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Standard Process
|
|
23
|
+
|
|
24
|
+
### 1. Create Task and Worktree in Main Worktree
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git worktree add .worktrees/harness-feat-<task-id> -b feat/<task-id>-<desc>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Update:
|
|
31
|
+
- `spec/changes/<change-name>/tasks/PHASE-*.json`
|
|
32
|
+
- `.harness/state.json`
|
|
33
|
+
|
|
34
|
+
### 2. Enter Worktree for Implementation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd .worktrees/harness-feat-<task-id>
|
|
38
|
+
git status
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Complete within this directory:
|
|
42
|
+
- Code modifications
|
|
43
|
+
- Build and test
|
|
44
|
+
- Review preparation
|
|
45
|
+
|
|
46
|
+
### 3. Execute Merge and Cleanup in Main Worktree
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd <project-root>
|
|
50
|
+
git merge feat/<task-id>-<desc> --squash
|
|
51
|
+
git worktree remove .worktrees/harness-feat-<task-id>
|
|
52
|
+
git branch -d feat/<task-id>-<desc>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Update:
|
|
56
|
+
- `.harness/state.json` (clean up corresponding worktree and currentTask)
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Must Follow Rules
|
|
61
|
+
|
|
62
|
+
- Do not modify task code directly in main worktree that should be handled by worktree
|
|
63
|
+
- Do not run multiple agents in a single worktree
|
|
64
|
+
- Do not skip lint/build/test validation
|
|
65
|
+
- Do not force merge without resolving conflicts
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Common Troubleshooting
|
|
70
|
+
|
|
71
|
+
### Worktree Creation Failed
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
git worktree prune
|
|
75
|
+
git branch -D <branch>
|
|
76
|
+
git worktree add <path> -b <branch>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Merge Conflict
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git diff --name-only --diff-filter=U
|
|
83
|
+
git merge --abort
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### State File Inconsistent with Reality
|
|
87
|
+
|
|
88
|
+
Order of resolution:
|
|
89
|
+
1. Use `git worktree list` as the source of truth
|
|
90
|
+
2. Correct `.harness/state.json`
|
|
91
|
+
3. Re-check current phase and currentTask
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Checklist
|
|
96
|
+
|
|
97
|
+
Before entering implementation:
|
|
98
|
+
- [ ] Task JSON created
|
|
99
|
+
- [ ] Worktree created with correct branch
|
|
100
|
+
- [ ] state.json recorded current task
|
|
101
|
+
|
|
102
|
+
Before entering review:
|
|
103
|
+
- [ ] Code completed in target worktree
|
|
104
|
+
- [ ] Lint/test passed
|
|
105
|
+
|
|
106
|
+
Before merge:
|
|
107
|
+
- [ ] Main worktree is clean
|
|
108
|
+
- [ ] Target branch is mergeable
|
|
109
|
+
- [ ] state.json can be synchronized
|