@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/design.ts
CHANGED
|
@@ -8,20 +8,23 @@ import {
|
|
|
8
8
|
} from '@/design/adapter'
|
|
9
9
|
import { buildDesignCss } from '@/design/css'
|
|
10
10
|
import { HAND_DRAWN_FONT_FACES } from '@/design/fonts'
|
|
11
|
+
import { addProjectFace, listProjectFaces } from '@/design/project-fonts'
|
|
11
12
|
import { renderDesignDoc } from '@/design/render'
|
|
12
13
|
import { DESIGN_BASE_CSS, DESIGN_DOCUMENT, regenDesign } from '@/design/regen'
|
|
13
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
14
|
-
import { creationRel, SCRATCH } from '@/record
|
|
15
|
-
import { surfaceDir } from '@/surface
|
|
14
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
15
|
+
import { creationRel, SCRATCH } from '@/roots/record'
|
|
16
|
+
import { surfaceDir } from '@/roots/surface'
|
|
16
17
|
import { recordStamp, runDomainSync } from '@/sync/engine'
|
|
17
|
-
import { resolveTarget } from '@/
|
|
18
|
+
import { isDirectory, resolveTarget } from '@/targets/validate'
|
|
18
19
|
import { intro, logAdd, logError, logInfo, logWarn, outro, palette } from '@/ui'
|
|
19
20
|
|
|
20
21
|
export function register(program: Command): void {
|
|
21
22
|
const design = program
|
|
22
23
|
.command('design')
|
|
23
24
|
.helpOption('-h, --help', 'Show this help message')
|
|
24
|
-
.description(
|
|
25
|
+
.description(
|
|
26
|
+
'Design system commands (regen, css, render, install, sync, fonts)',
|
|
27
|
+
)
|
|
25
28
|
|
|
26
29
|
design
|
|
27
30
|
.command('regen')
|
|
@@ -172,6 +175,143 @@ export function register(program: Command): void {
|
|
|
172
175
|
{ protectedRoot: PROJECT_ROOT },
|
|
173
176
|
)
|
|
174
177
|
})
|
|
178
|
+
|
|
179
|
+
registerFonts(design)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const FONTS_DIR = join(DESIGN_INSTALL_DIR, DESIGN_PROJECT_SUBDIR, 'fonts')
|
|
183
|
+
|
|
184
|
+
interface FontsRefused {
|
|
185
|
+
readonly ok: false
|
|
186
|
+
readonly reason: string
|
|
187
|
+
readonly detail: string
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function writeJson(record: unknown): void {
|
|
191
|
+
process.stdout.write(`${JSON.stringify(record)}\n`)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function refuseFonts(
|
|
195
|
+
title: string,
|
|
196
|
+
refusal: FontsRefused,
|
|
197
|
+
emitJson: boolean,
|
|
198
|
+
): number {
|
|
199
|
+
if (emitJson) writeJson(refusal)
|
|
200
|
+
intro(title)
|
|
201
|
+
logError(refusal.detail)
|
|
202
|
+
outro()
|
|
203
|
+
return 1
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** A target that is a directory, or the refusal naming the path given. */
|
|
207
|
+
function fontsTarget(target: string): string | FontsRefused {
|
|
208
|
+
const resolved = resolve(target)
|
|
209
|
+
if (!isDirectory(resolved)) {
|
|
210
|
+
return {
|
|
211
|
+
ok: false,
|
|
212
|
+
reason: 'no-target',
|
|
213
|
+
detail: `Target directory not found: ${target}`,
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return resolved
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function registerFonts(design: Command): void {
|
|
220
|
+
const fonts = design
|
|
221
|
+
.command('fonts')
|
|
222
|
+
.helpOption('-h, --help', 'Show this help message')
|
|
223
|
+
.description(`Read and add the project's own faces under ${FONTS_DIR}/`)
|
|
224
|
+
.addHelpText(
|
|
225
|
+
'after',
|
|
226
|
+
[
|
|
227
|
+
'',
|
|
228
|
+
`Faces are declared as @font-face rules in ${join(DESIGN_INSTALL_DIR, DESIGN_PROJECT_SUBDIR)}/fonts.css,`,
|
|
229
|
+
'which the canvas embeds into every frame. Sync never writes the folder.',
|
|
230
|
+
'',
|
|
231
|
+
].join('\n'),
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
fonts
|
|
235
|
+
.command('list')
|
|
236
|
+
.helpOption('-h, --help', 'Show this help message')
|
|
237
|
+
.description('List each face the project override sheets declare')
|
|
238
|
+
.argument('[target]', 'Target directory', '.')
|
|
239
|
+
.option('--json', 'Emit the record on stdout')
|
|
240
|
+
.action((target: string, opts: { json?: boolean }) => {
|
|
241
|
+
const title = 'canon design fonts list'
|
|
242
|
+
const resolved = fontsTarget(target)
|
|
243
|
+
if (typeof resolved !== 'string') {
|
|
244
|
+
process.exitCode = refuseFonts(title, resolved, Boolean(opts.json))
|
|
245
|
+
return
|
|
246
|
+
}
|
|
247
|
+
const faces = listProjectFaces(resolved)
|
|
248
|
+
if (opts.json) writeJson({ ok: true, faces })
|
|
249
|
+
intro(title)
|
|
250
|
+
if (faces.length === 0) logInfo(`No faces declared under ${FONTS_DIR}/`)
|
|
251
|
+
for (const face of faces) {
|
|
252
|
+
const line = `${face.family} ${face.weight} ${face.style}: ${face.file} in ${face.sheet}`
|
|
253
|
+
if (face.present) logInfo(line)
|
|
254
|
+
else logWarn(`${line} (${face.problem ?? 'missing'})`)
|
|
255
|
+
}
|
|
256
|
+
outro()
|
|
257
|
+
})
|
|
258
|
+
|
|
259
|
+
fonts
|
|
260
|
+
.command('add')
|
|
261
|
+
.helpOption('-h, --help', 'Show this help message')
|
|
262
|
+
.description(
|
|
263
|
+
`Copy a woff2, woff, ttf, or otf face into ${FONTS_DIR}/ and declare it`,
|
|
264
|
+
)
|
|
265
|
+
.argument('<file>', 'Font file to copy')
|
|
266
|
+
.argument('[target]', 'Target directory', '.')
|
|
267
|
+
.requiredOption('--family <name>', 'Family name the face declares')
|
|
268
|
+
.option('--weight <n>', "Weight, or a range such as '100 900'", '400')
|
|
269
|
+
.option('--style <style>', 'normal or italic', 'normal')
|
|
270
|
+
.option('--json', 'Emit the record on stdout')
|
|
271
|
+
.action(
|
|
272
|
+
(
|
|
273
|
+
file: string,
|
|
274
|
+
target: string,
|
|
275
|
+
opts: { family: string; weight: string; style: string; json?: boolean },
|
|
276
|
+
) => {
|
|
277
|
+
const title = 'canon design fonts add'
|
|
278
|
+
const emitJson = Boolean(opts.json)
|
|
279
|
+
const resolved = fontsTarget(target)
|
|
280
|
+
if (typeof resolved !== 'string') {
|
|
281
|
+
process.exitCode = refuseFonts(title, resolved, emitJson)
|
|
282
|
+
return
|
|
283
|
+
}
|
|
284
|
+
if (resolved === PROJECT_ROOT) {
|
|
285
|
+
process.exitCode = refuseFonts(
|
|
286
|
+
title,
|
|
287
|
+
{
|
|
288
|
+
ok: false,
|
|
289
|
+
reason: 'toolkit-root',
|
|
290
|
+
detail:
|
|
291
|
+
'Cannot run against toolkit root. Files here are the source of truth.',
|
|
292
|
+
},
|
|
293
|
+
emitJson,
|
|
294
|
+
)
|
|
295
|
+
return
|
|
296
|
+
}
|
|
297
|
+
const outcome = addProjectFace(resolved, resolve(file), {
|
|
298
|
+
family: opts.family,
|
|
299
|
+
weight: opts.weight,
|
|
300
|
+
style: opts.style,
|
|
301
|
+
})
|
|
302
|
+
if (!outcome.ok) {
|
|
303
|
+
process.exitCode = refuseFonts(title, outcome, emitJson)
|
|
304
|
+
return
|
|
305
|
+
}
|
|
306
|
+
if (emitJson) writeJson(outcome)
|
|
307
|
+
intro(title)
|
|
308
|
+
logAdd(join(DESIGN_INSTALL_DIR, DESIGN_PROJECT_SUBDIR, outcome.file))
|
|
309
|
+
logInfo(
|
|
310
|
+
`Declared ${outcome.family} ${outcome.weight} ${outcome.style} in ${outcome.sheet}`,
|
|
311
|
+
)
|
|
312
|
+
outro()
|
|
313
|
+
},
|
|
314
|
+
)
|
|
175
315
|
}
|
|
176
316
|
|
|
177
317
|
/**
|
package/src/commands/docs.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Command } from 'commander'
|
|
2
2
|
import { type DocEntry, listDocs } from '@/docs/list'
|
|
3
3
|
import { listTopics, readTopic, resolveTopic } from '@/docs/read'
|
|
4
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
4
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
5
5
|
import { intro, logError, logInfo, logStep, logWarn, outro } from '@/ui'
|
|
6
6
|
|
|
7
7
|
export function register(program: Command): void {
|
package/src/commands/feedback.ts
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
missingField,
|
|
9
9
|
missingFieldMessage,
|
|
10
10
|
} from '@/feedback/body'
|
|
11
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
12
|
-
import { creationRel } from '@/record
|
|
11
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
12
|
+
import { creationRel } from '@/roots/record'
|
|
13
13
|
import { createGithubIssue } from '@/feedback/github'
|
|
14
14
|
import { issueFailureMessage } from '@/feedback/github-format'
|
|
15
15
|
import { frameError, frameSuccess, logWarn, palette } from '@/ui'
|
package/src/commands/gate.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
summarize,
|
|
12
12
|
} from '@/gate/sequencer'
|
|
13
13
|
import { STAGES } from '@/gate/stages'
|
|
14
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
14
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
15
15
|
import {
|
|
16
16
|
intro,
|
|
17
17
|
logError,
|
|
@@ -113,6 +113,12 @@ async function runGate(opts: RunCommandOptions): Promise<number> {
|
|
|
113
113
|
cli: cliRunner(root),
|
|
114
114
|
write,
|
|
115
115
|
changed: changed.scoped ? changed.files : undefined,
|
|
116
|
+
onQueue: (label, holder) => {
|
|
117
|
+
const text = `${label} is waiting for the suite pid ${holder.pid} runs at ${holder.root}`
|
|
118
|
+
// stderr in both modes, so a JSON caller's stdout stays one record.
|
|
119
|
+
if (emitJson) process.stderr.write(`${text}\n`)
|
|
120
|
+
else logWarn(text)
|
|
121
|
+
},
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
const results = await runStages(
|
|
@@ -138,12 +144,13 @@ async function runGate(opts: RunCommandOptions): Promise<number> {
|
|
|
138
144
|
changed: changed.files.length,
|
|
139
145
|
summary,
|
|
140
146
|
ms: results.reduce((total, result) => total + result.ms, 0),
|
|
141
|
-
stages: results.map(({ id, label, status, failure, ms }) => ({
|
|
147
|
+
stages: results.map(({ id, label, status, failure, ms, queuedMs }) => ({
|
|
142
148
|
id,
|
|
143
149
|
label,
|
|
144
150
|
status,
|
|
145
151
|
failure,
|
|
146
152
|
ms,
|
|
153
|
+
queuedMs,
|
|
147
154
|
})),
|
|
148
155
|
})}\n`,
|
|
149
156
|
)
|
package/src/commands/gov.ts
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
type CountsReport,
|
|
9
9
|
scanCounts,
|
|
10
10
|
} from '@/counts/scan'
|
|
11
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
12
|
-
import { creationRel, SCRATCH } from '@/record
|
|
11
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
12
|
+
import { creationRel, SCRATCH } from '@/roots/record'
|
|
13
13
|
import { createGovAdapter } from '@/gov/adapter'
|
|
14
14
|
import { regenConsumedRules } from '@/gov/consumed'
|
|
15
15
|
import { regenStandardRules } from '@/gov/standard-rules'
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
} from '@/gov/test-order'
|
|
54
54
|
import { recordStamp, runDomainSync } from '@/sync/engine'
|
|
55
55
|
import { writeChainStamp } from '@/sync/stamp'
|
|
56
|
-
import { resolveTarget } from '@/
|
|
56
|
+
import { resolveTarget } from '@/targets/validate'
|
|
57
57
|
import {
|
|
58
58
|
intro,
|
|
59
59
|
isNonInteractive,
|
package/src/commands/hooks.ts
CHANGED
package/src/commands/indexes.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { $ } from 'bun'
|
|
|
4
4
|
import type { Command } from 'commander'
|
|
5
5
|
import { buildIndexCatalog } from '@/indexes/list'
|
|
6
6
|
import { exitCodeFor, type RegenResult, regenOne } from '@/indexes/regen'
|
|
7
|
-
import { gitEnv } from '@/git
|
|
7
|
+
import { gitEnv } from '@/git/env'
|
|
8
8
|
import { findIndexedAncestor, isIgnored, listIndexes } from '@/indexes/walk'
|
|
9
9
|
import { intro, logAdd, logInfo, logStep, logWarn, outro } from '@/ui'
|
|
10
10
|
|
package/src/commands/init.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Command } from 'commander'
|
|
2
2
|
import { cliPath, cliRun } from '@/cli-run'
|
|
3
|
-
import { PROJECT_ROOT } from '@/project
|
|
3
|
+
import { PROJECT_ROOT } from '@/roots/project'
|
|
4
4
|
import { applyInitOptions, flagsProvided } from '@/init/flags'
|
|
5
5
|
import { type InitFlags, parseSkip, planInit } from '@/init/plan'
|
|
6
6
|
import { runDomains } from '@/init/run'
|
|
7
7
|
import { buildSteps } from '@/init/steps'
|
|
8
|
-
import { resolveTarget } from '@/
|
|
8
|
+
import { resolveTarget } from '@/targets/validate'
|
|
9
9
|
import { intro, logInfo, logStep, logWarn, outro, palette, select } from '@/ui'
|
|
10
10
|
|
|
11
11
|
interface InitOptions {
|
package/src/commands/intake.ts
CHANGED
package/src/commands/migrate.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs'
|
|
2
2
|
import { join } from 'node:path'
|
|
3
3
|
import type { Command } from 'commander'
|
|
4
|
-
import { listRepositoryFiles } from '@/git
|
|
4
|
+
import { listRepositoryFiles } from '@/git/files'
|
|
5
5
|
import { indexSourceRules } from '@/gov/adapter'
|
|
6
6
|
import { applyRecordsMove, applyRename, readSources } from '@/migrate/apply'
|
|
7
7
|
import { isToolkitOwned, planRename, type RenamePlan } from '@/migrate/plan'
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
type ScratchEvidencePlan,
|
|
45
45
|
walkScratchEvidenceCorpus,
|
|
46
46
|
} from '@/migrate/scratch-evidence'
|
|
47
|
-
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/project
|
|
47
|
+
import { checkoutMismatchWarning, PROJECT_ROOT } from '@/roots/project'
|
|
48
48
|
import { readStamp, stampedHashes } from '@/sync/stamp'
|
|
49
49
|
import { logError, logInfo, logStep, logWarn, plural } from '@/ui'
|
|
50
50
|
|