Add CLI inspect, apply, and generated drift checks#256
Merged
Conversation
Single-shot human and --json summary of the schema: types, fields, enums, discriminated unions, raw types, and imports. Intended as the entry point for agents that need to orient before mutating the model.
Re-runs the emit pipeline in memory and compares each output against the file on disk. Exits non-zero with a list of stale paths so CI and agent loops can detect drift between the IR and the generated bundle.
Accepts `--op-json '<json>'` or `--op-file <path>` and forwards the op through the file-backed pipeline. Pairs the existing per-op subcommands with a single entrypoint for callers that already have a serialized Op, matching the agent-facing tool-registry shape.
Adds docs/agent-contexture-workflow.md as the canonical workflow guide for coding agents working in downstream apps, covering the CLI surface, rules, recommended loop, and the `check-generated` CI wiring pattern. Updates the plan doc to reflect what shipped in this PR (inspect, check-generated, apply) and marks the deferred items (root CI wiring, optional skill, init-agent-docs command) as backlog. Emitter header audit confirmed: all four pipeline outputs carry `@contexture-generated`; `emit-table-crud` and `emit-claude-md` intentionally carry `@contexture-seeded` (written once, user-owned).
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
contexture inspect,contexture apply, andcontexture check-generatedCLI commands with JSON and human-readable output paths.Testing
bun run ci