cowork-flow 0.0.37 → 0.0.39
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 +27 -14
- package/package.json +1 -1
- package/src/commands/init.js +39 -28
- package/src/commands/sync.js +2 -2
- package/src/lib/asset-plan.js +127 -0
- package/src/lib/copy-template.js +101 -141
- package/src/lib/host-assets.js +231 -0
- package/src/lib/plan-applier.js +329 -0
- package/src/lib/platforms.js +15 -76
- package/src/lib/skill-registry.js +503 -0
- package/template/.claude/agents/cowork-check.md +10 -1
- package/template/.claude/agents/cowork-implement.md +11 -2
- package/template/.claude/hooks/inject-workflow-state.py +51 -254
- package/template/.codex/agents/cowork-check.toml +12 -3
- package/template/.codex/agents/cowork-implement.toml +11 -2
- package/template/.codex/agents/default.toml +3 -2
- package/template/.codex/agents/explorer.toml +3 -2
- package/template/.codex/agents/worker.toml +2 -1
- package/template/.codex/hooks/inject-workflow-state.py +46 -265
- package/template/.cowork-flow/.version +1 -1
- package/template/.cowork-flow/scripts/application/__init__.py +1 -0
- package/template/.cowork-flow/scripts/application/batch_execution.py +743 -0
- package/template/.cowork-flow/scripts/application/runtime_context_service.py +365 -0
- package/template/.cowork-flow/scripts/application/task_archive.py +220 -0
- package/template/.cowork-flow/scripts/application/task_context.py +765 -0
- package/template/.cowork-flow/scripts/application/task_creation.py +201 -0
- package/template/.cowork-flow/scripts/application/task_lifecycle.py +532 -0
- package/template/.cowork-flow/scripts/application/task_tree.py +179 -0
- package/template/.cowork-flow/scripts/commands/doctor.py +78 -57
- package/template/.cowork-flow/scripts/commands/party_mode_v2.py +671 -425
- package/template/.cowork-flow/scripts/commands/subagent.py +38 -26
- package/template/.cowork-flow/scripts/commands/task.py +535 -1953
- package/template/.cowork-flow/scripts/commands/task_archive_commands.py +195 -0
- package/template/.cowork-flow/scripts/commands/task_context_commands.py +240 -0
- package/template/.cowork-flow/scripts/commands/task_create_command.py +164 -0
- package/template/.cowork-flow/scripts/commands/task_navigation.py +407 -0
- package/template/.cowork-flow/scripts/commands/task_parser.py +364 -0
- package/template/.cowork-flow/scripts/commands/task_support.py +76 -0
- package/template/.cowork-flow/scripts/commands/task_tree_commands.py +160 -0
- package/template/.cowork-flow/scripts/common/core/execution_context.py +161 -85
- package/template/.cowork-flow/scripts/common/core/host_manifest.py +393 -0
- package/template/.cowork-flow/scripts/common/core/skill_registry.py +568 -0
- package/template/.cowork-flow/scripts/common/gates/coding_standards.py +58 -7
- package/template/.cowork-flow/scripts/common/gates/gates.py +323 -46
- package/template/.cowork-flow/scripts/common/gates/models.py +196 -0
- package/template/.cowork-flow/scripts/common/gates/registry.py +79 -0
- package/template/.cowork-flow/scripts/common/gates/tdd_evidence.py +13 -13
- package/template/.cowork-flow/scripts/common/gates/validate_coding_standards.py +104 -62
- package/template/.cowork-flow/scripts/common/gates/validate_implementation.py +39 -22
- package/template/.cowork-flow/scripts/common/gates/validate_rules.py +223 -40
- package/template/.cowork-flow/scripts/common/git/git_context.py +216 -182
- package/template/.cowork-flow/scripts/common/host/__init__.py +1 -0
- package/template/.cowork-flow/scripts/common/host/workflow_state_hook.py +303 -0
- package/template/.cowork-flow/scripts/common/storage/__init__.py +1 -0
- package/template/.cowork-flow/scripts/common/storage/operation_log.py +72 -0
- package/template/.cowork-flow/scripts/common/storage/state_store.py +279 -0
- package/template/.cowork-flow/scripts/common/storage/unit_of_work.py +214 -0
- package/template/.cowork-flow/scripts/common/task/active_task.py +93 -135
- package/template/.cowork-flow/scripts/common/task/batch_mode.py +33 -120
- package/template/.cowork-flow/scripts/common/task/decision_review.py +85 -0
- package/template/.cowork-flow/scripts/common/task/readiness.py +9 -15
- package/template/.cowork-flow/scripts/common/task/task_repository.py +156 -0
- package/template/.cowork-flow/scripts/run.py +24 -0
- package/template/.cowork-flow/spec/contracts/decision-anchor.md +8 -2
- package/template/.cowork-flow/spec/contracts/subagent-dispatch.md +2 -4
- package/template/.cowork-flow/spec/contracts/workflow-state-templates.md +1 -1
- package/template/.cowork-flow/spec/protocols/decision-review.md +28 -0
- package/template/.cowork-flow/spec/protocols/review.md +34 -0
- package/template/.cowork-flow/spec/protocols/spec-maintenance.md +16 -0
- package/template/.cowork-flow/spec/protocols/tdd.md +30 -0
- package/template/.cowork-flow/spec/references/definition-of-done.md +4 -4
- package/template/.cowork-flow/spec/references/orchestration-patterns.md +1 -1
- package/template/.cowork-flow/spec/runtime/contract-registry.json +25 -0
- package/template/.cowork-flow/spec/runtime/host-assets.json +214 -0
- package/template/.cowork-flow/spec/runtime/index.md +8 -0
- package/template/.cowork-flow/spec/runtime/rules.json +61 -10
- package/template/.cowork-flow/spec/runtime/skill-registry.json +397 -0
- package/template/.cowork-flow/spec/schemas/host-assets.schema.json +173 -0
- package/template/.cowork-flow/spec/schemas/rules.schema.json +10 -1
- package/template/.cowork-flow/spec/schemas/skill-registry.schema.json +202 -0
- package/template/.cowork-flow/workflow.md +18 -13
- package/template/.opencode/agents/cowork-check.md +11 -0
- package/template/.opencode/agents/cowork-implement.md +16 -1
- package/template/.zcode/.zcode-plugin/plugin.json +1 -1
- package/template/.zcode/hooks/inject-context.js +3 -85
- package/template/.zcode/hooks/inject-context.selfcheck.mjs +6 -6
- package/template/.zcode/scaffold/.cowork-flow/spec/contracts/decision-anchor.md +8 -2
- package/template/.zcode/scaffold/.cowork-flow/spec/contracts/subagent-dispatch.md +2 -4
- package/template/.zcode/scaffold/.cowork-flow/spec/runtime/rules.json +61 -10
- package/template/.zcode/scaffold/.cowork-flow/spec/schemas/rules.schema.json +10 -1
- package/template/.zcode/scaffold/.cowork-flow/workflow.md +18 -13
- package/template/.zcode/scaffold/AGENTS.md +18 -8
- package/template/AGENTS.md +1 -1
- package/template/skills/batch-mode/SKILL.md +140 -76
- package/template/skills/brainstorming/SKILL.md +2 -2
- package/template/skills/cowork-flow/SKILL.md +42 -0
- package/template/skills/party-mode/SHARED-BOUNDARIES.md +1 -1
- package/template/skills/party-mode/SKILL.md +48 -119
- package/template/.cowork-flow/scripts/common/gates/spec_validator.py +0 -53
- package/template/.cowork-flow/scripts/common/gates/validate_jsonl.py +0 -32
- package/template/skills/before-dev/SKILL.md +0 -41
- package/template/skills/check/SKILL.md +0 -53
- package/template/skills/check/simplification-guide.md +0 -47
- package/template/skills/continue/SKILL.md +0 -29
- package/template/skills/doubt-review/SKILL.md +0 -118
- package/template/skills/finish-work/SKILL.md +0 -32
- package/template/skills/party-mode-v2/SKILL.md +0 -75
- package/template/skills/start/SKILL.md +0 -78
- package/template/skills/tdd/SKILL.md +0 -74
- package/template/skills/update-spec/SKILL.md +0 -39
- package/template/skills/using-cowork-flow/SKILL.md +0 -80
|
@@ -17,15 +17,14 @@ if __package__:
|
|
|
17
17
|
else:
|
|
18
18
|
import _bootstrap # noqa: F401
|
|
19
19
|
from common.task.active_task import (
|
|
20
|
-
bind_runtime_context,
|
|
21
|
-
close_runtime_context,
|
|
22
|
-
read_runtime_context,
|
|
23
20
|
resolve_context_key,
|
|
24
21
|
runtime_context_path,
|
|
25
22
|
sessions_dir,
|
|
26
23
|
subagent_contexts_dir,
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
)
|
|
25
|
+
from application.runtime_context_service import (
|
|
26
|
+
RuntimeContextError,
|
|
27
|
+
RuntimeContextService,
|
|
29
28
|
)
|
|
30
29
|
from common.core.execution_context import build_internal_execution_context_parser
|
|
31
30
|
from common.core.paths import get_repo_root
|
|
@@ -170,13 +169,15 @@ def cmd_init(args: argparse.Namespace) -> int:
|
|
|
170
169
|
"bound_context_key": None,
|
|
171
170
|
"closed_at": None,
|
|
172
171
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
try:
|
|
173
|
+
initialized = RuntimeContextService(repo_root).initialize(
|
|
174
|
+
runtime_context_id,
|
|
175
|
+
context,
|
|
176
|
+
)
|
|
177
|
+
except RuntimeContextError as error:
|
|
178
|
+
print(f"Error: {error.detail}", file=sys.stderr)
|
|
179
|
+
return 1
|
|
180
|
+
logical_context_key = initialized.logical_context_key
|
|
180
181
|
host_context_key = _suggest_host_context_key(host, runtime_context_id)
|
|
181
182
|
|
|
182
183
|
print(
|
|
@@ -206,7 +207,7 @@ def cmd_init(args: argparse.Namespace) -> int:
|
|
|
206
207
|
|
|
207
208
|
|
|
208
209
|
def _find_subagent(repo_root: Path, runtime_context_id: str) -> dict:
|
|
209
|
-
context =
|
|
210
|
+
context = RuntimeContextService(repo_root).load(runtime_context_id)
|
|
210
211
|
if not context:
|
|
211
212
|
raise FileNotFoundError(runtime_context_id)
|
|
212
213
|
return context
|
|
@@ -233,26 +234,32 @@ def cmd_update(args: argparse.Namespace) -> int:
|
|
|
233
234
|
except FileNotFoundError:
|
|
234
235
|
print(f"Error: subagent not found: {args.subagent_id}", file=sys.stderr)
|
|
235
236
|
return 1
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
try:
|
|
238
|
+
context = RuntimeContextService(repo_root).update(
|
|
239
|
+
args.subagent_id,
|
|
240
|
+
status=args.status,
|
|
241
|
+
note=args.note,
|
|
242
|
+
)
|
|
243
|
+
except RuntimeContextError as error:
|
|
244
|
+
print(f"Error: {error.detail}", file=sys.stderr)
|
|
245
|
+
return 1
|
|
246
|
+
if context is None:
|
|
247
|
+
print(f"Error: subagent not found: {args.subagent_id}", file=sys.stderr)
|
|
248
|
+
return 1
|
|
241
249
|
print(f"subagent {args.subagent_id} status={args.status}")
|
|
242
250
|
return 0
|
|
243
251
|
|
|
244
252
|
|
|
245
253
|
def cmd_bind(args: argparse.Namespace) -> int:
|
|
246
254
|
repo_root = get_repo_root()
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
f"Error: runtime context {args.subagent_id} already bound to {existing_key}",
|
|
252
|
-
file=sys.stderr,
|
|
255
|
+
try:
|
|
256
|
+
context = RuntimeContextService(repo_root).bind(
|
|
257
|
+
args.subagent_id,
|
|
258
|
+
args.context_key,
|
|
253
259
|
)
|
|
260
|
+
except RuntimeContextError as error:
|
|
261
|
+
print(f"Error: {error.detail}", file=sys.stderr)
|
|
254
262
|
return 1
|
|
255
|
-
context = bind_runtime_context(repo_root, args.subagent_id, args.context_key)
|
|
256
263
|
if context is None:
|
|
257
264
|
print(f"Error: cannot bind runtime context: {args.subagent_id}", file=sys.stderr)
|
|
258
265
|
return 1
|
|
@@ -262,7 +269,12 @@ def cmd_bind(args: argparse.Namespace) -> int:
|
|
|
262
269
|
|
|
263
270
|
def cmd_close(args: argparse.Namespace) -> int:
|
|
264
271
|
repo_root = get_repo_root()
|
|
265
|
-
|
|
272
|
+
try:
|
|
273
|
+
closed = RuntimeContextService(repo_root).close(args.subagent_id)
|
|
274
|
+
except RuntimeContextError as error:
|
|
275
|
+
print(f"Error: {error.detail}", file=sys.stderr)
|
|
276
|
+
return 1
|
|
277
|
+
if not closed:
|
|
266
278
|
print(f"Error: subagent not found: {args.subagent_id}", file=sys.stderr)
|
|
267
279
|
return 1
|
|
268
280
|
print(f"subagent {args.subagent_id} closed")
|