light-plan 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +3181 -2
- package/assets/README.md +111 -0
- package/assets/agents/lpm-developer.md +468 -0
- package/assets/agents/lpm-planner.md +532 -0
- package/assets/harnesses/claude.yml +43 -0
- package/assets/harnesses/copilot.yml +54 -0
- package/assets/harnesses/reasonix.yml +49 -0
- package/assets/hcm/light-plan.yml +45 -0
- package/assets/skills/lpm-board-health.md +243 -0
- package/assets/skills/lpm-board-setup.md +354 -0
- package/assets/skills/lpm-delivery.md +344 -0
- package/assets/skills/lpm-planning.md +411 -0
- package/assets/skills/lpm-templates.md +144 -0
- package/assets/skills/lpm.md +267 -0
- package/dist/cli/agent-view.d.ts +27 -0
- package/dist/cli/agent-view.js +247 -0
- package/dist/cli/agent-view.js.map +1 -0
- package/dist/cli/commands/agent/assets.d.ts +64 -0
- package/dist/cli/commands/agent/assets.js +106 -0
- package/dist/cli/commands/agent/assets.js.map +1 -0
- package/dist/cli/commands/agent/glob.d.ts +25 -0
- package/dist/cli/commands/agent/glob.js +82 -0
- package/dist/cli/commands/agent/glob.js.map +1 -0
- package/dist/cli/commands/agent/index.d.ts +11 -0
- package/dist/cli/commands/agent/index.js +284 -0
- package/dist/cli/commands/agent/index.js.map +1 -0
- package/dist/cli/commands/agent/install.d.ts +59 -0
- package/dist/cli/commands/agent/install.js +131 -0
- package/dist/cli/commands/agent/install.js.map +1 -0
- package/dist/cli/commands/agent/mapping.d.ts +175 -0
- package/dist/cli/commands/agent/mapping.js +256 -0
- package/dist/cli/commands/agent/mapping.js.map +1 -0
- package/dist/cli/commands/check.d.ts +2 -0
- package/dist/cli/commands/check.js +81 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/comment.d.ts +2 -0
- package/dist/cli/commands/comment.js +104 -0
- package/dist/cli/commands/comment.js.map +1 -0
- package/dist/cli/commands/convert.d.ts +2 -0
- package/dist/cli/commands/convert.js +115 -0
- package/dist/cli/commands/convert.js.map +1 -0
- package/dist/cli/commands/copy.d.ts +2 -0
- package/dist/cli/commands/copy.js +69 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/export.d.ts +11 -0
- package/dist/cli/commands/export.js +226 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/flag.d.ts +2 -0
- package/dist/cli/commands/flag.js +172 -0
- package/dist/cli/commands/flag.js.map +1 -0
- package/dist/cli/commands/git.d.ts +11 -0
- package/dist/cli/commands/git.js +357 -0
- package/dist/cli/commands/git.js.map +1 -0
- package/dist/cli/commands/hcm/bundle.d.ts +60 -0
- package/dist/cli/commands/hcm/bundle.js +166 -0
- package/dist/cli/commands/hcm/bundle.js.map +1 -0
- package/dist/cli/commands/hcm/index.d.ts +11 -0
- package/dist/cli/commands/hcm/index.js +162 -0
- package/dist/cli/commands/hcm/index.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +81 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/insert.d.ts +2 -0
- package/dist/cli/commands/insert.js +70 -0
- package/dist/cli/commands/insert.js.map +1 -0
- package/dist/cli/commands/instructions.d.ts +7 -0
- package/dist/cli/commands/instructions.js +256 -0
- package/dist/cli/commands/instructions.js.map +1 -0
- package/dist/cli/commands/link.d.ts +2 -0
- package/dist/cli/commands/link.js +121 -0
- package/dist/cli/commands/link.js.map +1 -0
- package/dist/cli/commands/mcp/config.d.ts +71 -0
- package/dist/cli/commands/mcp/config.js +119 -0
- package/dist/cli/commands/mcp/config.js.map +1 -0
- package/dist/cli/commands/mcp/index.d.ts +9 -0
- package/dist/cli/commands/mcp/index.js +92 -0
- package/dist/cli/commands/mcp/index.js.map +1 -0
- package/dist/cli/commands/mcp/serve.d.ts +1 -0
- package/dist/cli/commands/mcp/serve.js +76 -0
- package/dist/cli/commands/mcp/serve.js.map +1 -0
- package/dist/cli/commands/mcp/setup.d.ts +1 -0
- package/dist/cli/commands/mcp/setup.js +83 -0
- package/dist/cli/commands/mcp/setup.js.map +1 -0
- package/dist/cli/commands/me.d.ts +2 -0
- package/dist/cli/commands/me.js +85 -0
- package/dist/cli/commands/me.js.map +1 -0
- package/dist/cli/commands/move.d.ts +2 -0
- package/dist/cli/commands/move.js +81 -0
- package/dist/cli/commands/move.js.map +1 -0
- package/dist/cli/commands/new.d.ts +2 -0
- package/dist/cli/commands/new.js +222 -0
- package/dist/cli/commands/new.js.map +1 -0
- package/dist/cli/commands/open.d.ts +2 -0
- package/dist/cli/commands/open.js +43 -0
- package/dist/cli/commands/open.js.map +1 -0
- package/dist/cli/commands/period.d.ts +10 -0
- package/dist/cli/commands/period.js +165 -0
- package/dist/cli/commands/period.js.map +1 -0
- package/dist/cli/commands/profile.d.ts +2 -0
- package/dist/cli/commands/profile.js +133 -0
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/queue.d.ts +2 -0
- package/dist/cli/commands/queue.js +582 -0
- package/dist/cli/commands/queue.js.map +1 -0
- package/dist/cli/commands/remote.d.ts +10 -0
- package/dist/cli/commands/remote.js +3142 -0
- package/dist/cli/commands/remote.js.map +1 -0
- package/dist/cli/commands/rm.d.ts +2 -0
- package/dist/cli/commands/rm.js +63 -0
- package/dist/cli/commands/rm.js.map +1 -0
- package/dist/cli/commands/set.d.ts +2 -0
- package/dist/cli/commands/set.js +139 -0
- package/dist/cli/commands/set.js.map +1 -0
- package/dist/cli/commands/split.d.ts +2 -0
- package/dist/cli/commands/split.js +90 -0
- package/dist/cli/commands/split.js.map +1 -0
- package/dist/cli/commands/task.d.ts +2 -0
- package/dist/cli/commands/task.js +298 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/commands/team.d.ts +2 -0
- package/dist/cli/commands/team.js +114 -0
- package/dist/cli/commands/team.js.map +1 -0
- package/dist/cli/commands/template.d.ts +2 -0
- package/dist/cli/commands/template.js +338 -0
- package/dist/cli/commands/template.js.map +1 -0
- package/dist/cli/commands/ui.d.ts +2 -0
- package/dist/cli/commands/ui.js +98 -0
- package/dist/cli/commands/ui.js.map +1 -0
- package/dist/cli/commands/upstream.d.ts +2 -0
- package/dist/cli/commands/upstream.js +218 -0
- package/dist/cli/commands/upstream.js.map +1 -0
- package/dist/cli/context.d.ts +24 -0
- package/dist/cli/context.js +52 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +208 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/live.d.ts +71 -0
- package/dist/cli/live.js +182 -0
- package/dist/cli/live.js.map +1 -0
- package/dist/cli/plan.d.ts +28 -0
- package/dist/cli/plan.js +76 -0
- package/dist/cli/plan.js.map +1 -0
- package/dist/cli/prompt.d.ts +60 -0
- package/dist/cli/prompt.js +185 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/ui.d.ts +65 -0
- package/dist/cli/ui.js +79 -0
- package/dist/cli/ui.js.map +1 -0
- package/dist/core/board/dependency-rollup.d.ts +54 -0
- package/dist/core/board/dependency-rollup.js +72 -0
- package/dist/core/board/dependency-rollup.js.map +1 -0
- package/dist/core/board/flag-rollup.d.ts +33 -0
- package/dist/core/board/flag-rollup.js +56 -0
- package/dist/core/board/flag-rollup.js.map +1 -0
- package/dist/core/board/index.d.ts +21 -0
- package/dist/core/board/index.js +22 -0
- package/dist/core/board/index.js.map +1 -0
- package/dist/core/board/load/cache.d.ts +52 -0
- package/dist/core/board/load/cache.js +105 -0
- package/dist/core/board/load/cache.js.map +1 -0
- package/dist/core/board/load/fields.d.ts +33 -0
- package/dist/core/board/load/fields.js +154 -0
- package/dist/core/board/load/fields.js.map +1 -0
- package/dist/core/board/load/scan.d.ts +39 -0
- package/dist/core/board/load/scan.js +88 -0
- package/dist/core/board/load/scan.js.map +1 -0
- package/dist/core/board/load/tree.d.ts +10 -0
- package/dist/core/board/load/tree.js +114 -0
- package/dist/core/board/load/tree.js.map +1 -0
- package/dist/core/board/load.d.ts +69 -0
- package/dist/core/board/load.js +204 -0
- package/dist/core/board/load.js.map +1 -0
- package/dist/core/board/query.d.ts +126 -0
- package/dist/core/board/query.js +291 -0
- package/dist/core/board/query.js.map +1 -0
- package/dist/core/board/registry.d.ts +51 -0
- package/dist/core/board/registry.js +98 -0
- package/dist/core/board/registry.js.map +1 -0
- package/dist/core/board/remote-scopes.d.ts +71 -0
- package/dist/core/board/remote-scopes.js +103 -0
- package/dist/core/board/remote-scopes.js.map +1 -0
- package/dist/core/board/rollup.d.ts +32 -0
- package/dist/core/board/rollup.js +67 -0
- package/dist/core/board/rollup.js.map +1 -0
- package/dist/core/board/scope.d.ts +81 -0
- package/dist/core/board/scope.js +134 -0
- package/dist/core/board/scope.js.map +1 -0
- package/dist/core/board/simulate.d.ts +138 -0
- package/dist/core/board/simulate.js +141 -0
- package/dist/core/board/simulate.js.map +1 -0
- package/dist/core/board/tasks/index.d.ts +25 -0
- package/dist/core/board/tasks/index.js +26 -0
- package/dist/core/board/tasks/index.js.map +1 -0
- package/dist/core/board/tasks/ranking.d.ts +155 -0
- package/dist/core/board/tasks/ranking.js +374 -0
- package/dist/core/board/tasks/ranking.js.map +1 -0
- package/dist/core/board/tasks/roster.d.ts +42 -0
- package/dist/core/board/tasks/roster.js +82 -0
- package/dist/core/board/tasks/roster.js.map +1 -0
- package/dist/core/board/tasks.d.ts +1 -0
- package/dist/core/board/tasks.js +2 -0
- package/dist/core/board/tasks.js.map +1 -0
- package/dist/core/config/index.d.ts +9 -0
- package/dist/core/config/index.js +10 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/config/lookup.d.ts +114 -0
- package/dist/core/config/lookup.js +221 -0
- package/dist/core/config/lookup.js.map +1 -0
- package/dist/core/config/remote-blocks.d.ts +17 -0
- package/dist/core/config/remote-blocks.js +47 -0
- package/dist/core/config/remote-blocks.js.map +1 -0
- package/dist/core/config/schema.d.ts +10 -0
- package/dist/core/config/schema.js +451 -0
- package/dist/core/config/schema.js.map +1 -0
- package/dist/core/errors.d.ts +23 -0
- package/dist/core/errors.js +31 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/gitsync/hosts.d.ts +40 -0
- package/dist/core/gitsync/hosts.js +115 -0
- package/dist/core/gitsync/hosts.js.map +1 -0
- package/dist/core/gitsync/index.d.ts +25 -0
- package/dist/core/gitsync/index.js +25 -0
- package/dist/core/gitsync/index.js.map +1 -0
- package/dist/core/gitsync/integrate.d.ts +72 -0
- package/dist/core/gitsync/integrate.js +115 -0
- package/dist/core/gitsync/integrate.js.map +1 -0
- package/dist/core/gitsync/repo.d.ts +61 -0
- package/dist/core/gitsync/repo.js +213 -0
- package/dist/core/gitsync/repo.js.map +1 -0
- package/dist/core/gitsync/run.d.ts +58 -0
- package/dist/core/gitsync/run.js +102 -0
- package/dist/core/gitsync/run.js.map +1 -0
- package/dist/core/gitsync/status.d.ts +59 -0
- package/dist/core/gitsync/status.js +81 -0
- package/dist/core/gitsync/status.js.map +1 -0
- package/dist/core/gitsync/sync.d.ts +111 -0
- package/dist/core/gitsync/sync.js +275 -0
- package/dist/core/gitsync/sync.js.map +1 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/core/index.js +32 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/instructions/analyze.d.ts +70 -0
- package/dist/core/instructions/analyze.js +275 -0
- package/dist/core/instructions/analyze.js.map +1 -0
- package/dist/core/instructions/builtin.d.ts +21 -0
- package/dist/core/instructions/builtin.js +133 -0
- package/dist/core/instructions/builtin.js.map +1 -0
- package/dist/core/instructions/context.d.ts +155 -0
- package/dist/core/instructions/context.js +209 -0
- package/dist/core/instructions/context.js.map +1 -0
- package/dist/core/instructions/index.d.ts +29 -0
- package/dist/core/instructions/index.js +30 -0
- package/dist/core/instructions/index.js.map +1 -0
- package/dist/core/instructions/instructions.d.ts +90 -0
- package/dist/core/instructions/instructions.js +179 -0
- package/dist/core/instructions/instructions.js.map +1 -0
- package/dist/core/instructions/template.d.ts +108 -0
- package/dist/core/instructions/template.js +252 -0
- package/dist/core/instructions/template.js.map +1 -0
- package/dist/core/model/attributes.d.ts +16 -0
- package/dist/core/model/attributes.js +119 -0
- package/dist/core/model/attributes.js.map +1 -0
- package/dist/core/model/index.d.ts +10 -0
- package/dist/core/model/index.js +11 -0
- package/dist/core/model/index.js.map +1 -0
- package/dist/core/model/links.d.ts +34 -0
- package/dist/core/model/links.js +114 -0
- package/dist/core/model/links.js.map +1 -0
- package/dist/core/model/profile.d.ts +31 -0
- package/dist/core/model/profile.js +8 -0
- package/dist/core/model/profile.js.map +1 -0
- package/dist/core/model/types.d.ts +441 -0
- package/dist/core/model/types.js +167 -0
- package/dist/core/model/types.js.map +1 -0
- package/dist/core/model/zod.d.ts +6 -0
- package/dist/core/model/zod.js +11 -0
- package/dist/core/model/zod.js.map +1 -0
- package/dist/core/operations/board-index.d.ts +45 -0
- package/dist/core/operations/board-index.js +147 -0
- package/dist/core/operations/board-index.js.map +1 -0
- package/dist/core/operations/claim.d.ts +69 -0
- package/dist/core/operations/claim.js +115 -0
- package/dist/core/operations/claim.js.map +1 -0
- package/dist/core/operations/comment.d.ts +30 -0
- package/dist/core/operations/comment.js +46 -0
- package/dist/core/operations/comment.js.map +1 -0
- package/dist/core/operations/create.d.ts +82 -0
- package/dist/core/operations/create.js +306 -0
- package/dist/core/operations/create.js.map +1 -0
- package/dist/core/operations/flag.d.ts +58 -0
- package/dist/core/operations/flag.js +95 -0
- package/dist/core/operations/flag.js.map +1 -0
- package/dist/core/operations/git-sync.d.ts +148 -0
- package/dist/core/operations/git-sync.js +341 -0
- package/dist/core/operations/git-sync.js.map +1 -0
- package/dist/core/operations/index.d.ts +44 -0
- package/dist/core/operations/index.js +45 -0
- package/dist/core/operations/index.js.map +1 -0
- package/dist/core/operations/init.d.ts +25 -0
- package/dist/core/operations/init.js +122 -0
- package/dist/core/operations/init.js.map +1 -0
- package/dist/core/operations/link.d.ts +40 -0
- package/dist/core/operations/link.js +131 -0
- package/dist/core/operations/link.js.map +1 -0
- package/dist/core/operations/move.d.ts +43 -0
- package/dist/core/operations/move.js +103 -0
- package/dist/core/operations/move.js.map +1 -0
- package/dist/core/operations/profile.d.ts +23 -0
- package/dist/core/operations/profile.js +26 -0
- package/dist/core/operations/profile.js.map +1 -0
- package/dist/core/operations/remotes-off.d.ts +12 -0
- package/dist/core/operations/remotes-off.js +67 -0
- package/dist/core/operations/remotes-off.js.map +1 -0
- package/dist/core/operations/remove.d.ts +18 -0
- package/dist/core/operations/remove.js +114 -0
- package/dist/core/operations/remove.js.map +1 -0
- package/dist/core/operations/retype.d.ts +25 -0
- package/dist/core/operations/retype.js +59 -0
- package/dist/core/operations/retype.js.map +1 -0
- package/dist/core/operations/rollup.d.ts +74 -0
- package/dist/core/operations/rollup.js +121 -0
- package/dist/core/operations/rollup.js.map +1 -0
- package/dist/core/operations/shared.d.ts +133 -0
- package/dist/core/operations/shared.js +383 -0
- package/dist/core/operations/shared.js.map +1 -0
- package/dist/core/operations/update.d.ts +43 -0
- package/dist/core/operations/update.js +161 -0
- package/dist/core/operations/update.js.map +1 -0
- package/dist/core/operations/user.d.ts +27 -0
- package/dist/core/operations/user.js +68 -0
- package/dist/core/operations/user.js.map +1 -0
- package/dist/core/profile/current.d.ts +35 -0
- package/dist/core/profile/current.js +31 -0
- package/dist/core/profile/current.js.map +1 -0
- package/dist/core/profile/index.d.ts +14 -0
- package/dist/core/profile/index.js +15 -0
- package/dist/core/profile/index.js.map +1 -0
- package/dist/core/profile/schema.d.ts +9 -0
- package/dist/core/profile/schema.js +100 -0
- package/dist/core/profile/schema.js.map +1 -0
- package/dist/core/storage/activity.d.ts +78 -0
- package/dist/core/storage/activity.js +131 -0
- package/dist/core/storage/activity.js.map +1 -0
- package/dist/core/storage/atomic.d.ts +34 -0
- package/dist/core/storage/atomic.js +117 -0
- package/dist/core/storage/atomic.js.map +1 -0
- package/dist/core/storage/comments.d.ts +39 -0
- package/dist/core/storage/comments.js +88 -0
- package/dist/core/storage/comments.js.map +1 -0
- package/dist/core/storage/document.d.ts +16 -0
- package/dist/core/storage/document.js +98 -0
- package/dist/core/storage/document.js.map +1 -0
- package/dist/core/storage/frontmatter.d.ts +16 -0
- package/dist/core/storage/frontmatter.js +33 -0
- package/dist/core/storage/frontmatter.js.map +1 -0
- package/dist/core/storage/git.d.ts +8 -0
- package/dist/core/storage/git.js +48 -0
- package/dist/core/storage/git.js.map +1 -0
- package/dist/core/storage/index.d.ts +27 -0
- package/dist/core/storage/index.js +28 -0
- package/dist/core/storage/index.js.map +1 -0
- package/dist/core/storage/local.d.ts +57 -0
- package/dist/core/storage/local.js +133 -0
- package/dist/core/storage/local.js.map +1 -0
- package/dist/core/storage/lock.d.ts +85 -0
- package/dist/core/storage/lock.js +364 -0
- package/dist/core/storage/lock.js.map +1 -0
- package/dist/core/storage/paths.d.ts +125 -0
- package/dist/core/storage/paths.js +202 -0
- package/dist/core/storage/paths.js.map +1 -0
- package/dist/core/storage/state.d.ts +32 -0
- package/dist/core/storage/state.js +71 -0
- package/dist/core/storage/state.js.map +1 -0
- package/dist/core/storage/templates.d.ts +29 -0
- package/dist/core/storage/templates.js +62 -0
- package/dist/core/storage/templates.js.map +1 -0
- package/dist/core/storage/views.d.ts +18 -0
- package/dist/core/storage/views.js +62 -0
- package/dist/core/storage/views.js.map +1 -0
- package/dist/core/validation/check.d.ts +4 -0
- package/dist/core/validation/check.js +22 -0
- package/dist/core/validation/check.js.map +1 -0
- package/dist/core/validation/checks/collection.d.ts +4 -0
- package/dist/core/validation/checks/collection.js +152 -0
- package/dist/core/validation/checks/collection.js.map +1 -0
- package/dist/core/validation/checks/counters.d.ts +3 -0
- package/dist/core/validation/checks/counters.js +23 -0
- package/dist/core/validation/checks/counters.js.map +1 -0
- package/dist/core/validation/checks/dependencies.d.ts +3 -0
- package/dist/core/validation/checks/dependencies.js +58 -0
- package/dist/core/validation/checks/dependencies.js.map +1 -0
- package/dist/core/validation/checks/gitignore.d.ts +10 -0
- package/dist/core/validation/checks/gitignore.js +22 -0
- package/dist/core/validation/checks/gitignore.js.map +1 -0
- package/dist/core/validation/checks/index-file.d.ts +8 -0
- package/dist/core/validation/checks/index-file.js +26 -0
- package/dist/core/validation/checks/index-file.js.map +1 -0
- package/dist/core/validation/checks/index.d.ts +20 -0
- package/dist/core/validation/checks/index.js +21 -0
- package/dist/core/validation/checks/index.js.map +1 -0
- package/dist/core/validation/checks/issues.d.ts +3 -0
- package/dist/core/validation/checks/issues.js +152 -0
- package/dist/core/validation/checks/issues.js.map +1 -0
- package/dist/core/validation/checks/periods.d.ts +3 -0
- package/dist/core/validation/checks/periods.js +89 -0
- package/dist/core/validation/checks/periods.js.map +1 -0
- package/dist/core/validation/checks/remotes.d.ts +20 -0
- package/dist/core/validation/checks/remotes.js +42 -0
- package/dist/core/validation/checks/remotes.js.map +1 -0
- package/dist/core/validation/checks/resources.d.ts +3 -0
- package/dist/core/validation/checks/resources.js +77 -0
- package/dist/core/validation/checks/resources.js.map +1 -0
- package/dist/core/validation/checks/rollup.d.ts +27 -0
- package/dist/core/validation/checks/rollup.js +53 -0
- package/dist/core/validation/checks/rollup.js.map +1 -0
- package/dist/core/validation/checks/squads.d.ts +3 -0
- package/dist/core/validation/checks/squads.js +42 -0
- package/dist/core/validation/checks/squads.js.map +1 -0
- package/dist/core/validation/checks/templates.d.ts +14 -0
- package/dist/core/validation/checks/templates.js +119 -0
- package/dist/core/validation/checks/templates.js.map +1 -0
- package/dist/core/validation/fix.d.ts +7 -0
- package/dist/core/validation/fix.js +273 -0
- package/dist/core/validation/fix.js.map +1 -0
- package/dist/core/validation/index.d.ts +7 -0
- package/dist/core/validation/index.js +8 -0
- package/dist/core/validation/index.js.map +1 -0
- package/dist/core/validation/shared.d.ts +47 -0
- package/dist/core/validation/shared.js +66 -0
- package/dist/core/validation/shared.js.map +1 -0
- package/dist/mcp/context.d.ts +70 -0
- package/dist/mcp/context.js +110 -0
- package/dist/mcp/context.js.map +1 -0
- package/dist/mcp/index.d.ts +49 -0
- package/dist/mcp/index.js +90 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/reply.d.ts +28 -0
- package/dist/mcp/reply.js +34 -0
- package/dist/mcp/reply.js.map +1 -0
- package/dist/mcp/tools/plan/create.d.ts +3 -0
- package/dist/mcp/tools/plan/create.js +128 -0
- package/dist/mcp/tools/plan/create.js.map +1 -0
- package/dist/mcp/tools/plan/delete.d.ts +3 -0
- package/dist/mcp/tools/plan/delete.js +35 -0
- package/dist/mcp/tools/plan/delete.js.map +1 -0
- package/dist/mcp/tools/plan/graph.d.ts +3 -0
- package/dist/mcp/tools/plan/graph.js +53 -0
- package/dist/mcp/tools/plan/graph.js.map +1 -0
- package/dist/mcp/tools/plan/index.d.ts +15 -0
- package/dist/mcp/tools/plan/index.js +16 -0
- package/dist/mcp/tools/plan/index.js.map +1 -0
- package/dist/mcp/tools/plan/link.d.ts +3 -0
- package/dist/mcp/tools/plan/link.js +46 -0
- package/dist/mcp/tools/plan/link.js.map +1 -0
- package/dist/mcp/tools/plan/registrar.d.ts +10 -0
- package/dist/mcp/tools/plan/registrar.js +24 -0
- package/dist/mcp/tools/plan/registrar.js.map +1 -0
- package/dist/mcp/tools/plan/reshape.d.ts +3 -0
- package/dist/mcp/tools/plan/reshape.js +95 -0
- package/dist/mcp/tools/plan/reshape.js.map +1 -0
- package/dist/mcp/tools/plan/timeline.d.ts +3 -0
- package/dist/mcp/tools/plan/timeline.js +68 -0
- package/dist/mcp/tools/plan/timeline.js.map +1 -0
- package/dist/mcp/tools/plan/upstream.d.ts +14 -0
- package/dist/mcp/tools/plan/upstream.js +69 -0
- package/dist/mcp/tools/plan/upstream.js.map +1 -0
- package/dist/mcp/tools/plan.d.ts +1 -0
- package/dist/mcp/tools/plan.js +2 -0
- package/dist/mcp/tools/plan.js.map +1 -0
- package/dist/mcp/tools/read.d.ts +3 -0
- package/dist/mcp/tools/read.js +339 -0
- package/dist/mcp/tools/read.js.map +1 -0
- package/dist/mcp/tools/remote.d.ts +3 -0
- package/dist/mcp/tools/remote.js +254 -0
- package/dist/mcp/tools/remote.js.map +1 -0
- package/dist/mcp/tools/templates.d.ts +12 -0
- package/dist/mcp/tools/templates.js +165 -0
- package/dist/mcp/tools/templates.js.map +1 -0
- package/dist/mcp/tools/work.d.ts +16 -0
- package/dist/mcp/tools/work.js +359 -0
- package/dist/mcp/tools/work.js.map +1 -0
- package/dist/remote/accounts.d.ts +158 -0
- package/dist/remote/accounts.js +207 -0
- package/dist/remote/accounts.js.map +1 -0
- package/dist/remote/adopt.d.ts +139 -0
- package/dist/remote/adopt.js +181 -0
- package/dist/remote/adopt.js.map +1 -0
- package/dist/remote/anchor.d.ts +35 -0
- package/dist/remote/anchor.js +53 -0
- package/dist/remote/anchor.js.map +1 -0
- package/dist/remote/attributes.d.ts +103 -0
- package/dist/remote/attributes.js +245 -0
- package/dist/remote/attributes.js.map +1 -0
- package/dist/remote/audit.d.ts +112 -0
- package/dist/remote/audit.js +215 -0
- package/dist/remote/audit.js.map +1 -0
- package/dist/remote/capabilities.d.ts +267 -0
- package/dist/remote/capabilities.js +225 -0
- package/dist/remote/capabilities.js.map +1 -0
- package/dist/remote/check.d.ts +49 -0
- package/dist/remote/check.js +356 -0
- package/dist/remote/check.js.map +1 -0
- package/dist/remote/comments.d.ts +86 -0
- package/dist/remote/comments.js +87 -0
- package/dist/remote/comments.js.map +1 -0
- package/dist/remote/config-file.d.ts +237 -0
- package/dist/remote/config-file.js +640 -0
- package/dist/remote/config-file.js.map +1 -0
- package/dist/remote/conflicts.d.ts +110 -0
- package/dist/remote/conflicts.js +188 -0
- package/dist/remote/conflicts.js.map +1 -0
- package/dist/remote/connection-catalogue.d.ts +65 -0
- package/dist/remote/connection-catalogue.js +66 -0
- package/dist/remote/connection-catalogue.js.map +1 -0
- package/dist/remote/connection.d.ts +84 -0
- package/dist/remote/connection.js +229 -0
- package/dist/remote/connection.js.map +1 -0
- package/dist/remote/coverage.d.ts +65 -0
- package/dist/remote/coverage.js +244 -0
- package/dist/remote/coverage.js.map +1 -0
- package/dist/remote/credentials.d.ts +95 -0
- package/dist/remote/credentials.js +210 -0
- package/dist/remote/credentials.js.map +1 -0
- package/dist/remote/execute.d.ts +178 -0
- package/dist/remote/execute.js +1245 -0
- package/dist/remote/execute.js.map +1 -0
- package/dist/remote/fingerprint.d.ts +172 -0
- package/dist/remote/fingerprint.js +337 -0
- package/dist/remote/fingerprint.js.map +1 -0
- package/dist/remote/fixtures.d.ts +176 -0
- package/dist/remote/fixtures.js +432 -0
- package/dist/remote/fixtures.js.map +1 -0
- package/dist/remote/guard.d.ts +90 -0
- package/dist/remote/guard.js +83 -0
- package/dist/remote/guard.js.map +1 -0
- package/dist/remote/hierarchy.d.ts +141 -0
- package/dist/remote/hierarchy.js +129 -0
- package/dist/remote/hierarchy.js.map +1 -0
- package/dist/remote/index.d.ts +145 -0
- package/dist/remote/index.js +146 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/remote/inspect.d.ts +103 -0
- package/dist/remote/inspect.js +152 -0
- package/dist/remote/inspect.js.map +1 -0
- package/dist/remote/labels.d.ts +75 -0
- package/dist/remote/labels.js +137 -0
- package/dist/remote/labels.js.map +1 -0
- package/dist/remote/ladder.d.ts +145 -0
- package/dist/remote/ladder.js +387 -0
- package/dist/remote/ladder.js.map +1 -0
- package/dist/remote/ledger.d.ts +97 -0
- package/dist/remote/ledger.js +148 -0
- package/dist/remote/ledger.js.map +1 -0
- package/dist/remote/lifecycle.d.ts +175 -0
- package/dist/remote/lifecycle.js +274 -0
- package/dist/remote/lifecycle.js.map +1 -0
- package/dist/remote/links.d.ts +411 -0
- package/dist/remote/links.js +748 -0
- package/dist/remote/links.js.map +1 -0
- package/dist/remote/managed-block.d.ts +182 -0
- package/dist/remote/managed-block.js +406 -0
- package/dist/remote/managed-block.js.map +1 -0
- package/dist/remote/managed-comment.d.ts +104 -0
- package/dist/remote/managed-comment.js +92 -0
- package/dist/remote/managed-comment.js.map +1 -0
- package/dist/remote/mapping.d.ts +282 -0
- package/dist/remote/mapping.js +336 -0
- package/dist/remote/mapping.js.map +1 -0
- package/dist/remote/merge.d.ts +172 -0
- package/dist/remote/merge.js +221 -0
- package/dist/remote/merge.js.map +1 -0
- package/dist/remote/periods.d.ts +209 -0
- package/dist/remote/periods.js +224 -0
- package/dist/remote/periods.js.map +1 -0
- package/dist/remote/plan.d.ts +671 -0
- package/dist/remote/plan.js +1210 -0
- package/dist/remote/plan.js.map +1 -0
- package/dist/remote/policy.d.ts +67 -0
- package/dist/remote/policy.js +67 -0
- package/dist/remote/policy.js.map +1 -0
- package/dist/remote/preflight.d.ts +112 -0
- package/dist/remote/preflight.js +342 -0
- package/dist/remote/preflight.js.map +1 -0
- package/dist/remote/prerequisites.d.ts +113 -0
- package/dist/remote/prerequisites.js +161 -0
- package/dist/remote/prerequisites.js.map +1 -0
- package/dist/remote/provider.d.ts +802 -0
- package/dist/remote/provider.js +27 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/providers/github/config.d.ts +84 -0
- package/dist/remote/providers/github/config.js +161 -0
- package/dist/remote/providers/github/config.js.map +1 -0
- package/dist/remote/providers/github/connector.d.ts +33 -0
- package/dist/remote/providers/github/connector.js +774 -0
- package/dist/remote/providers/github/connector.js.map +1 -0
- package/dist/remote/providers/github/edges.d.ts +29 -0
- package/dist/remote/providers/github/edges.js +56 -0
- package/dist/remote/providers/github/edges.js.map +1 -0
- package/dist/remote/providers/github/hierarchy.d.ts +21 -0
- package/dist/remote/providers/github/hierarchy.js +46 -0
- package/dist/remote/providers/github/hierarchy.js.map +1 -0
- package/dist/remote/providers/github/index.d.ts +26 -0
- package/dist/remote/providers/github/index.js +69 -0
- package/dist/remote/providers/github/index.js.map +1 -0
- package/dist/remote/providers/github/project-iteration.d.ts +71 -0
- package/dist/remote/providers/github/project-iteration.js +203 -0
- package/dist/remote/providers/github/project-iteration.js.map +1 -0
- package/dist/remote/providers/github/project-provision.d.ts +130 -0
- package/dist/remote/providers/github/project-provision.js +247 -0
- package/dist/remote/providers/github/project-provision.js.map +1 -0
- package/dist/remote/providers/github/project-status.d.ts +115 -0
- package/dist/remote/providers/github/project-status.js +317 -0
- package/dist/remote/providers/github/project-status.js.map +1 -0
- package/dist/remote/providers/github/projects.d.ts +181 -0
- package/dist/remote/providers/github/projects.js +481 -0
- package/dist/remote/providers/github/projects.js.map +1 -0
- package/dist/remote/providers/github/translator.d.ts +103 -0
- package/dist/remote/providers/github/translator.js +400 -0
- package/dist/remote/providers/github/translator.js.map +1 -0
- package/dist/remote/providers/jira/config.d.ts +96 -0
- package/dist/remote/providers/jira/config.js +200 -0
- package/dist/remote/providers/jira/config.js.map +1 -0
- package/dist/remote/providers/jira/connector.d.ts +42 -0
- package/dist/remote/providers/jira/connector.js +1688 -0
- package/dist/remote/providers/jira/connector.js.map +1 -0
- package/dist/remote/providers/jira/fields.d.ts +292 -0
- package/dist/remote/providers/jira/fields.js +463 -0
- package/dist/remote/providers/jira/fields.js.map +1 -0
- package/dist/remote/providers/jira/hierarchy.d.ts +28 -0
- package/dist/remote/providers/jira/hierarchy.js +60 -0
- package/dist/remote/providers/jira/hierarchy.js.map +1 -0
- package/dist/remote/providers/jira/index.d.ts +29 -0
- package/dist/remote/providers/jira/index.js +100 -0
- package/dist/remote/providers/jira/index.js.map +1 -0
- package/dist/remote/providers/jira/links.d.ts +41 -0
- package/dist/remote/providers/jira/links.js +102 -0
- package/dist/remote/providers/jira/links.js.map +1 -0
- package/dist/remote/providers/jira/sprints.d.ts +80 -0
- package/dist/remote/providers/jira/sprints.js +107 -0
- package/dist/remote/providers/jira/sprints.js.map +1 -0
- package/dist/remote/providers/jira/translator.d.ts +61 -0
- package/dist/remote/providers/jira/translator.js +382 -0
- package/dist/remote/providers/jira/translator.js.map +1 -0
- package/dist/remote/providers/jira/types.d.ts +112 -0
- package/dist/remote/providers/jira/types.js +160 -0
- package/dist/remote/providers/jira/types.js.map +1 -0
- package/dist/remote/providers/jira/vocabulary.d.ts +55 -0
- package/dist/remote/providers/jira/vocabulary.js +91 -0
- package/dist/remote/providers/jira/vocabulary.js.map +1 -0
- package/dist/remote/providers/jsonfile/config.d.ts +61 -0
- package/dist/remote/providers/jsonfile/config.js +83 -0
- package/dist/remote/providers/jsonfile/config.js.map +1 -0
- package/dist/remote/providers/jsonfile/connector.d.ts +34 -0
- package/dist/remote/providers/jsonfile/connector.js +251 -0
- package/dist/remote/providers/jsonfile/connector.js.map +1 -0
- package/dist/remote/providers/jsonfile/index.d.ts +38 -0
- package/dist/remote/providers/jsonfile/index.js +90 -0
- package/dist/remote/providers/jsonfile/index.js.map +1 -0
- package/dist/remote/providers/jsonfile/store.d.ts +59 -0
- package/dist/remote/providers/jsonfile/store.js +48 -0
- package/dist/remote/providers/jsonfile/store.js.map +1 -0
- package/dist/remote/providers/jsonfile/translator.d.ts +54 -0
- package/dist/remote/providers/jsonfile/translator.js +199 -0
- package/dist/remote/providers/jsonfile/translator.js.map +1 -0
- package/dist/remote/providers/linear/config.d.ts +83 -0
- package/dist/remote/providers/linear/config.js +140 -0
- package/dist/remote/providers/linear/config.js.map +1 -0
- package/dist/remote/providers/linear/connector.d.ts +36 -0
- package/dist/remote/providers/linear/connector.js +438 -0
- package/dist/remote/providers/linear/connector.js.map +1 -0
- package/dist/remote/providers/linear/estimate.d.ts +63 -0
- package/dist/remote/providers/linear/estimate.js +112 -0
- package/dist/remote/providers/linear/estimate.js.map +1 -0
- package/dist/remote/providers/linear/index.d.ts +31 -0
- package/dist/remote/providers/linear/index.js +75 -0
- package/dist/remote/providers/linear/index.js.map +1 -0
- package/dist/remote/providers/linear/labels.d.ts +51 -0
- package/dist/remote/providers/linear/labels.js +129 -0
- package/dist/remote/providers/linear/labels.js.map +1 -0
- package/dist/remote/providers/linear/states.d.ts +97 -0
- package/dist/remote/providers/linear/states.js +124 -0
- package/dist/remote/providers/linear/states.js.map +1 -0
- package/dist/remote/providers/linear/translator.d.ts +48 -0
- package/dist/remote/providers/linear/translator.js +343 -0
- package/dist/remote/providers/linear/translator.js.map +1 -0
- package/dist/remote/providers/linear/vocabulary.d.ts +27 -0
- package/dist/remote/providers/linear/vocabulary.js +42 -0
- package/dist/remote/providers/linear/vocabulary.js.map +1 -0
- package/dist/remote/provision.d.ts +45 -0
- package/dist/remote/provision.js +81 -0
- package/dist/remote/provision.js.map +1 -0
- package/dist/remote/pull.d.ts +52 -0
- package/dist/remote/pull.js +116 -0
- package/dist/remote/pull.js.map +1 -0
- package/dist/remote/readiness.d.ts +67 -0
- package/dist/remote/readiness.js +336 -0
- package/dist/remote/readiness.js.map +1 -0
- package/dist/remote/rebase.d.ts +157 -0
- package/dist/remote/rebase.js +255 -0
- package/dist/remote/rebase.js.map +1 -0
- package/dist/remote/reconcile.d.ts +115 -0
- package/dist/remote/reconcile.js +140 -0
- package/dist/remote/reconcile.js.map +1 -0
- package/dist/remote/redact.d.ts +70 -0
- package/dist/remote/redact.js +132 -0
- package/dist/remote/redact.js.map +1 -0
- package/dist/remote/registry.d.ts +32 -0
- package/dist/remote/registry.js +54 -0
- package/dist/remote/registry.js.map +1 -0
- package/dist/remote/remotes.d.ts +94 -0
- package/dist/remote/remotes.js +182 -0
- package/dist/remote/remotes.js.map +1 -0
- package/dist/remote/render.d.ts +147 -0
- package/dist/remote/render.js +683 -0
- package/dist/remote/render.js.map +1 -0
- package/dist/remote/report.d.ts +63 -0
- package/dist/remote/report.js +345 -0
- package/dist/remote/report.js.map +1 -0
- package/dist/remote/resolutions.d.ts +115 -0
- package/dist/remote/resolutions.js +217 -0
- package/dist/remote/resolutions.js.map +1 -0
- package/dist/remote/scaffold.d.ts +134 -0
- package/dist/remote/scaffold.js +370 -0
- package/dist/remote/scaffold.js.map +1 -0
- package/dist/remote/scope.d.ts +57 -0
- package/dist/remote/scope.js +91 -0
- package/dist/remote/scope.js.map +1 -0
- package/dist/remote/selection.d.ts +38 -0
- package/dist/remote/selection.js +50 -0
- package/dist/remote/selection.js.map +1 -0
- package/dist/remote/shape.d.ts +141 -0
- package/dist/remote/shape.js +220 -0
- package/dist/remote/shape.js.map +1 -0
- package/dist/remote/status.d.ts +104 -0
- package/dist/remote/status.js +238 -0
- package/dist/remote/status.js.map +1 -0
- package/dist/remote/sync.d.ts +182 -0
- package/dist/remote/sync.js +523 -0
- package/dist/remote/sync.js.map +1 -0
- package/dist/remote/transport/budget.d.ts +48 -0
- package/dist/remote/transport/budget.js +68 -0
- package/dist/remote/transport/budget.js.map +1 -0
- package/dist/remote/transport/connector.d.ts +115 -0
- package/dist/remote/transport/connector.js +21 -0
- package/dist/remote/transport/connector.js.map +1 -0
- package/dist/remote/transport/error.d.ts +88 -0
- package/dist/remote/transport/error.js +196 -0
- package/dist/remote/transport/error.js.map +1 -0
- package/dist/remote/transport/gh.d.ts +20 -0
- package/dist/remote/transport/gh.js +41 -0
- package/dist/remote/transport/gh.js.map +1 -0
- package/dist/remote/transport/graphql.d.ts +25 -0
- package/dist/remote/transport/graphql.js +81 -0
- package/dist/remote/transport/graphql.js.map +1 -0
- package/dist/remote/transport/http.d.ts +47 -0
- package/dist/remote/transport/http.js +195 -0
- package/dist/remote/transport/http.js.map +1 -0
- package/dist/remote/transport/index.d.ts +18 -0
- package/dist/remote/transport/index.js +19 -0
- package/dist/remote/transport/index.js.map +1 -0
- package/dist/remote/transport/process.d.ts +39 -0
- package/dist/remote/transport/process.js +121 -0
- package/dist/remote/transport/process.js.map +1 -0
- package/dist/remote/transport/rest.d.ts +22 -0
- package/dist/remote/transport/rest.js +57 -0
- package/dist/remote/transport/rest.js.map +1 -0
- package/dist/remote/transport/retry.d.ts +91 -0
- package/dist/remote/transport/retry.js +138 -0
- package/dist/remote/transport/retry.js.map +1 -0
- package/dist/remote/transport-error.d.ts +19 -0
- package/dist/remote/transport-error.js +22 -0
- package/dist/remote/transport-error.js.map +1 -0
- package/dist/remote/vocabulary.d.ts +126 -0
- package/dist/remote/vocabulary.js +57 -0
- package/dist/remote/vocabulary.js.map +1 -0
- package/dist/runner/config.d.ts +7 -0
- package/dist/runner/config.js +61 -0
- package/dist/runner/config.js.map +1 -0
- package/dist/runner/git.d.ts +19 -0
- package/dist/runner/git.js +26 -0
- package/dist/runner/git.js.map +1 -0
- package/dist/runner/index.d.ts +20 -0
- package/dist/runner/index.js +21 -0
- package/dist/runner/index.js.map +1 -0
- package/dist/runner/loop.d.ts +46 -0
- package/dist/runner/loop.js +243 -0
- package/dist/runner/loop.js.map +1 -0
- package/dist/runner/pi.d.ts +39 -0
- package/dist/runner/pi.js +276 -0
- package/dist/runner/pi.js.map +1 -0
- package/dist/runner/shell.d.ts +44 -0
- package/dist/runner/shell.js +174 -0
- package/dist/runner/shell.js.map +1 -0
- package/dist/runner/stats.d.ts +19 -0
- package/dist/runner/stats.js +58 -0
- package/dist/runner/stats.js.map +1 -0
- package/dist/runner/types.d.ts +218 -0
- package/dist/runner/types.js +37 -0
- package/dist/runner/types.js.map +1 -0
- package/dist/server/git.d.ts +8 -0
- package/dist/server/git.js +50 -0
- package/dist/server/git.js.map +1 -0
- package/dist/server/http/respond.d.ts +13 -0
- package/dist/server/http/respond.js +59 -0
- package/dist/server/http/respond.js.map +1 -0
- package/dist/server/http/router.d.ts +27 -0
- package/dist/server/http/router.js +48 -0
- package/dist/server/http/router.js.map +1 -0
- package/dist/server/http/static.d.ts +14 -0
- package/dist/server/http/static.js +55 -0
- package/dist/server/http/static.js.map +1 -0
- package/dist/server/index.d.ts +58 -0
- package/dist/server/index.js +124 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/routes/board.d.ts +8 -0
- package/dist/server/routes/board.js +19 -0
- package/dist/server/routes/board.js.map +1 -0
- package/dist/server/routes/comments.d.ts +13 -0
- package/dist/server/routes/comments.js +36 -0
- package/dist/server/routes/comments.js.map +1 -0
- package/dist/server/routes/flags.d.ts +16 -0
- package/dist/server/routes/flags.js +37 -0
- package/dist/server/routes/flags.js.map +1 -0
- package/dist/server/routes/git.d.ts +13 -0
- package/dist/server/routes/git.js +84 -0
- package/dist/server/routes/git.js.map +1 -0
- package/dist/server/routes/remotes.d.ts +36 -0
- package/dist/server/routes/remotes.js +749 -0
- package/dist/server/routes/remotes.js.map +1 -0
- package/dist/server/routes/views.d.ts +10 -0
- package/dist/server/routes/views.js +63 -0
- package/dist/server/routes/views.js.map +1 -0
- package/dist/server/views/schema.d.ts +2 -0
- package/dist/server/views/schema.js +121 -0
- package/dist/server/views/schema.js.map +1 -0
- package/dist/server/views/store.d.ts +17 -0
- package/dist/server/views/store.js +67 -0
- package/dist/server/views/store.js.map +1 -0
- package/dist/shared/adf.d.ts +83 -0
- package/dist/shared/adf.js +795 -0
- package/dist/shared/adf.js.map +1 -0
- package/dist/shared/blocking.d.ts +130 -0
- package/dist/shared/blocking.js +179 -0
- package/dist/shared/blocking.js.map +1 -0
- package/dist/shared/changes.d.ts +100 -0
- package/dist/shared/changes.js +112 -0
- package/dist/shared/changes.js.map +1 -0
- package/dist/shared/cohesion.d.ts +75 -0
- package/dist/shared/cohesion.js +132 -0
- package/dist/shared/cohesion.js.map +1 -0
- package/dist/shared/dependency-rollup.d.ts +91 -0
- package/dist/shared/dependency-rollup.js +132 -0
- package/dist/shared/dependency-rollup.js.map +1 -0
- package/dist/shared/errors.d.ts +23 -0
- package/dist/shared/errors.js +24 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/flag-rollup.d.ts +88 -0
- package/dist/shared/flag-rollup.js +119 -0
- package/dist/shared/flag-rollup.js.map +1 -0
- package/dist/shared/git-sync.d.ts +90 -0
- package/dist/shared/git-sync.js +9 -0
- package/dist/shared/git-sync.js.map +1 -0
- package/dist/shared/index.d.ts +40 -0
- package/dist/shared/index.js +41 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/model.d.ts +218 -0
- package/dist/shared/model.js +95 -0
- package/dist/shared/model.js.map +1 -0
- package/dist/shared/period-query.d.ts +21 -0
- package/dist/shared/period-query.js +26 -0
- package/dist/shared/period-query.js.map +1 -0
- package/dist/shared/period-stance.d.ts +45 -0
- package/dist/shared/period-stance.js +50 -0
- package/dist/shared/period-stance.js.map +1 -0
- package/dist/shared/plans/breakdown.d.ts +66 -0
- package/dist/shared/plans/breakdown.js +186 -0
- package/dist/shared/plans/breakdown.js.map +1 -0
- package/dist/shared/plans/index.d.ts +21 -0
- package/dist/shared/plans/index.js +22 -0
- package/dist/shared/plans/index.js.map +1 -0
- package/dist/shared/plans/instantiate.d.ts +61 -0
- package/dist/shared/plans/instantiate.js +184 -0
- package/dist/shared/plans/instantiate.js.map +1 -0
- package/dist/shared/plans/reading.d.ts +79 -0
- package/dist/shared/plans/reading.js +149 -0
- package/dist/shared/plans/reading.js.map +1 -0
- package/dist/shared/plans/reparent.d.ts +54 -0
- package/dist/shared/plans/reparent.js +217 -0
- package/dist/shared/plans/reparent.js.map +1 -0
- package/dist/shared/plans/timeline.d.ts +93 -0
- package/dist/shared/plans/timeline.js +224 -0
- package/dist/shared/plans/timeline.js.map +1 -0
- package/dist/shared/plans/upstream.d.ts +67 -0
- package/dist/shared/plans/upstream.js +73 -0
- package/dist/shared/plans/upstream.js.map +1 -0
- package/dist/shared/remote-api.d.ts +413 -0
- package/dist/shared/remote-api.js +11 -0
- package/dist/shared/remote-api.js.map +1 -0
- package/dist/shared/remote-coverage.d.ts +120 -0
- package/dist/shared/remote-coverage.js +98 -0
- package/dist/shared/remote-coverage.js.map +1 -0
- package/dist/shared/remote-readiness.d.ts +162 -0
- package/dist/shared/remote-readiness.js +49 -0
- package/dist/shared/remote-readiness.js.map +1 -0
- package/dist/shared/remote-status.d.ts +268 -0
- package/dist/shared/remote-status.js +79 -0
- package/dist/shared/remote-status.js.map +1 -0
- package/dist/shared/rollup.d.ts +90 -0
- package/dist/shared/rollup.js +119 -0
- package/dist/shared/rollup.js.map +1 -0
- package/dist/shared/static.d.ts +65 -0
- package/dist/shared/static.js +107 -0
- package/dist/shared/static.js.map +1 -0
- package/dist/shared/template-params.d.ts +80 -0
- package/dist/shared/template-params.js +141 -0
- package/dist/shared/template-params.js.map +1 -0
- package/dist/shared/view.d.ts +105 -0
- package/dist/shared/view.js +44 -0
- package/dist/shared/view.js.map +1 -0
- package/dist/shared/work-unit.d.ts +34 -0
- package/dist/shared/work-unit.js +47 -0
- package/dist/shared/work-unit.js.map +1 -0
- package/dist/sync/apply.d.ts +21 -0
- package/dist/sync/apply.js +149 -0
- package/dist/sync/apply.js.map +1 -0
- package/dist/sync/dto.d.ts +9 -0
- package/dist/sync/dto.js +162 -0
- package/dist/sync/dto.js.map +1 -0
- package/dist/sync/index.d.ts +24 -0
- package/dist/sync/index.js +25 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/patch.d.ts +13 -0
- package/dist/sync/patch.js +212 -0
- package/dist/sync/patch.js.map +1 -0
- package/dist/sync/session.d.ts +31 -0
- package/dist/sync/session.js +55 -0
- package/dist/sync/session.js.map +1 -0
- package/dist/sync/static.d.ts +11 -0
- package/dist/sync/static.js +33 -0
- package/dist/sync/static.js.map +1 -0
- package/package.json +95 -4
- package/templates/blank.yml +71 -0
- package/templates/context/bug.md +107 -0
- package/templates/context/default.md +119 -0
- package/templates/context/epic.md +81 -0
- package/templates/context/feature.md +91 -0
- package/templates/context/research.md +87 -0
- package/templates/context/review.md +81 -0
- package/templates/context/story.md +94 -0
- package/templates/context/sub_task.md +108 -0
- package/templates/context/task.md +86 -0
- package/templates/context/test.md +73 -0
- package/templates/context/user_story.md +147 -0
- package/templates/kanban.yml +226 -0
- package/templates/scrum.yml +567 -0
- package/web/dist/assets/index-D0j8OnHq.js +35 -0
- package/web/dist/assets/index-DFL7v8aP.css +1 -0
- package/web/dist/index.html +13 -0
- package/web/dist-viewer/assets/index-Bcns6OuC.css +1 -0
- package/web/dist-viewer/assets/index-vVXzeiFo.js +7 -0
- package/web/dist-viewer/index.html +14 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { isActiveStatus, isGenericType, isTerminalStatus, typesFor } from '../config/lookup.js';
|
|
3
|
+
import { flagLabel } from '../model/types.js';
|
|
4
|
+
import { readComments } from '../storage/comments.js';
|
|
5
|
+
import { displayPath } from '../storage/paths.js';
|
|
6
|
+
import { HELPER_NAMES } from './template.js';
|
|
7
|
+
/**
|
|
8
|
+
* Root keys a board type name may never take over — the fixed vocabulary, plus
|
|
9
|
+
* the helper functions, which are merged into the same scope at render time.
|
|
10
|
+
*/
|
|
11
|
+
const RESERVED_ROOT_KEYS = new Set([
|
|
12
|
+
...HELPER_NAMES,
|
|
13
|
+
'issue',
|
|
14
|
+
'it',
|
|
15
|
+
'board',
|
|
16
|
+
'today',
|
|
17
|
+
'parent',
|
|
18
|
+
'ancestors',
|
|
19
|
+
'children',
|
|
20
|
+
'descendants',
|
|
21
|
+
'siblings',
|
|
22
|
+
'blocked_by',
|
|
23
|
+
'blocks',
|
|
24
|
+
'relates_to',
|
|
25
|
+
'related_files',
|
|
26
|
+
'upstream_files',
|
|
27
|
+
'period',
|
|
28
|
+
'assignee',
|
|
29
|
+
'comments',
|
|
30
|
+
'loop',
|
|
31
|
+
]);
|
|
32
|
+
function labelOf(board, node) {
|
|
33
|
+
return typesFor(board.config, node.kind)[node.type]?.label ?? node.type;
|
|
34
|
+
}
|
|
35
|
+
function humanize(name) {
|
|
36
|
+
const words = name.replace(/[_-]+/g, ' ').trim();
|
|
37
|
+
return words ? words.charAt(0).toUpperCase() + words.slice(1) : name;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Declared attributes first, in config order, then keys somebody added by hand.
|
|
41
|
+
* Empty values are dropped: a brief listing eight blank fields teaches nothing.
|
|
42
|
+
*/
|
|
43
|
+
function attributeViews(board, node) {
|
|
44
|
+
const declared = typesFor(board.config, node.kind)[node.type]?.attributes ?? {};
|
|
45
|
+
const names = [
|
|
46
|
+
...Object.keys(declared),
|
|
47
|
+
...Object.keys(node.attributes).filter((name) => !declared[name]),
|
|
48
|
+
];
|
|
49
|
+
return names
|
|
50
|
+
.filter((name) => {
|
|
51
|
+
const value = node.attributes[name];
|
|
52
|
+
return value !== undefined && value !== null && value !== '' &&
|
|
53
|
+
!(Array.isArray(value) && value.length === 0);
|
|
54
|
+
})
|
|
55
|
+
.map((name) => ({
|
|
56
|
+
name,
|
|
57
|
+
label: humanize(name),
|
|
58
|
+
value: node.attributes[name],
|
|
59
|
+
type: declared[name]?.type ?? 'unknown',
|
|
60
|
+
description: declared[name]?.description ?? '',
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
function baseView(board, node) {
|
|
64
|
+
const issue = node.kind === 'issue' ? node : null;
|
|
65
|
+
const status = issue?.status ?? '';
|
|
66
|
+
return {
|
|
67
|
+
id: node.id,
|
|
68
|
+
kind: node.kind,
|
|
69
|
+
type: node.type,
|
|
70
|
+
type_label: labelOf(board, node),
|
|
71
|
+
title: node.title,
|
|
72
|
+
body: node.body.trim(),
|
|
73
|
+
attributes: node.attributes,
|
|
74
|
+
attribute_list: attributeViews(board, node),
|
|
75
|
+
created: node.created ?? '',
|
|
76
|
+
updated: node.updated ?? '',
|
|
77
|
+
author: node.author ?? '',
|
|
78
|
+
path: displayPath(board.paths, node.dir),
|
|
79
|
+
depth: node.depth,
|
|
80
|
+
parent: null,
|
|
81
|
+
ancestors: [],
|
|
82
|
+
children: [],
|
|
83
|
+
descendants: [],
|
|
84
|
+
siblings: [],
|
|
85
|
+
status,
|
|
86
|
+
status_label: board.config.statuses.find((entry) => entry.id === status)?.label ?? status,
|
|
87
|
+
done: Boolean(issue) && isTerminalStatus(board.config, status),
|
|
88
|
+
active: Boolean(issue) && isActiveStatus(board.config, status),
|
|
89
|
+
flag: issue?.flag ?? '',
|
|
90
|
+
flag_label: issue?.flag ? flagLabel(issue.flag) : '',
|
|
91
|
+
blocked_by: [],
|
|
92
|
+
blocks: [],
|
|
93
|
+
relates_to: [],
|
|
94
|
+
related_files: issue?.related_files ?? [],
|
|
95
|
+
period: null,
|
|
96
|
+
assignee: null,
|
|
97
|
+
starts: node.kind === 'period' ? (node.starts ?? '') : '',
|
|
98
|
+
ends: node.kind === 'period' ? (node.ends ?? '') : '',
|
|
99
|
+
capacity: node.kind === 'resource' ? node.capacity : null,
|
|
100
|
+
generic: node.kind === 'resource' && isGenericType(board.config, node.type),
|
|
101
|
+
covers: [],
|
|
102
|
+
comments: [],
|
|
103
|
+
is_target: false,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/** Views for every document on the board, wired to each other. */
|
|
107
|
+
function buildViews(board) {
|
|
108
|
+
// Loading is forgiving, so two documents can carry the same id; `check`
|
|
109
|
+
// reports that, and here the first one wins, exactly as `board.byId` does.
|
|
110
|
+
// Wiring the second as well would give one view two parents and push it into
|
|
111
|
+
// its children's lists twice.
|
|
112
|
+
const views = new Map();
|
|
113
|
+
const all = [];
|
|
114
|
+
for (const node of [...board.issues, ...board.periods, ...board.resources]) {
|
|
115
|
+
if (views.has(node.id))
|
|
116
|
+
continue;
|
|
117
|
+
views.set(node.id, baseView(board, node));
|
|
118
|
+
all.push(node);
|
|
119
|
+
}
|
|
120
|
+
const view = (id) => (id ? (views.get(id) ?? null) : null);
|
|
121
|
+
const list = (ids) => ids.map((id) => views.get(id)).filter((entry) => Boolean(entry));
|
|
122
|
+
for (const node of all) {
|
|
123
|
+
const self = views.get(node.id);
|
|
124
|
+
self.parent = view(node.parentId);
|
|
125
|
+
if (node.kind === 'issue') {
|
|
126
|
+
self.blocked_by = list(node.depends_on);
|
|
127
|
+
self.blocks = list(board.dependents.get(node.id) ?? []);
|
|
128
|
+
self.relates_to = list(node.relates_to);
|
|
129
|
+
self.period = view(node.period);
|
|
130
|
+
self.assignee = view(node.assignee);
|
|
131
|
+
}
|
|
132
|
+
if (node.kind === 'resource')
|
|
133
|
+
self.covers = list(node.covers);
|
|
134
|
+
}
|
|
135
|
+
// Parents are built before their children (documents come out of `load.ts`
|
|
136
|
+
// in folder order), so one pass up the chain is enough.
|
|
137
|
+
for (const node of all) {
|
|
138
|
+
const self = views.get(node.id);
|
|
139
|
+
const parent = self.parent;
|
|
140
|
+
if (!parent)
|
|
141
|
+
continue;
|
|
142
|
+
self.ancestors = [...parent.ancestors, parent];
|
|
143
|
+
parent.children.push(self);
|
|
144
|
+
}
|
|
145
|
+
for (const self of views.values()) {
|
|
146
|
+
self.siblings = (self.parent?.children ?? []).filter((other) => other !== self);
|
|
147
|
+
for (const ancestor of self.ancestors)
|
|
148
|
+
ancestor.descendants.push(self);
|
|
149
|
+
// `{{ epic.title }}` on a story: the nearest ancestor of that type, or the
|
|
150
|
+
// node itself when it *is* one. A type whose name collides with a field of
|
|
151
|
+
// this view keeps the field — the type is still reachable at the root.
|
|
152
|
+
for (const relative of [self, ...[...self.ancestors].reverse()]) {
|
|
153
|
+
if (relative.type && !(relative.type in self))
|
|
154
|
+
self[relative.type] = relative;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return views;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The data one issue's brief is rendered against.
|
|
161
|
+
*
|
|
162
|
+
* Read-only and derived entirely from the board plus the config, exactly like
|
|
163
|
+
* `board/tasks.ts` — assembling context is reporting, not planning.
|
|
164
|
+
*/
|
|
165
|
+
export function buildContext(board, issue, options = {}) {
|
|
166
|
+
const views = buildViews(board);
|
|
167
|
+
const target = views.get(issue.id) ?? baseView(board, issue);
|
|
168
|
+
target.is_target = true;
|
|
169
|
+
if (options.includeComments !== false)
|
|
170
|
+
target.comments = readComments(issue.dir);
|
|
171
|
+
const context = {
|
|
172
|
+
issue: target,
|
|
173
|
+
board: {
|
|
174
|
+
name: path.basename(board.paths.root),
|
|
175
|
+
key_prefix: board.config.key_prefix,
|
|
176
|
+
statuses: board.config.statuses.map((status) => status.id),
|
|
177
|
+
},
|
|
178
|
+
today: options.today ?? new Date().toISOString().slice(0, 10),
|
|
179
|
+
parent: target.parent,
|
|
180
|
+
ancestors: target.ancestors,
|
|
181
|
+
children: target.children,
|
|
182
|
+
descendants: target.descendants,
|
|
183
|
+
siblings: target.siblings,
|
|
184
|
+
blocked_by: target.blocked_by,
|
|
185
|
+
blocks: target.blocks,
|
|
186
|
+
relates_to: target.relates_to,
|
|
187
|
+
related_files: target.related_files,
|
|
188
|
+
// The work this one comes after, and what it touched. Only issues that
|
|
189
|
+
// named a file appear: an empty entry would be a heading with nothing
|
|
190
|
+
// under it in every brief on a board that does not use the field.
|
|
191
|
+
upstream_files: target.blocked_by
|
|
192
|
+
.filter((view) => view.related_files.length)
|
|
193
|
+
.map((view) => ({ issue: view, files: view.related_files })),
|
|
194
|
+
period: target.period,
|
|
195
|
+
assignee: target.assignee,
|
|
196
|
+
comments: target.comments,
|
|
197
|
+
};
|
|
198
|
+
// Every issue type on the board, so a template can name one that this issue
|
|
199
|
+
// does not happen to have an ancestor of and get nothing rather than a
|
|
200
|
+
// warning — `<% if (epic) { %>` is how a shared template stays honest.
|
|
201
|
+
for (const type of Object.keys(board.config.issue_types)) {
|
|
202
|
+
if (RESERVED_ROOT_KEYS.has(type))
|
|
203
|
+
continue;
|
|
204
|
+
const found = [target, ...[...target.ancestors].reverse()].find((view) => view.type === type);
|
|
205
|
+
context[type] = found ?? null;
|
|
206
|
+
}
|
|
207
|
+
return context;
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/core/instructions/context.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEhG,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAoJ7C;;;GAGG;AACH,MAAM,kBAAkB,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Q;KAC1B,CAAC;IAEF,4EAA4E;IAC5E,uEAAuE;IACvE,uEAAuE;IACvE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACzD,IAAI,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAC3C,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAC7D,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAC7B,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,IAAI,CAAC;IAChC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Working briefs: turning one issue into the text somebody needs to do it.
|
|
3
|
+
*
|
|
4
|
+
* `lpm task next` says *what* to work on. This layer answers the question
|
|
5
|
+
* straight after it — *what do I need to know to start?* — by walking up the
|
|
6
|
+
* hierarchy and laying the ancestors' titles and bodies out above the issue's
|
|
7
|
+
* own, plus its breakdown, its blockers, the findings it rests on and its work
|
|
8
|
+
* log. The result is markdown meant to be pasted into a prompt.
|
|
9
|
+
*
|
|
10
|
+
* analyze.ts the safety check a template passes before it is compiled
|
|
11
|
+
* template.ts rendering one with Eta, plus the helpers it may call
|
|
12
|
+
* context.ts board + issue -> the values a template can see
|
|
13
|
+
* builtin.ts the layout every board falls back to, naming no type
|
|
14
|
+
* instructions.ts which template to use, and rendering it
|
|
15
|
+
*
|
|
16
|
+
* Read-only, like `board/tasks.ts`: a brief reports the board, it never
|
|
17
|
+
* changes it. The layouts live in `.lpm/templates/context/`, which is the one
|
|
18
|
+
* folder under `.lpm` that holds no documents — `load.ts` never opens it and
|
|
19
|
+
* `check` does not know it exists, so no template can make a board invalid.
|
|
20
|
+
*
|
|
21
|
+
* They are, however, **executable**: Eta compiles a template to JavaScript and
|
|
22
|
+
* runs it. `analyze.ts` is what stands between a board somebody handed you and
|
|
23
|
+
* your shell, and every render goes through it.
|
|
24
|
+
*/
|
|
25
|
+
export * from './analyze.js';
|
|
26
|
+
export * from './builtin.js';
|
|
27
|
+
export * from './context.js';
|
|
28
|
+
export * from './instructions.js';
|
|
29
|
+
export * from './template.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Working briefs: turning one issue into the text somebody needs to do it.
|
|
3
|
+
*
|
|
4
|
+
* `lpm task next` says *what* to work on. This layer answers the question
|
|
5
|
+
* straight after it — *what do I need to know to start?* — by walking up the
|
|
6
|
+
* hierarchy and laying the ancestors' titles and bodies out above the issue's
|
|
7
|
+
* own, plus its breakdown, its blockers, the findings it rests on and its work
|
|
8
|
+
* log. The result is markdown meant to be pasted into a prompt.
|
|
9
|
+
*
|
|
10
|
+
* analyze.ts the safety check a template passes before it is compiled
|
|
11
|
+
* template.ts rendering one with Eta, plus the helpers it may call
|
|
12
|
+
* context.ts board + issue -> the values a template can see
|
|
13
|
+
* builtin.ts the layout every board falls back to, naming no type
|
|
14
|
+
* instructions.ts which template to use, and rendering it
|
|
15
|
+
*
|
|
16
|
+
* Read-only, like `board/tasks.ts`: a brief reports the board, it never
|
|
17
|
+
* changes it. The layouts live in `.lpm/templates/context/`, which is the one
|
|
18
|
+
* folder under `.lpm` that holds no documents — `load.ts` never opens it and
|
|
19
|
+
* `check` does not know it exists, so no template can make a board invalid.
|
|
20
|
+
*
|
|
21
|
+
* They are, however, **executable**: Eta compiles a template to JavaScript and
|
|
22
|
+
* runs it. `analyze.ts` is what stands between a board somebody handed you and
|
|
23
|
+
* your shell, and every render goes through it.
|
|
24
|
+
*/
|
|
25
|
+
export * from './analyze.js';
|
|
26
|
+
export * from './builtin.js';
|
|
27
|
+
export * from './context.js';
|
|
28
|
+
export * from './instructions.js';
|
|
29
|
+
export * from './template.js';
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { LoadedBoard } from '../board/load.js';
|
|
2
|
+
import type { BoardConfig, Issue } from '../model/types.js';
|
|
3
|
+
import type { BoardPaths } from '../storage/paths.js';
|
|
4
|
+
import type { TemplateFinding } from './analyze.js';
|
|
5
|
+
import type { ContextOptions } from './context.js';
|
|
6
|
+
/**
|
|
7
|
+
* A working brief: everything an agent or a developer needs to pick one issue
|
|
8
|
+
* up, as one piece of markdown they can paste into a prompt.
|
|
9
|
+
*
|
|
10
|
+
* Read-only, and derived entirely from the board plus the config — assembling
|
|
11
|
+
* context is reporting, like `board/tasks.ts`, not planning. The CLI and the
|
|
12
|
+
* MCP server are thin printers over `buildInstructions`, so `lpm instructions
|
|
13
|
+
* LP-12` and `get_instructions { id: "LP-12" }` hand out the same text.
|
|
14
|
+
*/
|
|
15
|
+
/** Where the layout that produced a brief came from. */
|
|
16
|
+
export interface TemplateSource {
|
|
17
|
+
kind: 'builtin' | 'board' | 'file';
|
|
18
|
+
/** `built-in`, a template name, or a path. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** The file it was read from, relative to the board root. Null for built-in. */
|
|
21
|
+
path: string | null;
|
|
22
|
+
text: string;
|
|
23
|
+
}
|
|
24
|
+
export interface InstructionsOptions extends ContextOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Override the layout: a template name in `.lpm/templates/context`, or a path
|
|
27
|
+
* to a markdown file anywhere.
|
|
28
|
+
*/
|
|
29
|
+
template?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Render a template the safety check refused. Only ever set this from a flag
|
|
32
|
+
* the person at the keyboard typed — never for an agent, and never for input
|
|
33
|
+
* that arrived with somebody else's board.
|
|
34
|
+
*/
|
|
35
|
+
allowUnsafe?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface Instructions {
|
|
38
|
+
issue: Issue;
|
|
39
|
+
source: TemplateSource;
|
|
40
|
+
text: string;
|
|
41
|
+
/** Everything the template asked for that the board could not answer. */
|
|
42
|
+
warnings: string[];
|
|
43
|
+
/** What the safety check saw in the layout that produced this. */
|
|
44
|
+
findings: TemplateFinding[];
|
|
45
|
+
}
|
|
46
|
+
/** Starter templates the package ships, by name. */
|
|
47
|
+
export declare function starterTemplateNames(): string[];
|
|
48
|
+
export declare function readStarterTemplate(name: string): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Write the starter templates a board's config can actually use: one per
|
|
51
|
+
* declared issue type that has a starter, plus `default.md` for the rest.
|
|
52
|
+
*
|
|
53
|
+
* Nothing is overwritten without `force` — a layout somebody has edited is
|
|
54
|
+
* worth more than the starter it grew from. Returns what it wrote and what it
|
|
55
|
+
* left alone.
|
|
56
|
+
*/
|
|
57
|
+
export declare function installContextTemplates(paths: BoardPaths, config: BoardConfig, options?: {
|
|
58
|
+
force?: boolean;
|
|
59
|
+
}): {
|
|
60
|
+
written: string[];
|
|
61
|
+
skipped: string[];
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Which layout an issue of this type gets: the board's template for the type,
|
|
65
|
+
* then the board's `default`, then the built-in one. An override is taken as a
|
|
66
|
+
* template name first and as a path second, so `--template user_story` means
|
|
67
|
+
* the board's, not a file that happens to be called that.
|
|
68
|
+
*/
|
|
69
|
+
export declare function resolveContextTemplate(paths: BoardPaths, type: string, override?: string): TemplateSource;
|
|
70
|
+
/** Resolve an issue by id, case-insensitively, or say so usefully. */
|
|
71
|
+
export declare function requireIssueFor(board: LoadedBoard, id: string): Issue;
|
|
72
|
+
/** The brief for one issue. */
|
|
73
|
+
export declare function buildInstructions(board: LoadedBoard, issue: Issue, options?: InstructionsOptions): Instructions;
|
|
74
|
+
/** One template's safety report, without rendering anything. */
|
|
75
|
+
export interface TemplateAudit {
|
|
76
|
+
source: TemplateSource;
|
|
77
|
+
findings: TemplateFinding[];
|
|
78
|
+
/** Set when the template will not even parse. */
|
|
79
|
+
error: string | null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Read every layout this board would use and report what is in them.
|
|
83
|
+
*
|
|
84
|
+
* The point of doing this per *type* rather than per file is that it answers
|
|
85
|
+
* the question that matters — "what will actually run when somebody asks for a
|
|
86
|
+
* brief?" — and it covers the built-in layout, which is not a file at all.
|
|
87
|
+
*/
|
|
88
|
+
export declare function auditContextTemplates(board: LoadedBoard): TemplateAudit[];
|
|
89
|
+
/** The same, from an id — what both front ends actually call. */
|
|
90
|
+
export declare function instructionsFor(board: LoadedBoard, id: string, options?: InstructionsOptions): Instructions;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { findIssue } from '../board/query.js';
|
|
5
|
+
import { BoardError } from '../errors.js';
|
|
6
|
+
import { displayPath } from '../storage/paths.js';
|
|
7
|
+
import { DEFAULT_TEMPLATE, contextTemplatePath, listContextTemplates, readContextTemplate, writeContextTemplate, } from '../storage/templates.js';
|
|
8
|
+
import { analyzeTemplate } from './analyze.js';
|
|
9
|
+
import { BUILTIN_CONTEXT_TEMPLATE } from './builtin.js';
|
|
10
|
+
import { buildContext } from './context.js';
|
|
11
|
+
import { renderTemplate } from './template.js';
|
|
12
|
+
// Three levels up from src/core/instructions (and dist/core/instructions) is
|
|
13
|
+
// the package root, where the starter templates ship. Keep in step with this
|
|
14
|
+
// file's depth, exactly like `operations/init.ts` and `agent/assets.ts`.
|
|
15
|
+
const STARTER_DIR = fileURLToPath(new URL('../../../templates/context/', import.meta.url));
|
|
16
|
+
/** Starter templates the package ships, by name. */
|
|
17
|
+
export function starterTemplateNames() {
|
|
18
|
+
try {
|
|
19
|
+
return readdirSync(STARTER_DIR)
|
|
20
|
+
.filter((name) => name.endsWith('.md'))
|
|
21
|
+
.map((name) => name.slice(0, -'.md'.length))
|
|
22
|
+
.sort();
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function readStarterTemplate(name) {
|
|
29
|
+
try {
|
|
30
|
+
return readFileSync(path.join(STARTER_DIR, `${name}.md`), 'utf8');
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Write the starter templates a board's config can actually use: one per
|
|
38
|
+
* declared issue type that has a starter, plus `default.md` for the rest.
|
|
39
|
+
*
|
|
40
|
+
* Nothing is overwritten without `force` — a layout somebody has edited is
|
|
41
|
+
* worth more than the starter it grew from. Returns what it wrote and what it
|
|
42
|
+
* left alone.
|
|
43
|
+
*/
|
|
44
|
+
export function installContextTemplates(paths, config, options = {}) {
|
|
45
|
+
const available = new Set(starterTemplateNames());
|
|
46
|
+
const wanted = [
|
|
47
|
+
DEFAULT_TEMPLATE,
|
|
48
|
+
...Object.keys(config.issue_types).filter((type) => available.has(type)),
|
|
49
|
+
].filter((name) => available.has(name));
|
|
50
|
+
const written = [];
|
|
51
|
+
const skipped = [];
|
|
52
|
+
for (const name of wanted) {
|
|
53
|
+
const text = readStarterTemplate(name);
|
|
54
|
+
if (text === null)
|
|
55
|
+
continue;
|
|
56
|
+
if (writeContextTemplate(paths, name, text, options.force))
|
|
57
|
+
written.push(name);
|
|
58
|
+
else
|
|
59
|
+
skipped.push(name);
|
|
60
|
+
}
|
|
61
|
+
return { written, skipped };
|
|
62
|
+
}
|
|
63
|
+
function fromBoard(paths, name) {
|
|
64
|
+
const text = readContextTemplate(paths, name);
|
|
65
|
+
if (text === null)
|
|
66
|
+
return null;
|
|
67
|
+
return {
|
|
68
|
+
kind: 'board',
|
|
69
|
+
name,
|
|
70
|
+
path: displayPath(paths, contextTemplatePath(paths, name)),
|
|
71
|
+
text,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function fromFile(file) {
|
|
75
|
+
const resolved = path.resolve(file);
|
|
76
|
+
if (!existsSync(resolved))
|
|
77
|
+
return null;
|
|
78
|
+
try {
|
|
79
|
+
return { kind: 'file', name: resolved, path: resolved, text: readFileSync(resolved, 'utf8') };
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Which layout an issue of this type gets: the board's template for the type,
|
|
87
|
+
* then the board's `default`, then the built-in one. An override is taken as a
|
|
88
|
+
* template name first and as a path second, so `--template user_story` means
|
|
89
|
+
* the board's, not a file that happens to be called that.
|
|
90
|
+
*/
|
|
91
|
+
export function resolveContextTemplate(paths, type, override) {
|
|
92
|
+
if (override) {
|
|
93
|
+
const named = fromBoard(paths, override.replace(/\.md$/, ''));
|
|
94
|
+
if (named)
|
|
95
|
+
return named;
|
|
96
|
+
const file = fromFile(override);
|
|
97
|
+
if (file)
|
|
98
|
+
return file;
|
|
99
|
+
const available = listContextTemplates(paths);
|
|
100
|
+
throw new BoardError(`No context template "${override}"`, [
|
|
101
|
+
available.length
|
|
102
|
+
? `This board has: ${available.join(', ')}.`
|
|
103
|
+
: `This board has none yet — run \`lpm instructions --init\` to write the starters.`,
|
|
104
|
+
'A --template is a name in .lpm/templates/context, or a path to a markdown file.',
|
|
105
|
+
]);
|
|
106
|
+
}
|
|
107
|
+
return ((type ? fromBoard(paths, type) : null) ??
|
|
108
|
+
fromBoard(paths, DEFAULT_TEMPLATE) ?? {
|
|
109
|
+
kind: 'builtin',
|
|
110
|
+
name: 'built-in',
|
|
111
|
+
path: null,
|
|
112
|
+
text: BUILTIN_CONTEXT_TEMPLATE,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/** Resolve an issue by id, case-insensitively, or say so usefully. */
|
|
116
|
+
export function requireIssueFor(board, id) {
|
|
117
|
+
const issue = findIssue(board, id);
|
|
118
|
+
if (!issue) {
|
|
119
|
+
throw new BoardError(`No issue with id "${id}"`, [
|
|
120
|
+
`Ids on this board look like ${board.config.key_prefix}-1.`,
|
|
121
|
+
]);
|
|
122
|
+
}
|
|
123
|
+
return issue;
|
|
124
|
+
}
|
|
125
|
+
/** The brief for one issue. */
|
|
126
|
+
export function buildInstructions(board, issue, options = {}) {
|
|
127
|
+
const source = resolveContextTemplate(board.paths, issue.type, options.template);
|
|
128
|
+
const context = buildContext(board, issue, options);
|
|
129
|
+
const { text, warnings, findings } = renderTemplate(source.text, context, {
|
|
130
|
+
name: source.path ?? 'the built-in template',
|
|
131
|
+
allowUnsafe: options.allowUnsafe,
|
|
132
|
+
});
|
|
133
|
+
return { issue, source, text, warnings, findings };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Read every layout this board would use and report what is in them.
|
|
137
|
+
*
|
|
138
|
+
* The point of doing this per *type* rather than per file is that it answers
|
|
139
|
+
* the question that matters — "what will actually run when somebody asks for a
|
|
140
|
+
* brief?" — and it covers the built-in layout, which is not a file at all.
|
|
141
|
+
*/
|
|
142
|
+
export function auditContextTemplates(board) {
|
|
143
|
+
const types = Object.keys(board.config.issue_types);
|
|
144
|
+
const audits = [];
|
|
145
|
+
const seen = new Set();
|
|
146
|
+
for (const type of types) {
|
|
147
|
+
const source = resolveContextTemplate(board.paths, type);
|
|
148
|
+
const key = source.path ?? 'builtin';
|
|
149
|
+
if (seen.has(key))
|
|
150
|
+
continue;
|
|
151
|
+
seen.add(key);
|
|
152
|
+
try {
|
|
153
|
+
audits.push({ source, findings: analyzeTemplate(source.text).findings, error: null });
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
audits.push({ source, findings: [], error: error.message });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// Templates no type resolves to are still on disk and still reachable with
|
|
160
|
+
// --template, so a report that skipped them would be telling half the story.
|
|
161
|
+
for (const name of listContextTemplates(board.paths)) {
|
|
162
|
+
const source = resolveContextTemplate(board.paths, '', name);
|
|
163
|
+
if (seen.has(source.path ?? name))
|
|
164
|
+
continue;
|
|
165
|
+
seen.add(source.path ?? name);
|
|
166
|
+
try {
|
|
167
|
+
audits.push({ source, findings: analyzeTemplate(source.text).findings, error: null });
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
audits.push({ source, findings: [], error: error.message });
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return audits;
|
|
174
|
+
}
|
|
175
|
+
/** The same, from an id — what both front ends actually call. */
|
|
176
|
+
export function instructionsFor(board, id, options = {}) {
|
|
177
|
+
return buildInstructions(board, requireIssueFor(board, id), options);
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../../src/core/instructions/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,M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