Tuckmark Agent Import Source
Use this skill inside a Tuckmark source checkout. It deliberately invokes the active worktree source CLI, never a globally installed tuckmark binary.
Source Guard
Resolve the checkout before every command:
REPO_ROOT="$(git rev-parse --show-toplevel)"
test -f "$REPO_ROOT/packages/cli/src/index.ts"
Use this command prefix:
bun tsx --tsconfig "$REPO_ROOT/packages/cli/tsconfig.typecheck.json" "$REPO_ROOT/packages/cli/src/index.ts"
Do not substitute tuckmark while validating source changes. Run
bun run dev:data:prepare when representative local data is needed; an existing
valid worktree copy is reused. Otherwise use the empty isolated directory
created by bun run dev:preview. Never point development DEVD at the formal
user data directory.
Workflow
Follow the privacy, identity, and browser boundaries in
tuckmark-agent-import. Never add a real order export to a fixture, test, screenshot, or commit.Start the worktree's named DEVD instance through
bun run dev:preview, then query its catalog and inventory with the source CLI. The default instance is derived from the worktree path and printed at startup. Native commands use IPC; the CLI never reads the directory:bun tsx --tsconfig "$REPO_ROOT/packages/cli/tsconfig.typecheck.json" "$REPO_ROOT/packages/cli/src/index.ts" \ agent-import catalog --instance "$DEVD_INSTANCE"Use a mock
tuckmark.agent-import.v1proposal for automated validation. Let the Agent decidenewversusrestock; use exact inventory IDs for restocks and set non-blockingneedsAttentionwhen evidence is incomplete. In each new-material payload, usedescriptionfor the concise overview and onedeviceDetailsMarkdown string for factual technical detail. Do not replace it with an Agent-invented structured object.Create and drive a session with the same source command prefix:
bun tsx --tsconfig "$REPO_ROOT/packages/cli/tsconfig.typecheck.json" "$REPO_ROOT/packages/cli/src/index.ts" \ agent-import create --file /tmp/mock-proposal.json --instance "$DEVD_INSTANCE" --no-open bun tsx --tsconfig "$REPO_ROOT/packages/cli/tsconfig.typecheck.json" "$REPO_ROOT/packages/cli/src/index.ts" \ agent-import wait --session <session-id> --instance "$DEVD_INSTANCE"When the user changes a new-material template, read the event field contract, produce fresh values, and fulfill the event's exact revision. Do not overwrite a later user edit or select templates for an existing restock.
Keep confirmation user-owned. Do not call the confirm API from an Agent test workflow.
Template lifecycle validation uses the same instance boundary:
... template list --instance "$DEVD_INSTANCE"
... template update --id <template-id> --instance "$DEVD_INSTANCE" --recommended-use "<text>"
Complete package imports create saved versions. Metadata patches preserve the saved-version count, and stale revisions must be re-read rather than replayed.
Focused Validation
bun run --filter @tuckmark/inventory test
bun run --filter @tuckmark/server test
bun run --filter @tuckmark/cli test
bun run --filter @tuckmark/web test