@erclx/canon 5.26.0 → 5.28.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 +2 -2
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/SKILL.md +2 -0
- package/claude/skills/auto-ship/SKILL.md +3 -11
- package/claude/skills/auto-ship/references/review-findings.md +20 -0
- package/claude/skills/backlog-triage/SKILL.md +2 -0
- package/claude/skills/bash-cli-script/SKILL.md +2 -0
- package/claude/skills/build-in-slices/SKILL.md +2 -0
- package/claude/skills/canon-cli/SKILL.md +2 -0
- package/claude/skills/canon-feedback/SKILL.md +2 -0
- package/claude/skills/canon-feedback-triage/SKILL.md +2 -0
- package/claude/skills/canon-operator/SKILL.md +2 -0
- package/claude/skills/canon-rollout/SKILL.md +3 -11
- package/claude/skills/canon-rollout/references/failure-recovery.md +20 -0
- package/claude/skills/canvas/SKILL.md +13 -0
- package/claude/skills/ci-workflow/SKILL.md +2 -0
- package/claude/skills/code-craft/SKILL.md +2 -0
- package/claude/skills/codebase-layout/SKILL.md +2 -0
- package/claude/skills/context-fold/SKILL.md +3 -17
- package/claude/skills/context-fold/references/completion-report.md +26 -0
- package/claude/skills/create-rule/SKILL.md +2 -0
- package/claude/skills/create-skill/SKILL.md +2 -0
- package/claude/skills/create-standard/SKILL.md +2 -0
- package/claude/skills/decision-escalate/SKILL.md +2 -0
- package/claude/skills/deploy-app/SKILL.md +2 -0
- package/claude/skills/deprecation-migration/SKILL.md +2 -0
- package/claude/skills/design-extract/SKILL.md +2 -0
- package/claude/skills/design-taste/SKILL.md +2 -0
- package/claude/skills/docs-sync/SKILL.md +2 -0
- package/claude/skills/document-health/SKILL.md +2 -0
- package/claude/skills/draft-and-pick/SKILL.md +2 -0
- package/claude/skills/draft-doc/SKILL.md +2 -0
- package/claude/skills/draft-doc/references/wiki.md +1 -1
- package/claude/skills/draft-figure/SKILL.md +2 -0
- package/claude/skills/draft-identity/SKILL.md +2 -0
- package/claude/skills/draft-ready/SKILL.md +5 -1
- package/claude/skills/draft-screencast/SKILL.md +2 -0
- package/claude/skills/draft-slides/SKILL.md +2 -0
- package/claude/skills/git-branch/SKILL.md +2 -0
- package/claude/skills/git-commit/SKILL.md +2 -0
- package/claude/skills/git-followup/SKILL.md +2 -0
- package/claude/skills/git-issue/SKILL.md +2 -0
- package/claude/skills/git-pr/SKILL.md +2 -0
- package/claude/skills/git-pr/references/evidence.md +7 -7
- package/claude/skills/git-ship/SKILL.md +2 -0
- package/claude/skills/git-split/SKILL.md +2 -0
- package/claude/skills/git-stage/SKILL.md +2 -0
- package/claude/skills/git-worktree/SKILL.md +2 -0
- package/claude/skills/index-lookup/SKILL.md +2 -0
- package/claude/skills/markdown-propose/SKILL.md +2 -0
- package/claude/skills/memory-capture/SKILL.md +2 -0
- package/claude/skills/memory-review/SKILL.md +2 -0
- package/claude/skills/plan-feature/SKILL.md +2 -0
- package/claude/skills/plan-groundwork/SKILL.md +2 -0
- package/claude/skills/plan-intake/SKILL.md +2 -0
- package/claude/skills/plan-intake-answer/SKILL.md +2 -0
- package/claude/skills/project-commands/SKILL.md +2 -0
- package/claude/skills/read-frames/SKILL.md +2 -0
- package/claude/skills/record-screencast/SKILL.md +2 -0
- package/claude/skills/repo-metadata/SKILL.md +2 -0
- package/claude/skills/restate-plainly/SKILL.md +2 -0
- package/claude/skills/review-address/REQUIREMENT.md +4 -2
- package/claude/skills/review-address/SKILL.md +19 -14
- package/claude/skills/review-address/references/post-review-findings.md +16 -0
- package/claude/skills/review-address/references/rebase-conflicts.md +4 -2
- package/claude/skills/review-branch/SKILL.md +2 -0
- package/claude/skills/review-craft/SKILL.md +2 -0
- package/claude/skills/review-craft/references/ui.md +6 -6
- package/claude/skills/review-pr/SKILL.md +4 -8
- package/claude/skills/review-pr/references/body-variants.md +52 -0
- package/claude/skills/review-pr/references/key-changes.md +16 -0
- package/claude/skills/review-pr/references/post.md +15 -43
- package/claude/skills/review-ui/REQUIREMENT.md +2 -2
- package/claude/skills/review-ui/SKILL.md +16 -12
- package/claude/skills/review-ui/references/driving.md +8 -8
- package/claude/skills/review-ui/references/post.md +13 -3
- package/claude/skills/review-ui/references/tick.md +22 -0
- package/claude/skills/role-orchestrator/REQUIREMENT.md +15 -15
- package/claude/skills/role-orchestrator/SKILL.md +31 -42
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +18 -16
- package/claude/skills/role-orchestrator/references/orchestrator-handback.md +13 -3
- package/claude/skills/role-orchestrator/references/orchestrator-inbound.md +23 -0
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +6 -34
- package/claude/skills/role-orchestrator/references/orchestrator-output.md +4 -4
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +5 -5
- package/claude/skills/role-orchestrator/references/orchestrator-poll.md +12 -23
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +6 -6
- package/claude/skills/role-orchestrator/references/orchestrator-review-dispatch.md +1 -1
- package/claude/skills/role-orchestrator/references/orchestrator-reviewer-launch.md +38 -0
- package/claude/skills/role-orchestrator/references/orchestrator-sweep.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-watch.md +26 -0
- package/claude/skills/role-orchestrator/scripts/poll.ts +304 -10
- package/claude/skills/role-planner/REQUIREMENT.md +1 -1
- package/claude/skills/role-planner/SKILL.md +4 -2
- package/claude/skills/role-reviewer/REQUIREMENT.md +1 -1
- package/claude/skills/role-reviewer/SKILL.md +3 -1
- package/claude/skills/role-worker/SKILL.md +5 -2
- package/claude/skills/search-craft/SKILL.md +2 -0
- package/claude/skills/seed-sync/SKILL.md +2 -0
- package/claude/skills/session-compact/SKILL.md +2 -0
- package/claude/skills/session-map/SKILL.md +2 -0
- package/claude/skills/session-relay/SKILL.md +2 -0
- package/claude/skills/session-resume/SKILL.md +2 -0
- package/claude/skills/session-worktree/SKILL.md +3 -11
- package/claude/skills/session-worktree/references/install-command.md +20 -0
- package/claude/skills/sketch-design/SKILL.md +2 -0
- package/claude/skills/systematic-debugging/SKILL.md +2 -0
- package/claude/skills/target-check/SKILL.md +2 -0
- package/claude/skills/target-setup/SKILL.md +2 -0
- package/claude/skills/task-board/SKILL.md +2 -0
- package/claude/skills/teach-workspace/SKILL.md +5 -15
- package/claude/skills/teach-workspace/references/lesson-build.md +75 -0
- package/claude/skills/teach-workspace/references/lesson-craft.md +13 -69
- package/claude/skills/teach-workspace/references/revisit.md +22 -0
- package/claude/skills/test-craft/SKILL.md +2 -0
- package/claude/skills/test-first/SKILL.md +2 -0
- package/claude/skills/ui-checklist/SKILL.md +3 -1
- package/claude/skills/ux-audit/SKILL.md +2 -0
- package/claude/skills/ux-measure/SKILL.md +2 -0
- package/claude/skills/ux-walkthrough/SKILL.md +2 -0
- package/claude/skills/video-craft/SKILL.md +2 -0
- package/claude/skills/write-human/SKILL.md +2 -0
- package/claude/skills/youtube-transcripts/SKILL.md +2 -0
- package/docs/agents/canvas.md +24 -8
- package/docs/agents/capture.md +5 -5
- package/docs/agents/commands.md +2 -2
- package/docs/agents/gate.md +3 -1
- package/docs/agents/index.md +5 -4
- package/docs/agents/install-and-sync.md +7 -0
- package/docs/agents/key-changes.md +1 -1
- package/docs/agents/pr-evidence.md +47 -23
- package/docs/agents/pr-local.md +19 -13
- package/docs/agents/pr-preview.md +44 -21
- package/docs/agents/pr-tick.md +72 -0
- package/docs/agents/sandbox.md +30 -6
- package/docs/agents/scripting.md +8 -1
- package/docs/agents/skills-audit.md +2 -1
- package/docs/agents/tasks-plans.md +1 -1
- package/docs/agents/tasks-validate.md +18 -18
- package/docs/agents/tasks.md +1 -1
- package/docs/workflow/operating-model.md +15 -21
- package/docs/workflow/parallel-features.md +24 -3
- package/docs/workflow/skill-map.md +3 -1
- package/docs/workflow/zshrc-aliases.md +1 -1
- package/package.json +1 -1
- package/scripts/core/regen-hero.ts +1 -1
- package/scripts/lib/sandbox-path.sh +6 -162
- package/src/audits/baseline.ts +1 -1
- package/src/audits/run.ts +2 -2
- package/src/canvas/address.ts +12 -3
- package/src/canvas/capture.ts +1 -1
- package/src/canvas/client/inspector/align-grid.tsx +162 -0
- package/src/canvas/client/inspector/color-field.tsx +201 -171
- package/src/canvas/client/inspector/color-inputs.tsx +139 -0
- package/src/canvas/client/inspector/color-picker.tsx +668 -0
- package/src/canvas/client/inspector/color-space.ts +240 -0
- package/src/canvas/client/inspector/field.tsx +66 -3
- package/src/canvas/client/inspector/fields.css +473 -6
- package/src/canvas/client/inspector/size-field.tsx +69 -0
- package/src/canvas/client/inspector/token-select.tsx +109 -0
- package/src/canvas/client/inspector/values.ts +117 -3
- package/src/canvas/client/inspector.tsx +311 -15
- package/src/canvas/client/keys.ts +54 -0
- package/src/canvas/client/selection.tsx +199 -0
- package/src/canvas/client/shell.css +210 -12
- package/src/canvas/client/state.ts +165 -14
- package/src/canvas/client/surface.tsx +341 -39
- package/src/canvas/client/tools.tsx +64 -0
- package/src/canvas/content.ts +51 -2
- package/src/canvas/edit.ts +49 -6
- package/src/canvas/editing.ts +203 -0
- package/src/canvas/global.d.ts +15 -0
- package/src/canvas/server.ts +149 -12
- package/src/canvas/tokens.ts +60 -18
- package/src/census/count.ts +1 -1
- package/src/claude/seeds.ts +3 -3
- package/src/claude/skills-audit.ts +28 -0
- package/src/claude/skills-drift.ts +1 -1
- package/src/claude/skills-families.ts +36 -0
- package/src/claude/skills-list.ts +76 -15
- package/src/claude/skills-reach.ts +1 -1
- package/src/commands/audits.ts +2 -2
- package/src/commands/canvas.ts +180 -3
- package/src/commands/claude.ts +70 -12
- package/src/commands/design.ts +145 -5
- package/src/commands/docs.ts +1 -1
- package/src/commands/feedback.ts +2 -2
- package/src/commands/gate.ts +9 -2
- package/src/commands/gov.ts +3 -3
- package/src/commands/hooks.ts +1 -1
- package/src/commands/indexes.ts +1 -1
- package/src/commands/init.ts +2 -2
- package/src/commands/intake.ts +1 -1
- package/src/commands/migrate.ts +2 -2
- package/src/commands/pr.ts +288 -65
- package/src/commands/records.ts +1 -1
- package/src/commands/repo.ts +1 -1
- package/src/commands/sandbox.ts +64 -15
- package/src/commands/sessions.ts +1 -1
- package/src/commands/slides.ts +1 -1
- package/src/commands/sync.ts +2 -2
- package/src/commands/tasks.ts +21 -4
- package/src/commands/teach.ts +1 -1
- package/src/commands/tooling.ts +1 -1
- package/src/commands/transcripts.ts +2 -2
- package/src/commands/upgrade.ts +1 -1
- package/src/commands/wiki.ts +1 -1
- package/src/commands/worktrees.ts +1 -1
- package/src/comments/scan.ts +1 -1
- package/src/comments/trend.ts +1 -1
- package/src/context/architecture.ts +1 -1
- package/src/context/citations.ts +3 -3
- package/src/context/classify/extract.ts +3 -3
- package/src/context/folders.ts +2 -2
- package/src/context/requirements.ts +1 -1
- package/src/design/project-fonts.ts +392 -0
- package/src/docs/read.ts +1 -1
- package/src/exec.ts +1 -1
- package/src/feedback/github.ts +2 -2
- package/src/gate/measures.ts +48 -10
- package/src/gate/sequencer.ts +56 -4
- package/src/gate/stages.ts +17 -0
- package/src/gate/suite-lock.ts +214 -0
- package/src/{git-files.ts → git/files.ts} +2 -2
- package/src/{git-ignore.ts → git/ignore.ts} +1 -1
- package/src/{worktree.ts → git/worktree.ts} +1 -1
- package/src/gov/citations.ts +1 -1
- package/src/gov/install.ts +1 -1
- package/src/gov/superseded.ts +1 -1
- package/src/gov/test-order.ts +2 -2
- package/src/help.ts +1 -1
- package/src/hooks/post-merge.ts +1 -1
- package/src/indexes/walk.ts +1 -1
- package/src/intake/folder.ts +1 -1
- package/src/labels/audit.ts +1 -1
- package/src/labels/map.ts +1 -1
- package/src/labels/phase.ts +3 -3
- package/src/markdown/files.ts +1 -1
- package/src/migrate/apply.ts +1 -1
- package/src/migrate/record-layout.ts +1 -1
- package/src/migrate/records.ts +11 -11
- package/src/migrate/scratch-evidence.ts +1 -1
- package/src/migrate/surface-roots.ts +6 -6
- package/src/pr/bijection.ts +1 -1
- package/src/pr/evidence.ts +250 -59
- package/src/pr/local.ts +16 -10
- package/src/pr/preview.ts +78 -2
- package/src/pr/tick.ts +56 -0
- package/src/process/harness.ts +1 -1
- package/src/records/backup.ts +2 -2
- package/src/records/ordinal.ts +1 -1
- package/src/records/prune.ts +1 -1
- package/src/records/size.ts +1 -1
- package/src/records/stale-canonical.ts +2 -2
- package/src/records/stale.ts +1 -1
- package/src/records/validate.ts +2 -2
- package/src/{project-root.ts → roots/project.ts} +1 -1
- package/src/{record-root.ts → roots/record.ts} +1 -1
- package/src/sandbox/coverage.ts +11 -12
- package/src/sandbox/equivalence.ts +57 -26
- package/src/sandbox/headless/dispatch.ts +264 -0
- package/src/sandbox/headless/run.ts +653 -0
- package/src/sandbox/headless/watch.ts +145 -0
- package/src/sandbox/hooks.ts +1 -1
- package/src/sandbox/provision.ts +90 -29
- package/src/sandbox/scenario.ts +588 -0
- package/src/sandbox/tree.ts +4 -8
- package/src/secrets/scan.ts +1 -1
- package/src/sessions/claim.ts +1 -1
- package/src/sessions/live.ts +4 -1
- package/src/sessions/resolve.ts +1 -1
- package/src/sessions/transfer/bundle.ts +2 -2
- package/src/slides/decks.ts +1 -1
- package/src/slides/package/fonts.ts +6 -2
- package/src/standards/audit.ts +2 -2
- package/src/standards/read.ts +1 -1
- package/src/sync/check.ts +2 -2
- package/src/sync/engine.ts +3 -3
- package/src/sync/git.ts +1 -1
- package/src/sync/history.ts +1 -1
- package/src/sync/layout.ts +2 -2
- package/src/sync/reverse.ts +1 -1
- package/src/sync/stamp.ts +1 -1
- package/src/sync/target.ts +1 -1
- package/src/sync/workflow.ts +1 -1
- package/src/targets/pulls.ts +2 -2
- package/src/targets/sweep.ts +2 -2
- package/src/{target.ts → targets/validate.ts} +1 -1
- package/src/tasks/answers.ts +1 -1
- package/src/tasks/archive.ts +1 -1
- package/src/tasks/label.ts +1 -1
- package/src/tasks/reach.ts +2 -2
- package/src/tasks/trunk.ts +1 -1
- package/src/tasks/validate.ts +38 -14
- package/src/teach/nav.ts +1 -1
- package/src/teach/workspace.ts +1 -1
- package/src/tooling/inject.ts +2 -2
- package/src/tooling/read.ts +1 -1
- package/src/tooling/scan.ts +1 -1
- package/src/tooling/subfolder.ts +1 -1
- package/src/version/installed.ts +1 -1
- package/src/version/skew.ts +1 -1
- package/src/web/readme-citations.ts +1 -1
- package/src/worktrees/bare-flag.ts +1 -1
- package/src/worktrees/reclaim.ts +2 -2
- package/src/worktrees/remove.ts +1 -1
- package/standards/board.md +3 -3
- package/standards/canvas.md +2 -1
- package/standards/plan.md +13 -7
- package/standards/skill.md +1 -0
- package/standards/wiki.md +12 -3
- package/tooling/base/configs/.github/workflows/pr-local-preview.yml +2 -2
- package/tsconfig.json +1 -1
- package/scripts/lib/sandbox-dispatch.sh +0 -190
- /package/src/{client-commands.ts → gate/client-commands.ts} +0 -0
- /package/src/{git-base.ts → git/base.ts} +0 -0
- /package/src/{git-env.ts → git/env.ts} +0 -0
- /package/src/{legacy-path.ts → roots/legacy.ts} +0 -0
- /package/src/{surface-root.ts → roots/surface.ts} +0 -0
- /package/src/{copy.ts → sync/copy.ts} +0 -0
package/src/commands/sandbox.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { existsSync, readFileSync
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
2
2
|
import { join } from 'node:path'
|
|
3
3
|
import type { Command } from 'commander'
|
|
4
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
4
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
5
5
|
import {
|
|
6
6
|
assertedPercent,
|
|
7
7
|
collectCensus,
|
|
@@ -25,7 +25,9 @@ import {
|
|
|
25
25
|
type RunEnvelope,
|
|
26
26
|
type Verdict,
|
|
27
27
|
} from '@/sandbox/expect'
|
|
28
|
+
import { runHeadless } from '@/sandbox/headless/run'
|
|
28
29
|
import { runSandbox } from '@/sandbox/provision'
|
|
30
|
+
import { listCategories, listScenarioFiles } from '@/sandbox/scenario'
|
|
29
31
|
import { sandboxTree } from '@/sandbox/tree'
|
|
30
32
|
import {
|
|
31
33
|
frameError,
|
|
@@ -70,9 +72,6 @@ function reportAbsentScenarioTree(): boolean {
|
|
|
70
72
|
return true
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
/** Holds fixture content for scenarios rather than scenarios of its own. */
|
|
74
|
-
const FIXTURES_DIR = 'fixtures'
|
|
75
|
-
|
|
76
75
|
/**
|
|
77
76
|
* The provision verb takes positional words rather than options, since `reset`
|
|
78
77
|
* and `clean` share its slot with a target, so its usage is written out here
|
|
@@ -124,17 +123,16 @@ interface CoverageOptions {
|
|
|
124
123
|
}
|
|
125
124
|
|
|
126
125
|
function getCategories(): string[] {
|
|
127
|
-
return
|
|
128
|
-
.filter((d) => d.isDirectory() && d.name !== FIXTURES_DIR)
|
|
129
|
-
.map((d) => d.name)
|
|
130
|
-
.sort()
|
|
126
|
+
return listCategories(SANDBOX_DIR)
|
|
131
127
|
}
|
|
132
128
|
|
|
129
|
+
/** Lists a stem in both forms too, so picking it reaches the refusal that names it. */
|
|
133
130
|
function getCommands(category: string): string[] {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
131
|
+
const { scenarios, ambiguous } = listScenarioFiles(
|
|
132
|
+
join(SANDBOX_DIR, category),
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
return [...scenarios.map((s) => s.command), ...ambiguous].sort()
|
|
138
136
|
}
|
|
139
137
|
|
|
140
138
|
async function interactivePicker(): Promise<string> {
|
|
@@ -510,7 +508,7 @@ export function register(program: Command): void {
|
|
|
510
508
|
if (mismatch !== undefined) logWarn(mismatch)
|
|
511
509
|
|
|
512
510
|
// `--no-header` is the frame opt-out for a caller that already opened
|
|
513
|
-
// one, which `sandbox
|
|
511
|
+
// one, which `canon sandbox run` and the picker below both do.
|
|
514
512
|
const isHeader = cmd.args[0] !== '--no-header'
|
|
515
513
|
const args = isHeader ? cmd.args : cmd.args.slice(1)
|
|
516
514
|
|
|
@@ -527,6 +525,57 @@ export function register(program: Command): void {
|
|
|
527
525
|
})
|
|
528
526
|
})
|
|
529
527
|
|
|
528
|
+
sandbox
|
|
529
|
+
.command('run')
|
|
530
|
+
.description(
|
|
531
|
+
'Provision a scenario, drive one claude -p session over it, and print the envelope with its verdict',
|
|
532
|
+
)
|
|
533
|
+
.argument('[target]', 'Scenario as <category>:<command>, e.g. git:commit')
|
|
534
|
+
.argument('[prompt]', 'Skill invocation, e.g. "/canon:git-commit"')
|
|
535
|
+
.argument('[arm]', 'Named scenario arm, e.g. small')
|
|
536
|
+
.helpOption('-h, --help', 'Show this help message')
|
|
537
|
+
.addHelpText(
|
|
538
|
+
'after',
|
|
539
|
+
[
|
|
540
|
+
'',
|
|
541
|
+
'Env overrides:',
|
|
542
|
+
' CANON_SKILL_TEST_MODEL default sonnet',
|
|
543
|
+
' CANON_SKILL_TEST_TOOLS default Bash,Read,Glob,Grep,Edit,Write',
|
|
544
|
+
' CANON_SKILL_TEST_MAX_TURNS default 30',
|
|
545
|
+
' CANON_SKILL_TEST_PERMISSION_MODE default bypassPermissions',
|
|
546
|
+
'',
|
|
547
|
+
'Examples:',
|
|
548
|
+
' canon sandbox run git:commit "/canon:git-commit"',
|
|
549
|
+
' canon sandbox run claude:plan-feature "/canon:plan-feature add a widget" small',
|
|
550
|
+
'',
|
|
551
|
+
'Bills a real session through the claude binary on PATH.',
|
|
552
|
+
'Exit codes: the verdict, 1 when the envelope does not parse, or the',
|
|
553
|
+
'provisioning or session code when either stops the run first.',
|
|
554
|
+
].join('\n'),
|
|
555
|
+
)
|
|
556
|
+
.action(
|
|
557
|
+
async (
|
|
558
|
+
target: string | undefined,
|
|
559
|
+
prompt: string | undefined,
|
|
560
|
+
arm: string | undefined,
|
|
561
|
+
_opts: unknown,
|
|
562
|
+
cmd: Command,
|
|
563
|
+
) => {
|
|
564
|
+
if (target === undefined) {
|
|
565
|
+
cmd.help()
|
|
566
|
+
return
|
|
567
|
+
}
|
|
568
|
+
if (reportAbsentScenarioTree()) return
|
|
569
|
+
|
|
570
|
+
process.exitCode = await runHeadless({
|
|
571
|
+
projectRoot: PROJECT_ROOT,
|
|
572
|
+
target,
|
|
573
|
+
prompt,
|
|
574
|
+
arm,
|
|
575
|
+
})
|
|
576
|
+
},
|
|
577
|
+
)
|
|
578
|
+
|
|
530
579
|
sandbox
|
|
531
580
|
.command('check')
|
|
532
581
|
.description('Check a provisioned sandbox against a scenario expectation')
|
|
@@ -628,7 +677,7 @@ export function register(program: Command): void {
|
|
|
628
677
|
' canon sandbox equivalence claude --json',
|
|
629
678
|
' canon sandbox equivalence claude:plan-feature --base origin/main',
|
|
630
679
|
'',
|
|
631
|
-
'Provisions offline only and never runs sandbox
|
|
680
|
+
'Provisions offline only and never runs canon sandbox run or a claude binary.',
|
|
632
681
|
'--stub-remote also runs the anchor arms, and wins over --include-anchor.',
|
|
633
682
|
'Exit codes: 0 when every compared arm is identical or red the same way',
|
|
634
683
|
'on both sides, 1 on any difference, exit mismatch, or enumeration error.',
|
package/src/commands/sessions.ts
CHANGED
package/src/commands/slides.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolve } from 'node:path'
|
|
2
2
|
import type { Command } from 'commander'
|
|
3
3
|
import { INSTALL_BROWSER } from '@/browser/engine'
|
|
4
|
-
import { creationRel, SCRATCH } from '@/record
|
|
4
|
+
import { creationRel, SCRATCH } from '@/roots/record'
|
|
5
5
|
import { listDecks, resolveDeck, SLIDES_FOLDER } from '@/slides/decks'
|
|
6
6
|
import { openDeck } from '@/slides/open'
|
|
7
7
|
import { intro, outro, palette } from '@/ui'
|
package/src/commands/sync.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs'
|
|
|
2
2
|
import { join } from 'node:path'
|
|
3
3
|
import type { Command } from 'commander'
|
|
4
4
|
import { cliPath, cliRun } from '@/cli-run'
|
|
5
|
-
import { PROJECT_ROOT } from '@/project
|
|
5
|
+
import { PROJECT_ROOT } from '@/roots/project'
|
|
6
6
|
import {
|
|
7
7
|
buildCheckReport,
|
|
8
8
|
type CheckReport,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from '@/sync/target'
|
|
21
21
|
import type { UnclaimedFolder } from '@/sync/reverse'
|
|
22
22
|
import { runGitWorkflow } from '@/sync/workflow'
|
|
23
|
-
import { resolveTarget } from '@/
|
|
23
|
+
import { resolveTarget } from '@/targets/validate'
|
|
24
24
|
import {
|
|
25
25
|
intro,
|
|
26
26
|
isNonInteractive,
|
package/src/commands/tasks.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relative } from 'node:path'
|
|
2
2
|
import type { Command } from 'commander'
|
|
3
3
|
import { execa } from 'execa'
|
|
4
|
-
import { gitEnv } from '@/git
|
|
4
|
+
import { gitEnv } from '@/git/env'
|
|
5
5
|
import { type AnswersOutcome, planAnswers } from '@/tasks/answers'
|
|
6
6
|
import { type BranchOutcome, planBranch } from '@/tasks/branch'
|
|
7
7
|
import {
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
type Finding,
|
|
44
44
|
type FolderClaim,
|
|
45
|
+
type SharedFiles,
|
|
45
46
|
type WideToken,
|
|
46
47
|
type Unplaced,
|
|
47
48
|
type Untested,
|
|
@@ -59,7 +60,7 @@ import {
|
|
|
59
60
|
outro,
|
|
60
61
|
pipeOutput,
|
|
61
62
|
} from '@/ui'
|
|
62
|
-
import { mainWorktreeRoot } from '@/worktree'
|
|
63
|
+
import { mainWorktreeRoot } from '@/git/worktree'
|
|
63
64
|
|
|
64
65
|
/** Returned when the board carries a finding, which is the gating result. */
|
|
65
66
|
const EXIT_FINDINGS = 2
|
|
@@ -239,7 +240,8 @@ export function register(program: Command): void {
|
|
|
239
240
|
' no Needs a plan row has a live plan, and every Up next row has one',
|
|
240
241
|
' every task file carries a board row or a backlog line, never both',
|
|
241
242
|
' no task carries more than one row',
|
|
242
|
-
'
|
|
243
|
+
' every Run now row names the files it touches',
|
|
244
|
+
' a file two Run now rows share is listed, never failed',
|
|
243
245
|
'',
|
|
244
246
|
'Exit codes:',
|
|
245
247
|
' 0 every check passed',
|
|
@@ -1383,7 +1385,7 @@ function reportValidation(
|
|
|
1383
1385
|
logStep(outcome.findings.length === 0 ? 'Clean' : 'Findings')
|
|
1384
1386
|
if (outcome.findings.length === 0) {
|
|
1385
1387
|
logInfo(
|
|
1386
|
-
'every row resolves, every task sits on one surface, and each
|
|
1388
|
+
'every row resolves, every task sits on one surface, and each run now row names its files',
|
|
1387
1389
|
)
|
|
1388
1390
|
} else {
|
|
1389
1391
|
for (const finding of outcome.findings) logWarn(describe(finding))
|
|
@@ -1412,6 +1414,16 @@ function reportValidation(
|
|
|
1412
1414
|
for (const claim of outcome.claims) logWarn(describeClaim(claim))
|
|
1413
1415
|
}
|
|
1414
1416
|
|
|
1417
|
+
// A shared file holds nothing under the dispatch gate, so the pairs report
|
|
1418
|
+
// with the warn glyph and move no exit code. They stay listed for merge
|
|
1419
|
+
// order and for the holds a Touches cell cannot state.
|
|
1420
|
+
logStep('Shared files')
|
|
1421
|
+
if (outcome.shared.length === 0) {
|
|
1422
|
+
logInfo('no two run now rows name the same file')
|
|
1423
|
+
} else {
|
|
1424
|
+
for (const pair of outcome.shared) logWarn(describeShared(pair))
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1415
1427
|
// The width limit is a heuristic over one preview pane, so a wide token
|
|
1416
1428
|
// reports and moves no exit code, and a measure failing on a cell that
|
|
1417
1429
|
// fits would teach a reader to skip it.
|
|
@@ -1447,6 +1459,7 @@ function reportValidation(
|
|
|
1447
1459
|
findings: outcome.findings,
|
|
1448
1460
|
untested: outcome.untested,
|
|
1449
1461
|
claims: outcome.claims,
|
|
1462
|
+
shared: outcome.shared,
|
|
1450
1463
|
wide: outcome.wide,
|
|
1451
1464
|
unplaced: outcome.unplaced,
|
|
1452
1465
|
})}\n`,
|
|
@@ -1469,6 +1482,10 @@ function describeClaim(claim: FolderClaim): string {
|
|
|
1469
1482
|
return `${claim.group}: ${claim.subject} ${claim.message}`
|
|
1470
1483
|
}
|
|
1471
1484
|
|
|
1485
|
+
function describeShared(pair: SharedFiles): string {
|
|
1486
|
+
return `${pair.group}: ${pair.subject} ${pair.message}`
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1472
1489
|
function describeWide(token: WideToken): string {
|
|
1473
1490
|
return `${token.group}: ${token.subject} ${token.message}`
|
|
1474
1491
|
}
|
package/src/commands/teach.ts
CHANGED
package/src/commands/tooling.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path'
|
|
2
2
|
import type { Command } from 'commander'
|
|
3
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
3
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
4
4
|
import {
|
|
5
5
|
injectConfigs,
|
|
6
6
|
injectGitignore,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { resolve } from 'node:path'
|
|
2
2
|
import type { Command } from 'commander'
|
|
3
|
-
import { recordDir } from '@/record
|
|
3
|
+
import { recordDir } from '@/roots/record'
|
|
4
4
|
import { ensureYtDlp, fetchOne } from '@/transcripts/fetch'
|
|
5
5
|
import { palette } from '@/ui'
|
|
6
|
-
import { mainWorktreeRoot } from '@/worktree'
|
|
6
|
+
import { mainWorktreeRoot } from '@/git/worktree'
|
|
7
7
|
|
|
8
8
|
interface TranscriptOptions {
|
|
9
9
|
out?: string
|
package/src/commands/upgrade.ts
CHANGED
package/src/commands/wiki.ts
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
type Unreadable,
|
|
17
17
|
type WorktreeVerdict,
|
|
18
18
|
} from '@/worktrees/reclaim'
|
|
19
|
-
import { mainWorktreeRoot } from '@/worktree'
|
|
19
|
+
import { mainWorktreeRoot } from '@/git/worktree'
|
|
20
20
|
import { repairBareFlag } from '@/worktrees/bare-flag'
|
|
21
21
|
import {
|
|
22
22
|
removeReclaimable,
|
package/src/comments/scan.ts
CHANGED
package/src/comments/trend.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { access, readFile } from 'node:fs/promises'
|
|
|
2
2
|
import { join, relative } from 'node:path'
|
|
3
3
|
import { AUDITS } from '@/audits/catalog'
|
|
4
4
|
import { type BodyLine, bodyLines } from '@/markdown/scan'
|
|
5
|
-
import { surfaceDir } from '@/surface
|
|
5
|
+
import { surfaceDir } from '@/roots/surface'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The record this measures, relative to `root`.
|
package/src/context/citations.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs'
|
|
2
2
|
import { readFile } from 'node:fs/promises'
|
|
3
3
|
import { resolve } from 'node:path'
|
|
4
|
-
import { listRepositoryFiles } from '@/git
|
|
5
|
-
import { RECORD_ROOTS } from '@/record
|
|
6
|
-
import { SURFACE_ROOTS } from '@/surface
|
|
4
|
+
import { listRepositoryFiles } from '@/git/files'
|
|
5
|
+
import { RECORD_ROOTS } from '@/roots/record'
|
|
6
|
+
import { SURFACE_ROOTS } from '@/roots/surface'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Suppresses citation checking for the source line carrying it.
|
|
@@ -2,9 +2,9 @@ import { existsSync, readFileSync } from 'node:fs'
|
|
|
2
2
|
import { basename, relative, resolve } from 'node:path'
|
|
3
3
|
import { $ } from 'bun'
|
|
4
4
|
import { resolveFolders } from '@/context/folders'
|
|
5
|
-
import { gitEnv } from '@/git
|
|
6
|
-
import { listChangedFiles, resolveBaseRef } from '@/git
|
|
7
|
-
import { surfaceDir } from '@/surface
|
|
5
|
+
import { gitEnv } from '@/git/env'
|
|
6
|
+
import { listChangedFiles, resolveBaseRef } from '@/git/files'
|
|
7
|
+
import { surfaceDir } from '@/roots/surface'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The five canonical doc types the classifier reaches, matching the file
|
package/src/context/folders.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs'
|
|
2
2
|
import { dirname, relative, resolve } from 'node:path'
|
|
3
3
|
import { INDEX_FILE, listIndexes } from '@/indexes/walk'
|
|
4
|
-
import { RECORD_ROOTS } from '@/record
|
|
5
|
-
import { SURFACE_ROOTS } from '@/surface
|
|
4
|
+
import { RECORD_ROOTS } from '@/roots/record'
|
|
5
|
+
import { SURFACE_ROOTS } from '@/roots/surface'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Folder names under a record root audited by default.
|
|
@@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises'
|
|
|
2
2
|
import { join, relative } from 'node:path'
|
|
3
3
|
import { wordCount } from '@/context/architecture'
|
|
4
4
|
import { bodyLines } from '@/markdown/scan'
|
|
5
|
-
import { surfaceDir } from '@/surface
|
|
5
|
+
import { surfaceDir } from '@/roots/surface'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The record this measures, relative to `root`, resolved at either surface
|