feat: add perstack validate and perstack schema CLI commands#795
Merged
feat: add perstack validate and perstack schema CLI commands#795
Conversation
New commands for perstack.toml authoring support: - `perstack validate <path>`: Validates a perstack.toml against the schema. Runs TOML parsing, Zod schema validation, and expert delegation validation. Exits 0 with "Valid" on success, exits 1 with errors on failure. - `perstack schema`: Prints a TOML-oriented schema reference generated from the Zod schema via z.toJSONSchema(). Includes valid fields, types, required/optional status, @perstack/base tool names, and naming rules. These replace LLM-based review for structural correctness — the write expert can run `perstack validate` as a hard signal after writing perstack.toml. New exports from @perstack/perstack-toml: - validatePerstackConfigFile(filePath) - printPerstackSchema() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ation Architecture overhaul based on 100+ test runs: - Plan restored as "context expansion" — maximizes context before authoring - Write uses `perstack validate` and `perstack schema` CLI tools instead of LLM-based review (which was unreliable for structural correctness) - Verify does test execution + ONE completion signal check (no separate test expert — context separation caused misunderstanding) - Verify appends results to plan.md for cross-iteration knowledge continuity - Review and test experts removed - Completion signal: ONE, binary, deterministic, essential - Max 3 iterations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Two new CLI commands for perstack.toml authoring support:
perstack validate <path>perstack validate ./perstack.tomlperstack schemaz.toJSONSchema()internally then converts to human-readable formatWhy
These replace LLM-based structural review in create-expert. The write expert can run
perstack validateas a hard signal andperstack schemato learn valid values — no more wrong tool names, invalid fields, or invented field names.New exports
@perstack/perstack-toml:validatePerstackConfigFile(),printPerstackSchema()Test plan
perstack validate definitions/create-expert/perstack.toml→ "Valid", exit 0perstack validate nonexistent.toml→ error, exit 1perstack validatewith invalid defaultModelTier → Zod error, exit 1perstack schema→ TOML-oriented reference with all fieldsbun run typecheckpassesbun run testpasses🤖 Generated with Claude Code