Skip to content

Commit a3ae7df

Browse files
SpinaBuildsclaude
andcommitted
feat: initial release — Agent Discipline Standard v0.1.0
The standard (19 criteria / 6 categories), the in-agent audit skill, clean-room reference configs, a worked before/after example, and full community scaffolding (CONTRIBUTING, Code of Conduct, SECURITY, issue/PR templates, CI). Scores verified reproducible across independent blind auditors (0-1 point spread). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 parents  commit a3ae7df

24 files changed

Lines changed: 939 additions & 0 deletions

.claude-plugin/marketplace.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "agent-discipline",
3+
"description": "The Agent Discipline Standard — audit the operating discipline of a coding agent's config, from inside the agent.",
4+
"owner": {
5+
"name": "Antonio Spina"
6+
},
7+
"plugins": [
8+
{
9+
"name": "agent-discipline",
10+
"source": "./",
11+
"description": "Audit the operating discipline of a coding agent's config against the Agent Discipline Standard."
12+
}
13+
]
14+
}

.claude-plugin/plugin.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "agent-discipline",
3+
"description": "Audit the operating discipline of a coding agent's config against the Agent Discipline Standard — scored 0-100, run from inside the agent itself.",
4+
"version": "0.1.0",
5+
"author": {
6+
"name": "Antonio Spina"
7+
},
8+
"homepage": "https://github.com/SpinaBuilds/agent-discipline",
9+
"repository": "https://github.com/SpinaBuilds/agent-discipline",
10+
"license": "MIT"
11+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 2
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Bug report
3+
about: Something in the standard, skill, or templates is wrong or misbehaves
4+
title: "[bug] "
5+
labels: bug
6+
---
7+
8+
**What happened**
9+
A clear description of the problem.
10+
11+
**Where**
12+
Which file / criterion / skill step (e.g. `STANDARD.md` AD-4, `SKILL.md` Step 2).
13+
14+
**Expected vs actual**
15+
What you expected the audit/standard to do, and what it did instead. If it's a scoring issue, include the config you audited and the score you got.
16+
17+
**Reproducibility**
18+
If it's a scoring inconsistency: did it vary across runs? By how much? (The standard targets a few-points spread max.)
19+
20+
**Environment**
21+
Claude Code version, OS, install method (plugin / standalone).

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question or discussion
4+
url: https://github.com/SpinaBuilds/agent-discipline/discussions
5+
about: Ask a question or discuss the standard before filing an issue.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request / new criterion
3+
about: Propose a new criterion, dimension, or improvement
4+
title: "[proposal] "
5+
labels: enhancement
6+
---
7+
8+
**What discipline gap does this close?**
9+
Describe the engineering practice that the standard currently fails to measure.
10+
11+
**Proposed criterion**
12+
- **Presence test** (a near-deterministic "is this explicit rule present?" yes/no):
13+
- **What good looks like** (quality signal):
14+
- **Red flags**:
15+
- **Suggested category and weight** (remember: weights must still sum to 100):
16+
17+
**Behavioral (`AD-*`) or Enforcement (`EN-*`)?**
18+
Is this about a rule being *written* (behavioral) or *mechanically imposed by the harness* (enforcement)?
19+
20+
**Why it's not syntactic**
21+
Confirm this isn't already covered by a deterministic linter (agnix/cclint) — those checks are intentionally out of scope.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## What this changes
2+
3+
Brief description, and the issue it closes (e.g. `Closes #12`).
4+
5+
## Type
6+
7+
- [ ] Standard change (criterion / weight / scoring) — **changes everyone's score**
8+
- [ ] Skill change
9+
- [ ] Reference config / example
10+
- [ ] Docs / meta
11+
12+
## Checklist
13+
14+
- [ ] Weights still sum to **100** at both category and criterion level (if `STANDARD.md` changed)
15+
- [ ] Presence tests stayed near-deterministic; only quality carries judgment
16+
- [ ] The skill still *reads* `STANDARD.md` — criteria are not duplicated into it
17+
- [ ] JSON is valid and internal links resolve (CI checks both)
18+
- [ ] For a standard change: I sanity-checked reproducibility (a re-score lands within a few points)
19+
- [ ] Conventional commit messages
20+
21+
## Scope confirmation
22+
23+
This PR does one thing. If it grew beyond its title, I split it.

