feat: pgcrate brief — whole database in one dense screen (PGC-100)#18
Merged
Conversation
- Built: `pgcrate brief` command (src/commands/brief.rs) — target echo, schemas→tables→estimated rows (reltuples, never count(*); -1 rendered as ?), compact FK graph, migrations line (applied/pending, silent when unconfigured), extensions + server version, catalog-cheap health flags (sequences >75%, XID age). Dense/pretty via PGC-102 Density; --json with pgcrate.brief schema + brief.schema.json. Wired into main.rs + commands/mod.rs; SKILL.md session-start now leads with brief and drops the "coming soon" note. - Validation: cargo fmt --check clean, clippy clean for new files, 780 tests pass (768 baseline + 12 new: 9 brief_integration incl. multi-schema fixture, 3 unit). Live-verified on solitaire_local (multi-schema + migrations line) and the messy postgres instance (88 tables → per-schema cap). ~20ms, 50x under the sub-second bar. - Notes: added a SCHEMA_TABLE_CAP=40 (human output only; JSON uncapped) and size-descending table ordering so a schema full of orphan/partition tables can't bury the headline — the messy-instance case made the cap necessary. Health flags are displayed not scored; brief always exits 0 (orientation, not triage).
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.
The session-start orientation command, spec'd from observed agent friction (first dogfood session): target echo first (the wrong-database hazard), ALL schemas → tables → estimated rows (non-public schemas are the headline — data hiding outside public caused the original wild-goose chase), compact FK map, migrations applied/pending when project config resolves, extensions, catalog-cheap health flags.
Completes the 0.7 agent-wedge feature set.