@kynetic-ai/spec 0.1.2 → 0.4.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/README.md +250 -17
- package/dist/acp/client.d.ts +18 -4
- package/dist/acp/client.d.ts.map +1 -1
- package/dist/acp/client.js +44 -26
- package/dist/acp/client.js.map +1 -1
- package/dist/acp/framing.d.ts +2 -2
- package/dist/acp/framing.d.ts.map +1 -1
- package/dist/acp/framing.js +37 -29
- package/dist/acp/framing.js.map +1 -1
- package/dist/acp/index.d.ts +6 -7
- package/dist/acp/index.d.ts.map +1 -1
- package/dist/acp/index.js +3 -3
- package/dist/acp/index.js.map +1 -1
- package/dist/acp/types.d.ts +5 -5
- package/dist/acp/types.d.ts.map +1 -1
- package/dist/acp/types.js +18 -18
- package/dist/acp/types.js.map +1 -1
- package/dist/agents/adapters.d.ts.map +1 -1
- package/dist/agents/adapters.js +24 -13
- package/dist/agents/adapters.js.map +1 -1
- package/dist/agents/index.d.ts +2 -2
- package/dist/agents/index.js +2 -2
- package/dist/agents/spawner.d.ts +4 -4
- package/dist/agents/spawner.d.ts.map +1 -1
- package/dist/agents/spawner.js +6 -6
- package/dist/agents/spawner.js.map +1 -1
- package/dist/cli/batch-context.d.ts +43 -0
- package/dist/cli/batch-context.d.ts.map +1 -0
- package/dist/cli/batch-context.js +93 -0
- package/dist/cli/batch-context.js.map +1 -0
- package/dist/cli/batch-exec.d.ts +107 -0
- package/dist/cli/batch-exec.d.ts.map +1 -0
- package/dist/cli/batch-exec.js +706 -0
- package/dist/cli/batch-exec.js.map +1 -0
- package/dist/cli/batch.d.ts +4 -2
- package/dist/cli/batch.d.ts.map +1 -1
- package/dist/cli/batch.js +15 -14
- package/dist/cli/batch.js.map +1 -1
- package/dist/cli/command-annotations.d.ts +23 -0
- package/dist/cli/command-annotations.d.ts.map +1 -0
- package/dist/cli/command-annotations.js +27 -0
- package/dist/cli/command-annotations.js.map +1 -0
- package/dist/cli/commands/agents.d.ts +46 -0
- package/dist/cli/commands/agents.d.ts.map +1 -0
- package/dist/cli/commands/agents.js +377 -0
- package/dist/cli/commands/agents.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +20 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +214 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/clone-for-testing.d.ts +1 -1
- package/dist/cli/commands/clone-for-testing.d.ts.map +1 -1
- package/dist/cli/commands/clone-for-testing.js +37 -47
- package/dist/cli/commands/clone-for-testing.js.map +1 -1
- package/dist/cli/commands/derive.d.ts +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +141 -88
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +11 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +152 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/export.d.ts +12 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +134 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/help.d.ts +1 -1
- package/dist/cli/commands/help.d.ts.map +1 -1
- package/dist/cli/commands/help.js +163 -37
- package/dist/cli/commands/help.js.map +1 -1
- package/dist/cli/commands/inbox.d.ts +1 -1
- package/dist/cli/commands/inbox.d.ts.map +1 -1
- package/dist/cli/commands/inbox.js +178 -56
- package/dist/cli/commands/inbox.js.map +1 -1
- package/dist/cli/commands/index.d.ts +31 -19
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +31 -19
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +5 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +108 -57
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/item.d.ts +1 -1
- package/dist/cli/commands/item.d.ts.map +1 -1
- package/dist/cli/commands/item.js +557 -274
- package/dist/cli/commands/item.js.map +1 -1
- package/dist/cli/commands/link.d.ts +1 -1
- package/dist/cli/commands/link.d.ts.map +1 -1
- package/dist/cli/commands/link.js +55 -46
- package/dist/cli/commands/link.js.map +1 -1
- package/dist/cli/commands/log.d.ts +1 -1
- package/dist/cli/commands/log.d.ts.map +1 -1
- package/dist/cli/commands/log.js +58 -51
- package/dist/cli/commands/log.js.map +1 -1
- package/dist/cli/commands/merge-driver.d.ts +19 -0
- package/dist/cli/commands/merge-driver.d.ts.map +1 -0
- package/dist/cli/commands/merge-driver.js +398 -0
- package/dist/cli/commands/merge-driver.js.map +1 -0
- package/dist/cli/commands/meta.d.ts +1 -1
- package/dist/cli/commands/meta.d.ts.map +1 -1
- package/dist/cli/commands/meta.js +534 -399
- package/dist/cli/commands/meta.js.map +1 -1
- package/dist/cli/commands/module.d.ts +1 -1
- package/dist/cli/commands/module.d.ts.map +1 -1
- package/dist/cli/commands/module.js +30 -25
- package/dist/cli/commands/module.js.map +1 -1
- package/dist/cli/commands/plan-import.d.ts +11 -0
- package/dist/cli/commands/plan-import.d.ts.map +1 -0
- package/dist/cli/commands/plan-import.js +547 -0
- package/dist/cli/commands/plan-import.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +10 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +421 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/ralph.d.ts +1 -1
- package/dist/cli/commands/ralph.d.ts.map +1 -1
- package/dist/cli/commands/ralph.js +1109 -170
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/refs.d.ts +13 -0
- package/dist/cli/commands/refs.d.ts.map +1 -0
- package/dist/cli/commands/refs.js +283 -0
- package/dist/cli/commands/refs.js.map +1 -0
- package/dist/cli/commands/search.d.ts +1 -1
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +199 -37
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/serve.d.ts +10 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +491 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/session.d.ts +25 -6
- package/dist/cli/commands/session.d.ts.map +1 -1
- package/dist/cli/commands/session.js +810 -127
- package/dist/cli/commands/session.js.map +1 -1
- package/dist/cli/commands/setup-seeding.d.ts +81 -0
- package/dist/cli/commands/setup-seeding.d.ts.map +1 -0
- package/dist/cli/commands/setup-seeding.js +292 -0
- package/dist/cli/commands/setup-seeding.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +77 -3
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +1267 -274
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/shadow.d.ts +1 -1
- package/dist/cli/commands/shadow.d.ts.map +1 -1
- package/dist/cli/commands/shadow.js +70 -50
- package/dist/cli/commands/shadow.js.map +1 -1
- package/dist/cli/commands/skill-crud.d.ts +58 -0
- package/dist/cli/commands/skill-crud.d.ts.map +1 -0
- package/dist/cli/commands/skill-crud.js +753 -0
- package/dist/cli/commands/skill-crud.js.map +1 -0
- package/dist/cli/commands/skill-diff.d.ts +27 -0
- package/dist/cli/commands/skill-diff.d.ts.map +1 -0
- package/dist/cli/commands/skill-diff.js +840 -0
- package/dist/cli/commands/skill-diff.js.map +1 -0
- package/dist/cli/commands/skill-install.d.ts +56 -0
- package/dist/cli/commands/skill-install.d.ts.map +1 -0
- package/dist/cli/commands/skill-install.js +509 -0
- package/dist/cli/commands/skill-install.js.map +1 -0
- package/dist/cli/commands/skill.d.ts +20 -0
- package/dist/cli/commands/skill.d.ts.map +1 -0
- package/dist/cli/commands/skill.js +36 -0
- package/dist/cli/commands/skill.js.map +1 -0
- package/dist/cli/commands/task.d.ts +1 -1
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +584 -350
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/cli/commands/tasks.d.ts +26 -1
- package/dist/cli/commands/tasks.d.ts.map +1 -1
- package/dist/cli/commands/tasks.js +225 -122
- package/dist/cli/commands/tasks.js.map +1 -1
- package/dist/cli/commands/trait.d.ts +1 -1
- package/dist/cli/commands/trait.d.ts.map +1 -1
- package/dist/cli/commands/trait.js +166 -101
- package/dist/cli/commands/trait.js.map +1 -1
- package/dist/cli/commands/triage.d.ts +7 -0
- package/dist/cli/commands/triage.d.ts.map +1 -0
- package/dist/cli/commands/triage.js +483 -0
- package/dist/cli/commands/triage.js.map +1 -0
- package/dist/cli/commands/util.d.ts +7 -0
- package/dist/cli/commands/util.d.ts.map +1 -0
- package/dist/cli/commands/util.js +30 -0
- package/dist/cli/commands/util.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +1 -1
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/commands/validate.js +264 -83
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/commands/workflow.d.ts +16 -0
- package/dist/cli/commands/workflow.d.ts.map +1 -0
- package/dist/cli/commands/workflow.js +851 -0
- package/dist/cli/commands/workflow.js.map +1 -0
- package/dist/cli/exit-codes.d.ts +7 -0
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +26 -18
- package/dist/cli/exit-codes.js.map +1 -1
- package/dist/cli/help/content.d.ts.map +1 -1
- package/dist/cli/help/content.js +86 -71
- package/dist/cli/help/content.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +131 -19
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/introspection.d.ts +6 -2
- package/dist/cli/introspection.d.ts.map +1 -1
- package/dist/cli/introspection.js +11 -8
- package/dist/cli/introspection.js.map +1 -1
- package/dist/cli/output.d.ts +64 -4
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +237 -85
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/parse-utils.d.ts +21 -0
- package/dist/cli/parse-utils.d.ts.map +1 -0
- package/dist/cli/parse-utils.js +32 -0
- package/dist/cli/parse-utils.js.map +1 -0
- package/dist/cli/pid-utils.d.ts +72 -0
- package/dist/cli/pid-utils.d.ts.map +1 -0
- package/dist/cli/pid-utils.js +174 -0
- package/dist/cli/pid-utils.js.map +1 -0
- package/dist/cli/suggest.d.ts.map +1 -1
- package/dist/cli/suggest.js +1 -2
- package/dist/cli/suggest.js.map +1 -1
- package/dist/cli/validators.d.ts +43 -0
- package/dist/cli/validators.d.ts.map +1 -0
- package/dist/cli/validators.js +84 -0
- package/dist/cli/validators.js.map +1 -0
- package/dist/daemon/index.ts +52 -0
- package/dist/daemon/middleware/project-context.ts +126 -0
- package/dist/daemon/pid.ts +179 -0
- package/dist/daemon/project-context.ts +343 -0
- package/dist/daemon/routes/inbox.ts +164 -0
- package/dist/daemon/routes/items.ts +322 -0
- package/dist/daemon/routes/meta.ts +118 -0
- package/dist/daemon/routes/projects.ts +162 -0
- package/dist/daemon/routes/tasks.ts +327 -0
- package/dist/daemon/routes/triage.ts +402 -0
- package/dist/daemon/routes/validation.ts +248 -0
- package/dist/daemon/server.ts +408 -0
- package/dist/daemon/watcher.ts +195 -0
- package/dist/daemon/websocket/handler.ts +138 -0
- package/dist/daemon/websocket/heartbeat.ts +71 -0
- package/dist/daemon/websocket/pubsub.ts +125 -0
- package/dist/daemon/websocket/types.ts +66 -0
- package/dist/export/html.d.ts +19 -0
- package/dist/export/html.d.ts.map +1 -0
- package/dist/export/html.js +239 -0
- package/dist/export/html.js.map +1 -0
- package/dist/export/index.d.ts +10 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/index.js +10 -0
- package/dist/export/index.js.map +1 -0
- package/dist/export/json.d.ts +24 -0
- package/dist/export/json.d.ts.map +1 -0
- package/dist/export/json.js +198 -0
- package/dist/export/json.js.map +1 -0
- package/dist/export/triage.d.ts +51 -0
- package/dist/export/triage.d.ts.map +1 -0
- package/dist/export/triage.js +83 -0
- package/dist/export/triage.js.map +1 -0
- package/dist/export/types.d.ts +122 -0
- package/dist/export/types.d.ts.map +1 -0
- package/dist/export/types.js +9 -0
- package/dist/export/types.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/lib/claude-plugin-registry.d.ts +66 -0
- package/dist/lib/claude-plugin-registry.d.ts.map +1 -0
- package/dist/lib/claude-plugin-registry.js +318 -0
- package/dist/lib/claude-plugin-registry.js.map +1 -0
- package/dist/merge/arrays.d.ts +87 -0
- package/dist/merge/arrays.d.ts.map +1 -0
- package/dist/merge/arrays.js +164 -0
- package/dist/merge/arrays.js.map +1 -0
- package/dist/merge/file-type.d.ts +32 -0
- package/dist/merge/file-type.d.ts.map +1 -0
- package/dist/merge/file-type.js +70 -0
- package/dist/merge/file-type.js.map +1 -0
- package/dist/merge/index.d.ts +14 -0
- package/dist/merge/index.d.ts.map +1 -0
- package/dist/merge/index.js +11 -0
- package/dist/merge/index.js.map +1 -0
- package/dist/merge/objects.d.ts +46 -0
- package/dist/merge/objects.d.ts.map +1 -0
- package/dist/merge/objects.js +193 -0
- package/dist/merge/objects.js.map +1 -0
- package/dist/merge/parse.d.ts +23 -0
- package/dist/merge/parse.d.ts.map +1 -0
- package/dist/merge/parse.js +78 -0
- package/dist/merge/parse.js.map +1 -0
- package/dist/merge/resolve.d.ts +66 -0
- package/dist/merge/resolve.d.ts.map +1 -0
- package/dist/merge/resolve.js +189 -0
- package/dist/merge/resolve.js.map +1 -0
- package/dist/merge/types.d.ts +82 -0
- package/dist/merge/types.d.ts.map +1 -0
- package/dist/merge/types.js +8 -0
- package/dist/merge/types.js.map +1 -0
- package/dist/parser/agent-data-sections.d.ts +53 -0
- package/dist/parser/agent-data-sections.d.ts.map +1 -0
- package/dist/parser/agent-data-sections.js +118 -0
- package/dist/parser/agent-data-sections.js.map +1 -0
- package/dist/parser/alignment.d.ts +4 -4
- package/dist/parser/alignment.d.ts.map +1 -1
- package/dist/parser/alignment.js +27 -22
- package/dist/parser/alignment.js.map +1 -1
- package/dist/parser/assess.d.ts +5 -5
- package/dist/parser/assess.d.ts.map +1 -1
- package/dist/parser/assess.js +36 -32
- package/dist/parser/assess.js.map +1 -1
- package/dist/parser/config.d.ts +457 -0
- package/dist/parser/config.d.ts.map +1 -0
- package/dist/parser/config.js +373 -0
- package/dist/parser/config.js.map +1 -0
- package/dist/parser/convention-validation.d.ts +1 -1
- package/dist/parser/convention-validation.d.ts.map +1 -1
- package/dist/parser/convention-validation.js +21 -16
- package/dist/parser/convention-validation.js.map +1 -1
- package/dist/parser/coverage-cache.d.ts +49 -0
- package/dist/parser/coverage-cache.d.ts.map +1 -0
- package/dist/parser/coverage-cache.js +123 -0
- package/dist/parser/coverage-cache.js.map +1 -0
- package/dist/parser/daemon-status.d.ts +37 -0
- package/dist/parser/daemon-status.d.ts.map +1 -0
- package/dist/parser/daemon-status.js +67 -0
- package/dist/parser/daemon-status.js.map +1 -0
- package/dist/parser/doctor.d.ts +107 -0
- package/dist/parser/doctor.d.ts.map +1 -0
- package/dist/parser/doctor.js +366 -0
- package/dist/parser/doctor.js.map +1 -0
- package/dist/parser/fix.d.ts +1 -1
- package/dist/parser/fix.d.ts.map +1 -1
- package/dist/parser/fix.js +31 -27
- package/dist/parser/fix.js.map +1 -1
- package/dist/parser/index.d.ts +16 -11
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +16 -11
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/items.d.ts +8 -2
- package/dist/parser/items.d.ts.map +1 -1
- package/dist/parser/items.js +71 -35
- package/dist/parser/items.js.map +1 -1
- package/dist/parser/meta.d.ts +167 -9
- package/dist/parser/meta.d.ts.map +1 -1
- package/dist/parser/meta.js +379 -46
- package/dist/parser/meta.js.map +1 -1
- package/dist/parser/plan-document.d.ts +197 -0
- package/dist/parser/plan-document.d.ts.map +1 -0
- package/dist/parser/plan-document.js +341 -0
- package/dist/parser/plan-document.js.map +1 -0
- package/dist/parser/plans.d.ts +59 -0
- package/dist/parser/plans.d.ts.map +1 -0
- package/dist/parser/plans.js +239 -0
- package/dist/parser/plans.js.map +1 -0
- package/dist/parser/refs.d.ts +22 -9
- package/dist/parser/refs.d.ts.map +1 -1
- package/dist/parser/refs.js +102 -50
- package/dist/parser/refs.js.map +1 -1
- package/dist/parser/setup-status.d.ts +71 -0
- package/dist/parser/setup-status.d.ts.map +1 -0
- package/dist/parser/setup-status.js +269 -0
- package/dist/parser/setup-status.js.map +1 -0
- package/dist/parser/shadow.d.ts +150 -19
- package/dist/parser/shadow.d.ts.map +1 -1
- package/dist/parser/shadow.js +548 -187
- package/dist/parser/shadow.js.map +1 -1
- package/dist/parser/skill-render.d.ts +317 -0
- package/dist/parser/skill-render.d.ts.map +1 -0
- package/dist/parser/skill-render.js +943 -0
- package/dist/parser/skill-render.js.map +1 -0
- package/dist/parser/traits.d.ts +3 -3
- package/dist/parser/traits.d.ts.map +1 -1
- package/dist/parser/traits.js +2 -2
- package/dist/parser/traits.js.map +1 -1
- package/dist/parser/validate-skills.d.ts +32 -0
- package/dist/parser/validate-skills.d.ts.map +1 -0
- package/dist/parser/validate-skills.js +202 -0
- package/dist/parser/validate-skills.js.map +1 -0
- package/dist/parser/validate.d.ts +45 -3
- package/dist/parser/validate.d.ts.map +1 -1
- package/dist/parser/validate.js +622 -105
- package/dist/parser/validate.js.map +1 -1
- package/dist/parser/yaml.d.ts +83 -19
- package/dist/parser/yaml.d.ts.map +1 -1
- package/dist/parser/yaml.js +478 -173
- package/dist/parser/yaml.js.map +1 -1
- package/dist/ralph/cli-renderer.d.ts +8 -1
- package/dist/ralph/cli-renderer.d.ts.map +1 -1
- package/dist/ralph/cli-renderer.js +105 -34
- package/dist/ralph/cli-renderer.js.map +1 -1
- package/dist/ralph/events.d.ts +10 -10
- package/dist/ralph/events.d.ts.map +1 -1
- package/dist/ralph/events.js +301 -98
- package/dist/ralph/events.js.map +1 -1
- package/dist/ralph/index.d.ts +5 -2
- package/dist/ralph/index.d.ts.map +1 -1
- package/dist/ralph/index.js +9 -3
- package/dist/ralph/index.js.map +1 -1
- package/dist/ralph/loop-errors.d.ts +83 -0
- package/dist/ralph/loop-errors.d.ts.map +1 -0
- package/dist/ralph/loop-errors.js +150 -0
- package/dist/ralph/loop-errors.js.map +1 -0
- package/dist/ralph/subagent.d.ts +94 -0
- package/dist/ralph/subagent.d.ts.map +1 -0
- package/dist/ralph/subagent.js +193 -0
- package/dist/ralph/subagent.js.map +1 -0
- package/dist/ralph/wrap-up.d.ts +125 -0
- package/dist/ralph/wrap-up.d.ts.map +1 -0
- package/dist/ralph/wrap-up.js +270 -0
- package/dist/ralph/wrap-up.js.map +1 -0
- package/dist/schema/batch.d.ts +97 -0
- package/dist/schema/batch.d.ts.map +1 -0
- package/dist/schema/batch.js +24 -0
- package/dist/schema/batch.js.map +1 -0
- package/dist/schema/common.d.ts +8 -2
- package/dist/schema/common.d.ts.map +1 -1
- package/dist/schema/common.js +42 -31
- package/dist/schema/common.js.map +1 -1
- package/dist/schema/inbox.d.ts +12 -12
- package/dist/schema/inbox.js +4 -4
- package/dist/schema/inbox.js.map +1 -1
- package/dist/schema/index.d.ts +8 -5
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +8 -5
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/meta.d.ts +1454 -27
- package/dist/schema/meta.d.ts.map +1 -1
- package/dist/schema/meta.js +198 -21
- package/dist/schema/meta.js.map +1 -1
- package/dist/schema/plan.d.ts +285 -0
- package/dist/schema/plan.d.ts.map +1 -0
- package/dist/schema/plan.js +81 -0
- package/dist/schema/plan.js.map +1 -0
- package/dist/schema/spec.d.ts +72 -33
- package/dist/schema/spec.d.ts.map +1 -1
- package/dist/schema/spec.js +22 -9
- package/dist/schema/spec.js.map +1 -1
- package/dist/schema/task.d.ts +172 -161
- package/dist/schema/task.d.ts.map +1 -1
- package/dist/schema/task.js +21 -12
- package/dist/schema/task.js.map +1 -1
- package/dist/schema/triage.d.ts +266 -0
- package/dist/schema/triage.d.ts.map +1 -0
- package/dist/schema/triage.js +134 -0
- package/dist/schema/triage.js.map +1 -0
- package/dist/sessions/index.d.ts +2 -2
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +3 -3
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/store.d.ts +241 -1
- package/dist/sessions/store.d.ts.map +1 -1
- package/dist/sessions/store.js +810 -31
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/types.d.ts +10 -10
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/sessions/types.js +10 -9
- package/dist/sessions/types.js.map +1 -1
- package/dist/strings/errors.d.ts +55 -0
- package/dist/strings/errors.d.ts.map +1 -1
- package/dist/strings/errors.js +138 -106
- package/dist/strings/errors.js.map +1 -1
- package/dist/strings/guidance.d.ts.map +1 -1
- package/dist/strings/guidance.js +16 -16
- package/dist/strings/guidance.js.map +1 -1
- package/dist/strings/index.d.ts +4 -4
- package/dist/strings/index.d.ts.map +1 -1
- package/dist/strings/index.js +4 -4
- package/dist/strings/index.js.map +1 -1
- package/dist/strings/labels.d.ts +4 -0
- package/dist/strings/labels.d.ts.map +1 -1
- package/dist/strings/labels.js +45 -41
- package/dist/strings/labels.js.map +1 -1
- package/dist/strings/validation.d.ts.map +1 -1
- package/dist/strings/validation.js +71 -71
- package/dist/strings/validation.js.map +1 -1
- package/dist/triage/actions.d.ts +27 -0
- package/dist/triage/actions.d.ts.map +1 -0
- package/dist/triage/actions.js +95 -0
- package/dist/triage/actions.js.map +1 -0
- package/dist/triage/constants.d.ts +6 -0
- package/dist/triage/constants.d.ts.map +1 -0
- package/dist/triage/constants.js +7 -0
- package/dist/triage/constants.js.map +1 -0
- package/dist/triage/index.d.ts +3 -0
- package/dist/triage/index.d.ts.map +1 -0
- package/dist/triage/index.js +3 -0
- package/dist/triage/index.js.map +1 -0
- package/dist/utils/commit.d.ts +1 -1
- package/dist/utils/commit.d.ts.map +1 -1
- package/dist/utils/commit.js +28 -26
- package/dist/utils/commit.js.map +1 -1
- package/dist/utils/git.d.ts +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +40 -38
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/grep.js +11 -11
- package/dist/utils/grep.js.map +1 -1
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/time.d.ts.map +1 -1
- package/dist/utils/time.js +10 -10
- package/dist/utils/time.js.map +1 -1
- package/package.json +28 -5
- package/plugin/.claude-plugin/marketplace.json +17 -0
- package/plugin/.claude-plugin/plugin.json +5 -0
- package/plugin/plugins/kspec/skills/create-workflow/SKILL.md +235 -0
- package/plugin/plugins/kspec/skills/help/SKILL.md +42 -0
- package/plugin/plugins/kspec/skills/observations/SKILL.md +143 -0
- package/plugin/plugins/kspec/skills/plan/SKILL.md +343 -0
- package/plugin/plugins/kspec/skills/reflect/SKILL.md +161 -0
- package/plugin/plugins/kspec/skills/review/SKILL.md +193 -0
- package/plugin/plugins/kspec/skills/task-work/SKILL.md +303 -0
- package/plugin/plugins/kspec/skills/triage/SKILL.md +206 -0
- package/plugin/plugins/kspec/skills/triage/docs/automation.md +120 -0
- package/plugin/plugins/kspec/skills/triage/docs/inbox.md +144 -0
- package/plugin/plugins/kspec/skills/triage/docs/observations.md +85 -0
- package/plugin/plugins/kspec/skills/triage-automation/SKILL.md +140 -0
- package/plugin/plugins/kspec/skills/triage-inbox/SKILL.md +232 -0
- package/plugin/plugins/kspec/skills/writing-specs/SKILL.md +340 -0
- package/templates/agents-sections/01-quick-start.md +22 -0
- package/templates/agents-sections/02-shadow-branch.md +34 -0
- package/templates/agents-sections/03-task-lifecycle.md +48 -0
- package/templates/agents-sections/04-pr-workflow.md +17 -0
- package/templates/agents-sections/05-commit-convention.md +27 -0
- package/templates/agents-sections/06-ralph-loop.md +45 -0
- package/templates/hooks/pre-commit +34 -0
- package/templates/skills/create-workflow/SKILL.md +228 -0
- package/templates/skills/help/SKILL.md +37 -0
- package/templates/skills/manifest.yaml +60 -0
- package/templates/skills/observations/SKILL.md +137 -0
- package/templates/skills/plan/SKILL.md +336 -0
- package/templates/skills/reflect/SKILL.md +155 -0
- package/templates/skills/review/SKILL.md +186 -0
- package/templates/skills/task-work/SKILL.md +296 -0
- package/templates/skills/triage/SKILL.md +199 -0
- package/templates/skills/triage/docs/automation.md +120 -0
- package/templates/skills/triage/docs/inbox.md +144 -0
- package/templates/skills/triage/docs/observations.md +85 -0
- package/templates/skills/triage-automation/SKILL.md +134 -0
- package/templates/skills/triage-inbox/SKILL.md +225 -0
- package/templates/skills/writing-specs/SKILL.md +333 -0
package/dist/cli/output.js
CHANGED
|
@@ -1,15 +1,90 @@
|
|
|
1
|
-
import chalk from
|
|
2
|
-
import {
|
|
3
|
-
import { fieldLabels, sectionHeaders, summaries } from
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { stringify as yamlStringify } from "yaml";
|
|
3
|
+
import { fieldLabels, sectionHeaders, summaries } from "../strings/labels.js";
|
|
4
|
+
import { formatMatchedFields, grepItem } from "../utils/grep.js";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Check if a note has been superseded by another note.
|
|
7
|
+
* A note is superseded if its ULID appears in any other note's `supersedes` field.
|
|
8
|
+
*/
|
|
9
|
+
export function isNoteSuperseded(note, allNotes) {
|
|
10
|
+
return allNotes.some((n) => n.supersedes === note._ulid);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Filter notes to exclude superseded ones.
|
|
14
|
+
* Returns only notes that have not been superseded.
|
|
15
|
+
*/
|
|
16
|
+
export function filterSupersededNotes(notes) {
|
|
17
|
+
return notes.filter((note) => !isNoteSuperseded(note, notes));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Annotate notes with superseded status for JSON output.
|
|
21
|
+
* Adds a computed `superseded` field to each note.
|
|
22
|
+
*/
|
|
23
|
+
export function annotateNotesWithSuperseded(notes) {
|
|
24
|
+
return notes.map((note) => ({
|
|
25
|
+
...note,
|
|
26
|
+
superseded: isNoteSuperseded(note, notes),
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Valid format values for --format option
|
|
31
|
+
*/
|
|
32
|
+
export const VALID_FORMATS = ["json", "yaml"];
|
|
33
|
+
/**
|
|
34
|
+
* Global output format (set by --json, --yaml, --raw, or --format flags)
|
|
35
|
+
* AC: @output-format-option ac-format-json, ac-format-yaml
|
|
36
|
+
*/
|
|
37
|
+
let globalOutputFormat = "text";
|
|
38
|
+
export function setOutputFormat(format) {
|
|
39
|
+
globalOutputFormat = format;
|
|
40
|
+
}
|
|
41
|
+
export function getOutputFormat() {
|
|
42
|
+
return globalOutputFormat;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Set JSON mode (for backward compatibility)
|
|
46
|
+
* AC: @output-format-option ac-json-shorthand
|
|
6
47
|
*/
|
|
7
|
-
let globalJsonMode = false;
|
|
8
48
|
export function setJsonMode(enabled) {
|
|
9
|
-
|
|
49
|
+
if (enabled) {
|
|
50
|
+
globalOutputFormat = "json";
|
|
51
|
+
}
|
|
52
|
+
else if (globalOutputFormat === "json") {
|
|
53
|
+
globalOutputFormat = "text";
|
|
54
|
+
}
|
|
10
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Check if JSON mode is active
|
|
58
|
+
* AC: @output-format-option ac-json-shorthand
|
|
59
|
+
*/
|
|
11
60
|
export function isJsonMode() {
|
|
12
|
-
return
|
|
61
|
+
return globalOutputFormat === "json";
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Set YAML mode
|
|
65
|
+
* AC: @output-format-option ac-format-yaml, ac-yaml-shorthand
|
|
66
|
+
*/
|
|
67
|
+
export function setYamlMode(enabled) {
|
|
68
|
+
if (enabled) {
|
|
69
|
+
globalOutputFormat = "yaml";
|
|
70
|
+
}
|
|
71
|
+
else if (globalOutputFormat === "yaml") {
|
|
72
|
+
globalOutputFormat = "text";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Check if YAML mode is active
|
|
77
|
+
* AC: @output-format-option ac-format-yaml
|
|
78
|
+
*/
|
|
79
|
+
export function isYamlMode() {
|
|
80
|
+
return globalOutputFormat === "yaml";
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Check if any structured output mode is active (JSON or YAML)
|
|
84
|
+
* AC: @output-format-option ac-yaml-no-ansi, ac-yaml-references
|
|
85
|
+
*/
|
|
86
|
+
export function isStructuredMode() {
|
|
87
|
+
return globalOutputFormat === "json" || globalOutputFormat === "yaml";
|
|
13
88
|
}
|
|
14
89
|
/**
|
|
15
90
|
* Global verbose mode (set by --verbose flag)
|
|
@@ -22,12 +97,16 @@ export function getVerboseMode() {
|
|
|
22
97
|
return globalVerboseMode;
|
|
23
98
|
}
|
|
24
99
|
/**
|
|
25
|
-
* Output data - JSON if
|
|
100
|
+
* Output data - JSON/YAML if structured mode, otherwise formatted
|
|
101
|
+
* AC: @output-format-option ac-format-json, ac-format-yaml
|
|
26
102
|
*/
|
|
27
103
|
export function output(data, formatter) {
|
|
28
|
-
if (
|
|
104
|
+
if (globalOutputFormat === "json") {
|
|
29
105
|
console.log(JSON.stringify(data, null, 2));
|
|
30
106
|
}
|
|
107
|
+
else if (globalOutputFormat === "yaml") {
|
|
108
|
+
console.log(yamlStringify(data, { indent: 2 }));
|
|
109
|
+
}
|
|
31
110
|
else if (formatter) {
|
|
32
111
|
formatter();
|
|
33
112
|
}
|
|
@@ -37,31 +116,39 @@ export function output(data, formatter) {
|
|
|
37
116
|
}
|
|
38
117
|
/**
|
|
39
118
|
* Output success message
|
|
119
|
+
* AC: @output-format-option ac-format-json, ac-format-yaml
|
|
40
120
|
*/
|
|
41
121
|
export function success(message, data) {
|
|
42
|
-
if (
|
|
122
|
+
if (globalOutputFormat === "json") {
|
|
43
123
|
console.log(JSON.stringify({ success: true, message, ...data }));
|
|
44
124
|
}
|
|
125
|
+
else if (globalOutputFormat === "yaml") {
|
|
126
|
+
console.log(yamlStringify({ success: true, message, ...data }, { indent: 2 }));
|
|
127
|
+
}
|
|
45
128
|
else {
|
|
46
|
-
console.log(chalk.green(
|
|
129
|
+
console.log(chalk.green("OK"), message);
|
|
47
130
|
}
|
|
48
131
|
}
|
|
49
132
|
/**
|
|
50
133
|
* Output error message
|
|
134
|
+
* AC: @output-format-option ac-format-json, ac-format-yaml
|
|
51
135
|
*/
|
|
52
136
|
export function error(message, details) {
|
|
53
|
-
if (
|
|
137
|
+
if (globalOutputFormat === "json") {
|
|
54
138
|
console.error(JSON.stringify({ success: false, error: message, details }));
|
|
55
139
|
}
|
|
140
|
+
else if (globalOutputFormat === "yaml") {
|
|
141
|
+
console.error(yamlStringify({ success: false, error: message, details }, { indent: 2 }));
|
|
142
|
+
}
|
|
56
143
|
else {
|
|
57
|
-
console.error(chalk.red(
|
|
144
|
+
console.error(chalk.red("✗"), message);
|
|
58
145
|
if (details) {
|
|
59
146
|
console.error(chalk.gray(String(details)));
|
|
60
147
|
// Show suggestion if it's a ShadowError with a suggestion
|
|
61
|
-
if (details && typeof details ===
|
|
148
|
+
if (details && typeof details === "object" && "suggestion" in details) {
|
|
62
149
|
const suggestion = details.suggestion;
|
|
63
150
|
if (suggestion) {
|
|
64
|
-
console.error(chalk.yellow(
|
|
151
|
+
console.error(chalk.yellow(" Suggestion:"), suggestion);
|
|
65
152
|
}
|
|
66
153
|
}
|
|
67
154
|
}
|
|
@@ -69,24 +156,28 @@ export function error(message, details) {
|
|
|
69
156
|
}
|
|
70
157
|
/**
|
|
71
158
|
* Output warning message
|
|
159
|
+
* AC: @output-format-option ac-yaml-no-ansi
|
|
72
160
|
*/
|
|
73
161
|
export function warn(message) {
|
|
74
|
-
if (
|
|
75
|
-
//
|
|
162
|
+
if (isStructuredMode()) {
|
|
163
|
+
// Route warnings to stderr in structured output modes to keep stdout pure
|
|
164
|
+
console.error(chalk.yellow("⚠"), message);
|
|
76
165
|
}
|
|
77
166
|
else {
|
|
78
|
-
console.warn(chalk.yellow(
|
|
167
|
+
console.warn(chalk.yellow("⚠"), message);
|
|
79
168
|
}
|
|
80
169
|
}
|
|
81
170
|
/**
|
|
82
171
|
* Output info message
|
|
172
|
+
* AC: @output-format-option ac-yaml-no-ansi
|
|
83
173
|
*/
|
|
84
174
|
export function info(message) {
|
|
85
|
-
if (
|
|
86
|
-
//
|
|
175
|
+
if (isStructuredMode()) {
|
|
176
|
+
// Route info to stderr in structured output modes to keep stdout pure
|
|
177
|
+
console.error(chalk.blue("ℹ"), message);
|
|
87
178
|
}
|
|
88
179
|
else {
|
|
89
|
-
console.log(chalk.blue(
|
|
180
|
+
console.log(chalk.blue("ℹ"), message);
|
|
90
181
|
}
|
|
91
182
|
}
|
|
92
183
|
/**
|
|
@@ -94,15 +185,15 @@ export function info(message) {
|
|
|
94
185
|
*/
|
|
95
186
|
function statusColor(status) {
|
|
96
187
|
switch (status) {
|
|
97
|
-
case
|
|
188
|
+
case "pending":
|
|
98
189
|
return (t) => chalk.gray(t);
|
|
99
|
-
case
|
|
190
|
+
case "in_progress":
|
|
100
191
|
return (t) => chalk.blue(t);
|
|
101
|
-
case
|
|
192
|
+
case "blocked":
|
|
102
193
|
return (t) => chalk.red(t);
|
|
103
|
-
case
|
|
194
|
+
case "completed":
|
|
104
195
|
return (t) => chalk.green(t);
|
|
105
|
-
case
|
|
196
|
+
case "cancelled":
|
|
106
197
|
return (t) => chalk.strikethrough.gray(t);
|
|
107
198
|
default:
|
|
108
199
|
return (t) => chalk.white(t);
|
|
@@ -126,18 +217,20 @@ export function formatTaskRef(task, index) {
|
|
|
126
217
|
export function formatTask(task, verbose = false, index, full = false) {
|
|
127
218
|
const ref = formatTaskRef(task, index);
|
|
128
219
|
const status = statusColor(task.status)(`[${task.status}]`);
|
|
129
|
-
const priority = task.priority <= 2
|
|
220
|
+
const priority = task.priority <= 2
|
|
221
|
+
? chalk.red(`P${task.priority}`)
|
|
222
|
+
: chalk.gray(`P${task.priority}`);
|
|
130
223
|
let line = `${ref} ${status} ${priority} ${task.title}`;
|
|
131
224
|
if (verbose && !full) {
|
|
132
|
-
// AC-2
|
|
225
|
+
// AC: @task-list-verbose ac-2 - Single verbose (-v) shows current behavior
|
|
133
226
|
if (task.spec_ref) {
|
|
134
227
|
line += chalk.gray(` (spec: ${task.spec_ref})`);
|
|
135
228
|
}
|
|
136
229
|
if (task.depends_on.length > 0) {
|
|
137
|
-
line += chalk.gray(` deps: [${task.depends_on.join(
|
|
230
|
+
line += chalk.gray(` deps: [${task.depends_on.join(", ")}]`);
|
|
138
231
|
}
|
|
139
232
|
if (task.tags.length > 0) {
|
|
140
|
-
line += chalk.cyan(` #${task.tags.join(
|
|
233
|
+
line += chalk.cyan(` #${task.tags.join(" #")}`);
|
|
141
234
|
}
|
|
142
235
|
}
|
|
143
236
|
return line;
|
|
@@ -148,16 +241,16 @@ export function formatTask(task, verbose = false, index, full = false) {
|
|
|
148
241
|
function getFirstLine(text, maxLength = 70) {
|
|
149
242
|
if (!text)
|
|
150
243
|
return undefined;
|
|
151
|
-
const firstLine = text.split(
|
|
244
|
+
const firstLine = text.split("\n")[0].trim();
|
|
152
245
|
if (firstLine.length <= maxLength)
|
|
153
246
|
return firstLine;
|
|
154
|
-
return firstLine.slice(0, maxLength - 3)
|
|
247
|
+
return `${firstLine.slice(0, maxLength - 3)}...`;
|
|
155
248
|
}
|
|
156
249
|
/**
|
|
157
250
|
* Format full mode context for a task (AC-1, AC-3, AC-5)
|
|
158
251
|
*/
|
|
159
252
|
function formatFullModeContext(task, index) {
|
|
160
|
-
const indent =
|
|
253
|
+
const indent = " ";
|
|
161
254
|
// Show timestamps (AC-1)
|
|
162
255
|
console.log(chalk.gray(`${indent}Created: ${task.created_at}`));
|
|
163
256
|
if (task.started_at) {
|
|
@@ -174,7 +267,7 @@ function formatFullModeContext(task, index) {
|
|
|
174
267
|
}
|
|
175
268
|
// Show pending todos count (AC-1, AC-3)
|
|
176
269
|
if (task.todos && task.todos.length > 0) {
|
|
177
|
-
const pendingCount = task.todos.filter(t => !t.done).length;
|
|
270
|
+
const pendingCount = task.todos.filter((t) => !t.done).length;
|
|
178
271
|
if (pendingCount > 0) {
|
|
179
272
|
console.log(chalk.gray(`${indent}Pending todos: ${pendingCount}`));
|
|
180
273
|
}
|
|
@@ -184,22 +277,31 @@ function formatFullModeContext(task, index) {
|
|
|
184
277
|
const result = index.resolve(task.spec_ref);
|
|
185
278
|
if (result.ok) {
|
|
186
279
|
const spec = result.item;
|
|
187
|
-
const specName =
|
|
280
|
+
const specName = "title" in spec
|
|
281
|
+
? spec.title
|
|
282
|
+
: "name" in spec
|
|
283
|
+
? spec.name
|
|
284
|
+
: "id" in spec
|
|
285
|
+
? spec.id
|
|
286
|
+
: task.spec_ref;
|
|
188
287
|
console.log(chalk.gray(`${indent}Spec: ${task.spec_ref}`));
|
|
189
288
|
console.log(chalk.cyan(`${indent} ${specName}`));
|
|
190
289
|
// Show spec description if available
|
|
191
|
-
if (
|
|
290
|
+
if ("description" in spec && spec.description) {
|
|
192
291
|
const descPreview = getFirstLine(spec.description, 70);
|
|
193
292
|
console.log(chalk.gray(`${indent} ${descPreview}`));
|
|
194
293
|
}
|
|
195
294
|
// Show acceptance criteria if available
|
|
196
|
-
if (
|
|
295
|
+
if ("acceptance_criteria" in spec &&
|
|
296
|
+
Array.isArray(spec.acceptance_criteria)) {
|
|
197
297
|
const ac = spec.acceptance_criteria;
|
|
198
298
|
if (ac.length > 0) {
|
|
199
299
|
console.log(chalk.gray(`${indent} Acceptance Criteria: ${ac.length}`));
|
|
200
300
|
// Show first AC as preview
|
|
201
301
|
const firstAC = ac[0];
|
|
202
|
-
if (typeof firstAC ===
|
|
302
|
+
if (typeof firstAC === "object" &&
|
|
303
|
+
firstAC !== null &&
|
|
304
|
+
"id" in firstAC) {
|
|
203
305
|
console.log(chalk.gray(`${indent} [${firstAC.id}] ${firstAC.then}`));
|
|
204
306
|
}
|
|
205
307
|
}
|
|
@@ -208,10 +310,10 @@ function formatFullModeContext(task, index) {
|
|
|
208
310
|
}
|
|
209
311
|
// Show tags and dependencies if present
|
|
210
312
|
if (task.tags && task.tags.length > 0) {
|
|
211
|
-
console.log(chalk.gray(`${indent}Tags: ${task.tags.join(
|
|
313
|
+
console.log(chalk.gray(`${indent}Tags: ${task.tags.join(", ")}`));
|
|
212
314
|
}
|
|
213
315
|
if (task.depends_on && task.depends_on.length > 0) {
|
|
214
|
-
console.log(chalk.gray(`${indent}Depends on: ${task.depends_on.join(
|
|
316
|
+
console.log(chalk.gray(`${indent}Depends on: ${task.depends_on.join(", ")}`));
|
|
215
317
|
}
|
|
216
318
|
}
|
|
217
319
|
/**
|
|
@@ -220,15 +322,15 @@ function formatFullModeContext(task, index) {
|
|
|
220
322
|
*/
|
|
221
323
|
function formatAutomationStatus(automation) {
|
|
222
324
|
if (!automation) {
|
|
223
|
-
return chalk.gray(
|
|
325
|
+
return chalk.gray("[unassessed]");
|
|
224
326
|
}
|
|
225
327
|
switch (automation) {
|
|
226
|
-
case
|
|
227
|
-
return chalk.green(
|
|
228
|
-
case
|
|
229
|
-
return chalk.yellow(
|
|
230
|
-
case
|
|
231
|
-
return chalk.red(
|
|
328
|
+
case "eligible":
|
|
329
|
+
return chalk.green("[eligible]");
|
|
330
|
+
case "needs_review":
|
|
331
|
+
return chalk.yellow("[needs_review]");
|
|
332
|
+
case "manual_only":
|
|
333
|
+
return chalk.red("[manual_only]");
|
|
232
334
|
default:
|
|
233
335
|
return chalk.gray(`[${automation}]`);
|
|
234
336
|
}
|
|
@@ -245,7 +347,9 @@ export function formatTaskListWithAutomation(tasks, verbose = false, index, grep
|
|
|
245
347
|
for (const task of tasks) {
|
|
246
348
|
const ref = formatTaskRef(task, index);
|
|
247
349
|
const status = statusColor(task.status)(`[${task.status}]`);
|
|
248
|
-
const priority = task.priority <= 2
|
|
350
|
+
const priority = task.priority <= 2
|
|
351
|
+
? chalk.red(`P${task.priority}`)
|
|
352
|
+
: chalk.gray(`P${task.priority}`);
|
|
249
353
|
const automationLabel = formatAutomationStatus(task.automation);
|
|
250
354
|
let line = `${ref} ${status} ${priority} ${automationLabel} ${task.title}`;
|
|
251
355
|
if (verbose && !full) {
|
|
@@ -253,10 +357,10 @@ export function formatTaskListWithAutomation(tasks, verbose = false, index, grep
|
|
|
253
357
|
line += chalk.gray(` (spec: ${task.spec_ref})`);
|
|
254
358
|
}
|
|
255
359
|
if (task.depends_on.length > 0) {
|
|
256
|
-
line += chalk.gray(` deps: [${task.depends_on.join(
|
|
360
|
+
line += chalk.gray(` deps: [${task.depends_on.join(", ")}]`);
|
|
257
361
|
}
|
|
258
362
|
if (task.tags.length > 0) {
|
|
259
|
-
line += chalk.cyan(` #${task.tags.join(
|
|
363
|
+
line += chalk.cyan(` #${task.tags.join(" #")}`);
|
|
260
364
|
}
|
|
261
365
|
}
|
|
262
366
|
console.log(line);
|
|
@@ -298,7 +402,7 @@ export function formatTaskList(tasks, verbose = false, index, grepPattern, full
|
|
|
298
402
|
}
|
|
299
403
|
}
|
|
300
404
|
else if (full) {
|
|
301
|
-
// AC-1
|
|
405
|
+
// AC: @task-list-verbose ac-1 - Full mode shows richer context
|
|
302
406
|
formatFullModeContext(task, index);
|
|
303
407
|
}
|
|
304
408
|
else {
|
|
@@ -314,26 +418,40 @@ export function formatTaskList(tasks, verbose = false, index, grepPattern, full
|
|
|
314
418
|
/**
|
|
315
419
|
* Format task details
|
|
316
420
|
*/
|
|
317
|
-
export function formatTaskDetails(task, index) {
|
|
421
|
+
export function formatTaskDetails(task, index, options = {}) {
|
|
318
422
|
console.log(chalk.bold(task.title));
|
|
319
|
-
console.log(chalk.gray(
|
|
423
|
+
console.log(chalk.gray("─".repeat(40)));
|
|
320
424
|
console.log(`${fieldLabels.ulid} ${task._ulid}`);
|
|
321
425
|
if (task.slugs.length > 0) {
|
|
322
|
-
console.log(`${fieldLabels.slugs} ${task.slugs.join(
|
|
426
|
+
console.log(`${fieldLabels.slugs} ${task.slugs.join(", ")}`);
|
|
323
427
|
}
|
|
324
428
|
console.log(`${fieldLabels.type} ${task.type}`);
|
|
325
429
|
console.log(`${fieldLabels.status} ${statusColor(task.status)(task.status)}`);
|
|
326
430
|
console.log(`${fieldLabels.priority} ${task.priority}`);
|
|
327
431
|
// AC: @task-automation-eligibility ac-17 - show automation status
|
|
328
|
-
const automationDisplay = task.automation ||
|
|
329
|
-
const automationColor = task.automation ===
|
|
330
|
-
|
|
331
|
-
|
|
432
|
+
const automationDisplay = task.automation || "unassessed";
|
|
433
|
+
const automationColor = task.automation === "eligible"
|
|
434
|
+
? chalk.green
|
|
435
|
+
: task.automation === "needs_review"
|
|
436
|
+
? chalk.yellow
|
|
437
|
+
: task.automation === "manual_only"
|
|
438
|
+
? chalk.red
|
|
332
439
|
: chalk.gray;
|
|
333
440
|
console.log(`${fieldLabels.automation} ${automationColor(automationDisplay)}`);
|
|
441
|
+
if (task.description?.trim()) {
|
|
442
|
+
console.log(`\n${sectionHeaders.description}`);
|
|
443
|
+
const desc = task.description.trim();
|
|
444
|
+
for (const line of desc.split("\n")) {
|
|
445
|
+
console.log(` ${line}`);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
334
448
|
if (task.spec_ref) {
|
|
335
449
|
console.log(`${fieldLabels.specRef} ${task.spec_ref}`);
|
|
336
450
|
}
|
|
451
|
+
// AC: @plan-derive ac-6 - display plan_ref
|
|
452
|
+
if (task.plan_ref) {
|
|
453
|
+
console.log(`Plan ref: ${task.plan_ref}`);
|
|
454
|
+
}
|
|
337
455
|
if (task.depends_on.length > 0) {
|
|
338
456
|
if (index) {
|
|
339
457
|
console.log(fieldLabels.depends);
|
|
@@ -341,27 +459,33 @@ export function formatTaskDetails(task, index) {
|
|
|
341
459
|
const result = index.resolve(ref);
|
|
342
460
|
if (result.ok) {
|
|
343
461
|
const item = result.item;
|
|
344
|
-
const status =
|
|
462
|
+
const status = "status" in item && typeof item.status === "string"
|
|
345
463
|
? statusColor(item.status)(`[${item.status}]`)
|
|
346
|
-
: chalk.gray(
|
|
464
|
+
: chalk.gray("[spec]");
|
|
347
465
|
// Handle both spec items (with title) and meta items (with name or id)
|
|
348
|
-
const itemName =
|
|
349
|
-
|
|
466
|
+
const itemName = "title" in item
|
|
467
|
+
? item.title
|
|
468
|
+
: "name" in item
|
|
469
|
+
? item.name
|
|
470
|
+
: "id" in item
|
|
471
|
+
? item.id
|
|
472
|
+
: ref;
|
|
473
|
+
console.log(` ${ref} ${chalk.gray("→")} ${itemName} ${status}`);
|
|
350
474
|
}
|
|
351
475
|
else {
|
|
352
|
-
console.log(` ${ref} ${chalk.red(
|
|
476
|
+
console.log(` ${ref} ${chalk.red("(unresolved)")}`);
|
|
353
477
|
}
|
|
354
478
|
}
|
|
355
479
|
}
|
|
356
480
|
else {
|
|
357
|
-
console.log(`${fieldLabels.depends} ${task.depends_on.join(
|
|
481
|
+
console.log(`${fieldLabels.depends} ${task.depends_on.join(", ")}`);
|
|
358
482
|
}
|
|
359
483
|
}
|
|
360
484
|
if (task.blocked_by.length > 0) {
|
|
361
|
-
console.log(chalk.red(`${fieldLabels.blocked} ${task.blocked_by.join(
|
|
485
|
+
console.log(chalk.red(`${fieldLabels.blocked} ${task.blocked_by.join(", ")}`));
|
|
362
486
|
}
|
|
363
487
|
if (task.tags.length > 0) {
|
|
364
|
-
console.log(`${fieldLabels.tags} ${task.tags.join(
|
|
488
|
+
console.log(`${fieldLabels.tags} ${task.tags.join(", ")}`);
|
|
365
489
|
}
|
|
366
490
|
console.log(`${fieldLabels.created} ${task.created_at}`);
|
|
367
491
|
if (task.started_at) {
|
|
@@ -377,34 +501,46 @@ export function formatTaskDetails(task, index) {
|
|
|
377
501
|
const spec = result.item;
|
|
378
502
|
console.log(`\n${sectionHeaders.specContext}`);
|
|
379
503
|
// Handle both spec items (with title) and meta items (with name)
|
|
380
|
-
const specName =
|
|
504
|
+
const specName = "title" in spec
|
|
505
|
+
? spec.title
|
|
506
|
+
: "name" in spec
|
|
507
|
+
? spec.name
|
|
508
|
+
: "id" in spec
|
|
509
|
+
? spec.id
|
|
510
|
+
: task.spec_ref;
|
|
381
511
|
console.log(chalk.cyan(specName));
|
|
382
|
-
if (
|
|
512
|
+
if ("type" in spec && spec.type) {
|
|
383
513
|
console.log(chalk.gray(`${fieldLabels.type} ${spec.type}`));
|
|
384
514
|
}
|
|
385
515
|
// Show implementation status
|
|
386
|
-
if (
|
|
516
|
+
if ("status" in spec && spec.status && typeof spec.status === "object") {
|
|
387
517
|
const status = spec.status;
|
|
388
518
|
if (status.implementation) {
|
|
389
|
-
const implColor = status.implementation ===
|
|
390
|
-
|
|
391
|
-
|
|
519
|
+
const implColor = status.implementation === "verified"
|
|
520
|
+
? chalk.green
|
|
521
|
+
: status.implementation === "implemented"
|
|
522
|
+
? chalk.cyan
|
|
523
|
+
: status.implementation === "in_progress"
|
|
524
|
+
? chalk.yellow
|
|
392
525
|
: chalk.gray;
|
|
393
|
-
console.log(chalk.gray(fieldLabels.implementation) +
|
|
526
|
+
console.log(chalk.gray(fieldLabels.implementation) +
|
|
527
|
+
implColor(status.implementation));
|
|
394
528
|
}
|
|
395
529
|
}
|
|
396
|
-
if (
|
|
530
|
+
if ("description" in spec && spec.description) {
|
|
397
531
|
console.log(chalk.gray(fieldLabels.description));
|
|
398
532
|
// Indent description lines
|
|
399
533
|
const desc = String(spec.description).trim();
|
|
400
|
-
for (const line of desc.split(
|
|
534
|
+
for (const line of desc.split("\n")) {
|
|
401
535
|
console.log(chalk.gray(` ${line}`));
|
|
402
536
|
}
|
|
403
537
|
}
|
|
404
|
-
if (
|
|
538
|
+
if ("acceptance_criteria" in spec &&
|
|
539
|
+
Array.isArray(spec.acceptance_criteria) &&
|
|
540
|
+
spec.acceptance_criteria.length > 0) {
|
|
405
541
|
console.log(chalk.gray(fieldLabels.acceptanceCriteria));
|
|
406
542
|
for (const ac of spec.acceptance_criteria) {
|
|
407
|
-
if (ac && typeof ac ===
|
|
543
|
+
if (ac && typeof ac === "object" && "id" in ac) {
|
|
408
544
|
const acObj = ac;
|
|
409
545
|
console.log(chalk.gray(` [${acObj.id}]`));
|
|
410
546
|
if (acObj.given)
|
|
@@ -417,9 +553,14 @@ export function formatTaskDetails(task, index) {
|
|
|
417
553
|
}
|
|
418
554
|
}
|
|
419
555
|
// Show traceability if present
|
|
420
|
-
if (
|
|
556
|
+
if ("traceability" in spec &&
|
|
557
|
+
spec.traceability &&
|
|
558
|
+
typeof spec.traceability === "object") {
|
|
421
559
|
const trace = spec.traceability;
|
|
422
|
-
const hasTrace = trace.implementation?.length ||
|
|
560
|
+
const hasTrace = trace.implementation?.length ||
|
|
561
|
+
trace.tests?.length ||
|
|
562
|
+
trace.commits?.length ||
|
|
563
|
+
trace.issues?.length;
|
|
423
564
|
if (hasTrace) {
|
|
424
565
|
console.log(chalk.gray(fieldLabels.traceability));
|
|
425
566
|
if (trace.implementation?.length) {
|
|
@@ -438,27 +579,38 @@ export function formatTaskDetails(task, index) {
|
|
|
438
579
|
}
|
|
439
580
|
}
|
|
440
581
|
if (trace.commits?.length) {
|
|
441
|
-
console.log(chalk.gray(` Commits: ${trace.commits.join(
|
|
582
|
+
console.log(chalk.gray(` Commits: ${trace.commits.join(", ")}`));
|
|
442
583
|
}
|
|
443
584
|
if (trace.issues?.length) {
|
|
444
|
-
console.log(chalk.gray(` Issues: ${trace.issues.join(
|
|
585
|
+
console.log(chalk.gray(` Issues: ${trace.issues.join(", ")}`));
|
|
445
586
|
}
|
|
446
587
|
}
|
|
447
588
|
}
|
|
448
589
|
}
|
|
449
590
|
}
|
|
450
591
|
if (task.notes.length > 0) {
|
|
592
|
+
// Filter superseded notes unless showAllNotes is true
|
|
593
|
+
const notesToShow = options.showAllNotes
|
|
594
|
+
? task.notes
|
|
595
|
+
: filterSupersededNotes(task.notes);
|
|
596
|
+
const hiddenCount = task.notes.length - notesToShow.length;
|
|
451
597
|
console.log(`\n${sectionHeaders.notes}`);
|
|
452
|
-
for (const note of
|
|
453
|
-
const author = note.author ||
|
|
454
|
-
|
|
598
|
+
for (const note of notesToShow) {
|
|
599
|
+
const author = note.author || "unknown";
|
|
600
|
+
// Mark if this note supersedes another
|
|
601
|
+
const supersededLabel = note.supersedes ? chalk.gray(" (supersedes earlier note)") : "";
|
|
602
|
+
console.log(chalk.gray(`[${note.created_at}] ${author}:`) + supersededLabel);
|
|
455
603
|
console.log(note.content);
|
|
456
604
|
}
|
|
605
|
+
// Show count of hidden notes if any
|
|
606
|
+
if (hiddenCount > 0) {
|
|
607
|
+
console.log(chalk.gray(`\n(${hiddenCount} superseded note${hiddenCount > 1 ? "s" : ""} hidden - use --all to show)`));
|
|
608
|
+
}
|
|
457
609
|
}
|
|
458
610
|
if (task.todos.length > 0) {
|
|
459
611
|
console.log(`\n${sectionHeaders.todos}`);
|
|
460
612
|
for (const todo of task.todos) {
|
|
461
|
-
const check = todo.done ? chalk.green(
|
|
613
|
+
const check = todo.done ? chalk.green("✓") : chalk.gray("○");
|
|
462
614
|
const text = todo.done ? chalk.strikethrough.gray(todo.text) : todo.text;
|
|
463
615
|
console.log(`${check} [${todo.id}] ${text}`);
|
|
464
616
|
}
|