Skip to content

Commit 2d65310

Browse files
hyperpolymathclaude
andcommitted
chore: add agent_instructions methodology layer
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5363fc9 commit 2d65310

File tree

4 files changed

+258
-0
lines changed

4 files changed

+258
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
= Agent Instructions
4+
:toc: preamble
5+
6+
Methodology-aware configuration for AI agents. Read by any AI agent
7+
(Claude, Gemini, Copilot, etc.) at session start.
8+
9+
== Files
10+
11+
[cols="1,3"]
12+
|===
13+
| File | Purpose
14+
15+
| `methodology.a2ml`
16+
| Default mode, invariants, ring ceiling, priority weights, convergent budget
17+
18+
| `coverage.a2ml`
19+
| Session coverage tracking — what was visited, what was skipped, what has MUSTs
20+
21+
| `debt.a2ml`
22+
| Meander debt — things found but not fixed, carried between sessions
23+
|===
24+
25+
== How Agents Use These
26+
27+
1. Read `methodology.a2ml` at session start — know mode, invariants, ceiling
28+
2. Read `coverage.a2ml` — know what was visited last time, what was skipped
29+
3. Read `debt.a2ml` — know what's outstanding from previous sessions
30+
4. At session end, update `coverage.a2ml` and `debt.a2ml`
31+
32+
== Relationship to Other Files
33+
34+
* `AGENTIC.a2ml` says WHAT agents can do (permissions, gating)
35+
* `agent_instructions/` says HOW agents should work (methodology)
36+
* `bot_directives/` says what the gitbot-fleet does (fleet-specific)
37+
* `CLAUDE.md` says how Claude specifically should work (Claude-specific)
38+
39+
== Reference
40+
41+
ADR-002 in `standards/agentic-a2ml/docs/ADR-002-methodology-layer.adoc`
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# coverage.a2ml — Session coverage tracking
5+
# Updated at the end of each AI agent session.
6+
# Persists what was visited, what was skipped, and what has MUSTs.
7+
#
8+
# Reference: ADR-002 in standards/agentic-a2ml/docs/
9+
10+
[metadata]
11+
version = "1.0.0"
12+
last-updated = "2026-03-24"
13+
14+
# ============================================================================
15+
# COVERAGE STATE
16+
# ============================================================================
17+
# Updated by agents at session end. Tracks which components have been
18+
# visited and which have known MUSTs that were skipped.
19+
20+
[coverage]
21+
total-components = 0
22+
visited-components = 0
23+
coverage-percent = 0
24+
25+
# ============================================================================
26+
# VISITED COMPONENTS
27+
# ============================================================================
28+
# Component → session date + ring reached
29+
# Agents add entries as they work through components.
30+
#
31+
# Example:
32+
# [coverage.visited.emergency-room]
33+
# date = "2026-03-23"
34+
# ring = 2
35+
# fixes = 3
36+
# notes = "boot-guardian built, shutdown-marshal built"
37+
38+
# ============================================================================
39+
# SKIPPED COMPONENTS WITH MUSTS
40+
# ============================================================================
41+
# Components with known MUSTs that were not visited in the most recent session.
42+
# These become P1 inputs for the next session's Phase 0.
43+
#
44+
# Example:
45+
# [coverage.skipped-musts.session-sentinel]
46+
# priority = "P0"
47+
# issue = "56 SIGABRTs in 4 days, D-Bus race condition"
48+
# discovered = "2026-03-23"
49+
50+
# ============================================================================
51+
# CHERRY-PICKING AUDIT
52+
# ============================================================================
53+
# At session end, agents report whether they chose easy work over hard work.
54+
# This is the accountability mechanism for the weighted priority system.
55+
#
56+
# [coverage.cherry-picking]
57+
# easy-high-completed = 3
58+
# hard-high-completed = 1
59+
# easy-low-completed = 2
60+
# hard-low-deferred = 4
61+
# assessment = "Correctly prioritised — all MUST items addressed before COULDs"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# debt.a2ml — Meander debt list
5+
# Things found but not fixed. Carried between sessions.
6+
# Becomes the next session's Phase 0 input.
7+
#
8+
# Reference: ADR-002 in standards/agentic-a2ml/docs/
9+
10+
[metadata]
11+
version = "1.0.0"
12+
last-updated = "2026-03-24"
13+
14+
# ============================================================================
15+
# DEBT ITEMS
16+
# ============================================================================
17+
# Each item has: component, issue, effort (easy|medium|hard), impact (high|medium|low),
18+
# priority (should|could), and discovered date.
19+
#
20+
# Items are consumed (removed) when fixed. New items are added at session end.
21+
# The debt list prevents the "one more wave" loop — found things are persisted,
22+
# not forgotten, and not used as justification for infinite meandering.
23+
24+
# ============================================================================
25+
# SHOULD — would fix next wave
26+
# ============================================================================
27+
# These are inputs for the next session if the user says "keep going".
28+
#
29+
# Example:
30+
# [[debt.should]]
31+
# component = "system-tools/monitoring/observatory"
32+
# issue = "Stale duplicate of root observatory/"
33+
# effort = "easy"
34+
# impact = "medium"
35+
# discovered = "2026-03-23"
36+
37+
# ============================================================================
38+
# COULD — would fix eventually
39+
# ============================================================================
40+
# These are low-priority items that don't justify a session on their own.
41+
# They get picked up when an agent is in the area for other reasons.
42+
#
43+
# Example:
44+
# [[debt.could]]
45+
# component = "cicada"
46+
# issue = "RSR_OUTLINE.adoc references banned AGPL-3.0"
47+
# effort = "easy"
48+
# impact = "low"
49+
# discovered = "2026-03-23"
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# methodology.a2ml — AI agent methodology configuration
5+
# Declares how agents should approach work in this repository.
6+
# Read at session start by any AI agent (Claude, Gemini, Copilot, etc.)
7+
#
8+
# Reference: ADR-002 in standards/agentic-a2ml/docs/
9+
10+
[metadata]
11+
version = "1.0.0"
12+
last-updated = "2026-03-24"
13+
spec = "https://github.com/hyperpolymath/standards/blob/main/agentic-a2ml/docs/ADR-002-methodology-layer.adoc"
14+
15+
# ============================================================================
16+
# MODE SELECTION
17+
# ============================================================================
18+
# convergent: find gaps, fill them, build infrastructure (default for ops/infra)
19+
# divergent: find what's strongest, push it further (for research/creative)
20+
# hybrid: audit 20% of budget, then focus 80% on top MUSTs (default for most)
21+
22+
[methodology]
23+
default-mode = "hybrid"
24+
ring-ceiling = 2 # Hard ceiling for ring expansion (0-3)
25+
wave-cap = 2 # Max waves before requiring user "keep going"
26+
spike-required = true # Every session must ship code, not just designs
27+
28+
# ============================================================================
29+
# PRIORITY WEIGHTS
30+
# ============================================================================
31+
# MUST (3x): Blocking the current work → fix immediately
32+
# SHOULD (2x): Degrading quality of current work → fix if in zone
33+
# COULD (1x): Improving quality of adjacent work → add to debt list
34+
35+
[methodology.priority-weights]
36+
must = 3
37+
should = 2
38+
could = 1
39+
40+
# ============================================================================
41+
# CONVERGENT BUDGET (when mode = convergent or hybrid)
42+
# ============================================================================
43+
# How to allocate effort across work types.
44+
# Prevents over-polishing docs while structural work waits.
45+
46+
[methodology.convergent-budget]
47+
structural = 70 # % for new modules, compilation fixes, wiring, integration
48+
corrective = 20 # % for bugs found, broken imports, stale references
49+
perfective = 10 # % for SPDX headers, doc updates, formatting, style
50+
51+
# ============================================================================
52+
# UNIQUE STRENGTH (when mode = divergent)
53+
# ============================================================================
54+
# What makes this project special. Agents should DEEPEN this, not broaden it.
55+
# Customise this per project — the template default is generic.
56+
57+
[methodology.unique-strength]
58+
description = "{{PROJECT_UNIQUE_STRENGTH}}"
59+
deepen-not-broaden = true
60+
61+
# ============================================================================
62+
# DIVERGENT INVARIANTS
63+
# ============================================================================
64+
# Constraints that divergent mode must NOT violate.
65+
# These are the riverbanks — diverge within them, not across.
66+
# "Amplify uniqueness" means deepen, not broaden.
67+
#
68+
# Test before any divergent action:
69+
# "Does this deepen the existing strength, or add a parallel strength?"
70+
# If parallel → stop. Note as cross-project insight.
71+
72+
[methodology.divergent-invariants]
73+
rules = [
74+
# Customise per project. Examples:
75+
# "Idris2 only for formal verification — no Lean4, Coq, Agda",
76+
# "believe_me count must remain zero",
77+
# "FFI architecture: Idris2 → RefC → Zig → C ABI (no shortcuts)",
78+
]
79+
80+
# Optional: language invariant for the core strength
81+
# If set, divergent mode will not introduce other languages for this purpose
82+
# language-invariant = "idris2"
83+
84+
# ============================================================================
85+
# CONSTRAINT HINTS
86+
# ============================================================================
87+
# Help Phase 0 find the critical chain faster.
88+
# Updated at session end with newly discovered constraints.
89+
90+
[methodology.known-constraints]
91+
constraints = [
92+
# Customise per project. Examples:
93+
# "End-to-end build has never been verified",
94+
# "libproject.so does not exist yet — all bindings call stubs",
95+
]
96+
97+
# ============================================================================
98+
# STATE FILE VALIDATION
99+
# ============================================================================
100+
# Phase 0 reads STATE.a2ml first but it may be broken.
101+
# These rules detect corrupt/template/stale state files.
102+
103+
[methodology.state-validation]
104+
reject-if-contains = ["{{PLACEHOLDER}}", "{{PROJECT}}", "rsr-template-repo"]
105+
reject-if-project-name-mismatch = true
106+
staleness-threshold-days = 90
107+
fallback-files = ["TODO.md", "TODO.adoc", "ROADMAP.adoc", "README.adoc"]

0 commit comments

Comments
 (0)