@kynetic-ai/spec 0.1.2 → 0.3.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 +116 -0
- package/dist/cli/batch-exec.d.ts.map +1 -0
- package/dist/cli/batch-exec.js +694 -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 +140 -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 +57 -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 +533 -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 +516 -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 +1097 -169
- 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 +811 -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 +1233 -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 +53 -0
- package/dist/cli/commands/skill-install.d.ts.map +1 -0
- package/dist/cli/commands/skill-install.js +452 -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 +569 -346
- 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 +227 -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 +569 -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 +235 -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 +468 -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 +351 -0
- package/dist/parser/config.d.ts.map +1 -0
- package/dist/parser/config.js +326 -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 +189 -0
- package/dist/parser/plan-document.d.ts.map +1 -0
- package/dist/parser/plan-document.js +340 -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 +277 -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 +83 -0
- package/dist/ralph/subagent.d.ts.map +1 -0
- package/dist/ralph/subagent.js +174 -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 +95 -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 +2 -2
- package/dist/schema/common.d.ts.map +1 -1
- package/dist/schema/common.js +34 -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 +233 -1
- package/dist/sessions/store.d.ts.map +1 -1
- package/dist/sessions/store.js +628 -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 +51 -0
- package/dist/strings/errors.d.ts.map +1 -1
- package/dist/strings/errors.js +136 -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/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/help/SKILL.md +42 -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/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/help/SKILL.md +37 -0
- package/templates/skills/manifest.yaml +15 -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
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triage
|
|
3
|
+
description: Triage inbox items systematically. Records decisions with audit
|
|
4
|
+
trail, then executes actions. Supports inbox, observations, and automation
|
|
5
|
+
eligibility triage.
|
|
6
|
+
---
|
|
7
|
+
<!-- kspec-managed -->
|
|
8
|
+
# Triage
|
|
9
|
+
|
|
10
|
+
Systematically process items: inbox, observations, or automation eligibility.
|
|
11
|
+
|
|
12
|
+
## Focus Modes
|
|
13
|
+
|
|
14
|
+
Use `/triage <mode>` to focus on a specific area:
|
|
15
|
+
|
|
16
|
+
| Mode | Purpose | Documentation |
|
|
17
|
+
|------|---------|---------------|
|
|
18
|
+
| `inbox` | Process inbox items → specs/tasks | [docs/inbox.md](docs/inbox.md) |
|
|
19
|
+
| `observations` | Process pending observations | [docs/observations.md](docs/observations.md) |
|
|
20
|
+
| `automation` | Assess task automation eligibility | [docs/automation.md](docs/automation.md) |
|
|
21
|
+
|
|
22
|
+
Without a mode, follow the full triage session pattern below.
|
|
23
|
+
|
|
24
|
+
## Core Concept: Record → Act
|
|
25
|
+
|
|
26
|
+
Triage uses a **two-step pattern** that separates decision-making from execution:
|
|
27
|
+
|
|
28
|
+
1. **Record** the decision (what to do + why)
|
|
29
|
+
2. **Act** on the decision (execute it)
|
|
30
|
+
|
|
31
|
+
This separation enables review, override, and audit trails.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Step 1: Record what you want to do
|
|
35
|
+
kspec triage record @inbox-ref --action promote --reasoning "Clear feature request"
|
|
36
|
+
|
|
37
|
+
# Step 2: Execute the decision
|
|
38
|
+
kspec triage act @triage-ref
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Actions
|
|
42
|
+
|
|
43
|
+
| Action | What `act` does |
|
|
44
|
+
|--------|-----------------|
|
|
45
|
+
| `promote` | Creates task from inbox item snapshot |
|
|
46
|
+
| `delete` | Deletes the inbox item |
|
|
47
|
+
| `defer` | Records deferral, no side effect |
|
|
48
|
+
| `spec-gap` | Creates observation tagged spec-gap |
|
|
49
|
+
| `duplicate` | Deletes the inbox item |
|
|
50
|
+
|
|
51
|
+
### Lifecycle
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
record (with action) override (optional) act
|
|
55
|
+
→ triaged → triaged → acted_on
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Full Session Pattern
|
|
59
|
+
|
|
60
|
+
1. **Get context**
|
|
61
|
+
```bash
|
|
62
|
+
kspec session start --full
|
|
63
|
+
kspec inbox list
|
|
64
|
+
kspec meta observations --pending-resolution
|
|
65
|
+
kspec tasks assess automation
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
2. **Present overview to user**
|
|
69
|
+
- Inbox items by category
|
|
70
|
+
- Pending observations by type
|
|
71
|
+
- Unassessed tasks needing triage
|
|
72
|
+
|
|
73
|
+
3. **Ask which focus area**
|
|
74
|
+
- Inbox items
|
|
75
|
+
- Observations
|
|
76
|
+
- Automation eligibility
|
|
77
|
+
|
|
78
|
+
4. **Process that focus area**
|
|
79
|
+
- Use the relevant sub-document for guidance
|
|
80
|
+
|
|
81
|
+
5. **Repeat or stop** when user indicates
|
|
82
|
+
|
|
83
|
+
## Quick Start by Mode
|
|
84
|
+
|
|
85
|
+
### `/triage inbox`
|
|
86
|
+
|
|
87
|
+
Process inbox items using the record → act pattern. See [docs/inbox.md](docs/inbox.md).
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
kspec inbox list
|
|
91
|
+
|
|
92
|
+
# Interactive mode: triage all untriaged items one by one
|
|
93
|
+
kspec triage start
|
|
94
|
+
|
|
95
|
+
# Or record decisions individually
|
|
96
|
+
kspec triage record @ref --action promote --reasoning "Clear feature need"
|
|
97
|
+
kspec triage record @ref --action delete --reasoning "Outdated"
|
|
98
|
+
kspec triage record @ref --action defer --reasoning "Not ready yet"
|
|
99
|
+
kspec triage record @ref --action spec-gap --reasoning "Missing spec coverage"
|
|
100
|
+
kspec triage record @ref --action duplicate --reasoning "Covered by @other-ref"
|
|
101
|
+
|
|
102
|
+
# Then execute recorded decisions
|
|
103
|
+
kspec triage act @triage-ref
|
|
104
|
+
kspec triage act @triage-ref --dry-run # Preview first
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### `/triage observations`
|
|
108
|
+
|
|
109
|
+
Process pending observations. See [docs/observations.md](docs/observations.md).
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
kspec meta observations --pending-resolution
|
|
113
|
+
# For each: resolve, promote to task, or leave
|
|
114
|
+
kspec meta resolve @ref "Resolution notes"
|
|
115
|
+
kspec meta resolve @ref1 @ref2 "Batch resolution"
|
|
116
|
+
kspec meta observations promote @ref --title "..."
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### `/triage automation`
|
|
120
|
+
|
|
121
|
+
Assess task automation eligibility. See [docs/automation.md](docs/automation.md).
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
kspec tasks assess automation
|
|
125
|
+
# Review criteria, fix issues, or mark status
|
|
126
|
+
kspec task set @ref --automation eligible
|
|
127
|
+
kspec task set @ref --automation needs_review --reason "..."
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Triage Commands Reference
|
|
131
|
+
|
|
132
|
+
### Recording Decisions
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Record a triage decision for an inbox item
|
|
136
|
+
kspec triage record @inbox-ref --action <action> --reasoning "why"
|
|
137
|
+
kspec triage record @inbox-ref --action promote --reasoning "..." --evidence @spec-ref
|
|
138
|
+
kspec triage record @inbox-ref --action promote --reasoning "..." --json # JSON output
|
|
139
|
+
|
|
140
|
+
# Interactive mode: presents untriaged items one at a time
|
|
141
|
+
kspec triage start
|
|
142
|
+
# Ctrl+C preserves all previously committed records
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Reviewing Decisions
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# List all triage records
|
|
149
|
+
kspec triage list
|
|
150
|
+
kspec triage list --status triaged # Only pending execution
|
|
151
|
+
kspec triage list --status acted_on # Already executed
|
|
152
|
+
kspec triage list --action promote # Filter by action type
|
|
153
|
+
|
|
154
|
+
# Get details of a specific record
|
|
155
|
+
kspec triage get @triage-ref
|
|
156
|
+
|
|
157
|
+
# Export for agent handoff
|
|
158
|
+
kspec triage export --format context # Markdown context blocks
|
|
159
|
+
kspec triage export --format json # Full JSON array
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Executing and Overriding
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Execute a recorded decision
|
|
166
|
+
kspec triage act @triage-ref
|
|
167
|
+
kspec triage act @triage-ref --dry-run # Preview without executing
|
|
168
|
+
|
|
169
|
+
# Override a previous decision (preserves audit trail)
|
|
170
|
+
kspec triage override @triage-ref --action defer --reasoning "Not ready yet"
|
|
171
|
+
# Then act on the updated decision
|
|
172
|
+
kspec triage act @triage-ref
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Bulk Operations with Batch
|
|
176
|
+
|
|
177
|
+
When processing many items at once, use `kspec batch`:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Record multiple triage decisions atomically
|
|
181
|
+
kspec batch --commands '[
|
|
182
|
+
{"command":"triage record","args":{"ref":"@ref1","action":"delete","reasoning":"Stale"}},
|
|
183
|
+
{"command":"triage record","args":{"ref":"@ref2","action":"delete","reasoning":"Duplicate"}},
|
|
184
|
+
{"command":"triage record","args":{"ref":"@ref3","action":"promote","reasoning":"Clear scope"}}
|
|
185
|
+
]'
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Use `--dry-run` to preview. See `/kspec:help` for full batch documentation.
|
|
189
|
+
|
|
190
|
+
## Key Principles
|
|
191
|
+
|
|
192
|
+
- **Record before act** - Separate decisions from execution for audit trail
|
|
193
|
+
- **Ask one question at a time** - Don't batch decisions
|
|
194
|
+
- **Spec before task** - Fill spec gaps before creating tasks
|
|
195
|
+
- **AC is required** - Specs without acceptance criteria are incomplete
|
|
196
|
+
- **Use CLI, not YAML** - All changes through kspec commands
|
|
197
|
+
- **Delete freely** - Outdated items should go
|
|
198
|
+
|
|
199
|
+
## Progress Tracking
|
|
200
|
+
|
|
201
|
+
At session end, provide summary:
|
|
202
|
+
- Items triaged (recorded decisions)
|
|
203
|
+
- Actions executed (promoted, deleted, deferred, spec-gap, duplicate)
|
|
204
|
+
- Tasks created/updated
|
|
205
|
+
- Observations resolved
|
|
206
|
+
- Remaining items
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Automation Triage
|
|
2
|
+
|
|
3
|
+
Assess and prepare tasks for automation eligibility. Goal: make tasks self-contained so they can be automated.
|
|
4
|
+
|
|
5
|
+
## Philosophy
|
|
6
|
+
|
|
7
|
+
- **Eligible is the goal** - Manual-only should be the exception
|
|
8
|
+
- **Criteria are for visibility** - Help identify what's missing, not auto-approve
|
|
9
|
+
- **Fix issues, don't just assess** - Guide toward making tasks automatable
|
|
10
|
+
|
|
11
|
+
## Eligibility Criteria
|
|
12
|
+
|
|
13
|
+
A task is ready for automation when:
|
|
14
|
+
1. Has `spec_ref` pointing to resolvable spec
|
|
15
|
+
2. Spec has acceptance criteria (testable outcomes)
|
|
16
|
+
3. Task type is not `spike` (spikes output knowledge, not code)
|
|
17
|
+
|
|
18
|
+
**Having spec + ACs is necessary but not sufficient** - you must also verify the spec is appropriate and ACs are adequate for the task.
|
|
19
|
+
|
|
20
|
+
**Task type does not determine automation eligibility.** Any non-spike task can be `automation: eligible` — including design tasks, refactoring tasks, documentation tasks, etc. The `automation` field is the definitive source. Once a task is marked `eligible`, do not second-guess it based on type, title, or description.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
### 1. Get Assessment Overview
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Show unassessed pending tasks with criteria status
|
|
28
|
+
kspec tasks assess automation
|
|
29
|
+
|
|
30
|
+
# See what auto mode would change
|
|
31
|
+
kspec tasks assess automation --auto --dry-run
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 2. Process Each Task
|
|
35
|
+
|
|
36
|
+
For each task shown:
|
|
37
|
+
|
|
38
|
+
**If spike:**
|
|
39
|
+
- Mark `manual_only` - spikes are inherently human work
|
|
40
|
+
- `kspec task set @ref --automation manual_only --reason "Spike - output is knowledge"`
|
|
41
|
+
|
|
42
|
+
**If missing spec_ref or no ACs:**
|
|
43
|
+
- Ask: "Fix now or mark for later?"
|
|
44
|
+
- **Fix now:**
|
|
45
|
+
1. Create or find appropriate spec: `kspec item add --under @parent --title "..."`
|
|
46
|
+
2. Add acceptance criteria: `kspec item ac add @spec --given "..." --when "..." --then "..."`
|
|
47
|
+
3. Link task to spec: `kspec task set @ref --spec-ref @spec`
|
|
48
|
+
4. Re-assess and mark eligible if appropriate
|
|
49
|
+
- **Mark for later:**
|
|
50
|
+
- `kspec task set @ref --automation needs_review --reason "Missing spec - needs spec creation"`
|
|
51
|
+
|
|
52
|
+
**If has spec + ACs:**
|
|
53
|
+
- Review for eligibility:
|
|
54
|
+
- Is the spec appropriate for this task?
|
|
55
|
+
- Are the ACs adequate and testable?
|
|
56
|
+
- Does the task have sufficient context?
|
|
57
|
+
- If yes: `kspec task set @ref --automation eligible`
|
|
58
|
+
- If no: Fix issues or mark `needs_review` with specific reason
|
|
59
|
+
|
|
60
|
+
### 3. Batch Processing with Auto Mode
|
|
61
|
+
|
|
62
|
+
For fast triage of obvious cases:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Apply auto mode (spikes → manual_only, missing → needs_review)
|
|
66
|
+
kspec tasks assess automation --auto
|
|
67
|
+
|
|
68
|
+
# Then manually review the "review_for_eligible" tasks
|
|
69
|
+
kspec tasks ready --unassessed
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Auto mode is conservative:
|
|
73
|
+
- Spikes → `manual_only`
|
|
74
|
+
- Missing spec/ACs → `needs_review`
|
|
75
|
+
- Has spec + ACs → **NOT auto-marked** (requires review)
|
|
76
|
+
|
|
77
|
+
## Quick Commands
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Assessment
|
|
81
|
+
kspec tasks assess automation # Show unassessed with criteria
|
|
82
|
+
kspec tasks assess automation @ref # Single task
|
|
83
|
+
kspec tasks assess automation --all # Include already-assessed
|
|
84
|
+
kspec tasks assess automation --auto # Apply obvious cases
|
|
85
|
+
kspec tasks assess automation --dry-run # Preview changes
|
|
86
|
+
|
|
87
|
+
# Setting automation status
|
|
88
|
+
kspec task set @ref --automation eligible
|
|
89
|
+
kspec task set @ref --automation needs_review --reason "Why"
|
|
90
|
+
kspec task set @ref --automation manual_only --reason "Why"
|
|
91
|
+
kspec task set @ref --no-automation # Clear to unassessed
|
|
92
|
+
|
|
93
|
+
# Filtering tasks
|
|
94
|
+
kspec tasks ready --unassessed # Tasks needing assessment
|
|
95
|
+
kspec tasks ready --eligible # Automation-ready tasks
|
|
96
|
+
kspec tasks ready --needs-review # Tasks needing human triage
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Assessment Output
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
@task-slug "Task title"
|
|
103
|
+
spec_ref: ✓ @feature-slug
|
|
104
|
+
has_acs: ✓ 3 acceptance criteria
|
|
105
|
+
not_spike: ✓ type: task
|
|
106
|
+
→ review_for_eligible (verify spec/AC adequacy)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
| Recommendation | Meaning | Auto Mode Action |
|
|
110
|
+
|----------------|---------|------------------|
|
|
111
|
+
| `review_for_eligible` | Passes criteria, needs review | No change (manual review) |
|
|
112
|
+
| `needs_review` | Missing spec or ACs | Sets `needs_review` with reason |
|
|
113
|
+
| `manual_only` | Spike task | Sets `manual_only` |
|
|
114
|
+
|
|
115
|
+
## Key Principles
|
|
116
|
+
|
|
117
|
+
- **CLI doesn't auto-mark eligible** - Requires agent/human review
|
|
118
|
+
- **Agents CAN mark eligible** - When reviewing based on user instruction
|
|
119
|
+
- **Add notes when setting status** - Document the "why"
|
|
120
|
+
- **Re-assess after fixes** - After adding spec/ACs, check again
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Inbox Triage
|
|
2
|
+
|
|
3
|
+
Process inbox items systematically using the **record → act** pattern: record a decision with reasoning, then execute it.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
### 1. Gather Context
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
kspec session start --full
|
|
11
|
+
kspec inbox list
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### 2. Categorize Items
|
|
15
|
+
|
|
16
|
+
Group inbox items by type:
|
|
17
|
+
- **Bugs** - implementation issues, errors
|
|
18
|
+
- **Spec gaps** - missing or incomplete specs
|
|
19
|
+
- **Quick wins** - small, well-defined improvements
|
|
20
|
+
- **Larger features** - need plan mode to design
|
|
21
|
+
- **Process/workflow** - meta improvements
|
|
22
|
+
- **Delete candidates** - outdated, duplicates, already done
|
|
23
|
+
|
|
24
|
+
Present categories to user for alignment.
|
|
25
|
+
|
|
26
|
+
### 3. Triage Each Item
|
|
27
|
+
|
|
28
|
+
**Interactive mode** (recommended for multiple items):
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
kspec triage start
|
|
32
|
+
# Presents untriaged items one by one
|
|
33
|
+
# Prompts for action + reasoning
|
|
34
|
+
# Ctrl+C preserves all previously committed records
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Individual recording** (for targeted decisions):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
kspec triage record @ref --action promote --reasoning "Clear feature request with spec coverage"
|
|
41
|
+
kspec triage record @ref --action delete --reasoning "Already implemented in PR #123"
|
|
42
|
+
kspec triage record @ref --action defer --reasoning "Depends on auth system redesign"
|
|
43
|
+
kspec triage record @ref --action spec-gap --reasoning "No spec covers error handling for this flow"
|
|
44
|
+
kspec triage record @ref --action duplicate --reasoning "Covered by @existing-spec"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 4. Review and Execute Decisions
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Review what was recorded
|
|
51
|
+
kspec triage list --status triaged
|
|
52
|
+
|
|
53
|
+
# Preview before executing
|
|
54
|
+
kspec triage act @triage-ref --dry-run
|
|
55
|
+
|
|
56
|
+
# Execute decisions
|
|
57
|
+
kspec triage act @triage-ref
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 5. Override If Needed
|
|
61
|
+
|
|
62
|
+
If a decision needs changing before or after execution:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Override changes the action while preserving the audit trail
|
|
66
|
+
kspec triage override @triage-ref --action defer --reasoning "Reconsidered - not ready"
|
|
67
|
+
|
|
68
|
+
# Then act on the updated decision
|
|
69
|
+
kspec triage act @triage-ref
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 6. Spec-First Processing
|
|
73
|
+
|
|
74
|
+
For behavior changes, check spec coverage before promoting:
|
|
75
|
+
|
|
76
|
+
1. **Check coverage**: `kspec item list | grep <relevant>`
|
|
77
|
+
2. **Identify gaps**: Does spec have description AND acceptance criteria?
|
|
78
|
+
3. **Update spec**:
|
|
79
|
+
```bash
|
|
80
|
+
kspec item set @ref --description "..."
|
|
81
|
+
kspec item ac add @ref --given "..." --when "..." --then "..."
|
|
82
|
+
```
|
|
83
|
+
4. **Record and act**:
|
|
84
|
+
```bash
|
|
85
|
+
kspec triage record @inbox-ref --action promote --reasoning "Spec updated" --evidence @spec-ref
|
|
86
|
+
kspec triage act @triage-ref
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 7. Plan Mode for Larger Items
|
|
90
|
+
|
|
91
|
+
When an item needs design work:
|
|
92
|
+
|
|
93
|
+
1. Enter plan mode
|
|
94
|
+
2. Explore codebase for patterns/context
|
|
95
|
+
3. Design spec structure and implementation approach
|
|
96
|
+
4. Write plan, exit for approval
|
|
97
|
+
5. Execute: create spec, add AC, derive task
|
|
98
|
+
|
|
99
|
+
## Export for Context
|
|
100
|
+
|
|
101
|
+
Share triage decisions with other agents or sessions:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Markdown context blocks (for agent handoff)
|
|
105
|
+
kspec triage export --format context
|
|
106
|
+
|
|
107
|
+
# Full structured data
|
|
108
|
+
kspec triage export --format json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Bulk Processing with Batch
|
|
112
|
+
|
|
113
|
+
When triaging many items, use `kspec batch` to record decisions in bulk:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Record multiple decisions atomically
|
|
117
|
+
kspec batch --commands '[
|
|
118
|
+
{"command":"triage record","args":{"ref":"@ref1","action":"delete","reasoning":"Stale"}},
|
|
119
|
+
{"command":"triage record","args":{"ref":"@ref2","action":"promote","reasoning":"Clear scope"}}
|
|
120
|
+
]'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Use `--dry-run` to preview. See `/kspec:help` for full batch documentation.
|
|
124
|
+
|
|
125
|
+
## Common Patterns
|
|
126
|
+
|
|
127
|
+
| Pattern | Action |
|
|
128
|
+
|---------|--------|
|
|
129
|
+
| Already implemented | Verify impl exists → check spec gaps → record delete |
|
|
130
|
+
| Duplicate of existing | Verify original covers scope → record duplicate |
|
|
131
|
+
| Small flag/option | Update spec + AC → record promote |
|
|
132
|
+
| New command | Plan mode → design spec → record promote with evidence |
|
|
133
|
+
| Bug report | Check spec coverage → update spec → record promote |
|
|
134
|
+
| Vague idea | Record defer, or leave untriaged for later |
|
|
135
|
+
| Missing spec | Record spec-gap → creates observation for follow-up |
|
|
136
|
+
|
|
137
|
+
## Key Principles
|
|
138
|
+
|
|
139
|
+
- **Record before act** - Decisions are separated from execution
|
|
140
|
+
- **Ask one question at a time** - Use AskUserQuestion for decisions
|
|
141
|
+
- **Spec before task** - Fill spec gaps before promoting to tasks
|
|
142
|
+
- **AC is required** - Specs without acceptance criteria are incomplete
|
|
143
|
+
- **Use CLI, not YAML** - All changes through kspec commands
|
|
144
|
+
- **Delete freely** - Outdated or duplicate items should go
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Observations Triage
|
|
2
|
+
|
|
3
|
+
Process pending observations: evaluate, resolve, or promote to tasks.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
### 1. List Pending Observations
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
kspec meta observations --pending-resolution
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### 2. Process by Type
|
|
14
|
+
|
|
15
|
+
| Type | How to Process |
|
|
16
|
+
|------|----------------|
|
|
17
|
+
| **friction** | Does it reveal a spec gap? → Create spec or inbox item. If already addressed → resolve |
|
|
18
|
+
| **success** | Document in relevant spec or AGENTS.md if broadly useful → resolve |
|
|
19
|
+
| **question** | Answer it if you can. If needs investigation → promote to task |
|
|
20
|
+
| **idea** | Evaluate scope. Clear → inbox or task. Unclear → leave or delete |
|
|
21
|
+
|
|
22
|
+
### 3. Processing Commands
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Promote observation to task (when actionable work is clear)
|
|
26
|
+
kspec meta observations promote @ref --title "Add bulk AC command" --priority 2
|
|
27
|
+
|
|
28
|
+
# Resolve observation (when addressed or no longer relevant)
|
|
29
|
+
kspec meta resolve @ref "Resolution notes"
|
|
30
|
+
kspec meta resolve @ref1 @ref2 "Batch resolution"
|
|
31
|
+
|
|
32
|
+
# Convert inbox item to observation (if it's friction, not a task)
|
|
33
|
+
kspec meta observe --from-inbox @ref
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## When to Use Which
|
|
37
|
+
|
|
38
|
+
- **Inbox** = future work that becomes tasks
|
|
39
|
+
- **Observations** = systemic patterns that inform improvements
|
|
40
|
+
- **Tasks** = clear, actionable implementation work
|
|
41
|
+
|
|
42
|
+
## Decision Flow
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
For each observation:
|
|
46
|
+
├─ Still relevant?
|
|
47
|
+
│ ├─ No → resolve with note
|
|
48
|
+
│ └─ Yes → Does it need action?
|
|
49
|
+
│ ├─ No (just learning) → resolve after documenting
|
|
50
|
+
│ └─ Yes → Is scope clear?
|
|
51
|
+
│ ├─ Yes → promote to task
|
|
52
|
+
│ └─ No → add to inbox for later triage
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Bulk Resolution with Batch
|
|
56
|
+
|
|
57
|
+
When resolving many observations at once, use `kspec batch`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
kspec batch --commands '[
|
|
61
|
+
{"command":"meta resolve","args":{"ref":"@obs1","resolution":"Fixed in PR #100"}},
|
|
62
|
+
{"command":"meta resolve","args":{"ref":"@obs2","resolution":"No longer relevant"}},
|
|
63
|
+
{"command":"meta resolve","args":{"refs":["@obs3","@obs4"],"resolution":"Addressed by new workflow"}}
|
|
64
|
+
]'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `--dry-run` to preview. See `/kspec:help` for full batch documentation.
|
|
68
|
+
|
|
69
|
+
## Common Patterns
|
|
70
|
+
|
|
71
|
+
| Pattern | Action |
|
|
72
|
+
|---------|--------|
|
|
73
|
+
| Friction already fixed | Verify fix → resolve with note |
|
|
74
|
+
| Friction needs work | Check spec → create if needed → promote or inbox |
|
|
75
|
+
| Success pattern | Document in AGENTS.md or relevant spec → resolve |
|
|
76
|
+
| Open question | Answer if possible → resolve. If needs investigation → promote |
|
|
77
|
+
| Idea with clear scope | Promote to task or inbox |
|
|
78
|
+
| Vague idea | Leave or delete if stale |
|
|
79
|
+
|
|
80
|
+
## Key Principles
|
|
81
|
+
|
|
82
|
+
- **Observations capture learning** - Not just todos
|
|
83
|
+
- **Friction informs improvement** - Turn pain points into better specs
|
|
84
|
+
- **Success patterns are worth documenting** - Help future sessions
|
|
85
|
+
- **Questions should get answers** - Don't let them linger
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Quick Start
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
# First time setup
|
|
5
|
+
kspec init # Initialize kspec in the project
|
|
6
|
+
kspec setup # Configure agent environment
|
|
7
|
+
|
|
8
|
+
# Returning to work
|
|
9
|
+
kspec session start # Get session context
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Verify shadow branch health with `kspec shadow status` if you encounter issues.
|
|
13
|
+
|
|
14
|
+
## Essential Rules
|
|
15
|
+
|
|
16
|
+
1. **Use CLI, not manual YAML edits** — Never manually edit files in `.kspec/`. CLI auto-commits to shadow branch.
|
|
17
|
+
2. **Spec before code** — If changing behavior, check spec coverage. Update spec first if needed.
|
|
18
|
+
3. **Add notes** — Document what you do in task notes for audit trail.
|
|
19
|
+
4. **Check dependencies** — Tasks have `depends_on` relationships; complete prerequisites first.
|
|
20
|
+
5. **Always confirm** — Ask before creating or modifying spec items.
|
|
21
|
+
6. **Batch mutations** — Use `kspec batch` for 2+ sequential write operations (one atomic commit).
|
|
22
|
+
7. **Regenerate agent instructions** — Run `kspec agents generate` after changing conventions, workflows, or skills. These are the inputs to `kspec-agents.md`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
## Shadow Branch Architecture
|
|
2
|
+
|
|
3
|
+
`.kspec/` is NOT a regular directory — it's a **git worktree** on an orphan branch (`kspec-meta`).
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
.kspec/.git → file pointing to worktree
|
|
7
|
+
↓
|
|
8
|
+
gitdir: .git/worktrees/-kspec
|
|
9
|
+
↓
|
|
10
|
+
Shadow branch (kspec-meta): orphan branch with spec/task files
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Why:** Spec/task changes don't clutter main branch history. Code PRs and spec changes tracked independently.
|
|
14
|
+
|
|
15
|
+
**How it works:** Every `kspec` command auto-commits to `kspec-meta`. Auto-pushes to remote if tracking configured. Main branch gitignores `.kspec/`.
|
|
16
|
+
|
|
17
|
+
**CRITICAL: Always run kspec from project root, never from inside `.kspec/`.** If you see "Cannot run kspec from inside .kspec/ directory", check `pwd`.
|
|
18
|
+
|
|
19
|
+
### Shadow Branch Commands
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
kspec shadow status # Verify health
|
|
23
|
+
kspec shadow repair # Fix broken worktree
|
|
24
|
+
kspec shadow sync # Sync with remote
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Troubleshooting
|
|
28
|
+
|
|
29
|
+
| Issue | Fix |
|
|
30
|
+
|-------|-----|
|
|
31
|
+
| `.kspec/` doesn't exist | `kspec init` |
|
|
32
|
+
| Worktree disconnected | `kspec shadow repair` |
|
|
33
|
+
| Sync conflicts | `kspec shadow resolve` |
|
|
34
|
+
| Commands seem broken | Check `pwd` — must be project root |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
## Task Lifecycle
|
|
2
|
+
|
|
3
|
+
### Key Concepts
|
|
4
|
+
|
|
5
|
+
Every item has a ULID (canonical) and slug (human-friendly). References use `@` prefix: `@task-slug` or `@01JHNKAB`.
|
|
6
|
+
|
|
7
|
+
**Spec items** (`.kspec/modules/*.yaml`): Define WHAT to build
|
|
8
|
+
**Tasks** (`.kspec/project.tasks.yaml`): Track the WORK of building
|
|
9
|
+
|
|
10
|
+
Tasks reference specs via `spec_ref`. They don't duplicate spec content.
|
|
11
|
+
|
|
12
|
+
### Task States
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
pending → in_progress → pending_review → completed
|
|
16
|
+
↓ ↓
|
|
17
|
+
blocked ←──────────┘
|
|
18
|
+
↓ needs_work
|
|
19
|
+
cancelled (fix cycle: → in_progress → pending_review)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
See `kspec help task` for transition commands and options.
|
|
23
|
+
|
|
24
|
+
### Spec-First Development
|
|
25
|
+
|
|
26
|
+
**Core principle**: If you're changing behavior and the spec doesn't cover it, update the spec first.
|
|
27
|
+
|
|
28
|
+
| Situation | Flow |
|
|
29
|
+
|-----------|------|
|
|
30
|
+
| Clear behavior change | Check spec → Update/create spec → Derive task |
|
|
31
|
+
| Vague idea, unclear scope | Capture in inbox → Triage later |
|
|
32
|
+
| Infra/internal (no user impact) | Create task directly, no spec needed |
|
|
33
|
+
| Bug revealing spec gap | Fix bug → Update spec to match reality |
|
|
34
|
+
|
|
35
|
+
### Creating Work
|
|
36
|
+
|
|
37
|
+
- **Clear scope?** → Create task directly
|
|
38
|
+
- **Unclear scope?** → `kspec inbox add "idea"` → triage later with `/triage`
|
|
39
|
+
- **Learning/friction?** → `kspec meta observe friction "..."` → review with `/reflect`
|
|
40
|
+
|
|
41
|
+
### Staying Aligned During Work
|
|
42
|
+
|
|
43
|
+
**Watch for scope expansion:**
|
|
44
|
+
- Modifying files outside your current task
|
|
45
|
+
- Adding functionality the spec doesn't mention
|
|
46
|
+
- "While I'm here, I should also..." thoughts
|
|
47
|
+
|
|
48
|
+
**When you notice something outside your task:** Capture it separately (inbox item, new task, or observation). Add a note to your current task documenting what you found. Don't fix it inline — even small detours compound into drift. Stay on your task.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## PR Workflow
|
|
2
|
+
|
|
3
|
+
Before creating a PR, mark the task: `kspec task submit @ref` (transitions to `pending_review`).
|
|
4
|
+
|
|
5
|
+
The full PR lifecycle has three steps — **all required, in order:**
|
|
6
|
+
|
|
7
|
+
1. **`/local-review`** — Quality gates: AC coverage, test quality, test isolation. Run this FIRST.
|
|
8
|
+
2. **`/pr`** — Create the pull request.
|
|
9
|
+
3. **`/pr-review`** — Review and merge. Or `kspec workflow start @pr-review-merge`.
|
|
10
|
+
|
|
11
|
+
**Quality gates (never skip without explicit approval):**
|
|
12
|
+
- All CI checks passing
|
|
13
|
+
- All review comments addressed
|
|
14
|
+
- All review threads resolved
|
|
15
|
+
- AC coverage verified
|
|
16
|
+
|
|
17
|
+
**After merge:** `kspec task complete @ref --reason "Merged in PR #N. Summary..."`
|