Learn

From CERTCC/Vultron · View interactive version

Learn is an AI agent skill from the GitHub repository CERTCC/Vultron. Promote lessons learned from the build process into durable specifications and design notes, and prune notes sections that are now stale. First refreshes docs/reference/codebase/ via acquire-codebase-knowledge, then reads plan/incoming/learnings/ and queries GitHub for open type:Concern issues (both

How to use this skill

Skill file

Skill: Learn

Integrate lessons learned from build execution into the project's durable

specification and design documentation. The inputs are what the build process

has discovered (plan/incoming/learnings/ — individual per-entry files) and

open GitHub type:Concern issues tracked in the repository; the output is

refined specs/, notes/, and AGENTS.md.

Constraint: Modify documentation files only, including Markdown files,

YAML spec files in specs/, and (conditionally for small in-session

translations) docs/. Do not modify code or tests.

Trigger: Use this skill when plan/incoming/learnings/ has unprocessed

entries that should be promoted into durable docs.

For new external ideas (GitHub Idea-type issues), use plan-issue instead.

Quick Start

  1. Ensure synced (before any writes): manage_worktree.sh ensure-synced
  2. Invoke acquire-codebase-knowledge — full scan, refreshes all 7 docs

in docs/reference/codebase/.

  1. Read all files in plan/incoming/learnings/ and query GitHub for open

type:Concern issues (both are input queues).

  1. Invoke orient-agent then deepen-context for full context (spec map and

governing specs, notes, code) — it now reads the freshly updated codebase

docs.

  1. Analyze what the build process has learned vs. what specs and notes capture.
  2. Invoke grill-me to align on scope and decisions — before writing anything.

Include GitHub Concern issue triage in this phase (no separate triage step

needed).

  1. Create the task branch: git switch -c learn/<YYYYMMDD>-<slug>

(worktree was already synced in step 1; branch here after slug is known)

  1. Write to specs/, notes/, and AGENTS.md.
  2. Archive each processed incoming learning file via

uv run append-history --from-file <path> (which moves the file to

plan/history/YYMM/learning/ and deletes the source).

Archive each resolved Concern issue via uv run append-history learning

and close the issue with a resolution comment.

  1. Invoke format-markdown.
  2. Commit (including updated docs/reference/codebase/ files), push, and

open a docs-only PR with specs-notes label.

Workflow

Phase 0 — Sync and Refresh Codebase Knowledge

First, ensure the worktree is synced to origin/main before any file

writes:

bash .agents/skills/shared/sync-check.sh

If that script is absent, verify git rev-list HEAD..origin/main returns 0

before continuing.

Do this before acquire-codebase-knowledge runs — the scan regenerates

files in docs/reference/codebase/ (uncommitted), and those outputs must not

be clobbered by a later git reset --hard.

Then invoke the acquire-codebase-knowledge skill (full scan, no focus area

restriction). This regenerates all seven files in docs/reference/codebase/

from the current state of the repository before any gap analysis begins,

ensuring orient-agent in Phase 1 reads an accurate baseline.

Always run this phase unconditionally — learn runs infrequently enough

that the cost of a full scan is justified on every invocation.

Phase 1 — Load Internal Sources and Context

  1. Read all files in plan/incoming/learnings/ — open questions, observations,

and constraints from recent build/bugfix runs (ephemeral queue; files are

moved to plan/history/YYMM/learning/ after archiving).

  1. Query GitHub for all open type:Concern issues — these are the tracked

technical concerns, risks, and debt items surfaced by prior codebase scans

and the process-concerns skill (second input queue; resolved issues are

archived and closed):

```bash

gh issue list \

--repo CERTCC/Vultron \

--state open \

--limit 1000 \

--json number,title,body,issueType \

--jq '.[] | select(.issueType.name == "Concern")'

```

Select on the issue type, not a concern label — the type is

authoritative (see notes/parallel-development.md § "GitHub Issue Tracker"),

and the two do not agree: the label matches 13 open issues where the type

matches 53.

reflect-cycle gates this same queue on the type, so a label query here

makes the two skills disagree about whether learn has input.

  1. Invoke orient-agent then deepen-context for full context: the spec map

plus the specs governing the learnings and Concerns in scope, plan files,

notes/, AGENTS.md, and a code scan. deepen-context routes through

decision records by title and adr: edge only, so read in full any record

body this run writes to (Phase 4 below). Because Phase 0 has already

refreshed the codebase docs, orient-agent/deepen-context will read

up-to-date architecture and structure information.

plan/incoming/learnings/ is an ephemeral queue. Files are moved to

plan/history/YYMM/learning/ after archiving. Any critical insight

in an entry must be promoted to specs/ or notes/ before being

archived.

Phase 2 — Analyze Gaps and Staleness

See .claude/skills/shared/completeness-doctrine.md for the project standard

on what constitutes a complete lesson — loaded by orient-agent in Phase 1.

This phase runs in both directions: what is missing from durable docs

(additions), and what in notes/ is now stale (removals). Both feed the

grill-me interview in Phase 3.

Part A — Find Gaps (additions)

Identify what the build process and codebase scan have surfaced that is not

yet captured in durable docs. Consider both incoming learning files and

open GitHub Concern issues.

Prioritise by signal type. Learning files tagged with signal: in their

frontmatter carry higher-urgency signals and MUST be addressed before general

pattern promotion. Process in this order:

  1. signal: spec-gap — behaviour in code with no spec entry. Before writing,

ask: **Would a participant running a different implementation of the protocol

notice if this requirement were violated?** If no → route to AGENTS.md, not

specs/. If yes → write the missing spec requirement.

  1. signal: spec-contradiction — two requirements that conflict. Resolve the

conflict and update both affected spec entries.

  1. signal: spec-ambiguity — requirement was unclear; an interpretation was made

during build. Clarify the requirement so future agents don't have to guess.

  1. signal: theme-candidate — a general claim the author could not verify from

one instance. Do not promote it on its own authority (BW-07-005). Group

candidates by claim and count independent witnesses — entries with

different source work items asserting the same thing:

or AGENTS.md, or file an issue through create-issue if it names a

defect, typed by shared/issue-creation-requirements.md § "Determining

the right values".

promote. If not, leave it queued.

append-history learning, with no promotion (BW-07-007). Note the

non-reproduction in the archive body.

  1. Retired signal values (design-question, concern, tooling-issue,

process-issue) should no longer appear on new entries — those findings are

now routed to a GitHub issue or an in-session fix at discovery (BW-07-004).

If you encounter one on a pre-existing entry, treat it per its destination in

that table: file the issue or apply the fix now, then archive the entry.

  1. Untagged entries — general observations and patterns:
  1. Open GitHub type:Concern issues that reveal missing spec requirements or

durable design notes.

  1. Recent completed-task insights — when needed, run `uv run show-history

--month YYMM` to identify which history entries contain architectural

lessons, then open those entry files.

A lesson is not complete until it has reached a durable destination: a specs/

requirement, a notes/ card, an AGENTS.md entry, a filed GitHub issue, or an

explicit non-reproduction verdict. If an entry clearly warrants a spec or notes

update that cannot be written in this session, document why and create a Concern

issue through create-issue — do not silently archive it as if nothing were

owed. Every issue this skill files goes through create-issue.

Two archive outcomes are legitimate without promotion, and both must be stated

in the archive body rather than left implicit:

no corroboration (BW-07-007).

issue, or already landed in specs/, notes/, docs/, or the code. Verify

the claim before accepting it; an entry asserting "tracked as #N" is only

discharged if #N actually covers it.

Part B — Notes Staleness Review (removals)

Start from uv run notes-tracks: every plan note it flags (all tracked

issues closed) is on the agenda. Then, for each notes/*.md file, review its

sections (cards) against the current codebase using the codebase knowledge

refreshed in Phase 0, and against the kind and trim rules in

.agents/skills/shared/notes-writing-guide.md (NF-08). A section that fits

neither its note's kind nor any other is mis-homed: split it out, move it

to docs/, or archive it. Assign each section one of three verdicts:

Archive signals — any one is sufficient, but signal (c) requires (a) or (b) to

also fire:

scan confirms is now implemented

an ADR, or AGENTS.md — the notes version adds nothing

now closed, AND signal (a) or (b) also fires

current code makes obvious

Age alone (signal d) is a tie-breaker only — "old" does not mean "stale."

Promote signals:

in docs/ for user-facing or developer-facing audiences, but no docs/

page currently covers it.

Promote disposition — apply the small/large heuristic:

the topic AND the content transfers with light editing only (tone/audience

adjustment, no restructuring). Write to docs/ in Phase 5, then archive

the notes section.

rewriting/synthesis is required. File a type:Task issue capturing the

gap and the target location; keep the notes section active until resolved.

Bring both the gap list (Part A) and the staleness/promote candidates (Part B)

into the Phase 3 grill-me interview as a combined agenda.

Phase 3 — Interview with Grill-Me

Invoke the grill-me skill, following .agents/skills/shared/asking-the-user.md

and its pre-ask check: ask what behavior a rule should require, not how to word it.

Resolve one question at a time (ask_user for discrete choices)

with a recommended answer before writing anything:

insights, outdated, or should be promoted to specs/notes? (Resolved

concerns go to specs/ if they reveal missing requirements, notes/

otherwise.)

Answer questions from codebase exploration where possible.

After grill-me completes — create the task branch before writing any files:

git switch -c learn/<YYYYMMDD>-<slug>

The worktree was already synced to origin/main in Phase 0. All file writes (Phases 4–7)

happen on this branch so they are never at risk from a git reset --hard.

Phase 4 — Refine Specifications (`specs/`)

concise, and verifiable.

broad.

and topic reorganizations.

ADR decision (MS-11): When adding new spec entries, apply the decision-tree

heuristic in notes/specs-vs-adrs.md to decide whether the underlying design

choice also warrants a new ADR. Write an ADR when a meaningful alternative was

evaluated and rejected; skip it for uncontested rules (MS-11-002, MS-11-005).

When both are created, cross-reference them: cite the ADR in the spec's per-requirement

rationale field (per MS-11-004 — not the spec-group description), and list the

generated spec IDs in the ADR's "More Information" section (MS-11-010).

Read the body of every record you cross-reference before you edit it, and weigh

it by .agents/skills/shared/weighing-decision-records.md.

Phase 5 — Update Design Notes (`notes/`) and `docs/`

into a kind: guidance note as rule + reason + one citation, never the

backstory; design for unbuilt work goes into a kind: plan note with

tracks:. Never add a plan item to a guidance note. Do not duplicate

spec text.

frontmatter with title, status, and kind (NF-01).

Archive stale sections confirmed in the Phase 3 interview:

For each section with an Archive verdict, remove the section from its

notes/*.md file and archive it to plan/history/YYMM/note/ using

append-history note:

cat <<'BODY' | PYTHONPATH= uv run append-history note \
  --title "<section heading>" \
  --source "NOTES-<file-stem>--<section-slug>"
**Archived:** YYYY-MM-DD
**Reason:** <which signal fired — delivered/redundant/confusion-resolved>
**Superseded by:** <code path, spec ID, or docs page>

---

<original section content verbatim>
BODY

Source ID convention: NOTES-<file-stem>--<section-slug> where file-stem

is the notes filename without extension and section-slug is the section

heading kebab-cased (e.g. NOTES-bt-pitfalls--bt-failure-reason-propagation).

If archiving a section empties the file entirely, remove the file and update

notes/README.md to remove its entry.

Translate small Promote sections to docs/ confirmed in the Phase 3

interview (small = existing target file + verbatim-friendly edit only):

Write the translated content to the target docs/ file, then archive the

notes section as above. For large Promote candidates (new page needed or

significant rewrite), file a type:Task issue instead and leave the

section active.

Phase 6 — Update Agent Guidance (`AGENTS.md`)

Promote recurring implementation patterns and conventions from

plan/incoming/learnings/ into AGENTS.md. Keep entries precise, actionable,

and minimal.

Phase 7 — Prepare Archive Content and Close Processed Entries

For each incoming learning file and each resolved GitHub Concern issue that

has been fully promoted to specs/, notes/, or AGENTS.md:

  1. For incoming learning files: run `uv run append-history --from-file

<path> — this moves the file from plan/incoming/learnings/` to

plan/history/YYMM/learning/, deletes the source, and regenerates the

monthly README. Add a promotion note to the end of the body before

calling append-history --from-file (edit the file in-place):

```text

Promoted: YYYY-MM-DD — captured in <destination file(s)>.

Docs PR: <PR_URL>. ← filled in after PR is opened

```

  1. For resolved GitHub Concern issues: draft the archive body

(store in memory — the actual archive-history invocations happen in

Phase 9 after the PR URL is known):

```text

TYPE = learning

TITLE = <short concern title>

SOURCE = CONCERN-<ISSUE_NUMBER>

BODY = Full original concern body

```

  1. For resolved GitHub Concern issues: close the issue and add a

resolution comment after the PR is open (step in Phase 9):

```bash

gh issue comment "${ISSUE_NUMBER}" --repo CERTCC/Vultron \

--body "✅ Resolved.

Design decisions are now captured in durable documentation."

gh issue close "${ISSUE_NUMBER}" --repo CERTCC/Vultron

```text

Do not reference plan/incoming/learnings/ from durable docs.

Phase 8 — Lint, Commit, and Open PR

  1. Invoke the format-markdown skill on all new/modified markdown files.

Fix all errors.

  1. If a requirement conflict cannot be resolved, create a learning file in

plan/incoming/learnings/ and stop before committing.

  1. Stage and commit (branch was created at the end of Phase 3):

```bash

git add specs/<changed-files> notes/<changed-files> AGENTS.md \

plan/incoming/learnings/ docs/reference/codebase/ \

plan/history/ docs/<changed-files-if-any>

```

Commit per commit/SKILL.md conventions. Subject format:

docs: promote learnings — <topic>. Use multiple commits for thematically

distinct changes (spec refinements, notes promoted, AGENTS.md updates).

Then invoke the create-pr skill:

```text

type: docs

title: docs: promote learnings — <topic>

body: <composed per pr-body-guide.md docs template>

labels: specs-notes

issue_number: <issue if applicable; omit if none>

```

create-pr performs the rebase on origin/main, runs linters, pushes, and

returns the PR URL. Use the returned URL when filling in the Docs PR:

field in the archive bodies (Phase 9).

  1. Invoke check-docs-sync while CI runs in the cloud to confirm all docs/

updates have been applied (PD-03-008). Because learn already handles

docs/ inline in Phase 5, this is a consistency check — if the skill

identifies additional pages, apply them and push an additional commit before

Phase 9.

Phase 9 — Archive Entries and Close Issues

Now that the PR URL is known:

  1. For each incoming learning file: edit it in-place to add the final

PR URL to the promotion note (appended in Phase 7), then run:

```bash

uv run append-history --from-file plan/incoming/learnings/<YYYYMMDD-SLUG>.md

```

This moves the file to plan/history/YYMM/learning/ and deletes the

source. Stage plan/history/ and commit.

  1. For each resolved GitHub Concern issue: invoke the archive-history

skill once per entry:

TYPE    = learning
TITLE   = <short concern title>
SOURCE  = CONCERN-<ISSUE_NUMBER>
BODY    = <full original concern body>
          + "**Resolved**: YYYY-MM-DD — captured in <destination file(s)>."
          + "Docs PR: <PR_URL>."

For resolved GitHub Concern issues, post the resolution comment and close

the issue (see Phase 7 step 3 for the comment template).

Constraints

uv run append-history --from-file <path>; do not leave files in

plan/incoming/learnings/ after promoting.

evidence.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.