mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-22 02:56:52 +03:00
Add monorepo context support (#213)
Context files (PRODUCT.md / DESIGN.md) resolve child-first then fall back to the repo root, and /impeccable live lets the user pick a child app in a monorepo. Single-app behavior is unchanged. Closes #202. Co-Authored-By: abdulwahabone
This commit is contained in:
@@ -7,6 +7,33 @@ import { compileProviderBlocks } from '../scripts/lib/utils.js';
|
||||
const ROOT = process.cwd();
|
||||
|
||||
describe('live reference authoring contract', () => {
|
||||
it('keeps setup guidance focused on inferred target paths', () => {
|
||||
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 <path>` instead/);
|
||||
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/);
|
||||
assert.doesNotMatch(liveMd, /walk upward for the nearest project `\.agents`, `\.claude`, or `\.cursor` skill/);
|
||||
});
|
||||
|
||||
it('keeps monorepo live guidance short and target-driven', () => {
|
||||
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, /--target <path>/);
|
||||
assert.doesNotMatch(skillSrc, /TARGET_SELECTION_REQUIRED/);
|
||||
assert.doesNotMatch(skillSrc, /productStatus/);
|
||||
assert.doesNotMatch(skillSrc, /designStatus/);
|
||||
assert.match(liveMd, /infer the concrete path and run `node \{\{scripts_path\}\}\/live\.mjs --target <path>` instead/);
|
||||
assert.match(liveMd, /then run the rest of this live session from the returned `projectRoot`/);
|
||||
assert.doesNotMatch(liveMd, /target_selection_required/);
|
||||
assert.doesNotMatch(liveMd, /rerun with the chosen app path as `--target`/);
|
||||
assert.doesNotMatch(liveMd, /productStatus/);
|
||||
assert.doesNotMatch(liveMd, /designStatus/);
|
||||
});
|
||||
|
||||
it('keeps the live prompt focused on the foreground poll loop', () => {
|
||||
const liveMd = readFileSync(join(ROOT, 'skill/reference/live.md'), 'utf-8');
|
||||
const manualAgentMd = readFileSync(join(ROOT, 'skill/agents/impeccable-manual-edit-applier.md'), 'utf-8');
|
||||
|
||||
Reference in New Issue
Block a user