hapax-agentgov 0.3.0__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hapax_agentgov-0.3.2/.coderabbit.yaml +23 -0
- hapax_agentgov-0.3.2/.github/ISSUE_TEMPLATE/config.yml +14 -0
- hapax_agentgov-0.3.2/.github/dependabot.yml +19 -0
- hapax_agentgov-0.3.2/.github/workflows/ci.yml +81 -0
- hapax_agentgov-0.3.2/.github/workflows/semgrep.yml +25 -0
- hapax_agentgov-0.3.2/.zenodo.json +25 -0
- hapax_agentgov-0.3.2/AGENTS.md +12 -0
- hapax_agentgov-0.3.2/CITATION.cff +16 -0
- hapax_agentgov-0.3.2/CONTRIBUTING.md +5 -0
- hapax_agentgov-0.3.2/GOVERNANCE.md +9 -0
- hapax_agentgov-0.3.2/NOTICE.md +38 -0
- hapax_agentgov-0.3.2/PKG-INFO +89 -0
- hapax_agentgov-0.3.2/README.md +68 -0
- hapax_agentgov-0.3.2/SECURITY.md +29 -0
- hapax_agentgov-0.3.2/SUPPORT.md +28 -0
- hapax_agentgov-0.3.2/codecov.yml +16 -0
- hapax_agentgov-0.3.2/codemeta.json +30 -0
- hapax_agentgov-0.3.2/docs/enterprise-adoption.md +88 -0
- hapax_agentgov-0.3.2/examples/advisory-governance-policy.md +39 -0
- hapax_agentgov-0.3.2/examples/ai-work-evidence-packet.md +52 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/pyproject.toml +10 -4
- hapax_agentgov-0.3.2/src/agentgov/__init__.py +3 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/uv.lock +1 -1
- hapax_agentgov-0.3.0/PKG-INFO +0 -129
- hapax_agentgov-0.3.0/README.md +0 -113
- hapax_agentgov-0.3.0/src/agentgov/__init__.py +0 -3
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/.gitignore +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/LICENSE +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/__main__.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/check.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/cli.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/conflict-marker-scan.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/no-stale-branches.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/pii-guard.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/pkg-manager-guard.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/protected-paths.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/push-gate.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/safe-stash-guard.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/secrets-guard.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/hooks/work-resolution-gate.sh +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/init.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/registry.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/src/agentgov/report.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/tests/test_check.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/tests/test_cli.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/tests/test_init.py +0 -0
- {hapax_agentgov-0.3.0 → hapax_agentgov-0.3.2}/tests/test_report.py +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
$schema: https://coderabbit.ai/integrations/schema.v2.json
|
|
2
|
+
|
|
3
|
+
reviews:
|
|
4
|
+
request_changes_workflow: false
|
|
5
|
+
review_status: true
|
|
6
|
+
auto_review:
|
|
7
|
+
enabled: true
|
|
8
|
+
drafts: false
|
|
9
|
+
path_filters:
|
|
10
|
+
- "!uv.lock"
|
|
11
|
+
path_instructions:
|
|
12
|
+
- path: "src/agentgov/**"
|
|
13
|
+
instructions: >-
|
|
14
|
+
Review for hook safety boundaries, deterministic CLI behavior, and
|
|
15
|
+
compatibility with Claude Code hook contracts. Treat findings as
|
|
16
|
+
advisory relative to Hapax governance.
|
|
17
|
+
- path: "tests/**"
|
|
18
|
+
instructions: >-
|
|
19
|
+
Check that tests cover command behavior, generated hook artifacts, and
|
|
20
|
+
guard failure modes without depending on host-specific state.
|
|
21
|
+
|
|
22
|
+
chat:
|
|
23
|
+
auto_reply: false
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Read the repository overview
|
|
4
|
+
url: https://github.com/hapax-systems/agentgov#readme
|
|
5
|
+
about: Start with the rendered README and repository body.
|
|
6
|
+
- name: Read the support boundary
|
|
7
|
+
url: https://github.com/hapax-systems/agentgov/blob/main/SUPPORT.md
|
|
8
|
+
about: GitHub Issues are not a staffed support queue.
|
|
9
|
+
- name: Read the security disclosure path
|
|
10
|
+
url: https://github.com/hapax-systems/agentgov/security/policy
|
|
11
|
+
about: Use the repository security policy before sending a disclosure.
|
|
12
|
+
- name: Read Hapax governance
|
|
13
|
+
url: https://github.com/hapax-systems/hapax-constitution
|
|
14
|
+
about: Repository governance is centralized in hapax-constitution.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
groups:
|
|
8
|
+
github-actions:
|
|
9
|
+
patterns:
|
|
10
|
+
- "*"
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "uv"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
16
|
+
groups:
|
|
17
|
+
python-dependencies:
|
|
18
|
+
patterns:
|
|
19
|
+
- "*"
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request: {}
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
workflow_dispatch: {}
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
|
19
|
+
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: uv sync --locked
|
|
22
|
+
- name: Ruff format check
|
|
23
|
+
run: uv run ruff format --check .
|
|
24
|
+
- name: Ruff lint
|
|
25
|
+
run: uv run ruff check .
|
|
26
|
+
|
|
27
|
+
test:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
|
31
|
+
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: uv sync --locked
|
|
34
|
+
- name: Run tests with coverage
|
|
35
|
+
run: >-
|
|
36
|
+
uv run --with pytest-cov pytest
|
|
37
|
+
--cov=agentgov
|
|
38
|
+
--cov-report=term
|
|
39
|
+
--cov-report=xml
|
|
40
|
+
- name: Upload coverage to Codecov
|
|
41
|
+
if: >-
|
|
42
|
+
always() &&
|
|
43
|
+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
|
44
|
+
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac
|
|
45
|
+
with:
|
|
46
|
+
files: ./coverage.xml
|
|
47
|
+
flags: python
|
|
48
|
+
name: hapax-agentgov-python
|
|
49
|
+
fail_ci_if_error: false
|
|
50
|
+
use_oidc: true
|
|
51
|
+
|
|
52
|
+
secrets-scan:
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
|
56
|
+
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16
|
|
57
|
+
with:
|
|
58
|
+
go-version: "1.25.x"
|
|
59
|
+
- name: Run Gitleaks
|
|
60
|
+
run: |
|
|
61
|
+
tmp="$RUNNER_TEMP/gitleaks-source"
|
|
62
|
+
mkdir -p "$tmp"
|
|
63
|
+
git ls-files -z | rsync --files-from=- --from0 -a ./ "$tmp"/
|
|
64
|
+
go run github.com/zricethezav/gitleaks/v8@latest dir --redact --verbose "$tmp"
|
|
65
|
+
|
|
66
|
+
all-green:
|
|
67
|
+
if: always()
|
|
68
|
+
needs:
|
|
69
|
+
- lint
|
|
70
|
+
- test
|
|
71
|
+
- secrets-scan
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
steps:
|
|
74
|
+
- name: Check required CI jobs
|
|
75
|
+
run: |
|
|
76
|
+
for result in "${{ needs.lint.result }}" "${{ needs.test.result }}" "${{ needs.secrets-scan.result }}"; do
|
|
77
|
+
if [[ "$result" != "success" ]]; then
|
|
78
|
+
echo "Required job failed or was skipped: $result" >&2
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
done
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_dispatch: {}
|
|
3
|
+
pull_request: {}
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
schedule:
|
|
8
|
+
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
|
9
|
+
- cron: 53 18 * * *
|
|
10
|
+
name: Semgrep
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
semgrep:
|
|
17
|
+
name: semgrep/ci
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
env:
|
|
20
|
+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
|
21
|
+
container:
|
|
22
|
+
image: semgrep/semgrep@sha256:06938c1f365d3f67b8cedd8bc117607ae64253f88a0e768e9da9408548927dd6
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
|
|
25
|
+
- run: semgrep ci
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "agentgov",
|
|
3
|
+
"description": "[Archived] Early prototype superseded by hapax-systems/reins — Hapax Research Lab",
|
|
4
|
+
"creators": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Hapax Research Lab"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"access_right": "open",
|
|
11
|
+
"upload_type": "software",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ai-governance",
|
|
14
|
+
"developer-tools",
|
|
15
|
+
"governance",
|
|
16
|
+
"safety"
|
|
17
|
+
],
|
|
18
|
+
"related_identifiers": [
|
|
19
|
+
{
|
|
20
|
+
"identifier": "https://github.com/hapax-systems/reins",
|
|
21
|
+
"relation": "isContinuedBy",
|
|
22
|
+
"scheme": "url"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Repository Guidance
|
|
2
|
+
|
|
3
|
+
Hapax repositories live under `hapax-systems`. Do not create, move, or point
|
|
4
|
+
automation at any personal user namespace.
|
|
5
|
+
|
|
6
|
+
External review and analysis from CodeRabbit, Claude, Codex, Codecov, and
|
|
7
|
+
Semgrep is advisory in this repository unless a governed Hapax task explicitly
|
|
8
|
+
promotes a stable aggregate check to a branch-protection gate. Preserve the
|
|
9
|
+
repository-owned `all-green` CI aggregate as the merge-readiness signal.
|
|
10
|
+
|
|
11
|
+
Secrets belong in governed secret stores or GitHub repository/organization
|
|
12
|
+
secrets; never commit secret values.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: If you use this software in your research, please cite it as below.
|
|
3
|
+
type: software
|
|
4
|
+
title: agentgov
|
|
5
|
+
version: 0.3.2
|
|
6
|
+
abstract: "[Archived] Early prototype superseded by hapax-systems/reins — Hapax Research Lab"
|
|
7
|
+
authors:
|
|
8
|
+
- name: Hapax Research Lab
|
|
9
|
+
repository-code: https://github.com/hapax-systems/agentgov
|
|
10
|
+
url: https://hapaxresearch.com
|
|
11
|
+
license: MIT
|
|
12
|
+
keywords:
|
|
13
|
+
- ai-governance
|
|
14
|
+
- developer-tools
|
|
15
|
+
- governance
|
|
16
|
+
- safety
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
This repository is archived and does not accept contributions or pull requests. Active governance cockpit work continues in [hapax-systems/reins](https://github.com/hapax-systems/reins); lab overview and contact details are published at https://hapaxresearch.com.
|
|
4
|
+
|
|
5
|
+
For security disclosures, follow `SECURITY.md` (`hrl-han@hapaxresearch.com`). For academic or archival citation, see `CITATION.cff` and `.zenodo.json`.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
`hapax-constitution` governs this archived repository on behalf of Hapax Research Lab (https://hapaxresearch.com).
|
|
4
|
+
|
|
5
|
+
## Authoritative sources
|
|
6
|
+
|
|
7
|
+
- [Hapax Constitution](https://github.com/hapax-systems/hapax-constitution)
|
|
8
|
+
- [Axiom registry](https://github.com/hapax-systems/hapax-constitution/blob/main/axioms/registry.yaml)
|
|
9
|
+
- [Successor project — reins](https://github.com/hapax-systems/reins)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# NOTICE - agentgov
|
|
2
|
+
|
|
3
|
+
`agentgov` is the bounded adoption-commons repository in the Hapax Systems portfolio. It is published for inspection and pilot use without granting rights to the broader Hapax runtime estate.
|
|
4
|
+
|
|
5
|
+
This repository is part of the Hapax Systems portfolio. Public metadata, issue affordances, and support boundaries follow the registry in `hapax-constitution`.
|
|
6
|
+
|
|
7
|
+
## Reader promise
|
|
8
|
+
|
|
9
|
+
Portable governance hooks that an adopter can install, audit, and pilot without inheriting the Hapax estate.
|
|
10
|
+
|
|
11
|
+
## Reader value
|
|
12
|
+
|
|
13
|
+
Turns common AI coding-agent risks into installable pre-action checks that teams can pilot before buying or building heavier governance.
|
|
14
|
+
|
|
15
|
+
## Claim ceiling
|
|
16
|
+
|
|
17
|
+
Adoption commons for hooks only; not the full Hapax governance system, not policyflow, and not a staffed support service.
|
|
18
|
+
|
|
19
|
+
## License and rights
|
|
20
|
+
|
|
21
|
+
Permissive adoption surface; copy may say MIT for agentgov only and must not imply broader Hapax runtime rights or support obligations.
|
|
22
|
+
|
|
23
|
+
Rendered summary: MIT - permissive.
|
|
24
|
+
|
|
25
|
+
## Public boundary
|
|
26
|
+
|
|
27
|
+
- Issues are redirect-only, support is bounded, and pull requests are not the intake path for this repository.
|
|
28
|
+
- First-party public links must use the `hapax-systems` GitHub organization.
|
|
29
|
+
- Public fanout must route through the governed publication bus or a documented guarded legacy surface.
|
|
30
|
+
- Governance reference: https://github.com/hapax-systems/hapax-constitution
|
|
31
|
+
|
|
32
|
+
## Portfolio position
|
|
33
|
+
|
|
34
|
+
Public adoption commons. Separate from council-local policyflow primitives and from the Hapax council runtime.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
This file is rendered from `hapax-constitution/sdlc/render/`. Do not edit by hand; edits will be overwritten on next render. To change content, edit `sdlc/render/repos.yaml` or the renderer templates in `hapax-constitution`.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: hapax-agentgov
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: [Archived] Early prototype superseded by hapax-systems/reins — Hapax Research Lab
|
|
5
|
+
Project-URL: Homepage, https://hapaxresearch.com
|
|
6
|
+
Project-URL: Repository, https://github.com/hapax-systems/agentgov
|
|
7
|
+
Project-URL: Documentation, https://github.com/hapax-systems/reins
|
|
8
|
+
Project-URL: Security, https://github.com/hapax-systems/agentgov/blob/main/SECURITY.md
|
|
9
|
+
Author-email: Hapax Research Lab <hrl-han@hapaxresearch.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
License-File: NOTICE.md
|
|
13
|
+
Keywords: ai-agents,claude-code,governance,hooks,safety
|
|
14
|
+
Classifier: Development Status :: 7 - Inactive
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# agentgov — Archived Early Prototype
|
|
23
|
+
|
|
24
|
+
> **Archived / Inactive (`v0.3.2`).** `agentgov` (`hapax-agentgov` on PyPI) is an early standalone governance-hook prototype from **Hapax Research Lab** ([hapaxresearch.com](https://hapaxresearch.com)) and is no longer under active development.
|
|
25
|
+
>
|
|
26
|
+
> - **Active governance cockpit & frontdoor:** [hapax-systems/reins](https://github.com/hapax-systems/reins)
|
|
27
|
+
> - **Runtime governance & routing mechanisms:** [hapax-systems/hapax-spine](https://github.com/hapax-systems/hapax-spine)
|
|
28
|
+
> - **Lab overview & publications:** [https://hapaxresearch.com](https://hapaxresearch.com)
|
|
29
|
+
> - **Security disclosures:** `hrl-han@hapaxresearch.com` (see [SECURITY.md](SECURITY.md))
|
|
30
|
+
|
|
31
|
+
Release `0.3.2` publishes this retirement notice, updates package metadata to `Development Status :: 7 - Inactive`, and aligns the security disclosure contact with `hrl-han@hapaxresearch.com`. Existing MIT license grants and historical source remain intact for inspection and citation.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Historical Overview
|
|
36
|
+
|
|
37
|
+
`agentgov` was published as a small MIT-licensed hook toolkit for governing AI coding agents at the local tool boundary before building heavier governance infrastructure. Hooks inspect file edits, shell commands, git actions, and project preconditions before the agent acts; when a check fails, the tool call is blocked with an actionable diagnostic on stderr.
|
|
38
|
+
|
|
39
|
+
Pattern checks at selected tool boundaries do not establish complete coverage of agent behavior or a general security boundary. New evaluations should inspect [hapax-systems/reins](https://github.com/hapax-systems/reins) and [hapaxresearch.com](https://hapaxresearch.com).
|
|
40
|
+
|
|
41
|
+
## Historical Quick Start
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install hapax-agentgov
|
|
45
|
+
cd your-project
|
|
46
|
+
agentgov init
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This scaffolds `.claude/hooks/` and registers the selected hooks in `.claude/settings.local.json`.
|
|
50
|
+
|
|
51
|
+
## Included Hook Scripts
|
|
52
|
+
|
|
53
|
+
| Hook | Category | Boundary |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| `pii-guard` | safety | Blocks tracked writes that introduce common personal-data or home-path patterns. |
|
|
56
|
+
| `secrets-guard` | safety | Blocks tracked writes containing common credential or token patterns. |
|
|
57
|
+
| `protected-paths` | safety | Prevents unapproved edits to sensitive or locked repository paths. |
|
|
58
|
+
| `conflict-marker-scan` | git-hygiene | Rejects files containing unresolved merge-conflict markers. |
|
|
59
|
+
| `no-stale-branches` | git-hygiene | Warns or blocks work on stale feature branches. |
|
|
60
|
+
| `push-gate` | git-hygiene | Enforces local verification gates prior to git push operations. |
|
|
61
|
+
| `safe-stash-guard` | git-hygiene | Guards against destructive git stash drops or overwrites. |
|
|
62
|
+
| `pkg-manager-guard` | project-rules | Enforces consistent package-manager invocation within a repository. |
|
|
63
|
+
| `work-resolution-gate` | project-rules | Checks work-item or evidence prerequisites before completion. |
|
|
64
|
+
|
|
65
|
+
## Historical Documentation & Examples
|
|
66
|
+
|
|
67
|
+
- [Enterprise adoption guide](docs/enterprise-adoption.md)
|
|
68
|
+
- [AI work evidence packet example](examples/ai-work-evidence-packet.md)
|
|
69
|
+
- [Advisory governance policy example](examples/advisory-governance-policy.md)
|
|
70
|
+
|
|
71
|
+
## How Hooks Work
|
|
72
|
+
|
|
73
|
+
Claude Code hooks are shell scripts that run before or after tool calls. They receive the tool name and input as JSON on stdin. A hook exits `0` to allow the action and exits `2` to block it with a message on stderr.
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"tool_name": "Edit",
|
|
78
|
+
"tool_input": {
|
|
79
|
+
"file_path": "/path/to/file.py",
|
|
80
|
+
"new_string": "API_KEY = 'sk-example'"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Boundary & License
|
|
86
|
+
|
|
87
|
+
`agentgov` is MIT licensed (see [LICENSE](LICENSE)). The broader Hapax Research Lab portfolio includes repositories with distinct licenses and support boundaries; do not infer license grants or support commitments for [reins](https://github.com/hapax-systems/reins) or [hapax-spine](https://github.com/hapax-systems/hapax-spine) from this archived package.
|
|
88
|
+
|
|
89
|
+
GitHub Issues are redirect-only. Governance rules live in [hapax-systems/hapax-constitution](https://github.com/hapax-systems/hapax-constitution).
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# agentgov — Archived Early Prototype
|
|
2
|
+
|
|
3
|
+
> **Archived / Inactive (`v0.3.2`).** `agentgov` (`hapax-agentgov` on PyPI) is an early standalone governance-hook prototype from **Hapax Research Lab** ([hapaxresearch.com](https://hapaxresearch.com)) and is no longer under active development.
|
|
4
|
+
>
|
|
5
|
+
> - **Active governance cockpit & frontdoor:** [hapax-systems/reins](https://github.com/hapax-systems/reins)
|
|
6
|
+
> - **Runtime governance & routing mechanisms:** [hapax-systems/hapax-spine](https://github.com/hapax-systems/hapax-spine)
|
|
7
|
+
> - **Lab overview & publications:** [https://hapaxresearch.com](https://hapaxresearch.com)
|
|
8
|
+
> - **Security disclosures:** `hrl-han@hapaxresearch.com` (see [SECURITY.md](SECURITY.md))
|
|
9
|
+
|
|
10
|
+
Release `0.3.2` publishes this retirement notice, updates package metadata to `Development Status :: 7 - Inactive`, and aligns the security disclosure contact with `hrl-han@hapaxresearch.com`. Existing MIT license grants and historical source remain intact for inspection and citation.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Historical Overview
|
|
15
|
+
|
|
16
|
+
`agentgov` was published as a small MIT-licensed hook toolkit for governing AI coding agents at the local tool boundary before building heavier governance infrastructure. Hooks inspect file edits, shell commands, git actions, and project preconditions before the agent acts; when a check fails, the tool call is blocked with an actionable diagnostic on stderr.
|
|
17
|
+
|
|
18
|
+
Pattern checks at selected tool boundaries do not establish complete coverage of agent behavior or a general security boundary. New evaluations should inspect [hapax-systems/reins](https://github.com/hapax-systems/reins) and [hapaxresearch.com](https://hapaxresearch.com).
|
|
19
|
+
|
|
20
|
+
## Historical Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install hapax-agentgov
|
|
24
|
+
cd your-project
|
|
25
|
+
agentgov init
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This scaffolds `.claude/hooks/` and registers the selected hooks in `.claude/settings.local.json`.
|
|
29
|
+
|
|
30
|
+
## Included Hook Scripts
|
|
31
|
+
|
|
32
|
+
| Hook | Category | Boundary |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `pii-guard` | safety | Blocks tracked writes that introduce common personal-data or home-path patterns. |
|
|
35
|
+
| `secrets-guard` | safety | Blocks tracked writes containing common credential or token patterns. |
|
|
36
|
+
| `protected-paths` | safety | Prevents unapproved edits to sensitive or locked repository paths. |
|
|
37
|
+
| `conflict-marker-scan` | git-hygiene | Rejects files containing unresolved merge-conflict markers. |
|
|
38
|
+
| `no-stale-branches` | git-hygiene | Warns or blocks work on stale feature branches. |
|
|
39
|
+
| `push-gate` | git-hygiene | Enforces local verification gates prior to git push operations. |
|
|
40
|
+
| `safe-stash-guard` | git-hygiene | Guards against destructive git stash drops or overwrites. |
|
|
41
|
+
| `pkg-manager-guard` | project-rules | Enforces consistent package-manager invocation within a repository. |
|
|
42
|
+
| `work-resolution-gate` | project-rules | Checks work-item or evidence prerequisites before completion. |
|
|
43
|
+
|
|
44
|
+
## Historical Documentation & Examples
|
|
45
|
+
|
|
46
|
+
- [Enterprise adoption guide](docs/enterprise-adoption.md)
|
|
47
|
+
- [AI work evidence packet example](examples/ai-work-evidence-packet.md)
|
|
48
|
+
- [Advisory governance policy example](examples/advisory-governance-policy.md)
|
|
49
|
+
|
|
50
|
+
## How Hooks Work
|
|
51
|
+
|
|
52
|
+
Claude Code hooks are shell scripts that run before or after tool calls. They receive the tool name and input as JSON on stdin. A hook exits `0` to allow the action and exits `2` to block it with a message on stderr.
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"tool_name": "Edit",
|
|
57
|
+
"tool_input": {
|
|
58
|
+
"file_path": "/path/to/file.py",
|
|
59
|
+
"new_string": "API_KEY = 'sk-example'"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Boundary & License
|
|
65
|
+
|
|
66
|
+
`agentgov` is MIT licensed (see [LICENSE](LICENSE)). The broader Hapax Research Lab portfolio includes repositories with distinct licenses and support boundaries; do not infer license grants or support commitments for [reins](https://github.com/hapax-systems/reins) or [hapax-spine](https://github.com/hapax-systems/hapax-spine) from this archived package.
|
|
67
|
+
|
|
68
|
+
GitHub Issues are redirect-only. Governance rules live in [hapax-systems/hapax-constitution](https://github.com/hapax-systems/hapax-constitution).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
This repository is published by Hapax Research Lab and is archived from active development. Public repository surfaces are not a multi-tenant product, customer-data processor, or public auth service. That boundary is a scope statement, not a warranty about every internal integration.
|
|
4
|
+
|
|
5
|
+
## Disclosure path
|
|
6
|
+
|
|
7
|
+
Send security disclosures to hrl-han@hapaxresearch.com, the address on the lab's contact page. An unsigned message is enough. If you sign an artifact with Sigstore, keyless signing is public: the signer's identity and the artifact's hash enter Rekor's log permanently. The commitment that covers this address is on that page:
|
|
8
|
+
|
|
9
|
+
https://hapaxresearch.com/about/#contact
|
|
10
|
+
|
|
11
|
+
Sigstore's keyless signing associates each signature with an OpenID Connect identity through a short-lived certificate, and logs the signing event in Rekor, a signature transparency log.
|
|
12
|
+
|
|
13
|
+
Address check (fails if the contact page no longer carries its contact anchor or this address):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -fsSL https://hapaxresearch.com/about/ | grep -qF 'id="contact"' && curl -fsSL https://hapaxresearch.com/about/ | grep -qF 'hrl-han@hapaxresearch.com'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Scope
|
|
20
|
+
|
|
21
|
+
In scope: exposure of secrets or private material in public commits/artifacts, public-egress bypasses, supply-chain or workflow weaknesses, and concrete remotely exploitable defects. Out of scope: feature requests for multi-tenancy, RBAC, federated identity, general hardening consultations, or integration support.
|
|
22
|
+
|
|
23
|
+
## Response time
|
|
24
|
+
|
|
25
|
+
Best effort; no SLA. Messages sent to this address fall under the commitment stated on the contact page: "The network commits to receipt, retention and published correction. It promises no response time." Critical disclosures, such as remote code execution or leaked secrets in published commits, are triaged out of band as soon as they are read, not deferred to a maintenance window. Other reports wait for one.
|
|
26
|
+
|
|
27
|
+
## Advisory record
|
|
28
|
+
|
|
29
|
+
This rendered policy does not maintain a complete dated advisory ledger. Current advisories, if any, belong in release notes, security notices, or publication-bus records with their own dates and receipts.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
`agentgov` is the bounded adoption surface for Hapax Systems. It is published to make the adopter-facing governance primitives inspectable and usable without turning the repository into a staffed support channel.
|
|
4
|
+
|
|
5
|
+
## GitHub issues
|
|
6
|
+
|
|
7
|
+
GitHub Issues are kept available only as a redirect surface. Blank issues are disabled; the issue chooser points readers to the appropriate published files instead of opening a support queue.
|
|
8
|
+
|
|
9
|
+
## What is in scope
|
|
10
|
+
|
|
11
|
+
- Reading the repository and its rendered metadata.
|
|
12
|
+
- Citing the repository through `CITATION.cff` and `.zenodo.json`.
|
|
13
|
+
- Reporting a concrete security disclosure through `SECURITY.md`.
|
|
14
|
+
- Following the governance boundary through `GOVERNANCE.md` and https://github.com/hapax-systems/hapax-constitution.
|
|
15
|
+
|
|
16
|
+
## What is out of scope
|
|
17
|
+
|
|
18
|
+
- Troubleshooting, integration help, feature requests, roadmap requests, or consulting through GitHub Issues.
|
|
19
|
+
- Pull requests, community maintenance, or contributor onboarding.
|
|
20
|
+
- Claims that a funding link, citation, fork, or public issue creates support, feature priority, commercial rights, or license expansion.
|
|
21
|
+
|
|
22
|
+
## Funding
|
|
23
|
+
|
|
24
|
+
Funding links, if present, are no-perk research support only. Payment does not create an SLA, support entitlement, product commitment, license grant, or consulting relationship.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
This file is rendered from `hapax-constitution/sdlc/render/`. Edits are overwritten on next render.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": "https://w3id.org/codemeta/3.0",
|
|
3
|
+
"@type": "SoftwareSourceCode",
|
|
4
|
+
"name": "agentgov",
|
|
5
|
+
"version": "0.3.2",
|
|
6
|
+
"description": "[Archived] Early prototype superseded by hapax-systems/reins — Hapax Research Lab",
|
|
7
|
+
"codeRepository": "https://github.com/hapax-systems/agentgov",
|
|
8
|
+
"url": "https://hapaxresearch.com",
|
|
9
|
+
"license": "https://spdx.org/licenses/MIT",
|
|
10
|
+
"author": [
|
|
11
|
+
{
|
|
12
|
+
"@type": "Organization",
|
|
13
|
+
"name": "Hapax Research Lab",
|
|
14
|
+
"url": "https://hapaxresearch.com"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"applicationCategory": "SoftwareLibrary",
|
|
18
|
+
"developmentStatus": "inactive",
|
|
19
|
+
"isAccessibleForFree": true,
|
|
20
|
+
"keywords": [
|
|
21
|
+
"ai-governance",
|
|
22
|
+
"developer-tools",
|
|
23
|
+
"governance",
|
|
24
|
+
"safety"
|
|
25
|
+
],
|
|
26
|
+
"relatedLink": [
|
|
27
|
+
"https://github.com/hapax-systems/reins",
|
|
28
|
+
"https://hapaxresearch.com"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Enterprise Adoption Guide
|
|
2
|
+
|
|
3
|
+
`hapax-agentgov` is an MIT-licensed package for AI coding governance hooks. It
|
|
4
|
+
can help an organization pilot safety, git hygiene, and project-rule checks for
|
|
5
|
+
AI-assisted development.
|
|
6
|
+
|
|
7
|
+
It is not:
|
|
8
|
+
|
|
9
|
+
- the Hapax private runtime;
|
|
10
|
+
- a compliance certification;
|
|
11
|
+
- a replacement for human review;
|
|
12
|
+
- a warranty or support commitment;
|
|
13
|
+
- a live bridge to any external system.
|
|
14
|
+
|
|
15
|
+
## Pilot Shape
|
|
16
|
+
|
|
17
|
+
Use this order:
|
|
18
|
+
|
|
19
|
+
1. Inventory local AI-assisted development workflows.
|
|
20
|
+
2. Select one low-risk repository, fork, or sandbox.
|
|
21
|
+
3. Install `hapax-agentgov` under normal open-source intake rules.
|
|
22
|
+
4. Run `agentgov init --preset minimal` or `agentgov init --preset safe` only
|
|
23
|
+
in that review environment. In this release, installed hooks enforce by
|
|
24
|
+
exiting non-zero when they block; there is no separate CLI advisory switch.
|
|
25
|
+
5. Run `agentgov check` and `agentgov report` and keep the output as evidence.
|
|
26
|
+
6. Keep the first production rollout advisory by reviewing sandbox findings
|
|
27
|
+
before installing hooks in production repositories.
|
|
28
|
+
7. Use an AI work evidence packet for each meaningful AI-assisted change.
|
|
29
|
+
8. Promote individual hooks to production enforcement only after local review.
|
|
30
|
+
|
|
31
|
+
## License And Attribution
|
|
32
|
+
|
|
33
|
+
The package is MIT licensed. Users may use, copy, modify, merge, publish,
|
|
34
|
+
distribute, sublicense, and sell copies under the MIT license terms.
|
|
35
|
+
|
|
36
|
+
Required:
|
|
37
|
+
|
|
38
|
+
- preserve the MIT copyright and license notice;
|
|
39
|
+
- record the package version or commit used in the pilot;
|
|
40
|
+
- keep local modifications identified.
|
|
41
|
+
|
|
42
|
+
Not included:
|
|
43
|
+
|
|
44
|
+
- warranty;
|
|
45
|
+
- indemnity;
|
|
46
|
+
- guaranteed support;
|
|
47
|
+
- transfer of any private Hapax system or private research artifact.
|
|
48
|
+
|
|
49
|
+
## Security And Release Readiness
|
|
50
|
+
|
|
51
|
+
Before a production or public adoption push, collect:
|
|
52
|
+
|
|
53
|
+
- SBOM or package inventory with SPDX license identifiers;
|
|
54
|
+
- package version or commit provenance;
|
|
55
|
+
- reproducible source/archive reference where possible;
|
|
56
|
+
- OpenSSF Scorecard or equivalent repository health review;
|
|
57
|
+
- dependency vulnerability scan;
|
|
58
|
+
- secret-scan result;
|
|
59
|
+
- documented hook coverage and known limitations;
|
|
60
|
+
- human approval for any hook promoted from sandbox review to production
|
|
61
|
+
enforcement.
|
|
62
|
+
|
|
63
|
+
Recommended external frameworks for mapping:
|
|
64
|
+
|
|
65
|
+
- SPDX for license and SBOM communication;
|
|
66
|
+
- SLSA for provenance and supply-chain posture;
|
|
67
|
+
- NIST SSDF for secure software development practices;
|
|
68
|
+
- CISA Secure by Design for customer-security outcome framing.
|
|
69
|
+
|
|
70
|
+
## Support Expectations
|
|
71
|
+
|
|
72
|
+
Free adoption means the code and docs are available under the stated license.
|
|
73
|
+
It does not imply response-time guarantees, custom integration, production
|
|
74
|
+
support, security attestation, or procurement terms.
|
|
75
|
+
|
|
76
|
+
Paid support, training, enterprise policy packs, or hosted services must be
|
|
77
|
+
handled through a separate agreement. Keep public/free adoption and paid
|
|
78
|
+
support language distinct.
|
|
79
|
+
|
|
80
|
+
## Boundary Checklist
|
|
81
|
+
|
|
82
|
+
- [ ] The pilot repository is owned by the adopting organization.
|
|
83
|
+
- [ ] No private Hapax code or runtime state is imported.
|
|
84
|
+
- [ ] No confidential organization data is copied into public examples.
|
|
85
|
+
- [ ] The package version and license are recorded.
|
|
86
|
+
- [ ] The first pilot starts in a sandbox, fork, or other review environment.
|
|
87
|
+
- [ ] Findings are reviewed by a human before enforcement.
|
|
88
|
+
- [ ] Any outbound feedback is sanitized and generic.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Advisory Governance Policy Example
|
|
2
|
+
|
|
3
|
+
Use an advisory rollout before production enforcement. In `hapax-agentgov`
|
|
4
|
+
0.3.1, advisory is a process choice rather than a CLI mode: evaluate hooks in a
|
|
5
|
+
sandbox, fork, or other low-risk review environment before installing them in
|
|
6
|
+
production repositories.
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
AI-assisted development must leave enough evidence for a human reviewer to
|
|
11
|
+
understand what changed, what the AI did, and which checks passed.
|
|
12
|
+
|
|
13
|
+
## Starting Rules
|
|
14
|
+
|
|
15
|
+
- AI output is never accepted without human review.
|
|
16
|
+
- Secrets, credentials, customer data, and private personal data must not be
|
|
17
|
+
placed in prompts or public examples.
|
|
18
|
+
- `agentgov check` output is retained with the work evidence packet.
|
|
19
|
+
- Hook failures from the review environment are retained and evaluated before
|
|
20
|
+
production enforcement is added.
|
|
21
|
+
- A human owner decides whether the change is accepted, revised, rejected, or
|
|
22
|
+
escalated.
|
|
23
|
+
|
|
24
|
+
## Pilot Stages
|
|
25
|
+
|
|
26
|
+
1. Observe: run checks in a review environment and collect findings without
|
|
27
|
+
blocking production work.
|
|
28
|
+
2. Warn: make repeated failures visible to reviewers.
|
|
29
|
+
3. Enforce: block only the checks that have been reviewed and approved locally.
|
|
30
|
+
|
|
31
|
+
## Promotion Criteria
|
|
32
|
+
|
|
33
|
+
A hook can move from advisory to enforcement when:
|
|
34
|
+
|
|
35
|
+
- the failure mode is clear;
|
|
36
|
+
- false positives are understood;
|
|
37
|
+
- bypass or exception handling is documented;
|
|
38
|
+
- reviewers agree the block prevents meaningful risk;
|
|
39
|
+
- the local team knows how to recover.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# AI Work Evidence Packet Example
|
|
2
|
+
|
|
3
|
+
Use this as a starting point for documenting AI-assisted development work.
|
|
4
|
+
Adapt it to local policy before production use.
|
|
5
|
+
|
|
6
|
+
```yaml
|
|
7
|
+
type: ai_work_evidence_packet
|
|
8
|
+
schema_version: 1
|
|
9
|
+
id: aiwp-YYYYMMDD-N
|
|
10
|
+
work_context: local-repository-or-sandbox
|
|
11
|
+
human_owner: name_or_role
|
|
12
|
+
created_at: YYYY-MM-DDTHH:MM:SSZ
|
|
13
|
+
ai_tool_used: tool name
|
|
14
|
+
ai_use_mode: brainstorming | drafting | code_generation | review | testing | summarization | other
|
|
15
|
+
input_classification: public | internal | confidential | restricted | unknown
|
|
16
|
+
output_used: none | partial | substantial
|
|
17
|
+
|
|
18
|
+
review:
|
|
19
|
+
human_review_completed: true
|
|
20
|
+
reviewer: name_or_role
|
|
21
|
+
review_summary: short description
|
|
22
|
+
known_limitations:
|
|
23
|
+
- item
|
|
24
|
+
|
|
25
|
+
evidence:
|
|
26
|
+
agentgov_checks:
|
|
27
|
+
- agentgov check output retained locally
|
|
28
|
+
tests_or_checks:
|
|
29
|
+
- item
|
|
30
|
+
source_refs:
|
|
31
|
+
- local reference
|
|
32
|
+
decision_record: human decision and rationale
|
|
33
|
+
|
|
34
|
+
guardrails:
|
|
35
|
+
contains_customer_data: false
|
|
36
|
+
contains_employee_personal_data: false
|
|
37
|
+
contains_credentials: false
|
|
38
|
+
contains_unapproved_external_disclosure: false
|
|
39
|
+
requires_manager_review: false
|
|
40
|
+
requires_security_review: false
|
|
41
|
+
|
|
42
|
+
outcome:
|
|
43
|
+
status: accepted | revised | rejected | escalated
|
|
44
|
+
next_action: short next step
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- Keep organization-confidential details in the organization's own systems.
|
|
50
|
+
- Do not paste secrets, customer data, private employee information, or
|
|
51
|
+
restricted architecture into public examples.
|
|
52
|
+
- Treat AI output as untrusted until reviewed by a human owner.
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "hapax-agentgov"
|
|
3
|
-
version = "0.3.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.3.2"
|
|
4
|
+
description = "[Archived] Early prototype superseded by hapax-systems/reins — Hapax Research Lab"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
7
7
|
requires-python = ">=3.10"
|
|
8
|
-
authors = [{ name = "
|
|
8
|
+
authors = [{ name = "Hapax Research Lab", email = "hrl-han@hapaxresearch.com" }]
|
|
9
9
|
keywords = ["claude-code", "hooks", "governance", "ai-agents", "safety"]
|
|
10
10
|
classifiers = [
|
|
11
|
-
"Development Status ::
|
|
11
|
+
"Development Status :: 7 - Inactive",
|
|
12
12
|
"Intended Audience :: Developers",
|
|
13
13
|
"License :: OSI Approved :: MIT License",
|
|
14
14
|
"Programming Language :: Python :: 3",
|
|
15
15
|
"Topic :: Software Development :: Quality Assurance",
|
|
16
16
|
]
|
|
17
17
|
|
|
18
|
+
[project.urls]
|
|
19
|
+
Homepage = "https://hapaxresearch.com"
|
|
20
|
+
Repository = "https://github.com/hapax-systems/agentgov"
|
|
21
|
+
Documentation = "https://github.com/hapax-systems/reins"
|
|
22
|
+
Security = "https://github.com/hapax-systems/agentgov/blob/main/SECURITY.md"
|
|
23
|
+
|
|
18
24
|
[project.scripts]
|
|
19
25
|
agentgov = "agentgov.cli:main"
|
|
20
26
|
|
hapax_agentgov-0.3.0/PKG-INFO
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: hapax-agentgov
|
|
3
|
-
Version: 0.3.0
|
|
4
|
-
Summary: Governance hooks for AI coding agents — enforce safety, git hygiene, and project rules via Claude Code hooks.
|
|
5
|
-
Author: hapax-systems
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Keywords: ai-agents,claude-code,governance,hooks,safety
|
|
9
|
-
Classifier: Development Status :: 3 - Alpha
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
14
|
-
Requires-Python: >=3.10
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
|
|
17
|
-
# hapax-agentgov
|
|
18
|
-
|
|
19
|
-
Governance hooks for AI coding agents. Extracted from a production system running 47 hooks across 200+ agents.
|
|
20
|
-
|
|
21
|
-
Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) hooks. Enforces safety, git hygiene, and project rules automatically — before the agent acts, not after.
|
|
22
|
-
|
|
23
|
-
## Quick start
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pip install hapax-agentgov
|
|
27
|
-
cd your-project
|
|
28
|
-
agentgov init
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
This scaffolds `.claude/hooks/` with safety hooks and registers them in `.claude/settings.local.json`.
|
|
32
|
-
|
|
33
|
-
## What it does
|
|
34
|
-
|
|
35
|
-
Hooks intercept Claude Code tool calls (file edits, bash commands) and block dangerous actions before they execute:
|
|
36
|
-
|
|
37
|
-
| Hook | Category | What it blocks |
|
|
38
|
-
|------|----------|----------------|
|
|
39
|
-
| `pii-guard` | safety | Email addresses, SSNs, phone numbers, home directory paths in tracked files |
|
|
40
|
-
| `secrets-guard` | safety | AWS keys, GitHub tokens, API keys, private keys |
|
|
41
|
-
| `conflict-marker-scan` | safety | Warns when `<<<<<<<` markers appear after git merge/rebase |
|
|
42
|
-
| `safe-stash-guard` | git | `git stash pop` (use `apply + drop` instead — pop can't recover from conflicts) |
|
|
43
|
-
| `push-gate` | git | Autonomous `git push`, `gh pr create/merge` without user approval |
|
|
44
|
-
| `no-stale-branches` | git | Creating new branches when unmerged work exists |
|
|
45
|
-
| `work-resolution-gate` | workflow | Editing code on branches with no open PR |
|
|
46
|
-
| `pkg-manager-guard` | tooling | Direct `pip install` (enforces `uv` or `poetry`) |
|
|
47
|
-
| `protected-paths` | workflow | Writes to `*.pem`, `*.key`, and other sensitive file patterns |
|
|
48
|
-
|
|
49
|
-
## CLI
|
|
50
|
-
|
|
51
|
-
### `agentgov init`
|
|
52
|
-
|
|
53
|
-
Scaffold hooks into your project.
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
agentgov init # "safe" preset (recommended 6 hooks)
|
|
57
|
-
agentgov init --preset strict # all 9 hooks
|
|
58
|
-
agentgov init --preset minimal # just pii-guard + conflict-marker-scan
|
|
59
|
-
agentgov init --force # overwrite existing hook scripts
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### `agentgov check`
|
|
63
|
-
|
|
64
|
-
Validate your hook configuration.
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
agentgov check
|
|
68
|
-
# agentgov: 6 hooks configured and valid
|
|
69
|
-
# OK pii-guard.sh (PreToolUse)
|
|
70
|
-
# OK secrets-guard.sh (PreToolUse)
|
|
71
|
-
# ...
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### `agentgov report`
|
|
75
|
-
|
|
76
|
-
Show governance coverage.
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
agentgov report
|
|
80
|
-
# agentgov: 6/9 hooks active (67% coverage)
|
|
81
|
-
#
|
|
82
|
-
# Active:
|
|
83
|
-
# [safety] pii-guard: Block writes that introduce PII patterns
|
|
84
|
-
# [safety] secrets-guard: Block writes containing API keys and tokens
|
|
85
|
-
# ...
|
|
86
|
-
|
|
87
|
-
agentgov report --json # machine-readable output
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## How hooks work
|
|
91
|
-
|
|
92
|
-
Claude Code hooks are shell scripts that run before (`PreToolUse`) or after (`PostToolUse`) tool calls. They receive the tool name and input as JSON on stdin:
|
|
93
|
-
|
|
94
|
-
```json
|
|
95
|
-
{
|
|
96
|
-
"tool_name": "Edit",
|
|
97
|
-
"tool_input": {
|
|
98
|
-
"file_path": "/path/to/file.py",
|
|
99
|
-
"new_string": "API_KEY = 'sk-abc123...'"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
A hook exits 0 to allow, exits 2 to block (with a message on stderr).
|
|
105
|
-
|
|
106
|
-
## Writing custom hooks
|
|
107
|
-
|
|
108
|
-
Drop any `.sh` script in `.claude/hooks/` and register it in `.claude/settings.local.json`:
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"hooks": {
|
|
113
|
-
"PreToolUse": [
|
|
114
|
-
{
|
|
115
|
-
"matcher": "Edit|Write",
|
|
116
|
-
"hooks": [{ "type": "command", "command": ".claude/hooks/my-hook.sh" }]
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Origin
|
|
124
|
-
|
|
125
|
-
Extracted from [hapax-council](https://github.com/hapax-systems/hapax-council), a personal operating environment running 200+ AI agents with 47 governance hooks enforcing safety, privacy, git discipline, and project rules across all agent sessions.
|
|
126
|
-
|
|
127
|
-
## License
|
|
128
|
-
|
|
129
|
-
MIT
|
hapax_agentgov-0.3.0/README.md
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# hapax-agentgov
|
|
2
|
-
|
|
3
|
-
Governance hooks for AI coding agents. Extracted from a production system running 47 hooks across 200+ agents.
|
|
4
|
-
|
|
5
|
-
Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) hooks. Enforces safety, git hygiene, and project rules automatically — before the agent acts, not after.
|
|
6
|
-
|
|
7
|
-
## Quick start
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pip install hapax-agentgov
|
|
11
|
-
cd your-project
|
|
12
|
-
agentgov init
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
This scaffolds `.claude/hooks/` with safety hooks and registers them in `.claude/settings.local.json`.
|
|
16
|
-
|
|
17
|
-
## What it does
|
|
18
|
-
|
|
19
|
-
Hooks intercept Claude Code tool calls (file edits, bash commands) and block dangerous actions before they execute:
|
|
20
|
-
|
|
21
|
-
| Hook | Category | What it blocks |
|
|
22
|
-
|------|----------|----------------|
|
|
23
|
-
| `pii-guard` | safety | Email addresses, SSNs, phone numbers, home directory paths in tracked files |
|
|
24
|
-
| `secrets-guard` | safety | AWS keys, GitHub tokens, API keys, private keys |
|
|
25
|
-
| `conflict-marker-scan` | safety | Warns when `<<<<<<<` markers appear after git merge/rebase |
|
|
26
|
-
| `safe-stash-guard` | git | `git stash pop` (use `apply + drop` instead — pop can't recover from conflicts) |
|
|
27
|
-
| `push-gate` | git | Autonomous `git push`, `gh pr create/merge` without user approval |
|
|
28
|
-
| `no-stale-branches` | git | Creating new branches when unmerged work exists |
|
|
29
|
-
| `work-resolution-gate` | workflow | Editing code on branches with no open PR |
|
|
30
|
-
| `pkg-manager-guard` | tooling | Direct `pip install` (enforces `uv` or `poetry`) |
|
|
31
|
-
| `protected-paths` | workflow | Writes to `*.pem`, `*.key`, and other sensitive file patterns |
|
|
32
|
-
|
|
33
|
-
## CLI
|
|
34
|
-
|
|
35
|
-
### `agentgov init`
|
|
36
|
-
|
|
37
|
-
Scaffold hooks into your project.
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
agentgov init # "safe" preset (recommended 6 hooks)
|
|
41
|
-
agentgov init --preset strict # all 9 hooks
|
|
42
|
-
agentgov init --preset minimal # just pii-guard + conflict-marker-scan
|
|
43
|
-
agentgov init --force # overwrite existing hook scripts
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### `agentgov check`
|
|
47
|
-
|
|
48
|
-
Validate your hook configuration.
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
agentgov check
|
|
52
|
-
# agentgov: 6 hooks configured and valid
|
|
53
|
-
# OK pii-guard.sh (PreToolUse)
|
|
54
|
-
# OK secrets-guard.sh (PreToolUse)
|
|
55
|
-
# ...
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### `agentgov report`
|
|
59
|
-
|
|
60
|
-
Show governance coverage.
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
agentgov report
|
|
64
|
-
# agentgov: 6/9 hooks active (67% coverage)
|
|
65
|
-
#
|
|
66
|
-
# Active:
|
|
67
|
-
# [safety] pii-guard: Block writes that introduce PII patterns
|
|
68
|
-
# [safety] secrets-guard: Block writes containing API keys and tokens
|
|
69
|
-
# ...
|
|
70
|
-
|
|
71
|
-
agentgov report --json # machine-readable output
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## How hooks work
|
|
75
|
-
|
|
76
|
-
Claude Code hooks are shell scripts that run before (`PreToolUse`) or after (`PostToolUse`) tool calls. They receive the tool name and input as JSON on stdin:
|
|
77
|
-
|
|
78
|
-
```json
|
|
79
|
-
{
|
|
80
|
-
"tool_name": "Edit",
|
|
81
|
-
"tool_input": {
|
|
82
|
-
"file_path": "/path/to/file.py",
|
|
83
|
-
"new_string": "API_KEY = 'sk-abc123...'"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
A hook exits 0 to allow, exits 2 to block (with a message on stderr).
|
|
89
|
-
|
|
90
|
-
## Writing custom hooks
|
|
91
|
-
|
|
92
|
-
Drop any `.sh` script in `.claude/hooks/` and register it in `.claude/settings.local.json`:
|
|
93
|
-
|
|
94
|
-
```json
|
|
95
|
-
{
|
|
96
|
-
"hooks": {
|
|
97
|
-
"PreToolUse": [
|
|
98
|
-
{
|
|
99
|
-
"matcher": "Edit|Write",
|
|
100
|
-
"hooks": [{ "type": "command", "command": ".claude/hooks/my-hook.sh" }]
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Origin
|
|
108
|
-
|
|
109
|
-
Extracted from [hapax-council](https://github.com/hapax-systems/hapax-council), a personal operating environment running 200+ AI agents with 47 governance hooks enforcing safety, privacy, git discipline, and project rules across all agent sessions.
|
|
110
|
-
|
|
111
|
-
## License
|
|
112
|
-
|
|
113
|
-
MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|