Skip to content

Add CLI inspect, apply, and generated drift checks#256

Merged
DaveHudson merged 4 commits into
mainfrom
feat/cli-inspect-check-apply
May 13, 2026
Merged

Add CLI inspect, apply, and generated drift checks#256
DaveHudson merged 4 commits into
mainfrom
feat/cli-inspect-check-apply

Conversation

@DaveHudson
Copy link
Copy Markdown
Collaborator

Summary

  • Add contexture inspect, contexture apply, and contexture check-generated CLI commands with JSON and human-readable output paths.
  • Expand CLI tests for inspection output, serialized op application, and generated artifact drift detection.
  • Add the agent Contexture workflow guide and update the core CLI workflow plan to reflect completed phases and current command behavior.

Testing

  • bun run ci

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).
@DaveHudson DaveHudson merged commit 8072d19 into main May 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants