From 7b2c2a1f239fe9dc11f7583e3e03e5700f8f56a4 Mon Sep 17 00:00:00 2001 From: Abdul Wahab <32850166+abdulwahabone@users.noreply.github.com> Date: Wed, 8 Jul 2026 05:17:48 +0500 Subject: [PATCH] Fix Impeccable setup path guidance (#341) --- skill/SKILL.src.md | 2 +- tests/live-reference.test.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/skill/SKILL.src.md b/skill/SKILL.src.md index ef56796b1..9afbab4cf 100644 --- a/skill/SKILL.src.md +++ b/skill/SKILL.src.md @@ -15,7 +15,7 @@ Designs and iterates production-grade frontend interfaces. Real working code, co You MUST do these steps before proceeding: -1. Run `node {{scripts_path}}/context.mjs` once per session. If the request names or implies a file, route, or app inside a monorepo, infer the concrete path and run `node {{scripts_path}}/context.mjs --target ` instead. If you've already seen its output in this conversation, do not re-run it. The script either prints the project's PRODUCT.md (and DESIGN.md when present) as a markdown block, or tells you it's missing. Follow whatever it prints. **If it reports `NO_PRODUCT_MD`, stop and follow `reference/init.md` before doing anything else.** If the output ends with an `UPDATE_AVAILABLE` directive, follow it (ask the user once about updating, then continue). It never blocks the current task. +1. Run `node {{scripts_path}}/context.mjs` once per session; if the runtime shows this skill's loaded base directory, run `node /scripts/context.mjs` instead. Keep cwd/workdir at the user's project, not the skill directory. If the request names or implies a file, route, or app inside a monorepo, infer the concrete path and append `--target ` to the same command. If you've already seen its output in this conversation, do not re-run it. The script either prints the project's PRODUCT.md (and DESIGN.md when present) as a markdown block, or tells you it's missing. Follow whatever it prints. **If it reports `NO_PRODUCT_MD`, stop and follow `reference/init.md` before doing anything else.** If the output ends with an `UPDATE_AVAILABLE` directive, follow it (ask the user once about updating, then continue). It never blocks the current task. 2. If the user invoked a sub-command (`craft`, `shape`, `audit`, `polish`, ...), you MUST read `reference/.md` next. Non-optional. The reference defines the command's flow; without it you will skip steps the user expects. 3. Familiarize yourself with any existing design system, conventions, and components in the code. Read at least one project file (CSS / tokens / theme / a representative component or page). **Required even when you've loaded a sub-command reference in step 2.** Don't reinvent the wheel; use what's there when it works, branch out when the UX wins. 4. Read the matching register reference. **This is non-optional; skipping it produces generic output.** If the project is marketing, a landing page, a campaign, long-form content, or a portfolio (design IS the product), read `reference/brand.md`. If it is app UI, admin, a dashboard, or a tool (design SERVES the product), read `reference/product.md`. Pick by first match: (1) task cue ("landing page" vs "dashboard"); (2) surface in focus (the page, file, or route being worked on); (3) `register` field in PRODUCT.md. diff --git a/tests/live-reference.test.mjs b/tests/live-reference.test.mjs index f434bb16c..2fa1fff52 100644 --- a/tests/live-reference.test.mjs +++ b/tests/live-reference.test.mjs @@ -11,7 +11,7 @@ describe('live reference authoring contract', () => { const skillSrc = readFileSync(join(ROOT, 'skill/SKILL.src.md'), 'utf-8'); const liveMd = readFileSync(join(ROOT, 'skill/reference/live.md'), 'utf-8'); - assert.match(skillSrc, /infer the concrete path and run `node \{\{scripts_path\}\}\/context\.mjs --target ` instead/); + assert.match(skillSrc, /infer the concrete path and append `--target ` to the same command/); assert.doesNotMatch(skillSrc, /Use this same scripts directory for all Impeccable helper commands/); assert.doesNotMatch(skillSrc, /walk upward for the nearest project `\.agents`, `\.claude`, or `\.cursor` skill/); assert.doesNotMatch(skillSrc, /## Context diagnostics/);