Meta-Prompt Architect (Lite)
scripts/generate.mjs deterministically extracts structure from a task description; you refine wording and variable names. The script never invents requirements — it surfaces what's missing.
Rules
- The template is a scaffold, not the final prompt. Rewrite vague sections with the user's specifics.
- Keep
{{variable}}names stable between INPUT and references. - The CONSTRAINTS injection rule is load-bearing — do not remove it.
- Resolve each
warnings[]item by asking the user or stating an explicit assumption.
1. Run
Requires Node 18+, zero dependencies. Fully offline.
node <skill-dir>/scripts/generate.mjs task.txt
echo "..." | node <skill-dir>/scripts/generate.mjs -
JSON on stdout; exit 1 when warnings exist, 2 on read/usage error.
2. Read the report
variables[]:{name, source}candidate{{placeholders}}.format: detected output format ornull.warnings[]: gaps to close.template: the assembled scaffold.
3. Refine before delivering
- Rename variables to the user's domain vocabulary.
- Fill
# OUTPUTwith a concrete shape (JSON schema, section list, length cap). - Add domain constraints the description implies.
Lite vs full
The full meta-prompt-architect additionally detects tone and audience, adds assumption/ambiguity edge-case rules, and emits happy-path / edge / adversarial test-case stubs.
