agentleFS
bks-labbks-lab/open-bridge/skills/bridge-learn/SKILL.md

bridge-learn

Skill13 starsChanged 13 days agoMITView on GitHub

Review surface for Bridge Learning-Loop improvement proposals: lists pending suggestions by severity, walks through accept/reject/edit/defer, applies accepted diffs via commit. Auto-surfaces in /briefing when proposals pile up. Trigger: "/bridge-learn", "review proposals", "pending proposals", "what did we learn", "improvement queue".

  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

25 rules. About 0 are common, 10 are distinctive, and 15 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 15

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never auto-apply: Every accepted proposal is materialized through a git commit on user/<name>, audit-trail.md records it, git revert is …

    line 27
  2. Very specific:

    If diff_preview is set AND is a literal diff/patch:

    line 129
  3. Very specific:

    If diff_preview is descriptive prose (not literal diff):

    line 135
  4. Distinctive:

    Ask user: "Should I write the patch now?

    line 136
  5. Distinctive:

    If yes: generate patch based on proposal body, show preview, then apply

    line 137
  6. Distinctive:

    If edit: user can refine the patch interactively

    line 138
  7. Distinctive:

    Verify target file is valid (syntax-check YAML if YAML, schema if defined)

    line 139
  8. Very specific:

    If user accepts commit: set status: implemented in the proposal's frontmatter, then git commit the staged changes PLUS the moved proposal …

    line 155
  9. Very specific:

    Upstream hint (scope: core only): if the accepted proposal has scope: core, the improvement is by definition generic — offer it to the …

    line 171
  10. Very specific:

    If yes: hand off to skills/bridge-contribute/references/workflow.md with the just-created commit as the candidate.

    line 179
  11. Distinctive:

    Ask: "One-line reason? (why reject — will be logged in audit-trail)"

    line 185
  12. Very specific:

    Update proposal frontmatter: status: rejected, rejected_at:, reject_reason:

    line 187
  13. Distinctive:

    Ask: "Defer until when? (e.g.

    line 192
  14. Very specific:

    Update proposal frontmatter: status: deferred + defer_until: <user-input>

    line 193
  15. Very specific:

    Leave file in work/_learning/proposals/ (don't move — defer means "still pending later")

    line 194
  16. Very specific:

    After edit: re-validate frontmatter against _schema.proposal.yaml

    line 200
  17. Distinctive:

    No state change. Move to next proposal.

    line 206
  18. Very specific:

    When invoked by /briefing or /bridge-learn summary:

    line 220
  19. Distinctive:

    No interactive walk. Just numbers + pointer.

    line 229
  20. Very specific:

    Run python3 scripts/learning-ledger.py recurrences: every implemented proposal whose target.path shows up in a newer proposal, postmortem …

    line 261
  21. Distinctive:

    Before any action, validate the proposal file:

    line 298
  22. Very specific:

    If target.action: edit or delete: target file must exist

    line 303
  23. Very specific:

    If target.action: create: target file must NOT exist

    line 304
  24. Very specific:

    If validation fails: show clear error + offer to repair via edit action.

    line 306
  25. Distinctive:

    Use imperative present tense ("add", "tighten", "remove") — never "added" or "adding".

    line 323

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bridge Learn — Review Surface for Improvement Proposals

/bridge-learn is the Layer-3 edge of the Bridge Learning-Loop architecture (see work/_learning/README.md). It consumes proposals written by task-close-postmortem (Phase 1) or /bridge-audit recurring findings (Phase 3) and walks the user through accept/reject decisions.

Never auto-apply. Every accepted proposal is materialized through a git commit on user/<name>, audit-trail.md records it, git revert is always the rollback path.

When to use

TriggerMode
User says /bridge-learn / "review proposals" / "learn review"Interactive — full walk-through
/briefing skill invokes (Fridays, when pending ≥ threshold)Summary — count + 1-line list, no walk
User says /bridge-learn listList-only — no actions, just an overview
User says /bridge-learn trendsTrends — recurring + sleeping skills, no proposals
User says /bridge-learn <proposal-id>Single — go directly to that proposal

Inputs

  • work/_learning/proposals/*.md — all pending proposals
  • work/_learning/audit-trail.md — lifecycle log (for statistics)
  • work/_learning/audit-history/ — Phase 3, for trends section
  • bridge-config.yaml.learning — thresholds (auto_surface_threshold etc.)
  • (Optional) work/_learning/skill-usage.jsonl — Phase 4, for "sleeping skills"

Interactive walk-through

Header

═══ Bridge Learning Review — 2026-05-13 ═══

📋 Pending Proposals (N)
  P0  <id-1>                 (<source-type>)
  P1  <id-2>                 (<source-type>)
  P2  <id-3>                 (<source-type>)
  ...

📈 Trends (last 30d)              [if audit-history populated]
  Audit findings:  P0=0  P1=12→8  P2=23→27  P3=5
  Skills inactive: <N> of <total>  [if skill-usage populated]
  Task estimate-vs-actual: median 1.4x (vs 1.2x last month)

🔁 Recurring patterns (≥3 occurrences)
  - <pattern-1>  [→ proposal/audit-recurring exists]
  - <pattern-2>  [new — consider Standing-Order]

→ Review proposals one by one? [y/N]
→ Or: trends / list / quit

Sort proposals by:

  1. Severity (P0 first, then P1, P2, P3)
  2. Within severity: oldest created first
  3. Within same date: alphabetical by id

Per-proposal view

╭─ Proposal: <id> ──────────────────────────────────────╮
│                                                       │
│ Severity: <P0-P3>   Status: pending   Scope: <scope>  │
│ Source: <type> (<task-slug or audit-ref>)             │
│ Created: <YYYY-MM-DD>                                 │
│                                                       │
│ Evidence:                                             │
│   <list of source.evidence pointers>                  │
│                                                       │
│ Target: <type>/<action> — <path>                      │
│                                                       │
│ Body (excerpt or full if <50 lines):                  │
│   <markdown body of proposal>                         │
│                                                       │
│ Proposed diff (if diff_preview set):                  │
│   <diff_preview block>                                │
│                                                       │
│ Prior rejections (if prior_rejections set):           │
│   <id>: <reason>                                      │
│                                                       │
│ Verification (if verification set):                   │
│   <kind>: <command>                                   │
│   before: <before>   after: <after>                   │
│                                                       │
╰───────────────────────────────────────────────────────╯

[a]ccept  [r]eject  [e]dit  [d]efer  [s]kip  [q]uit

A proposal without verification: or prior_rejections: shows neither block, nothing else changes. prior_rejections means the writer found an earlier rejection on the same target and argued past it: read that argument in the body before deciding. verification: is evidence for the reviewer, never a threshold: it does not accept or reject anything on its own (rules/learning-autonomy.md).

Action: accept

  1. Curator learnings proposals (source.type: curator-suggestion whose evidence cites skills/<name>/LEARNINGS.md#…, from /bridge-curator --pass learnings): accept writes the target AND, in the same commit, deletes each cited journal entry from LEARNINGS.md. That trim is part of the accept, not optional. A proposal that creates a journal (target.path: …/LEARNINGS.md, action: create) also appends the routing block to that skill's SKILL.md in the same commit, from docs/skill-learnings.md § Templates; check-skill-learnings.py fails on half a pair.
  2. If diff_preview is set AND is a literal diff/patch:
    • Resolve target.path against repo root
    • For action: create: write file from diff body
    • For action: edit: apply diff
    • For action: delete: remove file
    • For action: rename: parse new path from body, git mv
  3. If diff_preview is descriptive prose (not literal diff):
    • Ask user: "Should I write the patch now? [y/n/edit]"
    • If yes: generate patch based on proposal body, show preview, then apply
    • If edit: user can refine the patch interactively
  4. Verify target file is valid (syntax-check YAML if YAML, schema if defined)
  5. git mv work/_learning/proposals/<id>.md work/_learning/proposals/accepted/<id>.md, then set status: accepted and accepted_at: in its frontmatter (Edit tool).
  6. Record the transition. Never type the row by hand:
    python3 scripts/learning-ledger.py record <id> --to accepted --reason "<user's note, or omit>"
    The script measures the timestamp and refuses if folder or status do not match accepted yet.
  7. Suggest a commit message (short, in the proposal's style):
    Suggested commit: <type>(<scope>): <one-line summary from proposal>
                      <2-3 line body>
    
    Commit now? [y/n/edit]
  8. If user accepts commit: set status: implemented in the proposal's frontmatter, then git commit the staged changes PLUS the moved proposal file and the step 5 trail row.
  9. Right after that commit, record it:
    python3 scripts/learning-ledger.py record <id> --to implemented
    The commit cell is HEAD's real short SHA plus its diffstat, never a placeholder. The same call stores implemented_commit and recurrence_fingerprint (<target.path>#<gap slug>, which trends mode checks against later evidence). For target.type: skill it also appends one line, - <date> · <id> · <why>, to work/_learning/provenance/<name>.md (created on first use, SKILL.md untouched), the why being the accept reason from step 5, else the first prose line of the proposal body. Rejecting never writes provenance. Commit that bookkeeping as a follow-up (chore(learning): record <id>); never amend, since amending changes the SHA the row just recorded.
  10. Upstream hint (scope: core only): if the accepted proposal has scope: core, the improvement is by definition generic — offer it to the community:
    💡 This improvement is scope:core — consider contributing it upstream
       via /bridge-promote → contribute (fork-based PR to the OSS upstream,
       content-safety gate runs first). Run now? [y/N]
    If yes: hand off to skills/bridge-contribute/references/workflow.md with the just-created commit as the candidate. Never auto-submit — the contribute flow has its own gates (leak scan + DCO + user confirm).

Action: reject

  1. Ask: "One-line reason? (why reject — will be logged in audit-trail)"
  2. git mv work/_learning/proposals/<id>.md work/_learning/proposals/rejected/<id>.md
  3. Update proposal frontmatter: status: rejected, rejected_at:, reject_reason:
  4. python3 scripts/learning-ledger.py record <id> --to rejected --reason "<reason>"

Action: defer

  1. Ask: "Defer until when? (e.g. 'next-week', '2026-06-01', 'phase-3')"
  2. Update proposal frontmatter: status: deferred + defer_until: <user-input>
  3. Leave file in work/_learning/proposals/ (don't move — defer means "still pending later")
  4. python3 scripts/learning-ledger.py record <id> --to deferred --until "<defer_until>" --reason "<reason, or omit>"

Action: edit

  1. Open the proposal file for user edit ($EDITOR work/_learning/proposals/<id>.md)
  2. After edit: re-validate frontmatter against _schema.proposal.yaml
  3. Return to per-proposal view with updated content
  4. User can then accept/reject/defer/skip again

Action: skip

No state change. Move to next proposal.

Action: quit

Save progress (which proposals were touched), exit cleanly. Print summary:

✅ Reviewed N proposals: <a> accepted, <r> rejected, <d> deferred, <s> skipped.
   <X> commits staged (run /commit or git commit to push).
   <Y> still pending — run /bridge-learn anytime.

Summary mode (called by /briefing on Fridays)

When invoked by /briefing or /bridge-learn summary:

🧠 Learning Loop — Pending Review (<N>)
   P0: <count>   P1: <count>   P2: <count>   P3: <count>
   Oldest pending: <YYYY-MM-DD> (<id>)
   → /bridge-learn to review

No interactive walk. Just numbers + pointer.

List mode

/bridge-learn list — one line per proposal, no walk:

📋 Pending Proposals (<N>)
   P1 2026-05-08 <id>    skill customer-a-coordinator triggers too broad
   P2 2026-05-13 <id>    standing-order research-claim-verification (NEW)
   P3 2026-05-10 <id>    memory: tahoe sleep behavior
   ...

Useful when user just wants to scan, not act.

Trends mode

/bridge-learn trends — focuses on Layer-2 aggregated signal:

Audit history (Phase 3):

  • Per-check severity trend: "skill-tree-drift P1 went 12 → 8 over 30d"
  • Recurring fingerprints (≥3 runs same finding): list with first/last seen dates
  • New-this-week findings: list

Skill usage (Phase 4, opt-in):

  • Inactive >30d: list
  • Inactive >60d: list (review-or-delete candidates)
  • Most-used (top 5): "for context, not action"
  • Time-spent: skills with median duration >5min (split candidates)

Recurrences (implemented proposals that came back):

  • Run python3 scripts/learning-ledger.py recurrences: every implemented proposal whose target.path shows up in a newer proposal, postmortem or audit-history file is listed as recurred: <date> with that evidence
  • Evidence only: a recurrence never reopens or changes a proposal's status

Task estimate-vs-actual:

  • From work/done/YYYY-MM/*/STATUS.md: parse estimate_vs_actual field
  • Median + worst-case last month
  • Flag: ">3x" tasks (where did time go?)

Trigger corrections (Phase 4):

  • Skills with ≥2 corrections in 30d: list with example mismatches

Friday auto-surface (called by /briefing)

In /briefing, after Stream B (board) but before Stream D:

threshold = config.learning.proposals.auto_surface_threshold  # default 5
trigger_day = config.learning.proposals.auto_surface_in_briefing  # default "friday"

if today == trigger_day and pending_count >= threshold:
    invoke bridge-learn in summary mode

The summary lands as a /briefing block. User can drill in with /bridge-learn.

Ledger check

python3 scripts/learning-ledger.py check compares, for every proposal, the folder its file sits in, its frontmatter status, and its last audit-trail row, and flags placeholder timestamps, implemented rows without a commit and rows without a file. It reports and exits 1; it never fixes. Run it at the start of an interactive walk and show any finding before the first proposal.

Schema validation

Before any action, validate the proposal file:

  • Frontmatter parses as YAML
  • Required fields present (id, created, source, severity, status, scope, target, proposal_type)
  • status is one of the enum values
  • target.path is a non-empty string
  • If target.action: edit or delete: target file must exist
  • If target.action: create: target file must NOT exist

If validation fails: show clear error + offer to repair via edit action.

Commit-message conventions

The skill suggests commit messages following repo convention:

Target typeCommit prefix
skillskill(<skill-name>):
standing_orderstanding-order(<name>):
rulerule(<name>):
docdocs(<area>):
protocolprotocol(<name>):
memorymemory: (or skip commit — memory edits go via auto-memory)
schemaschema(<name>):
configconfig(<scope>):

Use imperative present tense ("add", "tighten", "remove") — never "added" or "adding".

What this skill deliberately does NOT do

  • ❌ Auto-accept based on pattern (e.g. "all P3 from postmortem → reject")
  • ❌ Auto-write proposals (that's task-close-postmortem and /bridge-audit Phase 3)
  • ❌ Push commits (user runs git push separately if desired)
  • ❌ Cross-instance reasoning (only this repo's proposals)
  • ❌ Edit MEMORY.md directly (proposal can suggest a memory entry, but the actual memory write goes through the auto-memory system — target.type: memory proposals produce a suggested entry text + path, user copy-pastes)
  • ❌ Notify externally (no Slack, no email — /briefing is the surface)

Edge cases

  • No pending proposals → print "✅ No pending proposals. Run a task close or /bridge-audit (Phase 3) to generate signal."
  • Proposal file malformed → show validation error + [e]dit action; do not act on broken file.
  • Two proposals target same file → flag both, ask user "these overlap — pick one?" (one accept implicitly supersedes the other; mark loser as superseded with superseded_by: and superseded_at:, then python3 scripts/learning-ledger.py record <loser-id> --to superseded --reason "superseded by <winner-id>").
  • target.action: create but file exists → ask user: accept-and-overwrite / convert-to-edit / reject.
  • Proposal scope: core but content mentions org/customer names → block accept until /bridge-leak-check passes. (Run leak-check inline before move.)
  • User runs out of time mid-walk → [q]uit saves progress. Resume any time.

Related

  • skills/task-close-postmortem/SKILL.md — Layer 1 source of proposals
  • skills/bridge-audit/ — Phase 3 source of recurring-finding proposals
  • work/_learning/README.md — aggregation layer documentation
  • work/_learning/_schema.proposal.yaml — proposal frontmatter schema (the one definition)
  • scripts/learning-ledger.py — audit-trail writer (record), consistency check, fingerprint, recurrences, prior rejections
  • protocols/standing-orders/task-sync.md — close-out flow that feeds proposals
  • bridge-config.yaml.learning.proposals — thresholds + Friday-surface config
  • skills/briefing/ — invokes bridge-learn in summary mode on Fridays

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.