.github/workflows/validate.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: validate
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
validate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: JSON files are valid
15+
run: |
16+
python3 - <<'PY'
17+
import json, sys
18+
ok = True
19+
for f in ['.claude-plugin/plugin.json', '.claude-plugin/marketplace.json', 'templates/settings.reference.json']:
20+
try:
21+
json.load(open(f)); print('OK ', f)
22+
except Exception as e:
23+
print('FAIL', f, e); ok = False
24+
sys.exit(0 if ok else 1)
25+
PY
26+
27+
- name: STANDARD weights sum to 100 (both levels)
28+
run: |
29+
python3 - <<'PY'
30+
import re, sys
31+
txt = open('STANDARD.md').read()
32+
cats = [int(w) for w in re.findall(r'^### .*weight (\d+)', txt, re.M)]
33+
crit = [int(w) for w in re.findall(r'^#### .*weight (\d+)', txt, re.M)]
34+
print('categories sum =', sum(cats), '| criteria sum =', sum(crit))
35+
sys.exit(0 if sum(cats) == 100 and sum(crit) == 100 else 1)
36+
PY
37+
38+
- name: Internal markdown links resolve
39+
run: |
40+
python3 - <<'PY'
41+
import re, os, glob, sys
42+
errs = []
43+
for md in glob.glob('**/*.md', recursive=True):
44+
d = os.path.dirname(md)
45+
for m in re.findall(r'\]\((\.[^)\s]+)\)', open(md).read()):
46+
p = m.split('#')[0]
47+
if p and not os.path.exists(os.path.normpath(os.path.join(d, p))):
48+
errs.append(f'{md} -> {m}')
49+
for e in errs: print('BROKEN', e)
50+
print('broken links:', len(errs))
51+
sys.exit(0 if not errs else 1)
52+
PY

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Secrets — never commit (this repo's own AD-7 / AD-14)
2+
.env
3+
.env.*
4+
*.pem
5+
*.key
6+
credentials.json
7+
8+
# Dependencies
9+
node_modules/
10+
.pnp
11+
.pnp.js
12+
13+
# Build / cache
14+
dist/
15+
build/
16+
.cache/
17+
*.log
18+
19+
# OS
20+
.DS_Store
21+
Thumbs.db
22+
23+
# Editors
24+
.idea/
25+
.vscode/
26+
*.swp
27+
*~
28+
29+
# Local plugin test artifacts
30+
/tmp/

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented here. The format follows
4+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
5+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [0.1.0] — 2026-06-11
10+
11+
Initial release.
12+
13+
### Added
14+
- **The Agent Discipline Standard** ([`STANDARD.md`](./STANDARD.md)) — 19 criteria across 6 categories (Failure discipline, Verification, Security, Delegation & autonomy, Improvement loop, Enforcement), weights summing to 100. Two-part scoring: near-deterministic presence + bounded quality for behavioral criteria; fully deterministic checklist for enforcement criteria.
15+
- **Audit skill** (`skills/audit-setup/SKILL.md`) — runs inside Claude Code as `/agent-discipline:audit-setup`, reads the standard rather than duplicating it, and emits a 0–100 score with per-criterion evidence and concrete diffs.
16+
- **Plugin packaging**`.claude-plugin/plugin.json` + `marketplace.json` for `/plugin marketplace add`.
17+
- **Clean-room reference configs**`templates/CLAUDE.reference.md`, `templates/AGENTS.reference.md`, `templates/settings.reference.json` (score in the 🟢 band; verified 97/97/98 across three blind auditors).
18+
- **Worked example**`examples/before-after/` (a reasonable-looking config that scores 0/100, with the diffs to fix it).
19+
20+
[Unreleased]: https://github.com/SpinaBuilds/agent-discipline/compare/v0.1.0...HEAD
21+
[0.1.0]: https://github.com/SpinaBuilds/agent-discipline/releases/tag/v0.1.0

0 commit comments

Comments
 (0)