vernac / architecture, expressed.
Browse documentation

Model inspection in Vernac 0.7.0

An agent should be able to find a use case, follow its resolved relationships and identify the relevant scenarios without reconstructing the project from source files. The same read-only operations work on saved sources through the shared daemon and on private MCP overlays.

Step Implementation Acceptance
1 Build a revision-scoped symbol and relationship index from the resolved compiler model and scenario catalog. Find the Document Workspace delete operation, its permission, event, inbound adapter and scenarios using qualified IDs and source locations. Identify opaque Java and unavailable scenario metadata explicitly.
2 Expose list, describe and relationship queries over CLI and MCP. Equivalent saved queries return the same JSON data. Overlay queries reflect edits privately and reject stale revisions. Limit list and relationship responses and use stable pagination.
3 Add a short CLI and MCP task guide to the AI task index and bundled docs. A fresh agent can discover the right scenario, run it and report the result using the example exchange.
4 Verify and integrate. Exercise the installed CLI and MCP on the same fixture. Preserve existing daemon, parser and scenario checks. Merge the verified change into feature/0.7.0.

The first release uses project, namespace and module scope. Projects need explicit architecture metadata to claim DDD bounded-context membership. Qualified symbol IDs are independent of source paths. Relationships are direct, compiler-confirmed references. An event edge identifies a possible emission in a native body, and a scenario edge identifies a declared reference. Neither is runtime trace evidence. Generic text editing and the existing structured previews remain available for changes.

Glossary and validation coverage

Step Implementation Acceptance
1 Index parsed workspace and exported dependency terms alongside executable symbols. Give terms their own namespace and name identity. Query standalone, quoted and model-associated terms with full documentation and follow documents edges for exact associations.
2 Index explicit validation rules on domain declarations, usecases and service/adapter methods. Query native and Java-style conditions, rejections or messages, source locations and owners. Distinguish legacy modules without a validation inventory.
3 Use checked source edits for terms and rules. A valid overlay edit updates both kinds of query. A rejected edit preserves the previous revision. Saved source remains unchanged until explicitly edited.
4 Verify installed CLI and MCP parity and update the task guide. A shell or MCP agent can scope its query, change a rule or term and verify the same model.

Inspect nested elements and published rules

Step Implementation Acceptance
1 Index native behavior guards independently of state invariants and input validations. Describe a guard nested in an if branch, including its condition, rejection, operation and source.
2 Index view elements and adapter-local mappings. Follow a conditional to a form and its controls, inspect bindings, and follow a mapping’s named conversions. Support inbound and outbound mappings.
3 Add an optional inspection inventory to binary module metadata. A consumer sees rules on exported declarations and public operations. Older descriptors remain readable and report unavailable rules. Metadata changes leave structural fingerprints unchanged.
4 Exercise the same queries and checked edits through the installed CLI and MCP. Changes to a term, rule, guard, view control and mapping are visible on the overlay revision. The original files are unchanged and invalid candidates are rejected.

The generic edit path works on saved or overlay Vernac source in the supported source roots. Handwritten Java and the private internals of binary modules stay in their original source repositories.

For the Vellon model comparison, give each candidate the same pinned ticket, checkout and tool budget. Compare file-based work with and without inspection access. Score correct symbol and scenario selection, the resulting Vernac diff and actual tests before comparing tokens, file reads and time. Run the initial comparison with Inkling 2 Mini. Repeat on another provider/model before generalizing.

Agent evaluation

Start with this read-only prompt in Document Workspace: “A user reports that they can delete someone else’s document. Identify the delete use case, its permission and resource, the MVC entrypoint, the event it can emit, and one scenario that tests an access denial. Run that scenario and report the result.” The expected findings are DeleteDocument, DocumentPermissions.DELETE on documentId, DocumentWeb.delete, DocumentDeleted and a named denial scenario.

Run at least three fresh sessions per condition, using the same model endpoint and quantization. Keep the ordinary tools in both conditions. Add only the inspection operations and their short guide in the second condition. Record successful task completion, test outcome, source reads, tool errors and input/output tokens separately. Then repeat with Vellon’s existing publish or approval flow, using the real symbol names from a pinned Vellon checkout as the answer key.