cowork-flow 0.0.4 → 0.0.7

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 (41) hide show
  1. package/README.md +44 -1
  2. package/package.json +8 -5
  3. package/src/lib/copy-template.js +9 -9
  4. package/src/lib/package-info.js +8 -2
  5. package/template/.agent/skills/agent-team-execution/SKILL.md +26 -0
  6. package/template/{.superpowers → .agent/skills}/brainstorming/scripts/start-server.sh +0 -0
  7. package/template/{.superpowers → .agent/skills}/brainstorming/scripts/stop-server.sh +0 -0
  8. package/template/.agent/skills/start/SKILL.md +1 -0
  9. package/template/.cowork-flow/.version +1 -1
  10. package/template/.cowork-flow/agent-team/adapters.yaml +15 -0
  11. package/template/.cowork-flow/agent-team/agents.yaml +142 -0
  12. package/template/.cowork-flow/agent-team/policy.yaml +23 -0
  13. package/template/.cowork-flow/config.yaml +9 -0
  14. package/template/.cowork-flow/run +10 -93
  15. package/template/.cowork-flow/run.cmd +12 -115
  16. package/template/.cowork-flow/scripts/agent_team.py +584 -0
  17. package/template/.cowork-flow/scripts/change.py +68 -15
  18. package/template/.cowork-flow/scripts/common/agent_team.py +467 -0
  19. package/template/.cowork-flow/scripts/common/archive_utils.py +72 -0
  20. package/template/.cowork-flow/scripts/common/config.py +18 -0
  21. package/template/.cowork-flow/scripts/common/git_context.py +17 -0
  22. package/template/.cowork-flow/scripts/common/task_utils.py +5 -18
  23. package/template/.cowork-flow/scripts/run.py +92 -0
  24. package/template/.cowork-flow/scripts/task.py +1 -1
  25. package/template/.cowork-flow/workflow.md +65 -158
  26. package/template/.superpowers/executing-plans/SKILL.md +2 -0
  27. package/template/AGENTS.md +3 -2
  28. /package/template/{.superpowers → .agent/skills}/brainstorming/SKILL.md +0 -0
  29. /package/template/{.superpowers → .agent/skills}/brainstorming/scripts/frame-template.html +0 -0
  30. /package/template/{.superpowers → .agent/skills}/brainstorming/scripts/helper.js +0 -0
  31. /package/template/{.superpowers → .agent/skills}/brainstorming/scripts/server.cjs +0 -0
  32. /package/template/{.superpowers → .agent/skills}/brainstorming/spec-document-reviewer-prompt.md +0 -0
  33. /package/template/{.superpowers → .agent/skills}/brainstorming/visual-companion.md +0 -0
  34. /package/template/{.superpowers → .agent/skills}/requesting-code-review/SKILL.md +0 -0
  35. /package/template/{.superpowers → .agent/skills}/requesting-code-review/code-reviewer.md +0 -0
  36. /package/template/{.superpowers → .agent/skills}/subagent-driven-development/SKILL.md +0 -0
  37. /package/template/{.superpowers → .agent/skills}/subagent-driven-development/code-quality-reviewer-prompt.md +0 -0
  38. /package/template/{.superpowers → .agent/skills}/subagent-driven-development/implementer-prompt.md +0 -0
  39. /package/template/{.superpowers → .agent/skills}/subagent-driven-development/spec-reviewer-prompt.md +0 -0
  40. /package/template/{.superpowers → .agent/skills}/writing-plans/SKILL.md +0 -0
  41. /package/template/{.superpowers → .agent/skills}/writing-plans/plan-document-reviewer-prompt.md +0 -0
@@ -4,101 +4,20 @@ setlocal EnableExtensions
4
4
  set "MIN_PYTHON_LABEL=Python 3.8+"
5
5
  set "VERSION_CHECK=import sys; raise SystemExit(0 if sys.version_info >= (3, 8) else 1)"
6
6
  set "WORKFLOW_DIR=%~dp0"
7
- set "SCRIPTS_DIR=%WORKFLOW_DIR%scripts"
7
+ set "RUNNER_SCRIPT=%WORKFLOW_DIR%scripts\run.py"
8
8
  set "SELECTED_PYTHON="
9
9
  set "SELECTED_PYTHON_ARG="
10
- set "REST_ARGS="
11
10
 
12
- if "%~1"=="" goto usage_error
13
-
14
- set "COMMAND_NAME=%~1"
15
- if not "%~2"=="" (
16
- for /F "tokens=1,* delims= " %%A in ("%*") do set "REST_ARGS=%%B"
17
- )
11
+ call :select_python
12
+ if errorlevel 1 exit /b %ERRORLEVEL%
18
13
 
