Realign clify around copy-exemplar + validation-gate model (v0.2) - #1
Merged
Conversation
Inspired by google/agents-cli. Replaces "skeleton + LLM adapts" codegen with
"copy hand-crafted exemplar + mechanically substitute + run validation gate."
Architecture:
- bin/clify.mjs — verb-based binary: validate, scaffold-init, sync-check, scaffold (info)
- lib/{validate,scaffold-init,sync-check}.mjs — pure-JS deterministic phases
- skills/{clify-scaffold,clify-validate,clify-sync}/SKILL.md — LLM-driven phases
- examples/jsonplaceholder-cli/ — A+ exemplar (47 tests, full CRUD, mock server)
- references/{conventions,validation-gate}.md — single-source contracts
Validation gate (8 categories, deterministic):
manifest, coverage, structural, nuances, secrets, ci, tests, schema
Hard-fail nuances limited to pagination, idempotency, multipart, deprecated
to avoid prose-detection brittleness; soft-warn for the rest.
Verification:
- 15/15 clify unit + deliberate-break tests pass
- 47/47 exemplar smoke + integration tests pass on Node 22
- Round-trip: scaffold-init demo --target /tmp produces a repo where
npm test passes and clify validate passes
- Live: jsonplaceholder-cli posts get --id 1 hits real API
- CI matrix: Node 20 + 22
Throws out: skills/clify/ skeletons (cli-skeleton.mjs, skill-skeleton.md,
smoke-test-skeleton.mjs). Salvages: error taxonomy, .env loader, three-level
help, knowledge schema, .clify.json shape, manifest cross-check rules.
Plan in plan.md; codex pre-mortem incorporated into v0.2 narrowing decisions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Realigns clify from "LLM reads commented skeletons and writes most of the CLI from scratch" to "copy hand-crafted exemplar + mechanically substitute + run validation gate" — modeled on google/agents-cli. Quality now comes from a tested exemplar in the repo; the LLM does a smaller, more verifiable transformation; the binary does deterministic verification.
The plan in `plan.md` was reviewed by Codex pre-implementation; the v0.2 scope here adopts its top simplifications:
What's in the box
Removed: `skills/clify/` skeletons (`cli-skeleton.mjs`, `skill-skeleton.md`, `smoke-test-skeleton.mjs`). Salvaged: error taxonomy, `.env` loader, three-level help, knowledge schema, `.clify.json` shape, manifest cross-check rules.
Test plan
🤖 Generated with Claude Code