Skip to content

docs: ratify project constitution v1.0.0 (#1144)#1163

Open
dgarros wants to merge 2 commits into
stablefrom
dga/feat-constitution-tzh0i
Open

docs: ratify project constitution v1.0.0 (#1144)#1163
dgarros wants to merge 2 commits into
stablefrom
dga/feat-constitution-tzh0i

Conversation

@dgarros

@dgarros dgarros commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Why

The Spec Kit constitution (dev/constitution.md, symlinked from
.specify/memory/constitution.md) shipped as an unfilled template
([PRINCIPLE_1_NAME], [GOVERNANCE_RULES], …). With it empty, Spec Kit had no
project-specific guardrails, so specs/plans/implementations generated through it
could drift from the SDK's established conventions.

Goal: ratify a concrete constitution that encodes the SDK's non-negotiables, each
with enforcement teeth a reviewer or Spec Kit agent can check against a diff.

Non-goals: no changes to AGENTS.md or dev/knowledge/* (referenced as the
operational how-to layer, not duplicated); no new CI checks; no code changes.

Closes #1144

What changed

Populated the constitution with seven principles, each stated as a testable rule
with a named enforcement mechanism:

  • I. Async/Sync Dual API Parity — both clients, matching signatures; enforced by
    test_validate_method_signature / test_method_count.
  • II. Backward Compatibility & Public API Stability — tiered public API
    (__all__), deprecate → survive ≥1 minor → remove only in a major.
  • III. Layered Architecture — reusable logic in the SDK; CLI stays thin
    (the "would a non-CLI consumer duplicate this?" test).
  • IV. Type Safety & Typed Errorsty/mypy clean; errors use the
    infrahub_sdk.exceptions Error hierarchy.
  • V. Test-First Development — tests ship with the change; bug fixes need a
    reproduction test; assertions verify concrete values, not truthiness.
  • VI. Format & Lint Before Commit — tool-agnostic; CI is the gate.
  • VII. Documentation Accuracy (NON-NEGOTIABLE)docs-validate green +
    hand-written docs describe only real behavior, updated in the same PR.

Plus Additional Constraints, Development Workflow & Quality Gates, and a
Governance section (supremacy, SemVer amendment rules, v1.0.0 ratification).

Authored via /speckit.constitution. Dependent templates reviewed
(plan-template.md's Constitution Check reads this file at plan time; spec/tasks
templates carry no constitution refs) — no template edits needed.

How to review

Single file: dev/constitution.md. The Sync Impact Report is an HTML comment at
the top summarizing version, principles, and template review.

How to test

```bash
uv run rumdl check dev/constitution.md # passes clean
```

Impact & rollout

  • Backward compatibility: docs-only; no code or API changes.
  • Deployment notes: safe to merge; no runtime impact.

Checklist

  • Internal .md docs updated (this is the constitution itself)
  • Tests added/updated — N/A (docs-only)
  • Changelog entry — N/A (ci/skip-changelog; no user-facing change)
  • External docs updated — N/A (no user-facing behavior change)

Summary by cubic

Ratifies the Infrahub Python SDK constitution v1.0.0 in dev/constitution.md, replacing the empty template. Sets seven enforceable principles and governance to keep the SDK, CLI, and docs aligned; docs-only with no code or CI changes.

  • New Features
    • Seven core principles with enforcement: async/sync API parity (InfrahubClient/InfrahubClientSync); public API stability via __all__ and deprecation windows; SDK‑first layered architecture; strict typing and infrahub_sdk.exceptions; test‑first with meaningful assertions; format/lint gates; documentation accuracy with generated/validated docs.
    • Adds Additional Constraints, Development Workflow & Quality Gates, and Governance (constitution supremacy, SemVer for amendments, v1.0.0 ratified).

Written for commit 90e2327. Summary will update on new commits.

Review in cubic

dgarros and others added 2 commits July 10, 2026 16:36
Populate the empty Spec Kit constitution template with seven
project-specific principles (async/sync parity, backward compatibility,
layered architecture, type safety & typed errors, test-first, format &
lint, documentation accuracy) plus governance and versioning.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Require tests to assert concrete expected values rather than mere
truthiness or non-null, so a green test is real evidence. Elevates a
rule already in dev/rules/python-testing.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dgarros dgarros added type/documentation Improvements or additions to documentation ci/skip-changelog Don't include this PR in the changelog labels Jul 10, 2026
@github-actions github-actions Bot removed the type/documentation Improvements or additions to documentation label Jul 10, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="dev/constitution.md">

<violation number="1" location="dev/constitution.md:157">
P2: Python 3.14 is currently a declared supported runtime (`requires-python <3.15` and a 3.14 classifier in `pyproject.toml`), so limiting the constitution to 3.10–3.13 conflicts with the package metadata. Include 3.14 so this constraint does not invalidate supported work.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread dev/constitution.md

## Additional Constraints

- **Tech stack**: Python 3.10–3.13, UV for dependency management, pydantic >= 2.0, httpx,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Python 3.14 is currently a declared supported runtime (requires-python <3.15 and a 3.14 classifier in pyproject.toml), so limiting the constitution to 3.10–3.13 conflicts with the package metadata. Include 3.14 so this constraint does not invalidate supported work.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At dev/constitution.md, line 157:

<comment>Python 3.14 is currently a declared supported runtime (`requires-python <3.15` and a 3.14 classifier in `pyproject.toml`), so limiting the constitution to 3.10–3.13 conflicts with the package metadata. Include 3.14 so this constraint does not invalidate supported work.</comment>

<file context>
@@ -1,59 +1,197 @@
+
+## Additional Constraints
+
+- **Tech stack**: Python 3.10–3.13, UV for dependency management, pydantic >= 2.0, httpx,
+  graphql-core. Adding a new runtime dependency is an "ask first" decision (`AGENTS.md`).
+- **Generated code**: `protocols.py` and generated documentation are produced by tooling
</file context>
Suggested change
- **Tech stack**: Python 3.10–3.13, UV for dependency management, pydantic >= 2.0, httpx,
- **Tech stack**: Python 3.10–3.14, UV for dependency management, pydantic >= 2.0, httpx,

@dgarros dgarros requested review from a team and saltas888 July 11, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/skip-changelog Don't include this PR in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

task: populate the empty Spec Kit constitution with project-specific principles

2 participants