@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
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project-level configuration for kspec.
|
|
3
|
+
*
|
|
4
|
+
* Loads kspec.config.yaml from the project root (main branch) before shadow
|
|
5
|
+
* branch detection. All fields are optional with backward-compatible defaults.
|
|
6
|
+
*
|
|
7
|
+
* Priority: env vars > config file > defaults
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
/**
|
|
13
|
+
* Complete schema for kspec.config.yaml.
|
|
14
|
+
*
|
|
15
|
+
* AC: @project-config ac-4 — unknown fields are ignored via passthrough
|
|
16
|
+
*/
|
|
17
|
+
export declare const KspecConfigSchema: z.ZodObject<{
|
|
18
|
+
/** Shadow branch configuration */
|
|
19
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
/** Branch name for shadow branch (default: kspec-meta) */
|
|
21
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
22
|
+
/** Worktree directory name (default: .kspec) */
|
|
23
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
24
|
+
/**
|
|
25
|
+
* Remote target for shadow branch. Can be:
|
|
26
|
+
* - Named remote (e.g., "origin", "specs-origin")
|
|
27
|
+
* - Local filesystem path (starts with /, ./, or ~)
|
|
28
|
+
* - Git URL (contains :// or starts with git@)
|
|
29
|
+
*/
|
|
30
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, "strict", z.ZodTypeAny, {
|
|
32
|
+
branch?: string | undefined;
|
|
33
|
+
directory?: string | undefined;
|
|
34
|
+
remote?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
branch?: string | undefined;
|
|
37
|
+
directory?: string | undefined;
|
|
38
|
+
remote?: string | undefined;
|
|
39
|
+
}>>;
|
|
40
|
+
/** Identity configuration */
|
|
41
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
/** Default author for notes/tasks (overridden by KSPEC_AUTHOR env var) */
|
|
43
|
+
author: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, "strict", z.ZodTypeAny, {
|
|
45
|
+
author?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
author?: string | undefined;
|
|
48
|
+
}>>;
|
|
49
|
+
/** Validation configuration */
|
|
50
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
/**
|
|
52
|
+
* When true, dangling references are treated as errors instead of warnings.
|
|
53
|
+
* AC: @config-validation ac-2 ac-3 — strict_refs configurable
|
|
54
|
+
*/
|
|
55
|
+
strict_refs: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
/**
|
|
57
|
+
* When true, specs missing acceptance criteria are reported as errors not warnings.
|
|
58
|
+
* AC: @config-validation ac-1 — require_acceptance configurable
|
|
59
|
+
*/
|
|
60
|
+
require_acceptance: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
}, "strict", z.ZodTypeAny, {
|
|
62
|
+
strict_refs?: boolean | undefined;
|
|
63
|
+
require_acceptance?: boolean | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
strict_refs?: boolean | undefined;
|
|
66
|
+
require_acceptance?: boolean | undefined;
|
|
67
|
+
}>>;
|
|
68
|
+
/** Daemon configuration */
|
|
69
|
+
daemon: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
/** Default port for daemon (default: 3456) */
|
|
71
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
/** Host to bind to (default: localhost) */
|
|
73
|
+
host: z.ZodOptional<z.ZodString>;
|
|
74
|
+
/**
|
|
75
|
+
* Whether to auto-start daemon when running kspec commands.
|
|
76
|
+
* AC: @config-daemon ac-3 — auto_start configurable
|
|
77
|
+
*/
|
|
78
|
+
auto_start: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
auto_start?: boolean | undefined;
|
|
81
|
+
port?: number | undefined;
|
|
82
|
+
host?: string | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
auto_start?: boolean | undefined;
|
|
85
|
+
port?: number | undefined;
|
|
86
|
+
host?: string | undefined;
|
|
87
|
+
}>>;
|
|
88
|
+
/** Ralph automation configuration */
|
|
89
|
+
ralph: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
/** Skill invocation name overrides */
|
|
91
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
/** Skill invocation for task-work (default: /kspec:task-work) */
|
|
93
|
+
task_work: z.ZodOptional<z.ZodString>;
|
|
94
|
+
/** Skill invocation for reflect (default: /kspec:reflect) */
|
|
95
|
+
reflect: z.ZodOptional<z.ZodString>;
|
|
96
|
+
/** Skill invocation for PR review (default: /kspec:review) */
|
|
97
|
+
pr_review: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, "strict", z.ZodTypeAny, {
|
|
99
|
+
task_work?: string | undefined;
|
|
100
|
+
reflect?: string | undefined;
|
|
101
|
+
pr_review?: string | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
task_work?: string | undefined;
|
|
104
|
+
reflect?: string | undefined;
|
|
105
|
+
pr_review?: string | undefined;
|
|
106
|
+
}>>;
|
|
107
|
+
}, "strict", z.ZodTypeAny, {
|
|
108
|
+
skills?: {
|
|
109
|
+
task_work?: string | undefined;
|
|
110
|
+
reflect?: string | undefined;
|
|
111
|
+
pr_review?: string | undefined;
|
|
112
|
+
} | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
skills?: {
|
|
115
|
+
task_work?: string | undefined;
|
|
116
|
+
reflect?: string | undefined;
|
|
117
|
+
pr_review?: string | undefined;
|
|
118
|
+
} | undefined;
|
|
119
|
+
}>>;
|
|
120
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
121
|
+
/** Shadow branch configuration */
|
|
122
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
/** Branch name for shadow branch (default: kspec-meta) */
|
|
124
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
125
|
+
/** Worktree directory name (default: .kspec) */
|
|
126
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
127
|
+
/**
|
|
128
|
+
* Remote target for shadow branch. Can be:
|
|
129
|
+
* - Named remote (e.g., "origin", "specs-origin")
|
|
130
|
+
* - Local filesystem path (starts with /, ./, or ~)
|
|
131
|
+
* - Git URL (contains :// or starts with git@)
|
|
132
|
+
*/
|
|
133
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, "strict", z.ZodTypeAny, {
|
|
135
|
+
branch?: string | undefined;
|
|
136
|
+
directory?: string | undefined;
|
|
137
|
+
remote?: string | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
branch?: string | undefined;
|
|
140
|
+
directory?: string | undefined;
|
|
141
|
+
remote?: string | undefined;
|
|
142
|
+
}>>;
|
|
143
|
+
/** Identity configuration */
|
|
144
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
/** Default author for notes/tasks (overridden by KSPEC_AUTHOR env var) */
|
|
146
|
+
author: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, "strict", z.ZodTypeAny, {
|
|
148
|
+
author?: string | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
author?: string | undefined;
|
|
151
|
+
}>>;
|
|
152
|
+
/** Validation configuration */
|
|
153
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
/**
|
|
155
|
+
* When true, dangling references are treated as errors instead of warnings.
|
|
156
|
+
* AC: @config-validation ac-2 ac-3 — strict_refs configurable
|
|
157
|
+
*/
|
|
158
|
+
strict_refs: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
/**
|
|
160
|
+
* When true, specs missing acceptance criteria are reported as errors not warnings.
|
|
161
|
+
* AC: @config-validation ac-1 — require_acceptance configurable
|
|
162
|
+
*/
|
|
163
|
+
require_acceptance: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
}, "strict", z.ZodTypeAny, {
|
|
165
|
+
strict_refs?: boolean | undefined;
|
|
166
|
+
require_acceptance?: boolean | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
strict_refs?: boolean | undefined;
|
|
169
|
+
require_acceptance?: boolean | undefined;
|
|
170
|
+
}>>;
|
|
171
|
+
/** Daemon configuration */
|
|
172
|
+
daemon: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
/** Default port for daemon (default: 3456) */
|
|
174
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
/** Host to bind to (default: localhost) */
|
|
176
|
+
host: z.ZodOptional<z.ZodString>;
|
|
177
|
+
/**
|
|
178
|
+
* Whether to auto-start daemon when running kspec commands.
|
|
179
|
+
* AC: @config-daemon ac-3 — auto_start configurable
|
|
180
|
+
*/
|
|
181
|
+
auto_start: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
}, "strict", z.ZodTypeAny, {
|
|
183
|
+
auto_start?: boolean | undefined;
|
|
184
|
+
port?: number | undefined;
|
|
185
|
+
host?: string | undefined;
|
|
186
|
+
}, {
|
|
187
|
+
auto_start?: boolean | undefined;
|
|
188
|
+
port?: number | undefined;
|
|
189
|
+
host?: string | undefined;
|
|
190
|
+
}>>;
|
|
191
|
+
/** Ralph automation configuration */
|
|
192
|
+
ralph: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
/** Skill invocation name overrides */
|
|
194
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
195
|
+
/** Skill invocation for task-work (default: /kspec:task-work) */
|
|
196
|
+
task_work: z.ZodOptional<z.ZodString>;
|
|
197
|
+
/** Skill invocation for reflect (default: /kspec:reflect) */
|
|
198
|
+
reflect: z.ZodOptional<z.ZodString>;
|
|
199
|
+
/** Skill invocation for PR review (default: /kspec:review) */
|
|
200
|
+
pr_review: z.ZodOptional<z.ZodString>;
|
|
201
|
+
}, "strict", z.ZodTypeAny, {
|
|
202
|
+
task_work?: string | undefined;
|
|
203
|
+
reflect?: string | undefined;
|
|
204
|
+
pr_review?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
task_work?: string | undefined;
|
|
207
|
+
reflect?: string | undefined;
|
|
208
|
+
pr_review?: string | undefined;
|
|
209
|
+
}>>;
|
|
210
|
+
}, "strict", z.ZodTypeAny, {
|
|
211
|
+
skills?: {
|
|
212
|
+
task_work?: string | undefined;
|
|
213
|
+
reflect?: string | undefined;
|
|
214
|
+
pr_review?: string | undefined;
|
|
215
|
+
} | undefined;
|
|
216
|
+
}, {
|
|
217
|
+
skills?: {
|
|
218
|
+
task_work?: string | undefined;
|
|
219
|
+
reflect?: string | undefined;
|
|
220
|
+
pr_review?: string | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
}>>;
|
|
223
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
224
|
+
/** Shadow branch configuration */
|
|
225
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
/** Branch name for shadow branch (default: kspec-meta) */
|
|
227
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
228
|
+
/** Worktree directory name (default: .kspec) */
|
|
229
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
230
|
+
/**
|
|
231
|
+
* Remote target for shadow branch. Can be:
|
|
232
|
+
* - Named remote (e.g., "origin", "specs-origin")
|
|
233
|
+
* - Local filesystem path (starts with /, ./, or ~)
|
|
234
|
+
* - Git URL (contains :// or starts with git@)
|
|
235
|
+
*/
|
|
236
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
237
|
+
}, "strict", z.ZodTypeAny, {
|
|
238
|
+
branch?: string | undefined;
|
|
239
|
+
directory?: string | undefined;
|
|
240
|
+
remote?: string | undefined;
|
|
241
|
+
}, {
|
|
242
|
+
branch?: string | undefined;
|
|
243
|
+
directory?: string | undefined;
|
|
244
|
+
remote?: string | undefined;
|
|
245
|
+
}>>;
|
|
246
|
+
/** Identity configuration */
|
|
247
|
+
identity: z.ZodOptional<z.ZodObject<{
|
|
248
|
+
/** Default author for notes/tasks (overridden by KSPEC_AUTHOR env var) */
|
|
249
|
+
author: z.ZodOptional<z.ZodString>;
|
|
250
|
+
}, "strict", z.ZodTypeAny, {
|
|
251
|
+
author?: string | undefined;
|
|
252
|
+
}, {
|
|
253
|
+
author?: string | undefined;
|
|
254
|
+
}>>;
|
|
255
|
+
/** Validation configuration */
|
|
256
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
257
|
+
/**
|
|
258
|
+
* When true, dangling references are treated as errors instead of warnings.
|
|
259
|
+
* AC: @config-validation ac-2 ac-3 — strict_refs configurable
|
|
260
|
+
*/
|
|
261
|
+
strict_refs: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
/**
|
|
263
|
+
* When true, specs missing acceptance criteria are reported as errors not warnings.
|
|
264
|
+
* AC: @config-validation ac-1 — require_acceptance configurable
|
|
265
|
+
*/
|
|
266
|
+
require_acceptance: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
+
}, "strict", z.ZodTypeAny, {
|
|
268
|
+
strict_refs?: boolean | undefined;
|
|
269
|
+
require_acceptance?: boolean | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
strict_refs?: boolean | undefined;
|
|
272
|
+
require_acceptance?: boolean | undefined;
|
|
273
|
+
}>>;
|
|
274
|
+
/** Daemon configuration */
|
|
275
|
+
daemon: z.ZodOptional<z.ZodObject<{
|
|
276
|
+
/** Default port for daemon (default: 3456) */
|
|
277
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
/** Host to bind to (default: localhost) */
|
|
279
|
+
host: z.ZodOptional<z.ZodString>;
|
|
280
|
+
/**
|
|
281
|
+
* Whether to auto-start daemon when running kspec commands.
|
|
282
|
+
* AC: @config-daemon ac-3 — auto_start configurable
|
|
283
|
+
*/
|
|
284
|
+
auto_start: z.ZodOptional<z.ZodBoolean>;
|
|
285
|
+
}, "strict", z.ZodTypeAny, {
|
|
286
|
+
auto_start?: boolean | undefined;
|
|
287
|
+
port?: number | undefined;
|
|
288
|
+
host?: string | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
auto_start?: boolean | undefined;
|
|
291
|
+
port?: number | undefined;
|
|
292
|
+
host?: string | undefined;
|
|
293
|
+
}>>;
|
|
294
|
+
/** Ralph automation configuration */
|
|
295
|
+
ralph: z.ZodOptional<z.ZodObject<{
|
|
296
|
+
/** Skill invocation name overrides */
|
|
297
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
/** Skill invocation for task-work (default: /kspec:task-work) */
|
|
299
|
+
task_work: z.ZodOptional<z.ZodString>;
|
|
300
|
+
/** Skill invocation for reflect (default: /kspec:reflect) */
|
|
301
|
+
reflect: z.ZodOptional<z.ZodString>;
|
|
302
|
+
/** Skill invocation for PR review (default: /kspec:review) */
|
|
303
|
+
pr_review: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, "strict", z.ZodTypeAny, {
|
|
305
|
+
task_work?: string | undefined;
|
|
306
|
+
reflect?: string | undefined;
|
|
307
|
+
pr_review?: string | undefined;
|
|
308
|
+
}, {
|
|
309
|
+
task_work?: string | undefined;
|
|
310
|
+
reflect?: string | undefined;
|
|
311
|
+
pr_review?: string | undefined;
|
|
312
|
+
}>>;
|
|
313
|
+
}, "strict", z.ZodTypeAny, {
|
|
314
|
+
skills?: {
|
|
315
|
+
task_work?: string | undefined;
|
|
316
|
+
reflect?: string | undefined;
|
|
317
|
+
pr_review?: string | undefined;
|
|
318
|
+
} | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
skills?: {
|
|
321
|
+
task_work?: string | undefined;
|
|
322
|
+
reflect?: string | undefined;
|
|
323
|
+
pr_review?: string | undefined;
|
|
324
|
+
} | undefined;
|
|
325
|
+
}>>;
|
|
326
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
327
|
+
/**
|
|
328
|
+
* Raw config type as parsed from YAML file.
|
|
329
|
+
*/
|
|
330
|
+
export type KspecConfig = z.infer<typeof KspecConfigSchema>;
|
|
331
|
+
/**
|
|
332
|
+
* Remote type for shadow branch configuration.
|
|
333
|
+
* - "named": Git remote name (e.g., "origin", "specs-origin")
|
|
334
|
+
* - "path": Local filesystem path
|
|
335
|
+
* - "url": Git URL (https://, git@, etc.)
|
|
336
|
+
*/
|
|
337
|
+
export type ShadowRemoteType = "named" | "path" | "url";
|
|
338
|
+
/**
|
|
339
|
+
* Resolved shadow remote configuration.
|
|
340
|
+
*/
|
|
341
|
+
export interface ResolvedShadowRemote {
|
|
342
|
+
/** The remote value from config */
|
|
343
|
+
value: string;
|
|
344
|
+
/** Detected type of the remote */
|
|
345
|
+
type: ShadowRemoteType;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Detect the type of a shadow remote string.
|
|
349
|
+
*
|
|
350
|
+
* AC: @config-shadow ac-3 ac-4 ac-5 — remote type detection
|
|
351
|
+
*
|
|
352
|
+
* @param remote Remote string from config
|
|
353
|
+
* @returns Detected type: "path" for filesystem, "url" for git URLs, "named" for git remote names
|
|
354
|
+
*/
|
|
355
|
+
export declare function detectRemoteType(remote: string): ShadowRemoteType;
|
|
356
|
+
/**
|
|
357
|
+
* Resolved config with all values finalized (env vars applied, defaults filled).
|
|
358
|
+
*/
|
|
359
|
+
export interface ResolvedKspecConfig {
|
|
360
|
+
shadow: {
|
|
361
|
+
/** Branch name (default: kspec-meta) */
|
|
362
|
+
branch: string;
|
|
363
|
+
/** Worktree directory name (default: .kspec) */
|
|
364
|
+
directory: string;
|
|
365
|
+
/** Remote configuration, null if not specified */
|
|
366
|
+
remote: ResolvedShadowRemote | null;
|
|
367
|
+
};
|
|
368
|
+
identity: {
|
|
369
|
+
author: string | null;
|
|
370
|
+
};
|
|
371
|
+
validation: {
|
|
372
|
+
/**
|
|
373
|
+
* When true, dangling references are treated as errors instead of warnings.
|
|
374
|
+
* AC: @config-validation ac-2 ac-3
|
|
375
|
+
*/
|
|
376
|
+
strict_refs: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* When true, specs missing acceptance criteria are reported as errors not warnings.
|
|
379
|
+
* AC: @config-validation ac-1
|
|
380
|
+
*/
|
|
381
|
+
require_acceptance: boolean;
|
|
382
|
+
};
|
|
383
|
+
daemon: {
|
|
384
|
+
port: number;
|
|
385
|
+
host: string;
|
|
386
|
+
/**
|
|
387
|
+
* Whether to auto-start daemon when running kspec commands.
|
|
388
|
+
* AC: @config-daemon ac-3
|
|
389
|
+
*/
|
|
390
|
+
auto_start: boolean;
|
|
391
|
+
};
|
|
392
|
+
ralph: {
|
|
393
|
+
skills: {
|
|
394
|
+
/** Skill invocation for task-work (default: /kspec:task-work) */
|
|
395
|
+
task_work: string;
|
|
396
|
+
/** Skill invocation for reflect (default: /kspec:reflect) */
|
|
397
|
+
reflect: string;
|
|
398
|
+
/** Skill invocation for PR review (default: /kspec:review) */
|
|
399
|
+
pr_review: string;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Result of loading project config.
|
|
405
|
+
*/
|
|
406
|
+
export interface LoadConfigResult {
|
|
407
|
+
/** Resolved configuration with all values finalized */
|
|
408
|
+
config: ResolvedKspecConfig;
|
|
409
|
+
/** Path to config file if found, null otherwise */
|
|
410
|
+
configPath: string | null;
|
|
411
|
+
/** Warning message if config had issues but was recoverable */
|
|
412
|
+
warning: string | null;
|
|
413
|
+
/** The git root directory where config was loaded from */
|
|
414
|
+
gitRoot: string | null;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Find git root directory, handling KSPEC_SPEC_DIR batch mode.
|
|
418
|
+
*
|
|
419
|
+
* AC: @project-config ac-7 — in batch mode, we need the REAL project root
|
|
420
|
+
*
|
|
421
|
+
* When KSPEC_SPEC_DIR is set (batch atomic mode), the cwd might be the temp
|
|
422
|
+
* directory. We need to find the real project root by checking:
|
|
423
|
+
* 1. If KSPEC_BATCH_PROJECT_ROOT is set, use that (set by batch executor)
|
|
424
|
+
* 2. Otherwise, use git root from cwd
|
|
425
|
+
*
|
|
426
|
+
* AC: @project-config ac-6 — loads from git root, not cwd subdirectory
|
|
427
|
+
*/
|
|
428
|
+
export declare function findProjectRoot(startDir: string): string | null;
|
|
429
|
+
/**
|
|
430
|
+
* Load project configuration from kspec.config.yaml.
|
|
431
|
+
*
|
|
432
|
+
* AC: @project-config ac-1 — no config = all defaults
|
|
433
|
+
* AC: @project-config ac-2 — config parsed and available before shadow detection
|
|
434
|
+
* AC: @project-config ac-3 — invalid YAML = defaults + warning
|
|
435
|
+
* AC: @project-config ac-4 — unknown fields ignored
|
|
436
|
+
* AC: @project-config ac-5 — env vars take precedence
|
|
437
|
+
* AC: @project-config ac-6 — loads from git root
|
|
438
|
+
* AC: @project-config ac-7 — batch mode uses real project root
|
|
439
|
+
*
|
|
440
|
+
* @param startDir Starting directory for git root detection
|
|
441
|
+
*/
|
|
442
|
+
export declare function loadProjectConfig(startDir?: string): Promise<LoadConfigResult>;
|
|
443
|
+
/**
|
|
444
|
+
* Resolve configuration by merging file config with env vars and defaults.
|
|
445
|
+
*
|
|
446
|
+
* Priority: env vars > config file > defaults
|
|
447
|
+
*
|
|
448
|
+
* AC: @project-config ac-5 — env vars take precedence
|
|
449
|
+
*/
|
|
450
|
+
export declare function resolveConfig(fileConfig: KspecConfig | null): ResolvedKspecConfig;
|
|
451
|
+
/**
|
|
452
|
+
* Get the default configuration (no file, no env vars).
|
|
453
|
+
* Useful for testing or when config loading fails completely.
|
|
454
|
+
* Returns a deep copy to prevent mutation of shared defaults.
|
|
455
|
+
*/
|
|
456
|
+
export declare function getDefaultConfig(): ResolvedKspecConfig;
|
|
457
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/parser/config.ts"],"names":[],"mappings":"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"}
|