19
- if /I "%COMMAND_NAME%"=="-h" goto usage
20
- if /I "%COMMAND_NAME%"=="--help" goto usage
21
- if /I "%COMMAND_NAME%"=="help" goto usage
22
- if /I "%COMMAND_NAME%"=="python" goto run_python_passthrough
23
- if /I "%COMMAND_NAME%"=="resume" goto run_resume
24
- if /I "%COMMAND_NAME%"=="task" goto run_task
25
- if /I "%COMMAND_NAME%"=="change" goto run_change
26
- if /I "%COMMAND_NAME%"=="get-context" goto run_get_context
27
- if /I "%COMMAND_NAME%"=="get_context" goto run_get_context
28
- if /I "%COMMAND_NAME%"=="get-developer" goto run_get_developer
29
- if /I "%COMMAND_NAME%"=="get_developer" goto run_get_developer
30
- if /I "%COMMAND_NAME%"=="init-developer" goto run_init_developer
31
- if /I "%COMMAND_NAME%"=="init_developer" goto run_init_developer
32
- if /I "%COMMAND_NAME%"=="add-session" goto run_add_session
33
- if /I "%COMMAND_NAME%"=="add_session" goto run_add_session
34
-
35
- if exist "%SCRIPTS_DIR%\%COMMAND_NAME%.py" (
36
- call :run_script "%SCRIPTS_DIR%\%COMMAND_NAME%.py"
37
- exit /b %ERRORLEVEL%
14
+ if not "%SELECTED_PYTHON_ARG%"=="" (
15
+ "%SELECTED_PYTHON%" "%SELECTED_PYTHON_ARG%" "%RUNNER_SCRIPT%" %*
16
+ ) else (
17
+ "%SELECTED_PYTHON%" "%RUNNER_SCRIPT%" %*
38
18
  )
39
-
40
- echo 错误:未知 cowork-flow 命令:%COMMAND_NAME% 1>&2
41
- call :print_usage 1>&2
42
- exit /b 2
43
-
44
- :usage
45
- call :print_usage
46
- exit /b 0
47
-
48
- :usage_error
49
- call :print_usage 1>&2
50
- exit /b 2
51
-
52
- :run_python_passthrough
53
- call :exec_python %REST_ARGS%
54
- exit /b %ERRORLEVEL%
55
-
56
- :run_resume
57
- call :run_script "%SCRIPTS_DIR%\resume.py"
58
- exit /b %ERRORLEVEL%
59
-
60
- :run_task
61
- call :run_script "%SCRIPTS_DIR%\task.py"
62
19
  exit /b %ERRORLEVEL%
63
20
 
64
- :run_change
65
- call :run_script "%SCRIPTS_DIR%\change.py"
66
- exit /b %ERRORLEVEL%
67
-
68
- :run_get_context
69
- call :run_script "%SCRIPTS_DIR%\get_context.py"
70
- exit /b %ERRORLEVEL%
71
-
72
- :run_get_developer
73
- call :run_script "%SCRIPTS_DIR%\get_developer.py"
74
- exit /b %ERRORLEVEL%
75
-
76
- :run_init_developer
77
- call :run_script "%SCRIPTS_DIR%\init_developer.py"
78
- exit /b %ERRORLEVEL%
79
-
80
- :run_add_session
81
- call :run_script "%SCRIPTS_DIR%\add_session.py"
82
- exit /b %ERRORLEVEL%
83
-
84
- :print_usage
85
- echo 用法:
86
- echo .\.cowork-flow\run.cmd ^<command^> [args...]
87
- echo .\.cowork-flow\run.cmd python [python-args...]
88
- echo.
89
- echo 常用 command:
90
- echo resume
91
- echo task
92
- echo change
93
- echo get-context
94
- echo get-developer
95
- echo init-developer
96
- echo add-session
97
- echo.
98
- echo 解释器选择顺序:
99
- echo COWORK_FLOW_PYTHON -^> PYTHON -^> python3 -^> python -^> py -3
100
- exit /b 0
101
-
102
21
  :candidate_is_valid
103
22
  set "CANDIDATE_CMD=%~1"
104
23
  set "CANDIDATE_ARG=%~2"
@@ -126,8 +45,8 @@ if not errorlevel 1 (
126
45
  exit /b 0
127
46
  )
128
47
 
129
- echo 错误:%ENV_NAME% 指向的解释器不可用或版本低于 %MIN_PYTHON_LABEL%:%ENV_VALUE% 1>&2
130
- echo 请设置 %ENV_NAME% 为可执行的 Python 3.8+ 解释器路径。 1>&2
48
+ echo Error: %ENV_NAME% does not point to a usable %MIN_PYTHON_LABEL% interpreter: %ENV_VALUE% 1>&2
49
+ echo Set %ENV_NAME% to an executable Python 3.8+ interpreter path. 1>&2
131
50
  exit /b 127
132
51
 
133
52
  :select_python
@@ -163,29 +82,7 @@ if not errorlevel 1 (
163
82
  exit /b 0
164
83
  )
165
84
 
166
- echo 错误:需要 %MIN_PYTHON_LABEL%,但未找到可用解释器。 1>&2
167
- echo 已尝试:COWORK_FLOW_PYTHON、PYTHON、python3、python、py -3。 1>&2
168
- echo 可设置 COWORK_FLOW_PYTHON=C:\Path\To\python.exe 后重试。 1>&2
85
+ echo Error: %MIN_PYTHON_LABEL% is required, but no usable interpreter was found. 1>&2
86
+ echo Tried: COWORK_FLOW_PYTHON, PYTHON, python3, python, py -3. 1>&2
87
+ echo Set COWORK_FLOW_PYTHON=C:\Path\To\python.exe and retry. 1>&2
169
88
  exit /b 127
170
-
171
- :exec_python
172
- call :select_python
173
- if errorlevel 1 exit /b %ERRORLEVEL%
174
-
175
- if not "%SELECTED_PYTHON_ARG%"=="" (
176
- "%SELECTED_PYTHON%" "%SELECTED_PYTHON_ARG%" %*
177
- ) else (
178
- "%SELECTED_PYTHON%" %*
179
- )
180
- exit /b %ERRORLEVEL%
181
-
182
- :run_script
183
- set "SCRIPT_PATH=%~1"
184
-
185
- if not exist "%SCRIPT_PATH%" (
186
- echo 错误:找不到脚本:%SCRIPT_PATH% 1>&2
187
- exit /b 2
188
- )
189
-
190
- call :exec_python "%SCRIPT_PATH%" %REST_ARGS%
191
- exit /b %ERRORLEVEL%