repo-standards-kit 0.9.0__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.
- repo_standards_kit-0.9.0/.claude/settings.json +26 -0
- repo_standards_kit-0.9.0/.claude/skills/new-adr/SKILL.md +28 -0
- repo_standards_kit-0.9.0/.claude/skills/new-rfc/SKILL.md +30 -0
- repo_standards_kit-0.9.0/.claude/skills/promote-discovery/SKILL.md +37 -0
- repo_standards_kit-0.9.0/.claude/skills/standards-check/SKILL.md +38 -0
- repo_standards_kit-0.9.0/.claude/skills/update-handoff/SKILL.md +30 -0
- repo_standards_kit-0.9.0/.github/copilot-instructions.md +9 -0
- repo_standards_kit-0.9.0/.github/prompts/new-adr.prompt.md +18 -0
- repo_standards_kit-0.9.0/.github/prompts/new-rfc.prompt.md +20 -0
- repo_standards_kit-0.9.0/.github/prompts/promote-discovery.prompt.md +25 -0
- repo_standards_kit-0.9.0/.github/prompts/standards-check.prompt.md +21 -0
- repo_standards_kit-0.9.0/.github/prompts/update-handoff.prompt.md +23 -0
- repo_standards_kit-0.9.0/.github/pull_request_template.md +27 -0
- repo_standards_kit-0.9.0/.github/workflows/kit-guards.yml +21 -0
- repo_standards_kit-0.9.0/.github/workflows/release.yml +34 -0
- repo_standards_kit-0.9.0/.github/workflows/repo-standards.yml +57 -0
- repo_standards_kit-0.9.0/.gitignore +31 -0
- repo_standards_kit-0.9.0/AGENTS.md +74 -0
- repo_standards_kit-0.9.0/CHANGELOG.md +166 -0
- repo_standards_kit-0.9.0/CLAUDE.md +9 -0
- repo_standards_kit-0.9.0/PKG-INFO +75 -0
- repo_standards_kit-0.9.0/README.md +58 -0
- repo_standards_kit-0.9.0/ai/current-state.md +51 -0
- repo_standards_kit-0.9.0/ai/handoff.md +47 -0
- repo_standards_kit-0.9.0/ai/next-actions.md +10 -0
- repo_standards_kit-0.9.0/ai/open-questions.md +36 -0
- repo_standards_kit-0.9.0/docs/00-overview.md +32 -0
- repo_standards_kit-0.9.0/docs/02-architecture.md +103 -0
- repo_standards_kit-0.9.0/docs/04-api-and-integrations.md +62 -0
- repo_standards_kit-0.9.0/docs/07-testing.md +40 -0
- repo_standards_kit-0.9.0/docs/08-security-and-compliance.md +41 -0
- repo_standards_kit-0.9.0/docs/10-glossary.md +24 -0
- repo_standards_kit-0.9.0/docs/RELEASING.md +40 -0
- repo_standards_kit-0.9.0/docs/STANDARDS-CHECKLIST.md +55 -0
- repo_standards_kit-0.9.0/docs/STANDARDS.md +346 -0
- repo_standards_kit-0.9.0/docs/decisions/0001-record-architecture-decisions.md +43 -0
- repo_standards_kit-0.9.0/docs/decisions/0002-adopt-madr-3.md +62 -0
- repo_standards_kit-0.9.0/docs/decisions/0003-adopt-repo-profile-model.md +44 -0
- repo_standards_kit-0.9.0/docs/decisions/0004-define-ai-directory-contract.md +47 -0
- repo_standards_kit-0.9.0/docs/decisions/0005-split-discovery-and-rfcs.md +50 -0
- repo_standards_kit-0.9.0/docs/decisions/0006-adopt-agents-md-pattern.md +45 -0
- repo_standards_kit-0.9.0/docs/decisions/0007-author-ai-tool-wrappers-as-thin-shells-over-stdlib-python-scripts.md +41 -0
- repo_standards_kit-0.9.0/docs/decisions/0008-hooks-invoke-script-in-check-mode-behavior-writes-via-slash-command.md +41 -0
- repo_standards_kit-0.9.0/docs/decisions/0009-distribute-the-kit-as-a-pypi-standards-cli-with-vendored-copy-sync.md +57 -0
- repo_standards_kit-0.9.0/docs/decisions/0010-managed-region-sentinels-for-partially-kit-owned-files.md +85 -0
- repo_standards_kit-0.9.0/docs/decisions/0011-publish-to-pypi-via-github-actions-trusted-publishing.md +45 -0
- repo_standards_kit-0.9.0/docs/decisions/README.md +44 -0
- repo_standards_kit-0.9.0/docs/discovery/README.md +55 -0
- repo_standards_kit-0.9.0/docs/rfcs/0001-what-is-the-kit-s-distribution-and-upgrade-mechanism/rfc.md +124 -0
- repo_standards_kit-0.9.0/docs/rfcs/README.md +46 -0
- repo_standards_kit-0.9.0/docs/templates/README.md +55 -0
- repo_standards_kit-0.9.0/docs/templates/STANDARDS-CHECKLIST.md.template +55 -0
- repo_standards_kit-0.9.0/docs/templates/STANDARDS.md.template +26 -0
- repo_standards_kit-0.9.0/docs/templates/adr-template.md +68 -0
- repo_standards_kit-0.9.0/docs/templates/ai-starters/current-state.md +35 -0
- repo_standards_kit-0.9.0/docs/templates/ai-starters/handoff.md +29 -0
- repo_standards_kit-0.9.0/docs/templates/ai-starters/next-actions.md +14 -0
- repo_standards_kit-0.9.0/docs/templates/ai-starters/open-questions.md +17 -0
- repo_standards_kit-0.9.0/docs/templates/api-and-integrations-template.md +41 -0
- repo_standards_kit-0.9.0/docs/templates/architecture-template.md +41 -0
- repo_standards_kit-0.9.0/docs/templates/data-contract-template.md +44 -0
- repo_standards_kit-0.9.0/docs/templates/data-model-template.md +37 -0
- repo_standards_kit-0.9.0/docs/templates/deployment-template.md +41 -0
- repo_standards_kit-0.9.0/docs/templates/discovery-meeting-notes.md +42 -0
- repo_standards_kit-0.9.0/docs/templates/discovery-use-case.md +49 -0
- repo_standards_kit-0.9.0/docs/templates/environments-template.md +37 -0
- repo_standards_kit-0.9.0/docs/templates/glossary-template.md +11 -0
- repo_standards_kit-0.9.0/docs/templates/implementation-plan-template.md +44 -0
- repo_standards_kit-0.9.0/docs/templates/overview-template.md +27 -0
- repo_standards_kit-0.9.0/docs/templates/prd-template.md +47 -0
- repo_standards_kit-0.9.0/docs/templates/rfc-template.md +43 -0
- repo_standards_kit-0.9.0/docs/templates/runbook-template.md +46 -0
- repo_standards_kit-0.9.0/docs/templates/security-template.md +41 -0
- repo_standards_kit-0.9.0/docs/templates/skill-prompt-template.md +16 -0
- repo_standards_kit-0.9.0/docs/templates/skill-template.md +28 -0
- repo_standards_kit-0.9.0/docs/templates/testing-template.md +44 -0
- repo_standards_kit-0.9.0/docs/templates/versioning-policy-template.md +38 -0
- repo_standards_kit-0.9.0/docs/versioning-policy.md +48 -0
- repo_standards_kit-0.9.0/pyproject.toml +51 -0
- repo_standards_kit-0.9.0/scripts/_doc_lib/__init__.py +0 -0
- repo_standards_kit-0.9.0/scripts/_doc_lib/helpers.py +62 -0
- repo_standards_kit-0.9.0/scripts/new-doc/README.md +42 -0
- repo_standards_kit-0.9.0/scripts/new-doc/new-adr.py +96 -0
- repo_standards_kit-0.9.0/scripts/new-doc/new-rfc.py +111 -0
- repo_standards_kit-0.9.0/scripts/new-doc/test_cli.py +158 -0
- repo_standards_kit-0.9.0/scripts/new-doc/test_helpers.py +95 -0
- repo_standards_kit-0.9.0/scripts/promote-discovery/README.md +46 -0
- repo_standards_kit-0.9.0/scripts/promote-discovery/promote_discovery.py +217 -0
- repo_standards_kit-0.9.0/scripts/promote-discovery/test_promote_discovery.py +250 -0
- repo_standards_kit-0.9.0/scripts/standards-check/check.py +68 -0
- repo_standards_kit-0.9.0/scripts/standards-check/checks/__init__.py +41 -0
- repo_standards_kit-0.9.0/scripts/standards-check/checks/_text.py +25 -0
- repo_standards_kit-0.9.0/scripts/standards-check/checks/content.py +77 -0
- repo_standards_kit-0.9.0/scripts/standards-check/checks/discovery.py +61 -0
- repo_standards_kit-0.9.0/scripts/standards-check/checks/links.py +121 -0
- repo_standards_kit-0.9.0/scripts/standards-check/checks/skills.py +128 -0
- repo_standards_kit-0.9.0/scripts/standards-check/checks/structural.py +202 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_check.py +42 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_content.py +101 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_context.py +44 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_discovery.py +80 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_freshness.py +48 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_links.py +127 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_severity.py +38 -0
- repo_standards_kit-0.9.0/scripts/standards-check/test_skills.py +138 -0
- repo_standards_kit-0.9.0/scripts/update-handoff/README.md +45 -0
- repo_standards_kit-0.9.0/scripts/update-handoff/test_update_handoff.py +230 -0
- repo_standards_kit-0.9.0/scripts/update-handoff/update_handoff.py +242 -0
- repo_standards_kit-0.9.0/src/standards/__about__.py +1 -0
- repo_standards_kit-0.9.0/src/standards/__init__.py +4 -0
- repo_standards_kit-0.9.0/src/standards/cli.py +64 -0
- repo_standards_kit-0.9.0/src/standards/init.py +88 -0
- repo_standards_kit-0.9.0/src/standards/managed.py +62 -0
- repo_standards_kit-0.9.0/src/standards/manifest.py +97 -0
- repo_standards_kit-0.9.0/src/standards/marker.py +35 -0
- repo_standards_kit-0.9.0/src/standards/payload.py +29 -0
- repo_standards_kit-0.9.0/src/standards/update.py +129 -0
- repo_standards_kit-0.9.0/tests/test_cli.py +58 -0
- repo_standards_kit-0.9.0/tests/test_init.py +116 -0
- repo_standards_kit-0.9.0/tests/test_managed.py +59 -0
- repo_standards_kit-0.9.0/tests/test_manifest.py +58 -0
- repo_standards_kit-0.9.0/tests/test_marker.py +40 -0
- repo_standards_kit-0.9.0/tests/test_payload.py +18 -0
- repo_standards_kit-0.9.0/tests/test_payload_includes_checks.py +50 -0
- repo_standards_kit-0.9.0/tests/test_run_tests.py +45 -0
- repo_standards_kit-0.9.0/tests/test_update.py +144 -0
- repo_standards_kit-0.9.0/tests/test_version.py +26 -0
- repo_standards_kit-0.9.0/tests/test_version_coherence.py +74 -0
- repo_standards_kit-0.9.0/tools/check_version_coherence.py +86 -0
- repo_standards_kit-0.9.0/tools/run_tests.py +44 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"Stop": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "python scripts/update-handoff/update_handoff.py --check"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"SessionStart": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "python scripts/promote-discovery/promote_discovery.py list --check"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: new-adr
|
|
3
|
+
description: Scaffold a new MADR 3.0 ADR with the next NNNN, today's date, and the title filled in.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# new-adr
|
|
7
|
+
|
|
8
|
+
## When to invoke
|
|
9
|
+
|
|
10
|
+
Use when the user is about to record an architecture decision — typically because the
|
|
11
|
+
`AGENTS.md` end-of-session contract requires an ADR for a material technical decision,
|
|
12
|
+
or because an RFC's `Follow-ups → ADR to write` field points to a new ADR.
|
|
13
|
+
|
|
14
|
+
## How to invoke
|
|
15
|
+
|
|
16
|
+
Run from the repo root:
|
|
17
|
+
|
|
18
|
+
`python scripts/new-doc/new-adr.py "<Title of the decision>"`
|
|
19
|
+
|
|
20
|
+
The script creates `docs/decisions/<NNNN>-<slug>.md`, prints the created path, and
|
|
21
|
+
prints a paste-ready row for the manual index in `docs/decisions/README.md`.
|
|
22
|
+
|
|
23
|
+
## After scaffolding
|
|
24
|
+
|
|
25
|
+
Open the created file. Fill `deciders`, `consulted`, `informed`, the body sections,
|
|
26
|
+
and paste the printed index row into `docs/decisions/README.md`. Leave
|
|
27
|
+
`status: Proposed` until the decision is accepted. Once `status: Accepted`,
|
|
28
|
+
the body is immutable — reversal is a new ADR.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: new-rfc
|
|
3
|
+
description: Scaffold a new RFC folder with rfc.md, the next NNNN, and today as `opened`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# new-rfc
|
|
7
|
+
|
|
8
|
+
## When to invoke
|
|
9
|
+
|
|
10
|
+
Use when the user is about to open a time-boxed investigation that needs a written
|
|
11
|
+
record — typically to satisfy the `AGENTS.md` end-of-session contract item "If you ran
|
|
12
|
+
a time-boxed investigation, write or conclude an RFC", because a question can't be
|
|
13
|
+
resolved inside a single conversation and the team wants to track its approach,
|
|
14
|
+
findings, and recommendation.
|
|
15
|
+
|
|
16
|
+
## How to invoke
|
|
17
|
+
|
|
18
|
+
Run from the repo root:
|
|
19
|
+
|
|
20
|
+
`python scripts/new-doc/new-rfc.py "<Question being investigated>"`
|
|
21
|
+
|
|
22
|
+
The script creates `docs/rfcs/<NNNN>-<slug>/rfc.md` and prints the created path.
|
|
23
|
+
It does **not** create an `artifacts/` subfolder — add that yourself if the RFC
|
|
24
|
+
collects benchmarks, screenshots, or prototype code.
|
|
25
|
+
|
|
26
|
+
## After scaffolding
|
|
27
|
+
|
|
28
|
+
Open the created file. Fill `owner`, `time_box`, and the body sections. Every RFC
|
|
29
|
+
must eventually reach `status: Concluded` or `status: Abandoned`, or its question
|
|
30
|
+
must be moved to `ai/open-questions.md`. RFCs do not sit Open indefinitely.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: promote-discovery
|
|
3
|
+
description: List raw items in docs/discovery/, or flip a specific item from status raw to promoted with a promoted_to target.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# promote-discovery
|
|
7
|
+
|
|
8
|
+
## When to invoke
|
|
9
|
+
|
|
10
|
+
Use when:
|
|
11
|
+
- The SessionStart hook surfaced a "N raw items" reminder and you want to see the inventory.
|
|
12
|
+
- You just synthesized a discovery item's content into a PRD, ADR, RFC, or other structured
|
|
13
|
+
doc — to satisfy the `AGENTS.md` end-of-session contract item "If you used content from
|
|
14
|
+
`docs/discovery/`, flip its `status: raw` → `promoted`" so the audit trail stays accurate.
|
|
15
|
+
|
|
16
|
+
## How to invoke
|
|
17
|
+
|
|
18
|
+
**List raw items** (default verbose mode) from the repo root:
|
|
19
|
+
|
|
20
|
+
`python scripts/promote-discovery/promote_discovery.py list`
|
|
21
|
+
|
|
22
|
+
**Promote a specific item** (flip status: raw → promoted; set promoted_to):
|
|
23
|
+
|
|
24
|
+
`python scripts/promote-discovery/promote_discovery.py promote <path> --to <target>`
|
|
25
|
+
|
|
26
|
+
Both `<path>` and `--to <target>` are required. `<target>` must be a relative repo path
|
|
27
|
+
(no absolute paths, no `..`). The script does not require `<target>` to exist yet — you
|
|
28
|
+
often promote during the act of writing the target.
|
|
29
|
+
|
|
30
|
+
## After scaffolding
|
|
31
|
+
|
|
32
|
+
Verify the diff in the promoted file's frontmatter (`status:` line and `promoted_to:`
|
|
33
|
+
line; everything else preserved). Commit alongside the synthesized target doc.
|
|
34
|
+
|
|
35
|
+
Promotion is monotonic — once a discovery item is `promoted`, the script refuses to
|
|
36
|
+
re-promote it. If you genuinely need to un-promote, hand-edit the file and explain why
|
|
37
|
+
in the commit message.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: standards-check
|
|
3
|
+
description: Run the repo's standards checks and fix any findings before pushing or ending a session.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# standards-check
|
|
7
|
+
|
|
8
|
+
## When to invoke
|
|
9
|
+
|
|
10
|
+
Run before you finish a session that touched docs, before you push, or when CI's
|
|
11
|
+
"Structural lint" job is red. This satisfies the `AGENTS.md` end-of-session contract
|
|
12
|
+
item "Run `/standards-check` … before ending a session that touched docs."
|
|
13
|
+
|
|
14
|
+
## How to invoke
|
|
15
|
+
|
|
16
|
+
Run from the repo root:
|
|
17
|
+
|
|
18
|
+
`python scripts/standards-check/check.py`
|
|
19
|
+
|
|
20
|
+
Exit `1` with `ERROR` lines means there is work to fix. `WARN` lines are advisory and
|
|
21
|
+
do not fail CI. The output lists each finding as `[<check_id>] <file>:<line> <message>`.
|
|
22
|
+
|
|
23
|
+
## After running — how to fix, by check_id
|
|
24
|
+
|
|
25
|
+
- **`links`** — the relative link or `#anchor` doesn't resolve. Correct the path
|
|
26
|
+
(relative to the linking file) or fix the fragment to match the target heading slug.
|
|
27
|
+
- **`placeholder`** — a committed ADR/RFC still has template scaffolding. Fill the
|
|
28
|
+
`<…>`, `YYYY-MM-DD`, or `NNNN`.
|
|
29
|
+
- **`changelog`** — `CHANGELOG.md` has no `## [x.y.z]` version section; add one.
|
|
30
|
+
- **`discovery`** — a `status: promoted` item's `promoted_to:` path is missing or wrong.
|
|
31
|
+
- **`skill-format`** — a skill is missing frontmatter, its `.github/prompts/<n>.prompt.md`
|
|
32
|
+
twin, or an entry in the `AGENTS.md` `## Available skills` index. Add the missing piece.
|
|
33
|
+
- **`structural`** — a core file is missing, a profile/waiver is unset, or an ADR/RFC
|
|
34
|
+
filename/status is invalid. Add the file or a `**Waived:**` reason in `docs/STANDARDS-CHECKLIST.md`.
|
|
35
|
+
- **`ai` freshness (WARN)** — `ai/handoff.md`/`current-state.md` is stale. Run `/update-handoff`.
|
|
36
|
+
|
|
37
|
+
Re-run until `0 error(s)`. (Kit maintainers: version coherence is a separate kit-only
|
|
38
|
+
guard, `tools/check_version_coherence.py`, not covered by this skill.)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-handoff
|
|
3
|
+
description: Generate a draft ai/handoff.md from git state — frontmatter and "Recently touched" pre-filled; TL;DR, Open threads, and Don't do for the author.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# update-handoff
|
|
7
|
+
|
|
8
|
+
## When to invoke
|
|
9
|
+
|
|
10
|
+
Use when the user is about to end a session that produced meaningful change —
|
|
11
|
+
typically to satisfy the `AGENTS.md` end-of-session contract item "Write `ai/handoff.md`
|
|
12
|
+
for the next session", or because the `update-handoff` Stop hook surfaced a reminder
|
|
13
|
+
("N commits + M modified files since last handoff").
|
|
14
|
+
|
|
15
|
+
## How to invoke
|
|
16
|
+
|
|
17
|
+
Run from the repo root:
|
|
18
|
+
|
|
19
|
+
`python scripts/update-handoff/update_handoff.py`
|
|
20
|
+
|
|
21
|
+
Add `--force` to overwrite an existing handoff. The script:
|
|
22
|
+
- pre-fills frontmatter (`written:` now, `written_by:` from `git config user.name`),
|
|
23
|
+
- pre-fills "Recently touched" from `git log` since the prior handoff,
|
|
24
|
+
- leaves TL;DR, Open threads, and Don't do as placeholders for the author.
|
|
25
|
+
|
|
26
|
+
## After scaffolding
|
|
27
|
+
|
|
28
|
+
Open `ai/handoff.md`. Write the TL;DR in plain English (1–3 sentences). Replace
|
|
29
|
+
the Open threads and Don't do placeholders with the real items. Commit alongside
|
|
30
|
+
the slice's other end-of-session updates (`ai/current-state.md`, etc.).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copilot Instructions
|
|
2
|
+
|
|
3
|
+
<!-- BEGIN kit-managed: copilot-pointer (v0.6.0) -->
|
|
4
|
+
See [`AGENTS.md`](../AGENTS.md) — the canonical agent contract for this repo. Read it first.
|
|
5
|
+
<!-- END kit-managed: copilot-pointer -->
|
|
6
|
+
|
|
7
|
+
## Copilot-specific notes
|
|
8
|
+
|
|
9
|
+
- Copilot does not yet read `ai/handoff.md` automatically. When suggesting code or docs, treat `AGENTS.md` § "Canonical reading order" as the source of context.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
mode: agent
|
|
3
|
+
description: Scaffold a new MADR 3.0 ADR with the next NNNN, today's date, and the title filled in.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# new-adr
|
|
7
|
+
|
|
8
|
+
When the user asks to record an architecture decision, run this from the repo root:
|
|
9
|
+
|
|
10
|
+
`python scripts/new-doc/new-adr.py "<Title of the decision>"`
|
|
11
|
+
|
|
12
|
+
The script creates `docs/decisions/<NNNN>-<slug>.md`, prints the created path, and
|
|
13
|
+
prints a paste-ready row for the manual index in `docs/decisions/README.md`.
|
|
14
|
+
|
|
15
|
+
After scaffolding, open the created file. Fill `deciders`, `consulted`, `informed`,
|
|
16
|
+
the body sections, and paste the printed index row into `docs/decisions/README.md`.
|
|
17
|
+
Leave `status: Proposed` until the decision is accepted. Once `status: Accepted`,
|
|
18
|
+
the body is immutable — reversal is a new ADR.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
mode: agent
|
|
3
|
+
description: Scaffold a new RFC folder with rfc.md, the next NNNN, and today as `opened`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# new-rfc
|
|
7
|
+
|
|
8
|
+
When the user asks to open a time-boxed investigation that needs a written record,
|
|
9
|
+
run this from the repo root:
|
|
10
|
+
|
|
11
|
+
`python scripts/new-doc/new-rfc.py "<Question being investigated>"`
|
|
12
|
+
|
|
13
|
+
The script creates `docs/rfcs/<NNNN>-<slug>/rfc.md` and prints the created path.
|
|
14
|
+
It does **not** create an `artifacts/` subfolder — add that yourself if the RFC
|
|
15
|
+
collects benchmarks, screenshots, or prototype code.
|
|
16
|
+
|
|
17
|
+
After scaffolding, open the created file. Fill `owner`, `time_box`, and the body
|
|
18
|
+
sections. Every RFC must eventually reach `status: Concluded` or `status: Abandoned`,
|
|
19
|
+
or its question must be moved to `ai/open-questions.md`. RFCs do not sit Open
|
|
20
|
+
indefinitely.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
mode: agent
|
|
3
|
+
description: List raw items in docs/discovery/, or flip a specific item from status raw to promoted with a promoted_to target.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# promote-discovery
|
|
7
|
+
|
|
8
|
+
When the user wants to see the inventory of raw discovery items, or has just synthesized
|
|
9
|
+
a discovery item's content into a structured doc and wants to flip its status, run one
|
|
10
|
+
of these from the repo root:
|
|
11
|
+
|
|
12
|
+
**List raw items:** `python scripts/promote-discovery/promote_discovery.py list`
|
|
13
|
+
|
|
14
|
+
**Promote a specific item:** `python scripts/promote-discovery/promote_discovery.py promote <path> --to <target>`
|
|
15
|
+
|
|
16
|
+
Both `<path>` and `--to <target>` are required for the promote subcommand. `<target>` must
|
|
17
|
+
be a relative repo path (no absolute paths, no `..`). The script does not require the
|
|
18
|
+
target file to exist yet.
|
|
19
|
+
|
|
20
|
+
After promoting, verify the diff in the file's frontmatter and commit alongside the
|
|
21
|
+
synthesized target doc. Promotion is monotonic — the script refuses to re-promote.
|
|
22
|
+
|
|
23
|
+
**Note for Copilot users:** Claude Code's SessionStart hook auto-pings when raw items
|
|
24
|
+
exist at session open; Copilot Chat has no equivalent. Remember to run `list` periodically
|
|
25
|
+
to check the inventory yourself.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
mode: agent
|
|
3
|
+
description: Run the repo's standards checks and fix any findings before pushing or ending a session.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# standards-check
|
|
7
|
+
|
|
8
|
+
When finishing a session that touched docs, before pushing, or when CI's structural
|
|
9
|
+
lint is red, run this from the repo root:
|
|
10
|
+
|
|
11
|
+
`python scripts/standards-check/check.py`
|
|
12
|
+
|
|
13
|
+
Exit `1` with `ERROR` lines means there is work to fix; `WARN` lines are advisory.
|
|
14
|
+
Each finding is `[<check_id>] <file>:<line> <message>`.
|
|
15
|
+
|
|
16
|
+
Fix by check_id: `links` → correct the relative path / `#anchor`; `placeholder` → fill
|
|
17
|
+
`<…>`/`YYYY-MM-DD`/`NNNN` in the committed ADR/RFC; `changelog` → add a `## [x.y.z]`
|
|
18
|
+
section; `discovery` → fix the `promoted_to:` path; `skill-format` → add the missing
|
|
19
|
+
frontmatter / `.github/prompts/<n>.prompt.md` twin / `AGENTS.md` index entry;
|
|
20
|
+
`structural` → add the missing file or a `**Waived:**` reason; `ai` freshness → run
|
|
21
|
+
the update-handoff prompt. Re-run until `0 error(s)`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
mode: agent
|
|
3
|
+
description: Generate a draft ai/handoff.md from git state — frontmatter and "Recently touched" pre-filled; TL;DR, Open threads, and Don't do for the author.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# update-handoff
|
|
7
|
+
|
|
8
|
+
When the user is about to end a session that produced meaningful change, run this
|
|
9
|
+
from the repo root:
|
|
10
|
+
|
|
11
|
+
`python scripts/update-handoff/update_handoff.py`
|
|
12
|
+
|
|
13
|
+
(Add `--force` to overwrite an existing handoff.) The script pre-fills the handoff
|
|
14
|
+
frontmatter and "Recently touched" section from git state, leaving TL;DR, Open
|
|
15
|
+
threads, and Don't do as placeholders for the author.
|
|
16
|
+
|
|
17
|
+
After scaffolding, open `ai/handoff.md` and write the TL;DR in plain English (1–3
|
|
18
|
+
sentences). Replace the Open threads and Don't do placeholders with the real
|
|
19
|
+
items. Commit alongside the slice's other end-of-session updates.
|
|
20
|
+
|
|
21
|
+
**Note for Copilot users:** Claude Code's `update-handoff` Stop hook auto-reminds
|
|
22
|
+
when work has accumulated; Copilot Chat has no equivalent. Remember to invoke
|
|
23
|
+
this slash command yourself before ending a meaningful session.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
PR template — Standards Impact block at the bottom is enforced by the
|
|
3
|
+
`Standards check` workflow only for repos that have copied this template
|
|
4
|
+
verbatim. If you modify the headings here, update scripts/standards-check/check.py.
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
|
|
9
|
+
<!-- 1–3 sentences. What this PR changes and why. -->
|
|
10
|
+
|
|
11
|
+
## Test plan
|
|
12
|
+
|
|
13
|
+
- [ ] <how this was verified locally>
|
|
14
|
+
- [ ] <regressions to watch for>
|
|
15
|
+
|
|
16
|
+
## Standards Impact
|
|
17
|
+
|
|
18
|
+
Check each box or replace with `N/A — <reason>`. The Standards check workflow does not parse this section automatically (Slice 4 may add a check), but reviewers will look for it.
|
|
19
|
+
|
|
20
|
+
- [ ] **Docs:** Numbered doc(s) updated (which: ____) — or `N/A`.
|
|
21
|
+
- [ ] **ADR:** A material decision is captured in `docs/decisions/` — or `N/A — no material decision in this PR`.
|
|
22
|
+
- [ ] **RFC:** Any open RFC concluded by this PR (which: ____) — or `N/A`.
|
|
23
|
+
- [ ] **AI context:** `ai/current-state.md` and/or `ai/handoff.md` updated — or `N/A — state did not change`.
|
|
24
|
+
- [ ] **Discovery promoted:** Any `discovery/` items with `status: raw` synthesized in this PR are flipped to `promoted` — or `N/A`.
|
|
25
|
+
- [ ] **Testing:** New behavior covered by tests (link: ____) — or `N/A — <reason>`.
|
|
26
|
+
- [ ] **Operational:** `06-runbook.md` updated if operability changed — or `N/A`.
|
|
27
|
+
- [ ] **Standards drift:** No undocumented deviation from `docs/STANDARDS.md` introduced (or a new ADR justifies it).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Kit guards
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
coherence:
|
|
13
|
+
name: Version coherence
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.x'
|
|
20
|
+
- name: Check version coherence
|
|
21
|
+
run: python tools/check_version_coherence.py
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ['v*']
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
name: Build + publish to PyPI
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: pypi
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write # required for PyPI Trusted Publishing (OIDC)
|
|
17
|
+
contents: read
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.x'
|
|
23
|
+
- name: Verify version coherence + tag
|
|
24
|
+
env:
|
|
25
|
+
REF_NAME: ${{ github.ref_name }}
|
|
26
|
+
run: python tools/check_version_coherence.py --tag "$REF_NAME"
|
|
27
|
+
- name: Gate on the full test suite
|
|
28
|
+
run: python tools/run_tests.py
|
|
29
|
+
- name: Build sdist + wheel
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade build
|
|
32
|
+
python -m build
|
|
33
|
+
- name: Publish to PyPI (Trusted Publishing — no token)
|
|
34
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Standards check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
check:
|
|
13
|
+
name: Structural lint (v1)
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.x'
|
|
20
|
+
- name: Run standards check
|
|
21
|
+
run: python scripts/standards-check/check.py
|
|
22
|
+
|
|
23
|
+
test:
|
|
24
|
+
name: Tests (py${{ matrix.python-version }})
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
strategy:
|
|
27
|
+
fail-fast: false
|
|
28
|
+
matrix:
|
|
29
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
- name: Run all test suites
|
|
36
|
+
run: python tools/run_tests.py
|
|
37
|
+
|
|
38
|
+
build-smoke:
|
|
39
|
+
name: Build wheel + init smoke
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
- uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: '3.x'
|
|
46
|
+
- name: Build the wheel
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install --upgrade build
|
|
49
|
+
python -m build
|
|
50
|
+
- name: Install wheel into a clean venv and adopt a temp repo
|
|
51
|
+
run: |
|
|
52
|
+
python -m venv /tmp/venv
|
|
53
|
+
/tmp/venv/bin/pip install dist/*.whl
|
|
54
|
+
/tmp/venv/bin/standards init --profile library /tmp/adopted
|
|
55
|
+
test -f /tmp/adopted/docs/STANDARDS.md
|
|
56
|
+
test -f /tmp/adopted/.standards-kit.json
|
|
57
|
+
test -f /tmp/adopted/AGENTS.md
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# OS
|
|
2
|
+
.DS_Store
|
|
3
|
+
Thumbs.db
|
|
4
|
+
desktop.ini
|
|
5
|
+
|
|
6
|
+
# Editor
|
|
7
|
+
.vscode/*
|
|
8
|
+
!.vscode/extensions.json
|
|
9
|
+
.idea/
|
|
10
|
+
*.swp
|
|
11
|
+
*.swo
|
|
12
|
+
*~
|
|
13
|
+
|
|
14
|
+
# Logs / scratch
|
|
15
|
+
*.log
|
|
16
|
+
.scratch/
|
|
17
|
+
.tmp/
|
|
18
|
+
|
|
19
|
+
# AI tool caches (not the committed ai/ context — that ships with the repo)
|
|
20
|
+
.claude/cache/
|
|
21
|
+
.copilot/cache/
|
|
22
|
+
|
|
23
|
+
# Python bytecode and caches
|
|
24
|
+
__pycache__/
|
|
25
|
+
*.py[cod]
|
|
26
|
+
*$py.class
|
|
27
|
+
|
|
28
|
+
# Python build artifacts
|
|
29
|
+
dist/
|
|
30
|
+
build/
|
|
31
|
+
*.egg-info/
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
<!-- BEGIN kit-managed: agents-core (v0.9.0) -->
|
|
4
|
+
Single source of truth for AI agents working in this repository. Tool-specific files (`CLAUDE.md`, `.github/copilot-instructions.md`) are thin pointers to this document.
|
|
5
|
+
|
|
6
|
+
- Kit version: **0.9.0**
|
|
7
|
+
|
|
8
|
+
## Canonical reading order
|
|
9
|
+
|
|
10
|
+
When you start a session in a repo that follows this kit, read in this order before taking action:
|
|
11
|
+
|
|
12
|
+
1. **`docs/00-overview.md`** — what this repo is, in 1 page.
|
|
13
|
+
2. **`ai/handoff.md`** — what the last session left for you. If `written` is older than 7 days, treat as "no handoff available".
|
|
14
|
+
3. **`ai/current-state.md`** — the current truth about what works, what's in progress, what's blocked.
|
|
15
|
+
4. **`docs/STANDARDS.md`** — which profile this repo follows and any local deviations.
|
|
16
|
+
5. **`ai/next-actions.md`** — the next 1–7 things on deck.
|
|
17
|
+
6. **`ai/open-questions.md`** — unresolved questions you may need to factor in.
|
|
18
|
+
|
|
19
|
+
Only after that, dive into the code or the user's specific request.
|
|
20
|
+
|
|
21
|
+
## End-of-session contract
|
|
22
|
+
|
|
23
|
+
Before you finish a session that produced meaningful change:
|
|
24
|
+
|
|
25
|
+
- [ ] Update `ai/current-state.md` if any of the four sections changed (What works · What's in progress · What's blocked · Active environments).
|
|
26
|
+
- [ ] Write `ai/handoff.md` for the next session — TL;DR, recently touched, open threads, and **Don't do** (dead-ends to spare the next session).
|
|
27
|
+
- [ ] If you opened a new question while working, add it to `ai/open-questions.md` with a unique anchor (`#q-N`).
|
|
28
|
+
- [ ] If you closed an `ai/open-questions.md` entry, flip status to `answered` and link the ADR (if one was produced) or the resolution.
|
|
29
|
+
- [ ] If you made a material technical decision, write an ADR in `docs/decisions/` (MADR 3.0 format — see `docs/templates/adr-template.md`).
|
|
30
|
+
- [ ] If you ran a time-boxed investigation, write or conclude an RFC in `docs/rfcs/<NNNN-slug>/rfc.md`.
|
|
31
|
+
- [ ] If you used content from `docs/discovery/`, flip its `status: raw` → `promoted` and set `promoted_to:`.
|
|
32
|
+
- [ ] Run `/standards-check` (or `python scripts/standards-check/check.py`) and fix any findings before ending a session that touched docs.
|
|
33
|
+
|
|
34
|
+
## How to author each artifact type
|
|
35
|
+
|
|
36
|
+
- **ADRs:** `docs/templates/adr-template.md`. Immutable once `Accepted`. Reversal = new ADR + flip old to `Superseded by NNNN`.
|
|
37
|
+
- **RFCs:** `docs/templates/rfc-template.md`. One folder per RFC under `docs/rfcs/NNNN-slug/`. Every RFC must either spawn an ADR, be `Abandoned` with reason, or its question must be tracked in `ai/open-questions.md`.
|
|
38
|
+
- **Discovery items:** `docs/templates/discovery-meeting-notes.md` or `discovery-use-case.md`. Filename: `YYYY-MM-DD-source-topic.md`. Place in the right subfolder. Optional but encouraged frontmatter (`source`, `date_captured`, `topic`, `status`, `promoted_to`).
|
|
39
|
+
- **Skills:** `docs/templates/skill-template.md` (Claude) + `docs/templates/skill-prompt-template.md` (Copilot). Name must equal the skill's directory; add a row to the `## Available skills` index.
|
|
40
|
+
- **Numbered docs:** see `docs/STANDARDS.md` for which docs are Required/Expected/Optional/N/A for this profile.
|
|
41
|
+
|
|
42
|
+
## Standard conventions
|
|
43
|
+
|
|
44
|
+
- Date format everywhere: ISO 8601 (`YYYY-MM-DD`).
|
|
45
|
+
- Filename conventions: lowercase kebab-case for slugs.
|
|
46
|
+
- Don't edit files in `docs/decisions/` whose status is `Accepted` — write a superseding ADR instead.
|
|
47
|
+
- Don't create numbered docs marked **N/A** for this profile. If a doc is **Optional** and you skip it, no waiver is needed. If it's **Required** or **Expected** and you skip it, add a `**Waived:** <reason>` line in `docs/STANDARDS-CHECKLIST.md`.
|
|
48
|
+
<!-- END kit-managed: agents-core -->
|
|
49
|
+
|
|
50
|
+
## Available skills
|
|
51
|
+
|
|
52
|
+
| Skill | When to use |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `new-adr` | Recording a material architecture decision |
|
|
55
|
+
| `new-rfc` | Starting a time-boxed investigation |
|
|
56
|
+
| `promote-discovery` | Marking a discovery item promoted |
|
|
57
|
+
| `update-handoff` | Writing the end-of-session handoff |
|
|
58
|
+
| `standards-check` | Running the standards checks + fixing findings before pushing |
|
|
59
|
+
|
|
60
|
+
## About this repository
|
|
61
|
+
|
|
62
|
+
This is the **Team Repository Standards Kit** — a versioned set of documentation standards, templates, AI Skills + a `standards` CLI, and CI checks that other repositories adopt.
|
|
63
|
+
|
|
64
|
+
- Profile: **library** (this kit ships templates; it has no runtime, no deployment, no runbook)
|
|
65
|
+
|
|
66
|
+
### Local conventions
|
|
67
|
+
|
|
68
|
+
- This kit follows itself. Every Slice 1 decision (profile model, ADR format, RFC format, `ai/` contract, AGENTS.md pattern) is captured as an ADR in `docs/decisions/`.
|
|
69
|
+
|
|
70
|
+
### What's out of scope right now (queued slices)
|
|
71
|
+
|
|
72
|
+
- **Slice 4 (delivered):** Deeper CI enforcement — content/link/placeholder linting, SKILL.md format + parity + index guards, version-coherence, discovery checks.
|
|
73
|
+
|
|
74
|
+
Genuinely-future work (open an RFC or `ai/open-questions.md` entry before starting): external-link liveness, richer doc-freshness reporting, a `new-skill` scaffolder.
|