checks/global/navigation-block.md defines default format (linear graph, all epics, sequential)
checks/local/*.md can override (gantt, flowchart, or diagram: none)
Local wins on conflict
Generate mermaid (interpretive - AI):
Apply checks/ rules to parsed data
Create mermaid syntax matching specification
Example (default):
graph LR
A[🏗️ v0.1.0 Active Epic] --> B[📋 v0.2.0 Backlog Epic]
Propagate to all files (deterministic - SH):
Insert after > 🤖 marker
README.md, ROADMAP.md, CHANGELOG.md
Remove old diagrams (anti-drift)
AI Prompt (when running backstage-start/end):
Read checks/global/navigation-block.md and checks/local/*.md for diagram rules.
Run parse-roadmap.sh to extract epics.
Generate mermaid diagram following checks/ rules (prefer local over global).
Insert diagram after navigation block (> 🤖) in all backstage files.
If local checks say diagram: none, skip generation.
Tools:
parse-roadmap.sh - Extract version|status|name from ROADMAP.md
checks/ - Diagram format rules (type, include/exclude logic, status mapping)
AI intermediates - Reads checks/, executes checks/, integrates report
Notes:
1️⃣ Trigger: "backstage start", "vamos trabalhar no X", "whatsup" (start mode) OR "backstage end", "boa noite", "wrap up" (end mode)
Code:backstage-start.sh OR backstage-end.sh
2️⃣ Read README 🤖 block: Find navigation block between > 🤖 markers. Extract all status file paths (ROADMAP, CHANGELOG, checks/, checks/). This is ONLY source of truth for file locations.
Code:backstage-start.sh::read_navigation_block()
3️⃣ Locate status files: Use paths from 🤖 block. If missing, STOP and ask user where to create them. Check BOTH global (backstage/checks/global/, backstage/checks/global/) and local (backstage/checks/local/, backstage/checks/local/) for polycentric governance.
Code:backstage-start.sh::locate_status_files()
4️⃣ Check git branch: Run git branch --show-current. Determine work context.
Policies always ✅: AI reads, interprets, will act accordingly
Checks can fail ❌: Exit code determines status
Mode behavior:
Start mode: Hard fail (block commit if checks fail)
End mode: Soft fail (warn, add to ROADMAP)
Code:backstage-start.sh::report_enforcement()
7️⃣ Update docs: If checks pass, auto-update ROADMAP (mark checkboxes) and CHANGELOG (add new entries at TOP, append-only). Bump version. Add navigation menu to all status files.
9️⃣ Push / Groom: If checks passed, commit with appropriate message (progress/release). If grooming mode, just update ROADMAP priorities.
Code:backstage-start.sh::prompt_push()
Victory lap 🏆: Brief reminder of achievements (3 main items max + stats). Keep it short.
Code:backstage-end.sh::victory_lap()
Body check ⏸️: Ask: Hungry? Thirsty? Tired? Need to stretch? What does body NEED right now?
Code:backstage-end.sh::body_check()
Close VS Code 🌙: Run countdown + osascript -e 'quit app "Visual Studio Code"'. CRITICAL: Agent must NOT send ANY message after this or VS Code will prompt "unsaved changes".
Code:backstage-end.sh::close_vscode()
[STAY SILENT]: No reply after closing VS Code (prevents unsaved prompt).
🔄 Update Backstage: "update backstage" trigger
Find backstage folder: Search CWD for */backstage/ directory
Check if symlinked: If checks/global/ is symlink → already auto-updates (skip)
Generate changelog: Show NEW, CHANGED, REMOVED files (with descriptions)
Prompt user: "Apply updates? (y/n)"
Apply if yes:rsync --delete upstream → local
Report: What changed, how many files
Code:update-backstage.sh
When to Use
Trigger patterns:
"Bom dia" / "Good morning" + PROJECT:
bom dia personal / good morning personal
bom dia librarian / good morning librarian
Action: Load project context + run health checks
Output: Current epic, roadmap status, branch info, gaps
"Update backstage":
Action: Compare local */backstage/checks/global/ against official repo
Detect changes: What's NEW or CHANGED in upstream
Show delta: Mini changelog (1 paragraph: what you GAIN if updated)
Confirm: User approves update
Execute: Pull latest checks/global/ files from upstream
Output: Updated files list, what changed
Start mode:
"backstage start"
"whatsup"
"vamos trabalhar no X"
"what's the status"
Before every commit (especially after long breaks)
End mode:
"backstage end"
"boa noite"
"wrap up"
"pause work"
End of work session, when tired, or context-switch
"Update Backstage" Workflow
Trigger:update backstage (from any project using backstage protocol)
Purpose: Sync local checks/global/ with latest from upstream repo, show what's new.
How It Works
Detect project backstage folder:
# Search up from CWD for backstage/ folder
find . -type d -name "backstage" | grep -E "backstage$"
# Or read README 🤖 block for backstage location
Confirm upstream source:
# Check if checks/global/ is symlink (admin mode)
if [ -L "backstage/checks/global" ]; then
echo "✅ Symlinked to upstream (auto-updates)"
exit 0
fi
# Otherwise, assume official repo
UPSTREAM="https://github.com/nonlinear/backstage"
echo "Upstream: $UPSTREAM"
echo "Confirm this is correct? (y/n)"
Note: This SKILL.md is a DRAFT distillation of those prompts. Future refinements will improve diagram, add emoji notes, clarify steps. The original prompts contain ALL details.
TODO / Future Refinements
Update .sh scripts to read checks/ and checks/ folders