Flatnotes + Tasks.md GitHub Audit
by @branexp
Thoroughly audit Tasks.md + Flatnotes for drift and accuracy; use GitHub (gh CLI) as source of truth to detect stale notes/cards and missing links. Produces a report and an optional fix plan.
clawhub install flatnotes-tasksmd-github-audit📖 About This Skill
name: flatnotes-tasksmd-github-audit description: "Thoroughly audit Tasks.md + Flatnotes for drift and accuracy; use GitHub (gh CLI) as source of truth to detect stale notes/cards and missing links. Produces a report and an optional fix plan."
Flatnotes + Tasks.md + GitHub Audit
Use this skill when Brandon asks to audit the Flatnotes/Tasks.md system for accuracy and ensure it’s up to date, using GitHub as the source of truth.
Quick start
Run the bundled auditor (report-only):node skills/flatnotes-tasksmd-github-audit/scripts/audit.mjs --since-days 30 --write
Outputs:
tmp/flatnotes-tasksmd-audit.mdtmp/flatnotes-tasksmd-audit.json> If gh is not authenticated, the audit still runs but GitHub checks will be marked as SKIPPED_GITHUB.
Data sources (defaults)
/home/ds/.config/appdata/tasksmd/tasks/home/ds/.config/appdata/flatnotes/datanotes/resources/flatnotes-system/Override via env vars:
TASKS_ROOTFLATNOTES_ROOTAudit goals (what “accurate” means)
A) Board hygiene (Tasks.md)
00 Inbox, 05 Backlog, 10 Next, 20 Doing, 30 Blocked, 40 Waiting, 90 Done.prio-p2 lives in 05 Backlog by default (no prio-p2 in 10 Next).Unblock:.Flatnotes: ...).B) Project completeness (Flatnotes)
For each active project inSYS Workspace - Project Registry:
PJT - 00 Overview
- PJT - 10 Research
- PJT - 20 Plan
- PJT - 90 Log
C) GitHub truth reconciliation (GitHub = source of truth)
For each project repo in the registry:PJT - 90 Log ) + hub status update, or
- a Done card with PR link.
- (Audit treats either as reconciled; it may warn if a merged PR is only on a Done card but missing from the log.)
Workflow (recommended)
1) Parse registry - ReadSYS Workspace - Project Registry from Flatnotes.
- Extract: slug, status, Tasks tag, GitHub repo URL.2) Scan Tasks.md
- Index cards by lane and by proj-* tag.
- Flag lane rule violations (prio-p2 in Next, etc.).
- Flag cards missing Flatnotes pointer.
3) Scan Flatnotes - Check required project notes exist. - Check hub Decisions section links ADR notes.
4) GitHub cross-check
- Use gh:
- gh pr list --state open --json ...
- gh pr list --state merged --search "merged:>= (or equivalent)
- Try to match PRs ↔ Tasks cards using:
- PR URL in card content
- PR number
- Title substring heuristic
5) Report - Output: summary + per-project drift list + fix plan.
Applying fixes (guardrails)
Default is report-only.If Brandon explicitly asks to apply fixes:
10 Research, etc.) using existing templates
- add missing ADR links to hub Decisions section
- move prio-p2 from Next → Backlog
- add missing Flatnotes pointers to Tasks cards
Bundled code
scripts/audit.mjs — generates the report (Markdown + JSON). If needed, patch it rather than rewriting.💡 Examples
Run the bundled auditor (report-only):
node skills/flatnotes-tasksmd-github-audit/scripts/audit.mjs --since-days 30 --write
Outputs:
tmp/flatnotes-tasksmd-audit.mdtmp/flatnotes-tasksmd-audit.json> If gh is not authenticated, the audit still runs but GitHub checks will be marked as SKIPPED_GITHUB.