Replies: 1 comment 2 replies
|
@bodote Since this seems to rely on 3rd party tooling as per your rough sketch I would suggest an extension and/or preset |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
The constitution is Spec Kit's mechanism for non-negotiable principles, and enforcement today is LLM-mediated:
/speckit.analyzechecks artifacts against it, and review-style extensions (e.g. the recently registeredarchitecture-guardextension, #2696) detect violations via agent review. Issue #2459 showed how fragile that chain is —/speckit.implementdidn't even load the constitution, so code generation ran unaware of governance.LLM adherence to prose is probabilistic. But a large subclass of constitutional principles — layer boundaries, dependency direction, forbidden imports, cycle bans, module naming — is deterministically checkable with mature, boring tooling that exists in every major ecosystem (ArchUnit for Java, dependency-cruiser / eslint-plugin-boundaries for JS/TS, import-linter for Python, NetArchTest for .NET). An agent can ignore a Markdown principle; it cannot ignore a failing CI gate.
Proposal
Make structural constitution principles compilable:
/speckit.architecture— that reads the constitution andplan.md, extracts structural rules, and scaffolds the matching enforcement config for the project's stack, plus a CI job./speckit.implement(and a future/speckit.review, Add /speckit.review as a final, constitution-aware quality gate #1323) treat failures of these architecture tests as non-negotiable blockers — the same semantics/speckit.analyzealready assigns to constitutional violations, but enforced by the build instead of by model compliance.This turns "constitutional drift" prevention from a prompt-engineering concern into a deterministic gate: whatever agent or model implements the tasks, the boundaries hold.
Question to maintainers
Given that #2362 (governance preset) was closed pointing toward pluggable presets (#1708), and given the extension registry: do you see this belonging in core, as a preset, or as an extension?
Mainly I'd like to know whether maintainers consider deterministic, executable enforcement of structural constitution principles a direction Spec Kit wants to support first-class. Review-based detection (as in
architecture-guard) and executable enforcement complement each other well, so extending the scope of an existing extension might also be a viable route.Prior art
All reactions