Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/community-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
test -f .claude/skills/speckit-intake-visual-design/SKILL.md
test -f .claude/skills/speckit-intake-prd/SKILL.md
test -f .claude/skills/speckit-intake-test-cases/SKILL.md
test -f .claude/skills/speckit-repository-governance-refresh/SKILL.md
test -f .claude/skills/speckit-repository-governance-generate/SKILL.md
test -f .claude/skills/speckit-specify/SKILL.md
test -f .claude/skills/speckit-clarify/SKILL.md
test -f .claude/skills/speckit-checklist/SKILL.md
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
test "$(find .claude/skills -maxdepth 1 -type d -name 'speckit-intake-*' | wc -l)" -eq 0
;;
repository-governance)
test ! -d .claude/skills/speckit-repository-governance-refresh
test ! -d .claude/skills/speckit-repository-governance-generate
;;
esac
done
Expand Down Expand Up @@ -197,8 +197,8 @@ jobs:
grep -q "visual design intake" .claude/skills/speckit-intake-visual-design/SKILL.md
;;
repository-governance)
test -f .claude/skills/speckit-repository-governance-refresh/SKILL.md
grep -q "Repository Governance Generate/Update" .claude/skills/speckit-repository-governance-refresh/SKILL.md
test -f .claude/skills/speckit-repository-governance-generate/SKILL.md
grep -q "Project Governance Projection Generation" .claude/skills/speckit-repository-governance-generate/SKILL.md
;;
esac
done
Expand Down
4 changes: 2 additions & 2 deletions extensions/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@
"repository-governance": {
"name": "Repository Governance",
"id": "repository-governance",
"version": "2.0.6",
"description": "Generate Repository Governance Framework files from Spec Kit metadata",
"version": "3.0.0",
"description": "Generate project-governance projections from Spec Kit metadata",
"author": "bigben",
"repository": "https://github.com/bigsmartben/spec-kit-agent-governance",
"license": "MIT",
Expand Down
19 changes: 19 additions & 0 deletions extensions/repository-governance/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

## Unreleased

### Changed

- Merge Toolchain SSOT coverage into Engineering SSOT to remove overlapping vertical ownership.
- Remove the cache/managed-section model; generation now overwrites the active agent platform target from the current repository scan.
- Make generated projections subordinate to vertical SSOT documents and source-backed repository facts on substantive conflicts.
- Preserve `SKILL.md` trigger metadata in the scenario capability index.
- Restrict custom `context_file` projection targets to safe agent/rules/instructions context paths.
- Tighten generated write-boundary instructions around cache-free active-target generation, `CONTEXT_FILES` legacy cleanup, and protected-write validation gates.
- Rename the public command and packaged script from `refresh` to `generate`.

## [3.0.0] - 2026-06-25

### Changed

- Reposition generated output as project-governance projections for Spec Kit supported agent platform targets while keeping the `repository-governance` extension identity and runtime filenames.
- Replace generated `SPECKIT GOVERNANCE` managed markers with `PROJECT GOVERNANCE` markers and treat legacy Speckit markers as migration cleanup targets.
- Normalize legacy initialization cache wording during refresh so old cache sections cannot reintroduce `SPECKIT GOVERNANCE` markers or weaker protected-write rules.
- Resolve missing or unknown integration metadata through the explicit `generic` entry in `CONTEXT_FILES`.

## [2.0.6] - 2026-06-24

### Fixed
Expand Down
42 changes: 22 additions & 20 deletions extensions/repository-governance/README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# Spec Kit Repository Governance

Generate the active Repository Governance Framework SSOT section.
Generate project-governance projections for the active Spec Kit agent platform target.

## Output

- Active target file from Spec Kit integration metadata.
- Managed `SPECKIT GOVERNANCE` section.
- Active agent platform target from safe `context_file` override or Spec Kit integration metadata.
- Generated `PROJECT GOVERNANCE` projection file.

## Scope

- Generate missing target governance file.
- Update existing target governance file.
- Generate the resolved active agent platform target when missing.
- Update existing active target project-governance projections.
- Distill detected repository areas into action rules.
- Capture repository facts as vertical SSOT evidence.
- Project agent platform adapter rules from Spec Kit integration metadata.
- Build a scenario capability index for repository-local skills and MCP-backed external tool evidence.
- Analyze repository areas to depth 2 only.
- Include hidden and cache directories in repository area governance.
- Enforce one primary responsibility per directory.
- Preserve user-authored content outside managed markers.
- Preserve managed markers verbatim.
- Keep `.specify/memory/repository-governance.md` internal.
- Review only the active target file.
- Overwrite the active agent platform target on generation.
- Generate repository evidence from the current repository state on every run.
- Review only the active agent platform target.
- Remove legacy managed sections only from non-active context files enumerated by `CONTEXT_FILES`.

## Install

```bash
specify extension add repository-governance --from https://github.com/bigsmartben/spec-kit-agent-governance/archive/refs/tags/v2.0.6.zip
specify extension add repository-governance --from https://github.com/bigsmartben/spec-kit-agent-governance/archive/refs/tags/v3.0.0.zip
```

Local development:
Expand All @@ -38,13 +38,13 @@ specify extension add --dev /path/to/spec-kit-agent-governance
## Run

```text
/speckit.repository-governance.refresh
/speckit.repository-governance.generate
```

Helper:

```bash
uv run python .specify/extensions/repository-governance/scripts/refresh_repository_governance.py
uv run python .specify/extensions/repository-governance/scripts/generate_repository_governance.py
```

## Build
Expand All @@ -56,32 +56,34 @@ uv run python tools/build_repository_governance_zip.py
## Files

- `extension.yml`
- `commands/speckit.repository-governance.refresh.md`
- `scripts/refresh_repository_governance.py`
- `commands/speckit.repository-governance.generate.md`
- `scripts/generate_repository_governance.py`
- `templates/repository-governance-template.md`

## SSOT Coverage
## Vertical SSOT Coverage

- Architecture SSOT evidence from source roots, extension source assets, route files, API contracts, and deployment directories.
- Engineering SSOT evidence from CI workflows, release/version files, command/template governance contracts, manifests, and task runners.
- Engineering SSOT evidence from CI workflows, release/version files, command/template governance contracts, manifests, lockfiles, task runners, extension assets, build config, runtime config, Docker, and compose files.
- Code Style SSOT evidence from formatter, lint, type-check, and test configuration.
- Directory Structure SSOT evidence from repository areas scanned to depth 2.
- Toolchain SSOT evidence from manifests, lockfiles, extension assets, build config, runtime config, Docker, compose, and task runner files.
- Agent Harness SSOT evidence from active agent context files, Spec Kit metadata, repository-local skills, and MCP config candidates.

## Evidence Coverage

- Repository fact evidence from README files, project docs, repository policy files, feature specs, source/test paths, and runtime/build configuration.
- Development command evidence from package scripts or Python/uv test conventions.

## Agent Adapter

- Repository Capability: abstract repository-local skill specs and MCP evidence into scenario-level capabilities.
- Spec Kit Agent Adapter: map the active integration to the context target and supported discovery behavior.
- Platform Projection: emit only rules the active agent context file can safely apply.
- Spec Kit Agent Adapter: map the active integration to the active agent platform target and supported discovery behavior.
- Platform Projection: emit only rules the active agent platform target can safely apply.

Repository-local `SKILL.md` files are indexed by declared name, description, trigger, and source path. MCP config files are reported as candidates and evidence only; active servers, resources, and tools must be enumerated from the agent platform runtime before use.

## Verify

```bash
uv run --locked python -m py_compile scripts/refresh_repository_governance.py tools/build_repository_governance_zip.py tests/test_governance_domains.py
uv run --locked python -m py_compile scripts/generate_repository_governance.py tools/build_repository_governance_zip.py tests/test_governance_domains.py
uv run --locked pytest -q
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
description: "Generate the active project-governance projection"
---

# Project Governance Projection Generation

## Input

$ARGUMENTS

## Output

- Active agent platform target.
- Generated `PROJECT GOVERNANCE` projection file.

## Procedure

1. Require `.specify/`.
2. Resolve the active agent platform target:
- `.specify/init-options.json` `context_file` when it is a safe relative agent/rules/instructions context path
- `.specify/integration.json` `default_integration` or `integration`
- default context target from `CONTEXT_FILES`
3. Generate or overwrite the active agent platform target.
4. Distill detected repository areas into action rules.
- depth: 2
- include hidden and cache directories
5. Capture repository facts from the current repository state as vertical SSOT evidence.
- Architecture evidence
- Engineering evidence
- Code Style evidence
- Directory Structure evidence
- Agent Harness evidence
- README, project docs, repository policy, and Spec Kit metadata
- extension assets, command/template governance contracts, manifests, lockfiles, task runners, build config, and runtime config
- feature specs, API contracts, source paths, and test paths
- development commands from package scripts or Python/uv test conventions
6. Resolve the Spec Kit Agent Adapter for the active integration.
- active agent platform target
- repository-local skill discovery behavior
- MCP runtime discovery behavior
- repository MCP config candidates as evidence only
7. Project the scenario capability index.
- repository-local skill capabilities from `SKILL.md` name, description, trigger, and source path
- MCP-backed external tool capability with runtime enumeration before use
8. Run:

```bash
uv run python .specify/extensions/repository-governance/scripts/generate_repository_governance.py
```

## Report

- active agent platform target
- generated or updated
- review target
- captured evidence from the current repository state

This file was deleted.

28 changes: 14 additions & 14 deletions extensions/repository-governance/extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ schema_version: "1.0"
extension:
id: repository-governance
name: "Repository Governance"
version: "2.0.6"
description: "Generate Repository Governance Framework files from Spec Kit metadata"
version: "3.0.0"
description: "Generate project-governance projections from Spec Kit metadata"
author: "bigben"
repository: "https://github.com/bigsmartben/spec-kit-agent-governance"
homepage: "https://github.com/bigsmartben/spec-kit-agent-governance"
Expand All @@ -18,26 +18,26 @@ requires:

provides:
commands:
- name: "speckit.repository-governance.refresh"
file: "commands/speckit.repository-governance.refresh.md"
description: "Generate or update the active repository governance file"
- name: "speckit.repository-governance.generate"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update smoke checks for the renamed governance skill

Renaming the provided command here changes skill-based registrations from speckit-repository-governance-refresh to speckit-repository-governance-generate, but the community smoke workflow still asserts the old skill path at .github/workflows/community-smoke.yml:122 and again after reinstall at lines 200-201. In the Claude/default community smoke path this manifest will create the new directory, so those test -f .claude/skills/speckit-repository-governance-refresh/SKILL.md checks fail unless the workflow/tests are updated or a compatibility alias is kept.

Useful? React with 👍 / 👎.

file: "commands/speckit.repository-governance.generate.md"
description: "Generate the active project-governance projection"

hooks:
after_constitution:
command: "speckit.repository-governance.refresh"
command: "speckit.repository-governance.generate"
optional: true
prompt: "Refresh repository governance after constitution changes?"
description: "Generates the active repository governance file"
prompt: "Generate project-governance projection after constitution changes?"
description: "Generates the active agent platform target"
after_plan:
command: "speckit.repository-governance.refresh"
command: "speckit.repository-governance.generate"
optional: true
prompt: "Refresh repository governance after planning?"
description: "Keeps the active repository governance file aligned"
prompt: "Generate project-governance projection after planning?"
description: "Keeps the active agent platform target aligned"
after_tasks:
command: "speckit.repository-governance.refresh"
command: "speckit.repository-governance.generate"
optional: true
prompt: "Refresh repository governance after task generation?"
description: "Keeps the active repository governance file aligned"
prompt: "Generate project-governance projection after task generation?"
description: "Keeps the active agent platform target aligned"

tags:
- "governance"
Expand Down
Loading