Rename Product Artefacts
LANG: Respond in the user's language. Tech terms stay in English. Short sentences.
<!-- uses:
- skill: add-artefact-graph
- mention: add-commit
-->
When to Use
- Renaming one or more product commands or skills in
framwork/.codeadd/. - Changing provider registry names, frontmatter, fragments, plugin skills and active references in one delivery.
When NOT to Use
- Renaming internal workbench identities, agents, features or scripts: this tool maps product commands and skills only.
- Rewriting archived deliveries, tickets, changelogs or documents in existing users' projects: preserve history.
IF THE CURRENT F-BLOCK HAS ONLY ONE LAYER TAG:
⛔ DO NOT USE: Bash to run the renamer with --scope all
✅ DO: Use --scope product for a [product] block and --scope docs for an [internal] block
Procedure
- Ask
add-artefact-graphwho calls every target and what each target needs. For an injected command, query each fragment returned by its direct impact separately. Inspect active non-artefact references too;AGENTS.md, CLI code and tests are not graph nodes. - Write the failing tests in
cli/tests/orscripts/tests/before the rename. Assert the old command id (add.new) and the old skill id (add-commit) are absent, and the new ids (add-new,add--commit) are present. Readframwork/provider-map.jsonandcli/src/plugins.json; the tool derives the default old→new map from them. Pass--map <file>only to override mappings for active names; the override file hascommandsandskillsobjects. - Run
node scripts/rename-product-artefacts.js preview --scope <product|docs|all> --output <scratch-file>for large migrations, or omit--outputto get JSONL on stdout and the summary on stderr.--root <repo>is optional.--scope docspreviews current README, AGENTS.md, web and workbench text separately;--scope allcombines both. Pick the scope that matches the F-block layer tag. - Read the summary's
records,filesandbytes. Read the JSONL selectively by path and record type. Check each move and excerpt, especially fragments, frontmatter, runtime references and paths. A header carries the map and scope; a footer closes the preview. Do not treat a truncated or absent footer as approval. - Run
node scripts/rename-product-artefacts.js apply --preview <scratch-file>with the same--scope,--mapand--rootas that preview.--preview -reads the same JSONL from stdin. Apply regenerates the preview, checks its bytes and all source hashes/destinations before writing anything; a stale or modified preview is rejected, so rerun preview instead of bypassing checks. - Sweep active files outside the tool's scope. Run
ADD_GRAPH_WARNINGS=1 node scripts/build.jsand require exit 0 with no new warning. Query the new node ids and their depth-1 edges. Then runnpm run test:cliat the root for install, update and provider output; the dispatcher owns execution and isolation. Do not report success based on filename changes alone.
Rules
ALWAYS:
- Treat the JSONL as a checked work list for the agent, not a human approval gate.
- Keep command and skill renames in the same F-block as their active dependants.
- Leave workbench identities and historical records unchanged.
NEVER:
- Apply a stale preview or bypass destination preflight.
- Assume that a command emitted as a
SKILL.mdchanges its command identity.