@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.
Files changed (118) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +252 -0
  3. package/SKILL.md +250 -0
  4. package/assets/.harnessrc +10 -0
  5. package/assets/PHASE-task.json.example +50 -0
  6. package/assets/design.md +69 -0
  7. package/assets/hooks.json +15 -0
  8. package/assets/product-requirement.md +82 -0
  9. package/assets/schema.json +127 -0
  10. package/assets/tasks.md +26 -0
  11. package/dist/commands/analyze.d.ts +32 -0
  12. package/dist/commands/analyze.js +338 -0
  13. package/dist/commands/archive.d.ts +11 -0
  14. package/dist/commands/archive.js +53 -0
  15. package/dist/commands/design.d.ts +38 -0
  16. package/dist/commands/design.js +492 -0
  17. package/dist/commands/extract.d.ts +31 -0
  18. package/dist/commands/extract.js +477 -0
  19. package/dist/commands/init.d.ts +24 -0
  20. package/dist/commands/init.js +165 -0
  21. package/dist/commands/merge/index.d.ts +17 -0
  22. package/dist/commands/merge/index.js +322 -0
  23. package/dist/commands/merge/merger.d.ts +18 -0
  24. package/dist/commands/merge/merger.js +151 -0
  25. package/dist/commands/merge/types.d.ts +67 -0
  26. package/dist/commands/merge/types.js +6 -0
  27. package/dist/commands/merge/validators.d.ts +14 -0
  28. package/dist/commands/merge/validators.js +147 -0
  29. package/dist/commands/merge.d.ts +7 -0
  30. package/dist/commands/merge.js +15 -0
  31. package/dist/commands/start.d.ts +32 -0
  32. package/dist/commands/start.js +265 -0
  33. package/dist/commands/status.d.ts +15 -0
  34. package/dist/commands/status.js +143 -0
  35. package/dist/commands/sync.d.ts +11 -0
  36. package/dist/commands/sync.js +58 -0
  37. package/dist/commands/tasks-gen/doc-parser.d.ts +7 -0
  38. package/dist/commands/tasks-gen/doc-parser.js +259 -0
  39. package/dist/commands/tasks-gen/generators.d.ts +33 -0
  40. package/dist/commands/tasks-gen/generators.js +141 -0
  41. package/dist/commands/tasks-gen/index.d.ts +30 -0
  42. package/dist/commands/tasks-gen/index.js +345 -0
  43. package/dist/commands/tasks-gen/parsers.d.ts +29 -0
  44. package/dist/commands/tasks-gen/parsers.js +272 -0
  45. package/dist/commands/tasks-gen/templates.d.ts +8 -0
  46. package/dist/commands/tasks-gen/templates.js +37 -0
  47. package/dist/commands/tasks-gen/types.d.ts +71 -0
  48. package/dist/commands/tasks-gen/types.js +17 -0
  49. package/dist/commands/tasks-gen/validators.d.ts +14 -0
  50. package/dist/commands/tasks-gen/validators.js +54 -0
  51. package/dist/commands/tasks.d.ts +9 -0
  52. package/dist/commands/tasks.js +22 -0
  53. package/dist/commands/worktree.d.ts +28 -0
  54. package/dist/commands/worktree.js +275 -0
  55. package/dist/hooks/check-prd-exists.d.ts +20 -0
  56. package/dist/hooks/check-prd-exists.js +61 -0
  57. package/dist/hooks/check-worktree-conflict.d.ts +34 -0
  58. package/dist/hooks/check-worktree-conflict.js +107 -0
  59. package/dist/hooks/hook-runner/executor.d.ts +18 -0
  60. package/dist/hooks/hook-runner/executor.js +143 -0
  61. package/dist/hooks/hook-runner/index.d.ts +64 -0
  62. package/dist/hooks/hook-runner/index.js +220 -0
  63. package/dist/hooks/hook-runner/loader.d.ts +23 -0
  64. package/dist/hooks/hook-runner/loader.js +126 -0
  65. package/dist/hooks/hook-runner/types.d.ts +59 -0
  66. package/dist/hooks/hook-runner/types.js +6 -0
  67. package/dist/hooks/hook-runner.d.ts +9 -0
  68. package/dist/hooks/hook-runner.js +30 -0
  69. package/dist/hooks/phase-complete-detector.d.ts +35 -0
  70. package/dist/hooks/phase-complete-detector.js +203 -0
  71. package/dist/hooks/phase-gate-validator.d.ts +76 -0
  72. package/dist/hooks/phase-gate-validator.js +407 -0
  73. package/dist/hooks/save-checkpoint.d.ts +43 -0
  74. package/dist/hooks/save-checkpoint.js +144 -0
  75. package/dist/hooks/start-mcp-servers.d.ts +50 -0
  76. package/dist/hooks/start-mcp-servers.js +75 -0
  77. package/dist/hooks/stop-mcp-servers.d.ts +40 -0
  78. package/dist/hooks/stop-mcp-servers.js +58 -0
  79. package/dist/index.d.ts +29 -0
  80. package/dist/index.js +238 -0
  81. package/dist/lib/archive.d.ts +31 -0
  82. package/dist/lib/archive.js +226 -0
  83. package/dist/lib/config.d.ts +93 -0
  84. package/dist/lib/config.js +251 -0
  85. package/dist/lib/constants.d.ts +222 -0
  86. package/dist/lib/constants.js +247 -0
  87. package/dist/lib/interactive.d.ts +31 -0
  88. package/dist/lib/interactive.js +166 -0
  89. package/dist/lib/mcp-client.d.ts +156 -0
  90. package/dist/lib/mcp-client.js +370 -0
  91. package/dist/lib/state.d.ts +119 -0
  92. package/dist/lib/state.js +293 -0
  93. package/dist/slash/executor.d.ts +22 -0
  94. package/dist/slash/executor.js +259 -0
  95. package/dist/slash/index.d.ts +11 -0
  96. package/dist/slash/index.js +45 -0
  97. package/dist/slash/parser.d.ts +24 -0
  98. package/dist/slash/parser.js +101 -0
  99. package/dist/slash/registry.d.ts +22 -0
  100. package/dist/slash/registry.js +155 -0
  101. package/dist/spec/openspec-to-task/builders.d.ts +107 -0
  102. package/dist/spec/openspec-to-task/builders.js +138 -0
  103. package/dist/spec/openspec-to-task/index.d.ts +20 -0
  104. package/dist/spec/openspec-to-task/index.js +182 -0
  105. package/dist/spec/openspec-to-task/parsers.d.ts +65 -0
  106. package/dist/spec/openspec-to-task/parsers.js +232 -0
  107. package/dist/spec/openspec-to-task/types.d.ts +49 -0
  108. package/dist/spec/openspec-to-task/types.js +6 -0
  109. package/dist/spec/sync-openspec-to-task.d.ts +7 -0
  110. package/dist/spec/sync-openspec-to-task.js +21 -0
  111. package/dist/spec/sync-task-to-openspec.d.ts +27 -0
  112. package/dist/spec/sync-task-to-openspec.js +288 -0
  113. package/dist/types/ai-context.d.ts +108 -0
  114. package/dist/types/ai-context.js +9 -0
  115. package/package.json +66 -0
  116. package/references/AI-CONVERSATION-TUTORIAL.md +270 -0
  117. package/references/CLI-TUTORIAL.md +447 -0
  118. 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