Skip to content

Add Agent Law provisioner#42

Merged
simongonzalezdc merged 1 commit into
mainfrom
codex/agent-law-provisioner-20260507
May 7, 2026
Merged

Add Agent Law provisioner#42
simongonzalezdc merged 1 commit into
mainfrom
codex/agent-law-provisioner-20260507

Conversation

@simongonzalezdc
Copy link
Copy Markdown
Member

@simongonzalezdc simongonzalezdc commented May 7, 2026

Summary

Adds the durable Agent Law provisioner to the .github hub.

What it does

  • Scheduled/manual workflow: .github/workflows/agent-law-provisioner.yml
  • Self-contained provisioner: scripts/provision-agent-law.py
  • Operator docs: docs/agent-law/provisioning.md

The workflow provisions the Empower Orchestrator law across the owner namespace by ensuring repo rulesets, optionally creating an org-level ruleset when the owner is an org and token has admin:org, and opening repair PRs for repos missing repo-local law files.

Required secret

Configure AGENT_LAW_ADMIN_TOKEN in the hub repo for apply mode. Without it, scheduled runs fall back to audit-only because the default GITHUB_TOKEN is repo-scoped.

Verification

  • python3 -m py_compile scripts/provision-agent-law.py
  • Local audit smoke confirmed existing Agent Law repo rulesets and reported missing default-branch law in still-pending rollout repos without applying changes.

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Create a scheduled/manual provisioning hook that audits and repairs missing Empower Orchestrator law across the owner namespace.

Constraint: Direct org-level ruleset creation needs an admin token; the workflow uses AGENT_LAW_ADMIN_TOKEN when configured and otherwise falls back to audit-only.
Rejected: Relying only on one-time repo rollout | new repos and drift need a durable repair loop.
Confidence: high
Scope-risk: moderate
Directive: Keep this hub provisioner aligned with docs/agent-law/empower-orchestrator.md and the required agent-law status context.
Tested: python3 -m py_compile scripts/provision-agent-law.py; local audit smoke confirmed existing rulesets and reported missing default-branch law without applying changes.
Not-tested: Live scheduled workflow with AGENT_LAW_ADMIN_TOKEN secret, because the secret is not configured in this session.
@simongonzalezdc simongonzalezdc merged commit 37c4f7b into main May 7, 2026
1 check passed
@simongonzalezdc simongonzalezdc deleted the codex/agent-law-provisioner-20260507 branch May 7, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant