From 6e305f4f47c08d0bf4b9fb3e6fe7aaf9a609e2ea Mon Sep 17 00:00:00 2001 From: tegwick Date: Mon, 22 Jun 2026 23:34:58 +0200 Subject: [PATCH] Complete State Hub bootstrap workplans (WP-0001) - Review integration files; fill SCOPE where templated - Document dev workflow in stack-and-commands.md - Seed WP-0002 implementation workplan; mark bootstrap finished - Hub sync via fix-consistency --- .claude/rules/stack-and-commands.md | 19 +++++++------ workplans/AUDIT-WP-0001-statehub-bootstrap.md | 17 ++++++++--- .../AUDIT-WP-0002-pluggable-audit-backend.md | 28 +++++++++++++++++++ 3 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 workplans/AUDIT-WP-0002-pluggable-audit-backend.md diff --git a/.claude/rules/stack-and-commands.md b/.claude/rules/stack-and-commands.md index dc53ac6..1391d45 100644 --- a/.claude/rules/stack-and-commands.md +++ b/.claude/rules/stack-and-commands.md @@ -1,19 +1,20 @@ ## Stack - -- **Language:** -- **Key deps:** +- **Language:** Python 3.11+ +- **Key deps:** stdlib + pytest (see `pyproject.toml`) ## Dev Commands ```bash -# TODO: Fill in the standard commands for this repo - -# Install dependencies +# Install (editable) +pip install -e ".[dev]" # or: python3 -m pip install pytest # Run tests +make test +python3 -m pytest -q -# Lint / type check - -# Build / package (if applicable) +# Mock audit backend smoke / cleanup +make mock-audit-smoke +make mock-audit-cleanup +python3 -m audit_core emit --help ``` diff --git a/workplans/AUDIT-WP-0001-statehub-bootstrap.md b/workplans/AUDIT-WP-0001-statehub-bootstrap.md index bd8fc27..6c5a78b 100644 --- a/workplans/AUDIT-WP-0001-statehub-bootstrap.md +++ b/workplans/AUDIT-WP-0001-statehub-bootstrap.md @@ -4,7 +4,7 @@ type: workplan title: "Bootstrap State Hub integration" domain: infotech repo: audit-core -status: ready +status: finished owner: codex topic_slug: custodian created: "2026-06-22" @@ -20,11 +20,14 @@ Reliable multi-tenant auto setup audit capability. ```task id: AUDIT-WP-0001-T01 -status: todo +status: done priority: high state_hub_task_id: "59896d6b-85ed-455d-9bd4-b546a050205e" + ``` +Result 2026-06-22: INTENT.md and SCOPE.md reviewed; AGENTS.md and brief confirmed. + Review `INTENT.md`, `SCOPE.md`, `AGENTS.md`, and `.custodian-brief.md`. Replace generated placeholders with repo-specific facts where needed. @@ -32,11 +35,14 @@ Replace generated placeholders with repo-specific facts where needed. ```task id: AUDIT-WP-0001-T02 -status: todo +status: done priority: high state_hub_task_id: "f74d7033-a20b-45da-9d0a-23426e60403e" + ``` +Result 2026-06-22: Documented Python/pytest workflow in stack-and-commands.md. + Identify the repo's install, test, lint, build, and run commands. Add or refine those commands in the agent instructions so future coding sessions can verify changes confidently. @@ -45,11 +51,14 @@ changes confidently. ```task id: AUDIT-WP-0001-T03 -status: todo +status: done priority: medium state_hub_task_id: "5df0cd46-9193-48a0-bd59-0e6acbc56270" + ``` +Result 2026-06-22: Created AUDIT-WP-0002. + Create the first implementation workplan for the repository's most important next change. After workplan file updates, run from `~/state-hub`: diff --git a/workplans/AUDIT-WP-0002-pluggable-audit-backend.md b/workplans/AUDIT-WP-0002-pluggable-audit-backend.md new file mode 100644 index 0000000..38c7d7b --- /dev/null +++ b/workplans/AUDIT-WP-0002-pluggable-audit-backend.md @@ -0,0 +1,28 @@ +--- +id: AUDIT-WP-0002 +type: workplan +title: "Pluggable audit backend contract" +domain: infotech +repo: audit-core +status: ready +owner: codex +topic_slug: custodian +created: "2026-06-22" +updated: "2026-06-22" +state_hub_workstream_id: "14725dbf-16ae-43e5-bf52-3f93238cf264" +--- + +# Pluggable audit backend contract + +Define the replaceable audit backend interface beyond the mock JSONL writer and document retention guarantees. + +## Author backend interface contract + +```task +id: AUDIT-WP-0002-T01 +status: todo +priority: high +state_hub_task_id: "588ac6fa-eb41-49ce-8a1c-850d5791de0b" +``` + +Document `AuditBackend` protocol, event schema, retention policy, and migration path from the mock file backend in `docs/` or module docstrings.