Skip to content

Commit 3ba731c

Browse files
fix: baseline defects — 6a2→descriptiles, HAR-specific contractiles (all six verbs), documented CLI surface (#111)
## What Three of the recorded baseline defects, fixed in turn (curated multi-commit series — one logical change per commit): ### 1. `chore(naming)` — 6a2 → descriptiles + real contractiles - `.machine_readable/6a2/` → `.machine_readable/descriptiles/` per the estate naming mandate; references updated in `0-AI-MANIFEST.a2ml`, `GOVERNANCE.adoc`, `.claude/CLAUDE.md`. - All six contractile verbs now exist **and describe this repository**: the four existing files were verbatim rsr-template-repo copies (wrong repo name, JS/TS-only secret scan in a Rust repo, template-drift checks, a Mustfile asserting the old `6a2/anchors` path — so `must` failed by construction). Rewritten HAR-specific; **Dustfile + Bustfile created** (the two missing canon verbs). Bust failure modes reference the real test surface; Must gains a `no-deprecated-6a2` regression guard; Intentfile now carries the actual north star (ADR-0002/0003, arghda track #104). ### 2. `docs` — crate-count drift README/EXPLAINME/ROADMAP said "7 crates"; the workspace has 8 since `har-abi` (#109). Also reflects har-abi's implemented+tested status in the README ABI row (Idris2 stubs stay honestly marked scaffold). ### 3. `feat(cli)` — documented route-management surface har-cli was a 3-command demo with zero tests against a documented `list/add/remove/inspect` surface. Now config-backed: `--config` file bootstrap, add/remove with validation and orphan-rule cleanup, inspect with rule cross-references, `route --tag` dry-runs, `default_strategy` honoured from config. 8 unit tests; clippy `-D warnings` clean; every subcommand smoke-tested e2e against a real config file. Note: the "4/7 routing strategies are dead placeholders" defect from the same list was already fixed by a prior session (all seven strategies implemented and tested in har-router) — verified, nothing to do. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent e175be3 commit 3ba731c

20 files changed

Lines changed: 842 additions & 181 deletions

.claude/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The following files in `.machine_readable/` contain structured project metadata:
4141
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
4242
| **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Deno APIs |
4343
| **Nickel** | Configuration language | For complex configs |
44-
| **Guile Scheme** | State/meta files | .machine_readable/6a2/STATE.a2ml, .machine_readable/6a2/META.a2ml, .machine_readable/6a2/ECOSYSTEM.a2ml |
44+
| **Guile Scheme** | State/meta files | .machine_readable/descriptiles/STATE.a2ml, .machine_readable/descriptiles/META.a2ml, .machine_readable/descriptiles/ECOSYSTEM.a2ml |
4545
| **Julia** | Batch scripts, data processing | Per RSR |
4646
| **OCaml** | AffineScript compiler | Language-specific |
4747
| **Ada** | Safety-critical systems | Where required |

.github/workflows/secret-scanner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ jobs:
1919
# `timeout-minutes` is NOT permitted here and makes GitHub reject the whole
2020
# workflow (startup_failure on every push). The timeout belongs inside the
2121
# reusable workflow in hyperpolymath/standards, not on the caller.
22-
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@c4d24103506d9519ef87047eaabc3d5f5efaccd0
22+
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@db12a6ad3ef9076d5f7bdcf98d7d15cf8547555a
2323
secrets: inherit
Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Adjustfile — Drift-tolerance contract for rsr-template-repo
2+
# Adjustfile — Drift-tolerance contract for hybrid-automation-router
33
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
#
55
# Cumulative-drift catchment: tolerance bands + corrective actions.
@@ -8,65 +8,57 @@
88
# Fix with: adjust fix (applies deterministic patches; advisory otherwise)
99

1010
@abstract:
11-
Drift tolerances and corrective actions for rsr-template-repo. Unlike
12-
MUST (hard gate), ADJUST tracks cumulative drift against tolerance bands
13-
and proposes corrective actions. Advisory — it warns and trends, it does
14-
not block.
11+
Drift tolerances and corrective actions for hybrid-automation-router (HAR).
12+
Unlike MUST (hard gate), ADJUST tracks cumulative drift against tolerance
13+
bands and proposes corrective actions. Advisory — it warns and trends, it
14+
does not block.
1515
@end
1616

17-
## Template Drift
18-
19-
### placeholder-drift
20-
- description: Template placeholders should be replaced when copied
21-
- tolerance: 0 placeholder markers in copied repos
22-
- corrective: Search and replace all {{PLACEHOLDER}} markers
23-
- severity: advisory
24-
- notes: This check only applies to repos that copied from this template
17+
## Documentation Drift
2518

26-
### template-version-drift
27-
- description: Template version should match RSR spec version
28-
- tolerance: Template version matches current RSR spec
29-
- corrective: Update template to match latest RSR spec
19+
### crate-count-accuracy
20+
- description: Docs stating the crate count must match the actual workspace
21+
- tolerance: Documented count equals `ls crates | wc -l`
22+
- corrective: Update README/ROADMAP crate counts when the workspace changes
3023
- severity: advisory
24+
- notes: Historical drift — "8 crates" claims while the workspace held 7
3125

32-
## Documentation Drift
33-
34-
### readme-completeness
35-
- description: README should document all template features
36-
- tolerance: README covers all contractiles and directory structure
37-
- corrective: Update README.adoc with missing sections
26+
### planned-vs-present-dirs
27+
- description: Directories documented as done must exist; absent ones must be marked planned
28+
- tolerance: panels/ and services/ status in docs matches the filesystem
29+
- corrective: Demote absent artefacts to "planned" in README/ROADMAP
3830
- severity: advisory
3931

4032
### example-accuracy
41-
- description: Examples in documentation should match actual template content
42-
- tolerance: All code examples in docs are accurate
33+
- description: Code examples in documentation should match actual crate APIs
34+
- tolerance: All examples compile against the current workspace
4335
- corrective: Audit and fix examples in documentation
4436
- severity: advisory
4537

4638
## Structural Drift
4739

48-
### contractile-sync
49-
- description: All contractiles should have matching a2ml and ncl implementations
50-
- tolerance: Every .a2ml has a corresponding .ncl
51-
- corrective: Generate missing .ncl files from .a2ml
40+
### abi-wiring-honesty
41+
- description: ABI/FFI artefacts claimed as wired must be consumed by a crate
42+
- tolerance: Every src/abi spec is referenced from build.rs, a crate, or marked scaffold
43+
- corrective: Mark unwired specs as scaffold in docs, or wire them
5244
- severity: advisory
5345

5446
### no-broken-symlinks
55-
- description: No broken symbolic links in template structure
47+
- description: No broken symbolic links in the repository
5648
- tolerance: 0 broken symlinks
57-
- corrective: Run symlink-check script
49+
- corrective: Remove or repoint broken links
5850
- severity: advisory
5951

60-
## Accessibility Drift
52+
## Style Drift
6153

6254
### adoc-not-md
63-
- description: Template docs should prefer AsciiDoc
64-
- tolerance: New prose docs are *.adoc
65-
- corrective: Convert any new *.md to *.adoc
55+
- description: Prose docs should prefer AsciiDoc
56+
- tolerance: New prose docs are *.adoc (README.md is a deliberate exception)
57+
- corrective: Convert any new *.md prose to *.adoc
6658
- severity: advisory
6759

6860
### spdx-header-consistency
69-
- description: All template files have correct SPDX headers
70-
- tolerance: 0 files missing SPDX-License-Identifier
71-
- corrective: Add SPDX headers to files that need them
61+
- description: All source files have correct SPDX + Owner headers
62+
- tolerance: 0 files missing SPDX-License-Identifier (see AGENT-HEADERS.md)
63+
- corrective: Add SPDX/Owner headers to files that need them
7264
- severity: advisory
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Bustfile — failure mode contractile for hybrid-automation-router
3+
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
#
5+
# Verb: bust
6+
# Semantics: Every declared failure mode must have a working recovery path
7+
# that has been exercised. Status moves:
8+
# declared → drilled (probe run) → verified (recovery confirmed)
9+
# or → failing (recovery broken)
10+
11+
@abstract:
12+
Failure modes for hybrid-automation-router (HAR): the routing engine's
13+
no-target, unhealthy-target, and queue-backpressure paths, plus contractile
14+
format integrity. Probes reference the repository's real test surface so a
15+
drill is a runnable command, not a fiction.
16+
@end
17+
18+
## Failure Modes
19+
20+
### routing-no-eligible-target
21+
- class: routing
22+
- description: An event arrives whose category/capabilities no registered target can satisfy
23+
- injection_probe: "cargo test -p har-router test_no_matching_target"
24+
- recovery_probe: "cargo test -p har-dispatch"
25+
- expected_recovery_time_seconds: 5
26+
- status: declared
27+
- notes: route() must return Error::NoTarget (never panic); dispatch layer owns the dead-letter path
28+
29+
### primary-target-unhealthy
30+
- class: routing
31+
- description: The preferred target is unhealthy and traffic must move to a fallback
32+
- injection_probe: "cargo test -p har-router failover_primary_and_ordered_fallback_chain"
33+
- recovery_probe: "cargo test -p har-router"
34+
- expected_recovery_time_seconds: 5
35+
- status: declared
36+
- notes: Failover strategy emits the primary plus an ordered fallback chain in alternatives
37+
38+
### dispatch-queue-backpressure
39+
- class: dispatch
40+
- description: The target queue saturates and backpressure must engage without event loss
41+
- injection_probe: "cargo test -p har-dispatch"
42+
- recovery_probe: "cargo test --workspace"
43+
- expected_recovery_time_seconds: 30
44+
- status: declared
45+
- notes: Queue semantics follow the proven-queueconn ABI (src/abi/ProvenQueue.idr); dead-letter handling covers rejects
46+
47+
### contractile-parse-error
48+
- class: contractile_format
49+
- description: A contractile file fails to parse due to syntax errors
50+
- injection_probe: "echo 'invalid syntax' >> .machine_readable/contractiles/Intentfile.a2ml"
51+
- recovery_probe: "git checkout .machine_readable/contractiles/Intentfile.a2ml"
52+
- expected_recovery_time_seconds: 5
53+
- status: declared
54+
- notes: All .a2ml files should be valid A2ML; the dogfood gate validates manifests in CI
55+
56+
### workflow-pin-drift
57+
- class: ci
58+
- description: A pinned reusable-workflow SHA in .github/workflows goes stale or breaks (the d135b05 class)
59+
- injection_probe: "grep -rn 'hyperpolymath/standards' .github/workflows/ | head -5"
60+
- recovery_probe: "gh run list --branch main --limit 5"
61+
- expected_recovery_time_seconds: 600
62+
- status: declared
63+
- notes: Recovery is a pin bump to a known-green standards SHA; see estate CI-red master-cause records
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Dustfile — Cleanup and hygiene contract for hybrid-automation-router
3+
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
#
5+
# Verb: dust
6+
# Semantics: What should be cleaned up. Housekeeping, not blockers.
7+
8+
@abstract:
9+
Cleanup and hygiene items for hybrid-automation-router (HAR). Maintenance
10+
tasks that keep the repository tidy; none of these block CI on their own.
11+
@end
12+
13+
## Stale Files
14+
15+
### no-build-artifacts-tracked
16+
- description: No Cargo build artifacts tracked in git
17+
- run: test -z "$(git ls-files target/ 2>/dev/null)"
18+
- severity: warning
19+
20+
### no-merge-leftovers
21+
- description: No merge/patch leftovers (*.orig, *.rej) anywhere
22+
- run: test -z "$(find . -name '*.orig' -o -name '*.rej' 2>/dev/null | grep -v '^./.git/')"
23+
- severity: warning
24+
25+
### no-example-placeholders
26+
- description: No example placeholder files (EXAMPLE-, SAMPLE-) in contractiles/
27+
- run: test -z "$(find .machine_readable/contractiles/ -name 'EXAMPLE-*' -o -name 'SAMPLE-*' 2>/dev/null)"
28+
- severity: warning
29+
30+
## Format Duplicates
31+
32+
### no-duplicate-readme-format
33+
- description: Only one README format in contractiles/ (.adoc canonical)
34+
- run: test ! -f .machine_readable/contractiles/README.md
35+
- severity: info
36+
37+
## Naming Hygiene
38+
39+
### no-deprecated-6a2-references
40+
- description: No prose/path references to the deprecated 6a2 name outside Cargo.lock checksums
41+
- run: test -z "$(grep -rl '6a2' --exclude-dir=.git --exclude-dir=target --exclude=Cargo.lock --exclude=Dustfile.a2ml --exclude=Mustfile.a2ml . 2>/dev/null)"
42+
- severity: warning
43+
- notes: Canon is descriptiles (see standards/CANONICAL-NAMES.adoc); migrate on sight
44+
45+
### panels-are-panels
46+
- description: Dashboard panels are called "panels", never "panes"
47+
- run: test -z "$(grep -rniw 'panes' docs/ panels/ 2>/dev/null | grep -iv 'window panes')"
48+
- severity: info
49+
50+
## Documentation Hygiene
51+
52+
### template-placeholder-trend
53+
- description: Track unexpanded {{...}} template markers outside deliberate exemplars
54+
- run: sh -c "grep -rl '{{' docs/ 2>/dev/null | wc -l"
55+
- severity: info
56+
- notes: Which files stay as literal exemplars is an open owner decision; this only trends the count
Lines changed: 57 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Intentfile (A2ML Canonical) — north-star contractile for rsr-template-repo
2+
# Intentfile (A2ML Canonical) — north-star contractile for hybrid-automation-router
33
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
#
5-
# Paired runner: intend.ncl
6-
# Verb: intend
5+
# Verb: intend
76
#
87
# Semantics: North-star contractile. Declares BOTH concrete committed
98
# next-actions AND horizon aspirations the project wishes to
@@ -20,80 +19,93 @@
2019
# contractile for hard gates.
2120

2221
@abstract:
23-
North-star contractile for rsr-template-repo. This repository is the
24-
canonical template for Rhodium Standard Repository compliance. It provides
25-
the scaffold that all hyperpolymath repos should copy and customize.
22+
North-star contractile for hybrid-automation-router (HAR). HAR is a
23+
pluggable routing engine that dispatches automation events from sources to
24+
targets; its strategic direction (ADR-0002) is an automation interlingua —
25+
a tool-neutral meta-model carried on A2ML that doubles as an execution IR —
26+
letting heterogeneous automation estates hand off and resume across each
27+
other.
2628
@end
2729

2830
## Purpose
2931

30-
The rsr-template-repo serves as the master template for all hyperpolymath
31-
repositories. It contains the complete set of contractile files, machine-readable
32-
specifications, and governance documentation that define the Rhodium Standard.
33-
34-
Every new repository in the hyperpolymath estate should be initialized by
35-
copying this template and substituting the placeholder values with
36-
repo-specific content.
32+
HAR routes automation events to the best target (rpa-elysium first-class)
33+
via composable strategies, and is growing a declarative surface: translate
34+
between desired routing state and ordered dispatch (Phase 2A), then
35+
generalise to cross-tool handoff and federation (Phase 2B), with software
36+
installation & package management as the first concrete resource domain
37+
(Phase 2C, ADR-0003 ladder).
3738

3839
## Anti-Purpose
3940

4041
This repository is NOT:
41-
- A general-purpose project scaffold for external use (hyperpolymath-only)
42-
- A replacement for per-repo customization (all files must be bespoke)
43-
- A static template that never changes (evolves with RSR spec)
44-
- A runtime library or framework (build-time only)
42+
- A replacement for incumbent automation tools (Puppet/Salt/Terraform/
43+
Ansible) — replacement is out of scope and sponsor-gated (ADR-0002)
44+
- An RPA engine — it routes to rpa-elysium, it does not drive UIs itself
45+
- A general message broker — queue semantics follow the proven-queueconn
46+
ABI; NATS is a feature-gated transport, not the product
47+
- A package manager — the 2C ladder subsumes install functionality behind
48+
the meta-model; incumbent managers are wrapped last, not rebuilt
4549

4650
## If In Doubt
4751

4852
If you are unsure whether a change is in scope, ask. Sensitive areas:
53+
- src/abi/ (Idris2 + Ephapax normative specs — parallel-track discipline)
4954
- .machine_readable/ contractile definitions
50-
- RSR specification files
51-
- Governance templates
52-
- License policy documents
55+
- docs/decisions/ (ADRs record owner-ratified direction)
56+
- Routing strategy semantics (deterministic selection is load-bearing)
5357

5458
## Committed Next-Actions
5559

56-
### repo-initialization
57-
- description: Provide just copy-and-substitute template for new repos
58-
- probe: test -f scripts/init-repo.sh
59-
- status: done
60-
- notes: Run with source scripts/init-repo.sh <new-repo-name>
60+
### phase-2a-meta-model-skeleton
61+
- description: Meta-model + A2ML interchange dialect + two-level IR (graph ⇄ plan) proven on HAR's own routing domain
62+
- probe: test -d crates/har-metamodel
63+
- status: declared
64+
- notes: The de-risking gate for everything downstream (ADR-0002); Idris2 spec and Rust IR as parallel tracks
6165

62-
### contractile-completeness
63-
- description: Every RSR contractile has an a2ml and ncl implementation
64-
- probe: ls .machine_readable/contractiles/*.a2ml | wc -l | grep -q "^6$"
65-
- status: in_progress
66-
- notes: Currently 6 contractile verbs: intend, must, trust, adjust, bust, dust
66+
### phase-2c-tier-1-managerless
67+
- description: Regularise package-manager-less installs (curl|sh, tarballs, make install) — issue #97
68+
- probe: gh issue view 97 --json state -q .state | grep -q CLOSED
69+
- status: declared
70+
- notes: Gated on the 2A skeleton; flagship workload = prover/solver/toolchain centralisation (#106)
6771

68-
### automation-scripts
69-
- description: All repetitive tasks have just recipes
70-
- probe: grep -c "^# " Justfile | grep -q "^[6-9][0-9]*$"
71-
- status: in_progress
72+
### routing-strategies-complete
73+
- description: All seven routing strategies implemented with deterministic selection
74+
- probe: cargo test -p har-router
75+
- status: done
76+
- notes: RoundRobin/WeightedRandom/LeastLoaded/Failover landed 2026-07-07; route() honours the configured strategy
77+
78+
### cli-documented-surface
79+
- description: har-cli exposes the documented route-management surface (list, add, remove, inspect) with tests
80+
- probe: cargo test -p har-cli
81+
- status: done
82+
- notes: Config-backed list/add/remove/inspect + dry-run route/status landed 2026-07-07; 8 unit tests + e2e smoke
7283

7384
## Wishes
7485

7586
### Near Horizon
7687

77-
#### cross-repo-validation
78-
- description: Tooling to validate all repos against RSR spec
79-
- horizon: near
80-
- status: declared
81-
82-
#### automated-substitution
83-
- description: Script to automate repo-specific substitution in template
88+
#### arghda-proof-pipeline-pilot
89+
- description: arghda-core as an estate-internal front-end adapter — ladder pipelines over proof obligations (issue #104)
8490
- horizon: near
8591
- status: declared
92+
- notes: Owner decisions D1–D3 pending; no meta-model extension required
8693

8794
### Mid Horizon
8895

89-
#### formal-verification
90-
- description: Idris2 proofs for all critical contractile invariants
96+
#### puppet-salt-flagship-handoff
97+
- description: Puppet-in → A2ML → Salt-out handoff of a partially-realised estate (Phase 2B flagship)
98+
- horizon: mid
99+
- status: declared
100+
101+
#### formal-stack-load-bearing
102+
- description: Ephapax exactly-once ownership + proven-FSM lifecycle + Idris2 invariants wired end-to-end, not decorative
91103
- horizon: mid
92104
- status: declared
93105

94106
### Far Horizon
95107

96-
#### ecosystem-visualization
97-
- description: Interactive graph of all hyperpolymath repos and dependencies
108+
#### lingua-franca-surface-language
109+
- description: Human-authored router language over the meta-model; N front-ends + M back-ends replace N×M translators
98110
- horizon: far
99111
- status: declared

0 commit comments

Comments
 (0)