{
  "schemaVersion": "1.0",
  "item": {
    "slug": "backstage",
    "name": "backstage companion",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/nonlinear/backstage",
    "canonicalUrl": "https://clawhub.ai/nonlinear/backstage",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/backstage",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=backstage",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "backstage.sh",
      "checks.sh",
      "parse-roadmap.sh",
      "SKILL.md",
      "update-backstage.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/backstage"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/backstage",
    "agentPageUrl": "https://openagent3.xyz/skills/backstage/agent",
    "manifestUrl": "https://openagent3.xyz/skills/backstage/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/backstage/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Backstage Skill",
        "body": "Nickname: backstage:\n\nObjective: Universal project status management for AI-assisted development. Ensures documentation matches reality before every commit."
      },
      {
        "title": "⚠️ Security Notice",
        "body": "This is an admin tool with elevated privileges:\n\nExecutes checks from global path ($HOME/Documents/backstage/backstage/checks/global/)\nPulls remote code from GitHub (https://github.com/nonlinear/backstage)\nModifies project files (README, ROADMAP, CHANGELOG with mermaid diagrams)\nRsyncs updates when using update backstage trigger\n\nIntended for:\n\nPersonal use (you control the upstream repo)\nTrusted teams (shared backstage protocol repo)\n\nNot recommended for:\n\nUntrusted third-party projects\nPublic/open-source projects with unknown contributors\n\nMitigations in place:\n\nUser confirmation before applying updates\nGit history (all changes committed, revertable)\nSymlink detection (admin mode auto-updates)\n\nUse at your own risk. Review update-backstage.sh and checks.sh before running."
      },
      {
        "title": "🔴 Why This Skill Exists (Anti-Drift)",
        "body": "Backstage-skill = ANTI-DRIFT:\n\n✅ Force context awareness (project/epic)\n✅ Health checks prevent chaos\n✅ Architecture-first workflow\n✅ Roadmap visibility = no surprises\n\nWITHOUT IT:\nWork happens outside backstage → drift → broken trust → triple metabolic cost\n\nWITH IT:\n\"good morning X\" → automatic context load → work inside boundaries → paridade maintained\n\nThe Metabolic Cost Problem:\n\nWithout backstage, delegation costs triple:\n\nThe work itself\nExplicating methodology (ethics, preferences, protocols)\nDefining WHERE that learning gets stored (VISION? SOUL? SKILL? memory?)\n\nThis is exhausting for the human.\n\nInvestment is worth it ONLY IF plateau is reached:\n\nHuman teaches ONCE → AI internalizes\nEach session: READ context files → act according to ethics\nEach session: LESS explanation needed\nPlateau = Human delegates, AI executes without supervision\n\nThis skill enforces stabilization.\nForce context awareness (project/epic/design architecture) to prevent drift.\n3x work becomes 1x work."
      },
      {
        "title": "Policies & Checks Enforcement",
        "body": "Backstage-skill enforces ALL rules in checks/ (deterministic + interpretive, global + local)."
      },
      {
        "title": "Enforcement Model",
        "body": "flowchart TD\n    READ_CHK[\"Read checks/<br/>global + local<br/>[Deterministic .sh + Interpretive .md]\"]\n    \n    CONFLICT{Conflict?}\n    MERGE[Merge compatible rules]\n    LOCAL[Local wins]\n    \n    AI[\"AI interprets .md checks<br/>[Contextual enforcement]\"]\n    SH[\"Bash executes .sh checks<br/>[Deterministic validation]\"]\n    \n    AI_ACT[✅ Enforce or discuss]\n    AI_AMBIG[⚠️ Ask user]\n    \n    SH_OK[✅ All checks pass]\n    SH_FAIL[❌ Checks failed]\n    \n    REPORT[\"Report:<br/>📋 Interpretive (always ✅)<br/>🔍 Deterministic (✅/❌)\"]\n    \n    READ_CHK --> CONFLICT\n    CONFLICT -->|No| MERGE\n    CONFLICT -->|Yes| LOCAL\n    MERGE --> AI\n    MERGE --> SH\n    LOCAL --> AI\n    LOCAL --> SH\n    \n    AI -->|Clear| AI_ACT\n    AI -->|Ambiguous| AI_AMBIG\n    \n    SH -->|Pass| SH_OK\n    SH -->|Fail| SH_FAIL\n    \n    AI_ACT --> REPORT\n    AI_AMBIG --> REPORT\n    SH_OK --> REPORT\n    SH_FAIL --> REPORT\n\nTwo enforcement domains:\n\nChecks (Interpretive)\n\nchecks/global/*.md = Universal workflow rules\nchecks/local/*.md = Project-specific overrides\nEnforced by: AI (reads markdown, interprets context, acts)\nAlways pass: AI reads, understands, will act accordingly\n\n\n\nChecks (Deterministic)\n\nchecks/global/*.sh = Universal validation tests\nchecks/local/*.sh = Project-specific tests\nEnforced by: Bash (executes shell scripts, exit codes)\nPass or fail: ✅ (exit 0) or ❌ (exit non-zero)\n\nPolycentric governance:\n\nGlobal + local rules coexist\nLocal wins on conflict\nAI merges when compatible\n\nReport format:\n\n📋 Interpretive checks:\n  ✅ checks/global/branch-workflow.md (read)\n  ✅ checks/global/commit-style.md (read)\n  ✅ checks/local/dogfooding.md (read)\n\n🔍 Checks (deterministic):\n  ✅ checks/global/navigation-block-readme.sh\n  ✅ checks/global/semver-changelog.sh\n  ❌ checks/local/pre-merge-tasks.sh (incomplete tasks)\n\nSelf-contained: All prompts in SKILL.md (no external prompt files needed)."
      },
      {
        "title": "Mermaid Diagram Generation (Interpretive)",
        "body": "Purpose: Automatically generate + propagate ROADMAP diagram to all backstage files.\n\nWorkflow:\n\nParse ROADMAP.md (deterministic - SH):\nparse-roadmap.sh backstage/ROADMAP.md\n# Output: version|status_emoji|name\n\n\n\nRead checks/ diagram rules (interpretive - AI):\n\nchecks/global/navigation-block.md defines default format (linear graph, all epics, sequential)\nchecks/local/*.md can override (gantt, flowchart, or diagram: none)\nLocal wins on conflict\n\n\n\nGenerate mermaid (interpretive - AI):\n\nApply checks/ rules to parsed data\nCreate mermaid syntax matching specification\nExample (default):\ngraph LR\n    A[🏗️ v0.1.0 Active Epic] --> B[📋 v0.2.0 Backlog Epic]\n\n\n\n\n\nPropagate to all files (deterministic - SH):\n\nInsert after > 🤖 marker\nREADME.md, ROADMAP.md, CHANGELOG.md\nRemove old diagrams (anti-drift)\n\nAI Prompt (when running backstage-start/end):\n\nRead checks/global/navigation-block.md and checks/local/*.md for diagram rules.\nRun parse-roadmap.sh to extract epics.\nGenerate mermaid diagram following checks/ rules (prefer local over global).\nInsert diagram after navigation block (> 🤖) in all backstage files.\nIf local checks say diagram: none, skip generation.\n\nTools:\n\nparse-roadmap.sh - Extract version|status|name from ROADMAP.md\nchecks/ - Diagram format rules (type, include/exclude logic, status mapping)"
      },
      {
        "title": "Polycentric Governance (How It Works)",
        "body": "flowchart TD\n    GLOBAL_POL[checks/global/*.md<br/>Universal rules]\n    LOCAL_POL[checks/local/*.md<br/>Project-specific overrides]\n    \n    GLOBAL_CHK[checks/global/*.sh<br/>Universal tests]\n    LOCAL_CHK[checks/local/*.sh<br/>Project-specific tests]\n    \n    AI[AI reads checks/]\n    BASH[Bash executes checks/]\n    CONFLICT{Conflict?}\n    \n    GLOBAL_POL --> AI\n    LOCAL_POL --> AI\n    GLOBAL_CHK --> BASH\n    LOCAL_CHK --> BASH\n    \n    AI --> CONFLICT\n    CONFLICT -->|Yes| LOCAL_POL\n    CONFLICT -->|No| MERGE[Merge rules]\n    \n    MERGE --> ACTION[Execute workflow]\n    LOCAL_POL --> ACTION\n    BASH --> ACTION\n\nThis skill enforces polycentric governance:\n\nReads ALL checks/**/*.md files (global + local)\nExecutes ALL checks/**/*.sh files (global + local)\nMerges checks when compatible\nPrefers local checks on conflict\nReports deterministic check results (pass/fail)\n\nTriggered by: \"good morning\", \"good night\", \"backstage start/end\", \"update backstage\""
      },
      {
        "title": "Workflow Diagram",
        "body": "flowchart TD\n    START[\"Trigger 1️⃣<br/>[SH]\"]\n    MODE{\"Session mode?\"}\n    \n    %% Common enforcement module\n    READ_POL[\"Read checks/<br/>global + local<br/>[AI interprets MD]\"]\n    EXEC_CHK[\"Execute checks/<br/>global + local<br/>[Bash runs SH]\"]\n    \n    REPORT[\"Report 6️⃣<br/>📋 Interpretive (✅)<br/>🔍 Checks (✅/❌)\"]\n    CHECKS_GATE{\"All checks<br/>passed?\"}\n    \n    %% Start Branch\n    START_BRANCH[\"Read README 🤖 block 2️⃣<br/>[MD → AI]\"]\n    START_FILES[\"Locate status files 3️⃣<br/>[SH]\"]\n    START_GIT[\"Check git branch 4️⃣<br/>[SH]\"]\n    START_WORK[\"Analyze changes 5️⃣<br/>[SH]\"]\n    START_FIX[\"🛑 STOP: Fix issues<br/>[AI + SH]\"]\n    START_UPDATE[\"Update docs 7️⃣<br/>[SH writes MD]\"]\n    START_REPORT[\"Developer context 8️⃣<br/>[AI reads MD]\"]\n    START_PUSH[\"Push / Groom 9️⃣<br/>[SH]\"]\n    \n    %% End Branch\n    END_FIXES[\"Add fixes to roadmap<br/>[AI writes MD]\"]\n    END_PUSH[\"Commit + push<br/>[SH]\"]\n    END_VICTORY[\"Victory lap 🏆<br/>[AI reads MD]\"]\n    END_BODY[\"Body check ⏸️<br/>[AI prompt]\"]\n    END_CLOSE[\"Close VS Code 🌙<br/>[SH]\"]\n    END_SILENT[\"[STAY SILENT]\"]\n    \n    %% Update Backstage Branch\n    UPDATE_DETECT[\"Find backstage/ folder<br/>[SH]\"]\n    UPDATE_CHECK_SYM{\"Symlinked?\"}\n    UPDATE_SKIP[\"✅ Already auto-updates<br/>[Report]\"]\n    UPDATE_FETCH[\"Fetch upstream<br/>[SH: git clone]\"]\n    UPDATE_DIFF[\"Compare local vs upstream<br/>[SH: diff]\"]\n    UPDATE_UPTODATE{\"Changes<br/>found?\"}\n    UPDATE_UPTODATE_SKIP[\"✅ Already up to date<br/>[Report]\"]\n    UPDATE_CHANGELOG[\"Generate mini changelog<br/>[AI reads diffs]\"]\n    UPDATE_PROMPT{\"User<br/>approves?\"}\n    UPDATE_ABORT[\"Aborted<br/>[Report]\"]\n    UPDATE_APPLY[\"rsync upstream → local<br/>[SH]\"]\n    UPDATE_REPORT[\"🎉 Updated!<br/>[Report changes]\"]\n    \n    %% Flow\n    START --> MODE\n    \n    MODE -->|Start| START_BRANCH\n    START_BRANCH --> START_FILES\n    START_FILES --> START_GIT\n    START_GIT --> START_WORK\n    START_WORK --> READ_POL\n    START_WORK --> EXEC_CHK\n    \n    READ_POL --> REPORT\n    EXEC_CHK --> REPORT\n    REPORT --> CHECKS_GATE\n    \n    CHECKS_GATE -->|No, start mode| START_FIX\n    START_FIX --> READ_POL\n    CHECKS_GATE -->|Yes| START_UPDATE\n    START_UPDATE --> START_REPORT\n    START_REPORT --> START_PUSH\n    \n    MODE -->|End| READ_POL\n    MODE -->|End| EXEC_CHK\n    CHECKS_GATE -->|No, end mode| END_FIXES\n    CHECKS_GATE -->|Yes| END_PUSH\n    END_FIXES --> END_VICTORY\n    END_PUSH --> END_VICTORY\n    END_VICTORY --> END_BODY\n    END_BODY --> END_CLOSE\n    END_CLOSE --> END_SILENT\n    \n    MODE -->|Update| UPDATE_DETECT\n    UPDATE_DETECT --> UPDATE_CHECK_SYM\n    UPDATE_CHECK_SYM -->|Yes| UPDATE_SKIP\n    UPDATE_CHECK_SYM -->|No| UPDATE_FETCH\n    UPDATE_FETCH --> UPDATE_DIFF\n    UPDATE_DIFF --> UPDATE_UPTODATE\n    UPDATE_UPTODATE -->|No| UPDATE_UPTODATE_SKIP\n    UPDATE_UPTODATE -->|Yes| UPDATE_CHANGELOG\n    UPDATE_CHANGELOG --> UPDATE_PROMPT\n    UPDATE_PROMPT -->|No| UPDATE_ABORT\n    UPDATE_PROMPT -->|Yes| UPDATE_APPLY\n    UPDATE_APPLY --> UPDATE_REPORT\n\nDomain labels:\n\n[MD] - Markdown file (checks/*.md, ROADMAP.md) = Human/AI prompts\n[SH] - Shell script (checks/*.sh, backstage-start.sh) = Machine executables\n[AI reads MD] - AI parses markdown, understands rules/prompts\n[AI writes MD] - AI generates markdown content\n[SH writes MD] - Script modifies markdown files (checkboxes, navigation blocks)\n[Bash runs SH] - Bash executes shell scripts (deterministic validation)\n[AI interprets MD] - AI reads checks/, acts contextually\n\nCritical separation:\n\nchecks/ = prompts - AI reads, interprets, acts\nchecks/ = executors - Bash runs commands, returns exit codes\nAI intermediates - Reads checks/, executes checks/, integrates report\n\nNotes:\n\n1️⃣ Trigger: \"backstage start\", \"vamos trabalhar no X\", \"whatsup\" (start mode) OR \"backstage end\", \"boa noite\", \"wrap up\" (end mode)\n\nCode: backstage-start.sh OR backstage-end.sh\n\n2️⃣ 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.\n\nCode: backstage-start.sh::read_navigation_block()\n\n3️⃣ 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.\n\nCode: backstage-start.sh::locate_status_files()\n\n4️⃣ Check git branch: Run git branch --show-current. Determine work context.\n\nCode: backstage-start.sh::check_branch()\n\n5️⃣ Analyze changes:\n\ngit diff --name-status\ngit diff --stat\nLAST_VERSION=$(grep -m1 \"^## v\" CHANGELOG.md | cut -d' ' -f2)\ngit log --oneline \"${LAST_VERSION}..HEAD\"\n\nCategorize: patch/minor/major. Compare with ROADMAP. Match reality to plans.\n\nCode: backstage-start.sh::analyze_changes()\n\n6️⃣ Report - Policies + Checks:\n\nReport format:\n\n📋 Interpretive checks:\n  ✅ checks/global/branch-workflow.md (read)\n  ✅ checks/global/commit-style.md (read)\n  ✅ checks/local/dogfooding.md (read)\n\n🔍 Checks (deterministic):\n  ✅ checks/global/navigation-block-readme.sh\n  ✅ checks/global/semver-changelog.sh\n  ❌ checks/local/pre-merge-tasks.sh (incomplete tasks)\n\nPolicies always ✅: AI reads, interprets, will act accordingly\n\nChecks can fail ❌: Exit code determines status\n\nMode behavior:\n\nStart mode: Hard fail (block commit if checks fail)\n\n\nEnd mode: Soft fail (warn, add to ROADMAP)\n\n\nCode: backstage-start.sh::report_enforcement()\n\n7️⃣ 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.\n\nCode: backstage-start.sh::update_docs()\n\n8️⃣ Developer context: Generate outcome-based summary (5 possible states: 🛑 Failed, ⚠️ Mismatch, 🧑 Grooming, ✅ Progress, 🎉 Complete). Show: When, What, Why, Status, Next.\n\nCode: backstage-start.sh::show_developer_context()\n\n9️⃣ Push / Groom: If checks passed, commit with appropriate message (progress/release). If grooming mode, just update ROADMAP priorities.\n\nCode: backstage-start.sh::prompt_push()\n\nVictory lap 🏆: Brief reminder of achievements (3 main items max + stats). Keep it short.\n\nCode: backstage-end.sh::victory_lap()\n\nBody check ⏸️: Ask: Hungry? Thirsty? Tired? Need to stretch? What does body NEED right now?\n\nCode: backstage-end.sh::body_check()\n\nClose 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\".\n\nCode: backstage-end.sh::close_vscode()\n\n[STAY SILENT]: No reply after closing VS Code (prevents unsaved prompt).\n\n🔄 Update Backstage: \"update backstage\" trigger\n\nFind backstage folder: Search CWD for */backstage/ directory\nCheck if symlinked: If checks/global/ is symlink → already auto-updates (skip)\nFetch upstream: Clone https://github.com/nonlinear/backstage (temp dir)\nCompare: Diff local checks/global/ vs upstream\nGenerate changelog: Show NEW, CHANGED, REMOVED files (with descriptions)\nPrompt user: \"Apply updates? (y/n)\"\nApply if yes: rsync --delete upstream → local\nReport: What changed, how many files\nCode: update-backstage.sh"
      },
      {
        "title": "When to Use",
        "body": "Trigger patterns:\n\n\"Bom dia\" / \"Good morning\" + PROJECT:\n\nbom dia personal / good morning personal\nbom dia librarian / good morning librarian\nAction: Load project context + run health checks\nOutput: Current epic, roadmap status, branch info, gaps\n\n\"Update backstage\":\n\nAction: Compare local */backstage/checks/global/ against official repo\nDetect changes: What's NEW or CHANGED in upstream\nShow delta: Mini changelog (1 paragraph: what you GAIN if updated)\nConfirm: User approves update\nExecute: Pull latest checks/global/ files from upstream\nOutput: Updated files list, what changed\n\nStart mode:\n\n\"backstage start\"\n\"whatsup\"\n\"vamos trabalhar no X\"\n\"what's the status\"\nBefore every commit (especially after long breaks)\n\nEnd mode:\n\n\"backstage end\"\n\"boa noite\"\n\"wrap up\"\n\"pause work\"\nEnd of work session, when tired, or context-switch"
      },
      {
        "title": "\"Update Backstage\" Workflow",
        "body": "Trigger: update backstage (from any project using backstage protocol)\n\nPurpose: Sync local checks/global/ with latest from upstream repo, show what's new."
      },
      {
        "title": "How It Works",
        "body": "Detect project backstage folder:\n# Search up from CWD for backstage/ folder\nfind . -type d -name \"backstage\" | grep -E \"backstage$\"\n# Or read README 🤖 block for backstage location\n\n\n\nConfirm upstream source:\n# Check if checks/global/ is symlink (admin mode)\nif [ -L \"backstage/checks/global\" ]; then\n  echo \"✅ Symlinked to upstream (auto-updates)\"\n  exit 0\nfi\n\n# Otherwise, assume official repo\nUPSTREAM=\"https://github.com/nonlinear/backstage\"\necho \"Upstream: $UPSTREAM\"\necho \"Confirm this is correct? (y/n)\"\n\n\n\nFetch latest from upstream:\n# Clone or pull latest\nTMP_DIR=$(mktemp -d)\ngit clone --depth 1 \"$UPSTREAM\" \"$TMP_DIR/backstage\"\n\n\n\nCompare local vs upstream:\n# Diff local checks/global/ vs upstream\ndiff -qr backstage/checks/global/ \"$TMP_DIR/backstage/backstage/checks/global/\"\n\n\n\nGenerate mini changelog:\n📦 Backstage Updates Available:\n\nNEW files (3):\n- skill-publish-warning.sh (warns before merging unpublished skills)\n- rebase-cadence.md (suggests rebase if branch >7 days old)\n- epic-notes-orphan-detection.md (detects orphan epic notes)\n\nCHANGED files (2):\n- merge-to-main.md (added Step 0: skill publish check)\n- epic-branch.sh (improved detection logic)\n\nWHAT YOU GAIN:\nBetter skill publishing workflow, orphan detection, rebase reminders.\n\n\n\nPrompt user:\nApply these updates? (y/n)\n\n\n\nUpdate if confirmed:\n# Copy upstream checks/global/ to local\nrsync -av --delete \"$TMP_DIR/backstage/backstage/checks/global/\" backstage/checks/global/\n\n# Cleanup\nrm -rf \"$TMP_DIR\"\n\necho \"✅ Updated checks/global/ from upstream\"\n\n\n\nReport:\n🎉 Backstage updated!\n\nFiles changed: 5\n- Added: skill-publish-warning.sh, rebase-cadence.md, epic-notes-orphan-detection.md\n- Modified: merge-to-main.md, epic-branch.sh\n\nNext: Run 'backstage start' to test new checks."
      },
      {
        "title": "Edge Cases",
        "body": "Symlinked (admin mode):\n\nIf checks/global/ is symlink → already auto-updates\nJust report: \"✅ Already symlinked to upstream (no action needed)\"\n\nNo changes:\n\nIf local == upstream → report: \"✅ Already up to date\"\n\nConflicts:\n\nIf user modified global checks locally → warn, ask to resolve\nSuggest: copy to checks/local/ (overrides) before updating\n\nNo internet:\n\nIf git clone fails → report: \"❌ Can't reach upstream (offline?)\""
      },
      {
        "title": "Key Principles",
        "body": "README's 🤖 block = Single source of truth for file locations\nStatus files = AI prompts (checks/ = tests, checks/ = rules, ROADMAP = backlog, CHANGELOG = history)\nPolycentric governance (global + local rules, local wins on conflict)\nChecks must pass before commit (non-negotiable for start mode, soft fail for end mode)\nCHANGELOG is append-only (never edit old entries, add NEW entry for corrections)\n5 possible outcomes (Failed, Mismatch, Grooming, Progress, Complete)\nDocumentation auto-syncs with reality (mark checkboxes, bump versions, move epics)\nBody check at end (mental health + momentum preservation)\nSilent after VS Code close (prevent unsaved prompt)\nWorks on ANY project (no hardcoded paths, reads README first)"
      },
      {
        "title": "The 5 States (Start Mode)",
        "body": "StateWhenActionCan Push?🛑 Failed ChecksTests failFix issues❌ NO⚠️ Docs MismatchCode ≠ docsAuto-update docs✅ YES🧑 GroomingNo changesPlan next workN/A✅ In ProgressPartial workUpdate checkboxes✅ YES🎉 Version CompleteAll done!Move to CHANGELOG✅ YES 🎉"
      },
      {
        "title": "Check Policy",
        "body": "From checks/:\n\nEpic branches: Soft fail (warn but allow)\nMain branch: Hard fail (block merge)\nWrap-up (end mode): Soft fail (list fixes, don't push)"
      },
      {
        "title": "The 3-Level System",
        "body": "Level 1: Personal (not tracked)\n\nYour books, notes, local config\nNot part of any project\n\nLevel 2: Project-Specific (e.g., Librarian MCP)\n\nGeneric tool others can use\nHas status files (ROADMAP, CHANGELOG, checks/, checks/)\nExample flagship project for Level 3\n\nLevel 3: Meta-Workflow (this skill)\n\nWorks for ANY project\nNo hardcoded paths\nReads README to find everything\nCan be copied anywhere"
      },
      {
        "title": "Reference Prompts",
        "body": "Original prompts (for future refinement):\n\nbackstage-start.prompt.md - Full start workflow specification\nbackstage-close.prompt.md - Full end workflow specification\n\nLocation: /Users/nfrota/Documents/nonlinear/.github/prompts/\n\nNote: 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."
      },
      {
        "title": "TODO / Future Refinements",
        "body": "Update .sh scripts to read checks/ and checks/ folders\n Add emoji notes (like design-discrepancy 1️⃣-8️⃣ format)\n Simplify diagram (consolidated enforcement, removed \"separate\" step)\n Add code execution points (where scripts run, if any)\n Create templates (for new projects without status files)\n Document edge cases (no git, no README, corrupted files)\n Add examples (successful runs, failed runs, grooming sessions)\n Test on multiple projects (validate universal workflow)\n Consider splitting (start vs end as separate skills?)\n\nCreated: 2026-02-12\nUpdated: 2026-02-18 (v1.0.0 - modular checks/checks)\nStatus: Documentation updated, scripts pending\nLocation: ~/Documents/backstage/skills/backstage/SKILL.md"
      }
    ],
    "body": "Backstage Skill\n\nNickname: backstage:\n\nObjective: Universal project status management for AI-assisted development. Ensures documentation matches reality before every commit.\n\n⚠️ Security Notice\n\nThis is an admin tool with elevated privileges:\n\nExecutes checks from global path ($HOME/Documents/backstage/backstage/checks/global/)\nPulls remote code from GitHub (https://github.com/nonlinear/backstage)\nModifies project files (README, ROADMAP, CHANGELOG with mermaid diagrams)\nRsyncs updates when using update backstage trigger\n\nIntended for:\n\nPersonal use (you control the upstream repo)\nTrusted teams (shared backstage protocol repo)\n\nNot recommended for:\n\nUntrusted third-party projects\nPublic/open-source projects with unknown contributors\n\nMitigations in place:\n\nUser confirmation before applying updates\nGit history (all changes committed, revertable)\nSymlink detection (admin mode auto-updates)\n\nUse at your own risk. Review update-backstage.sh and checks.sh before running.\n\n🔴 Why This Skill Exists (Anti-Drift)\n\nBackstage-skill = ANTI-DRIFT:\n\n✅ Force context awareness (project/epic)\n✅ Health checks prevent chaos\n✅ Architecture-first workflow\n✅ Roadmap visibility = no surprises\n\nWITHOUT IT:\nWork happens outside backstage → drift → broken trust → triple metabolic cost\n\nWITH IT:\n\"good morning X\" → automatic context load → work inside boundaries → paridade maintained\n\nThe Metabolic Cost Problem:\n\nWithout backstage, delegation costs triple:\n\nThe work itself\nExplicating methodology (ethics, preferences, protocols)\nDefining WHERE that learning gets stored (VISION? SOUL? SKILL? memory?)\n\nThis is exhausting for the human.\n\nInvestment is worth it ONLY IF plateau is reached:\n\nHuman teaches ONCE → AI internalizes\nEach session: READ context files → act according to ethics\nEach session: LESS explanation needed\nPlateau = Human delegates, AI executes without supervision\n\nThis skill enforces stabilization.\nForce context awareness (project/epic/design architecture) to prevent drift.\n3x work becomes 1x work.\n\nPolicies & Checks Enforcement\n\nBackstage-skill enforces ALL rules in checks/ (deterministic + interpretive, global + local).\n\nEnforcement Model\nflowchart TD\n    READ_CHK[\"Read checks/<br/>global + local<br/>[Deterministic .sh + Interpretive .md]\"]\n    \n    CONFLICT{Conflict?}\n    MERGE[Merge compatible rules]\n    LOCAL[Local wins]\n    \n    AI[\"AI interprets .md checks<br/>[Contextual enforcement]\"]\n    SH[\"Bash executes .sh checks<br/>[Deterministic validation]\"]\n    \n    AI_ACT[✅ Enforce or discuss]\n    AI_AMBIG[⚠️ Ask user]\n    \n    SH_OK[✅ All checks pass]\n    SH_FAIL[❌ Checks failed]\n    \n    REPORT[\"Report:<br/>📋 Interpretive (always ✅)<br/>🔍 Deterministic (✅/❌)\"]\n    \n    READ_CHK --> CONFLICT\n    CONFLICT -->|No| MERGE\n    CONFLICT -->|Yes| LOCAL\n    MERGE --> AI\n    MERGE --> SH\n    LOCAL --> AI\n    LOCAL --> SH\n    \n    AI -->|Clear| AI_ACT\n    AI -->|Ambiguous| AI_AMBIG\n    \n    SH -->|Pass| SH_OK\n    SH -->|Fail| SH_FAIL\n    \n    AI_ACT --> REPORT\n    AI_AMBIG --> REPORT\n    SH_OK --> REPORT\n    SH_FAIL --> REPORT\n\n\nTwo enforcement domains:\n\nChecks (Interpretive)\n\nchecks/global/*.md = Universal workflow rules\nchecks/local/*.md = Project-specific overrides\nEnforced by: AI (reads markdown, interprets context, acts)\nAlways pass: AI reads, understands, will act accordingly\n\nChecks (Deterministic)\n\nchecks/global/*.sh = Universal validation tests\nchecks/local/*.sh = Project-specific tests\nEnforced by: Bash (executes shell scripts, exit codes)\nPass or fail: ✅ (exit 0) or ❌ (exit non-zero)\n\nPolycentric governance:\n\nGlobal + local rules coexist\nLocal wins on conflict\nAI merges when compatible\n\nReport format:\n\n📋 Interpretive checks:\n  ✅ checks/global/branch-workflow.md (read)\n  ✅ checks/global/commit-style.md (read)\n  ✅ checks/local/dogfooding.md (read)\n\n🔍 Checks (deterministic):\n  ✅ checks/global/navigation-block-readme.sh\n  ✅ checks/global/semver-changelog.sh\n  ❌ checks/local/pre-merge-tasks.sh (incomplete tasks)\n\n\nSelf-contained: All prompts in SKILL.md (no external prompt files needed).\n\nMermaid Diagram Generation (Interpretive)\n\nPurpose: Automatically generate + propagate ROADMAP diagram to all backstage files.\n\nWorkflow:\n\nParse ROADMAP.md (deterministic - SH):\n\nparse-roadmap.sh backstage/ROADMAP.md\n# Output: version|status_emoji|name\n\n\nRead checks/ diagram rules (interpretive - AI):\n\nchecks/global/navigation-block.md defines default format (linear graph, all epics, sequential)\nchecks/local/*.md can override (gantt, flowchart, or diagram: none)\nLocal wins on conflict\n\nGenerate mermaid (interpretive - AI):\n\nApply checks/ rules to parsed data\nCreate mermaid syntax matching specification\nExample (default):\ngraph LR\n    A[🏗️ v0.1.0 Active Epic] --> B[📋 v0.2.0 Backlog Epic]\n\n\nPropagate to all files (deterministic - SH):\n\nInsert after > 🤖 marker\nREADME.md, ROADMAP.md, CHANGELOG.md\nRemove old diagrams (anti-drift)\n\nAI Prompt (when running backstage-start/end):\n\nRead 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.\n\nTools:\n\nparse-roadmap.sh - Extract version|status|name from ROADMAP.md\nchecks/ - Diagram format rules (type, include/exclude logic, status mapping)\nPolycentric Governance (How It Works)\nflowchart TD\n    GLOBAL_POL[checks/global/*.md<br/>Universal rules]\n    LOCAL_POL[checks/local/*.md<br/>Project-specific overrides]\n    \n    GLOBAL_CHK[checks/global/*.sh<br/>Universal tests]\n    LOCAL_CHK[checks/local/*.sh<br/>Project-specific tests]\n    \n    AI[AI reads checks/]\n    BASH[Bash executes checks/]\n    CONFLICT{Conflict?}\n    \n    GLOBAL_POL --> AI\n    LOCAL_POL --> AI\n    GLOBAL_CHK --> BASH\n    LOCAL_CHK --> BASH\n    \n    AI --> CONFLICT\n    CONFLICT -->|Yes| LOCAL_POL\n    CONFLICT -->|No| MERGE[Merge rules]\n    \n    MERGE --> ACTION[Execute workflow]\n    LOCAL_POL --> ACTION\n    BASH --> ACTION\n\n\nThis skill enforces polycentric governance:\n\nReads ALL checks/**/*.md files (global + local)\nExecutes ALL checks/**/*.sh files (global + local)\nMerges checks when compatible\nPrefers local checks on conflict\nReports deterministic check results (pass/fail)\n\nTriggered by: \"good morning\", \"good night\", \"backstage start/end\", \"update backstage\"\n\nWorkflow Diagram\nflowchart TD\n    START[\"Trigger 1️⃣<br/>[SH]\"]\n    MODE{\"Session mode?\"}\n    \n    %% Common enforcement module\n    READ_POL[\"Read checks/<br/>global + local<br/>[AI interprets MD]\"]\n    EXEC_CHK[\"Execute checks/<br/>global + local<br/>[Bash runs SH]\"]\n    \n    REPORT[\"Report 6️⃣<br/>📋 Interpretive (✅)<br/>🔍 Checks (✅/❌)\"]\n    CHECKS_GATE{\"All checks<br/>passed?\"}\n    \n    %% Start Branch\n    START_BRANCH[\"Read README 🤖 block 2️⃣<br/>[MD → AI]\"]\n    START_FILES[\"Locate status files 3️⃣<br/>[SH]\"]\n    START_GIT[\"Check git branch 4️⃣<br/>[SH]\"]\n    START_WORK[\"Analyze changes 5️⃣<br/>[SH]\"]\n    START_FIX[\"🛑 STOP: Fix issues<br/>[AI + SH]\"]\n    START_UPDATE[\"Update docs 7️⃣<br/>[SH writes MD]\"]\n    START_REPORT[\"Developer context 8️⃣<br/>[AI reads MD]\"]\n    START_PUSH[\"Push / Groom 9️⃣<br/>[SH]\"]\n    \n    %% End Branch\n    END_FIXES[\"Add fixes to roadmap<br/>[AI writes MD]\"]\n    END_PUSH[\"Commit + push<br/>[SH]\"]\n    END_VICTORY[\"Victory lap 🏆<br/>[AI reads MD]\"]\n    END_BODY[\"Body check ⏸️<br/>[AI prompt]\"]\n    END_CLOSE[\"Close VS Code 🌙<br/>[SH]\"]\n    END_SILENT[\"[STAY SILENT]\"]\n    \n    %% Update Backstage Branch\n    UPDATE_DETECT[\"Find backstage/ folder<br/>[SH]\"]\n    UPDATE_CHECK_SYM{\"Symlinked?\"}\n    UPDATE_SKIP[\"✅ Already auto-updates<br/>[Report]\"]\n    UPDATE_FETCH[\"Fetch upstream<br/>[SH: git clone]\"]\n    UPDATE_DIFF[\"Compare local vs upstream<br/>[SH: diff]\"]\n    UPDATE_UPTODATE{\"Changes<br/>found?\"}\n    UPDATE_UPTODATE_SKIP[\"✅ Already up to date<br/>[Report]\"]\n    UPDATE_CHANGELOG[\"Generate mini changelog<br/>[AI reads diffs]\"]\n    UPDATE_PROMPT{\"User<br/>approves?\"}\n    UPDATE_ABORT[\"Aborted<br/>[Report]\"]\n    UPDATE_APPLY[\"rsync upstream → local<br/>[SH]\"]\n    UPDATE_REPORT[\"🎉 Updated!<br/>[Report changes]\"]\n    \n    %% Flow\n    START --> MODE\n    \n    MODE -->|Start| START_BRANCH\n    START_BRANCH --> START_FILES\n    START_FILES --> START_GIT\n    START_GIT --> START_WORK\n    START_WORK --> READ_POL\n    START_WORK --> EXEC_CHK\n    \n    READ_POL --> REPORT\n    EXEC_CHK --> REPORT\n    REPORT --> CHECKS_GATE\n    \n    CHECKS_GATE -->|No, start mode| START_FIX\n    START_FIX --> READ_POL\n    CHECKS_GATE -->|Yes| START_UPDATE\n    START_UPDATE --> START_REPORT\n    START_REPORT --> START_PUSH\n    \n    MODE -->|End| READ_POL\n    MODE -->|End| EXEC_CHK\n    CHECKS_GATE -->|No, end mode| END_FIXES\n    CHECKS_GATE -->|Yes| END_PUSH\n    END_FIXES --> END_VICTORY\n    END_PUSH --> END_VICTORY\n    END_VICTORY --> END_BODY\n    END_BODY --> END_CLOSE\n    END_CLOSE --> END_SILENT\n    \n    MODE -->|Update| UPDATE_DETECT\n    UPDATE_DETECT --> UPDATE_CHECK_SYM\n    UPDATE_CHECK_SYM -->|Yes| UPDATE_SKIP\n    UPDATE_CHECK_SYM -->|No| UPDATE_FETCH\n    UPDATE_FETCH --> UPDATE_DIFF\n    UPDATE_DIFF --> UPDATE_UPTODATE\n    UPDATE_UPTODATE -->|No| UPDATE_UPTODATE_SKIP\n    UPDATE_UPTODATE -->|Yes| UPDATE_CHANGELOG\n    UPDATE_CHANGELOG --> UPDATE_PROMPT\n    UPDATE_PROMPT -->|No| UPDATE_ABORT\n    UPDATE_PROMPT -->|Yes| UPDATE_APPLY\n    UPDATE_APPLY --> UPDATE_REPORT\n\n\nDomain labels:\n\n[MD] - Markdown file (checks/*.md, ROADMAP.md) = Human/AI prompts\n[SH] - Shell script (checks/*.sh, backstage-start.sh) = Machine executables\n[AI reads MD] - AI parses markdown, understands rules/prompts\n[AI writes MD] - AI generates markdown content\n[SH writes MD] - Script modifies markdown files (checkboxes, navigation blocks)\n[Bash runs SH] - Bash executes shell scripts (deterministic validation)\n[AI interprets MD] - AI reads checks/, acts contextually\n\nCritical separation:\n\nchecks/ = prompts - AI reads, interprets, acts\nchecks/ = executors - Bash runs commands, returns exit codes\nAI intermediates - Reads checks/, executes checks/, integrates report\n\nNotes:\n\n1️⃣ Trigger: \"backstage start\", \"vamos trabalhar no X\", \"whatsup\" (start mode) OR \"backstage end\", \"boa noite\", \"wrap up\" (end mode)\n\nCode: backstage-start.sh OR backstage-end.sh\n\n2️⃣ 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.\n\nCode: backstage-start.sh::read_navigation_block()\n\n3️⃣ 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.\n\nCode: backstage-start.sh::locate_status_files()\n\n4️⃣ Check git branch: Run git branch --show-current. Determine work context.\n\nCode: backstage-start.sh::check_branch()\n\n5️⃣ Analyze changes:\n\ngit diff --name-status\ngit diff --stat\nLAST_VERSION=$(grep -m1 \"^## v\" CHANGELOG.md | cut -d' ' -f2)\ngit log --oneline \"${LAST_VERSION}..HEAD\"\n\n\nCategorize: patch/minor/major. Compare with ROADMAP. Match reality to plans.\n\nCode: backstage-start.sh::analyze_changes()\n\n6️⃣ Report - Policies + Checks:\n\nReport format:\n\n📋 Interpretive checks:\n  ✅ checks/global/branch-workflow.md (read)\n  ✅ checks/global/commit-style.md (read)\n  ✅ checks/local/dogfooding.md (read)\n\n🔍 Checks (deterministic):\n  ✅ checks/global/navigation-block-readme.sh\n  ✅ checks/global/semver-changelog.sh\n  ❌ checks/local/pre-merge-tasks.sh (incomplete tasks)\n\n\nPolicies always ✅: AI reads, interprets, will act accordingly\n\nChecks can fail ❌: Exit code determines status\n\nMode behavior:\n\nStart mode: Hard fail (block commit if checks fail)\n\nEnd mode: Soft fail (warn, add to ROADMAP)\n\nCode: backstage-start.sh::report_enforcement()\n\n7️⃣ 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.\n\nCode: backstage-start.sh::update_docs()\n\n8️⃣ Developer context: Generate outcome-based summary (5 possible states: 🛑 Failed, ⚠️ Mismatch, 🧑 Grooming, ✅ Progress, 🎉 Complete). Show: When, What, Why, Status, Next.\n\nCode: backstage-start.sh::show_developer_context()\n\n9️⃣ Push / Groom: If checks passed, commit with appropriate message (progress/release). If grooming mode, just update ROADMAP priorities.\n\nCode: backstage-start.sh::prompt_push()\n\nVictory lap 🏆: Brief reminder of achievements (3 main items max + stats). Keep it short.\n\nCode: backstage-end.sh::victory_lap()\n\nBody check ⏸️: Ask: Hungry? Thirsty? Tired? Need to stretch? What does body NEED right now?\n\nCode: backstage-end.sh::body_check()\n\nClose 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\".\n\nCode: backstage-end.sh::close_vscode()\n\n[STAY SILENT]: No reply after closing VS Code (prevents unsaved prompt).\n\n🔄 Update Backstage: \"update backstage\" trigger\n\nFind backstage folder: Search CWD for */backstage/ directory\nCheck if symlinked: If checks/global/ is symlink → already auto-updates (skip)\nFetch upstream: Clone https://github.com/nonlinear/backstage (temp dir)\nCompare: Diff local checks/global/ vs upstream\nGenerate changelog: Show NEW, CHANGED, REMOVED files (with descriptions)\nPrompt user: \"Apply updates? (y/n)\"\nApply if yes: rsync --delete upstream → local\nReport: What changed, how many files\nCode: update-backstage.sh\nWhen to Use\n\nTrigger patterns:\n\n\"Bom dia\" / \"Good morning\" + PROJECT:\n\nbom dia personal / good morning personal\nbom dia librarian / good morning librarian\nAction: Load project context + run health checks\nOutput: Current epic, roadmap status, branch info, gaps\n\n\"Update backstage\":\n\nAction: Compare local */backstage/checks/global/ against official repo\nDetect changes: What's NEW or CHANGED in upstream\nShow delta: Mini changelog (1 paragraph: what you GAIN if updated)\nConfirm: User approves update\nExecute: Pull latest checks/global/ files from upstream\nOutput: Updated files list, what changed\n\nStart mode:\n\n\"backstage start\"\n\"whatsup\"\n\"vamos trabalhar no X\"\n\"what's the status\"\nBefore every commit (especially after long breaks)\n\nEnd mode:\n\n\"backstage end\"\n\"boa noite\"\n\"wrap up\"\n\"pause work\"\nEnd of work session, when tired, or context-switch\n\"Update Backstage\" Workflow\n\nTrigger: update backstage (from any project using backstage protocol)\n\nPurpose: Sync local checks/global/ with latest from upstream repo, show what's new.\n\nHow It Works\n\nDetect project backstage folder:\n\n# Search up from CWD for backstage/ folder\nfind . -type d -name \"backstage\" | grep -E \"backstage$\"\n# Or read README 🤖 block for backstage location\n\n\nConfirm upstream source:\n\n# Check if checks/global/ is symlink (admin mode)\nif [ -L \"backstage/checks/global\" ]; then\n  echo \"✅ Symlinked to upstream (auto-updates)\"\n  exit 0\nfi\n\n# Otherwise, assume official repo\nUPSTREAM=\"https://github.com/nonlinear/backstage\"\necho \"Upstream: $UPSTREAM\"\necho \"Confirm this is correct? (y/n)\"\n\n\nFetch latest from upstream:\n\n# Clone or pull latest\nTMP_DIR=$(mktemp -d)\ngit clone --depth 1 \"$UPSTREAM\" \"$TMP_DIR/backstage\"\n\n\nCompare local vs upstream:\n\n# Diff local checks/global/ vs upstream\ndiff -qr backstage/checks/global/ \"$TMP_DIR/backstage/backstage/checks/global/\"\n\n\nGenerate mini changelog:\n\n📦 Backstage Updates Available:\n\nNEW files (3):\n- skill-publish-warning.sh (warns before merging unpublished skills)\n- rebase-cadence.md (suggests rebase if branch >7 days old)\n- epic-notes-orphan-detection.md (detects orphan epic notes)\n\nCHANGED files (2):\n- merge-to-main.md (added Step 0: skill publish check)\n- epic-branch.sh (improved detection logic)\n\nWHAT YOU GAIN:\nBetter skill publishing workflow, orphan detection, rebase reminders.\n\n\nPrompt user:\n\nApply these updates? (y/n)\n\n\nUpdate if confirmed:\n\n# Copy upstream checks/global/ to local\nrsync -av --delete \"$TMP_DIR/backstage/backstage/checks/global/\" backstage/checks/global/\n\n# Cleanup\nrm -rf \"$TMP_DIR\"\n\necho \"✅ Updated checks/global/ from upstream\"\n\n\nReport:\n\n🎉 Backstage updated!\n\nFiles changed: 5\n- Added: skill-publish-warning.sh, rebase-cadence.md, epic-notes-orphan-detection.md\n- Modified: merge-to-main.md, epic-branch.sh\n\nNext: Run 'backstage start' to test new checks.\n\nEdge Cases\n\nSymlinked (admin mode):\n\nIf checks/global/ is symlink → already auto-updates\nJust report: \"✅ Already symlinked to upstream (no action needed)\"\n\nNo changes:\n\nIf local == upstream → report: \"✅ Already up to date\"\n\nConflicts:\n\nIf user modified global checks locally → warn, ask to resolve\nSuggest: copy to checks/local/ (overrides) before updating\n\nNo internet:\n\nIf git clone fails → report: \"❌ Can't reach upstream (offline?)\"\nKey Principles\nREADME's 🤖 block = Single source of truth for file locations\nStatus files = AI prompts (checks/ = tests, checks/ = rules, ROADMAP = backlog, CHANGELOG = history)\nPolycentric governance (global + local rules, local wins on conflict)\nChecks must pass before commit (non-negotiable for start mode, soft fail for end mode)\nCHANGELOG is append-only (never edit old entries, add NEW entry for corrections)\n5 possible outcomes (Failed, Mismatch, Grooming, Progress, Complete)\nDocumentation auto-syncs with reality (mark checkboxes, bump versions, move epics)\nBody check at end (mental health + momentum preservation)\nSilent after VS Code close (prevent unsaved prompt)\nWorks on ANY project (no hardcoded paths, reads README first)\nThe 5 States (Start Mode)\nState\tWhen\tAction\tCan Push?\n🛑 Failed Checks\tTests fail\tFix issues\t❌ NO\n⚠️ Docs Mismatch\tCode ≠ docs\tAuto-update docs\t✅ YES\n🧑 Grooming\tNo changes\tPlan next work\tN/A\n✅ In Progress\tPartial work\tUpdate checkboxes\t✅ YES\n🎉 Version Complete\tAll done!\tMove to CHANGELOG\t✅ YES 🎉\nCheck Policy\n\nFrom checks/:\n\nEpic branches: Soft fail (warn but allow)\nMain branch: Hard fail (block merge)\nWrap-up (end mode): Soft fail (list fixes, don't push)\nThe 3-Level System\n\nLevel 1: Personal (not tracked)\n\nYour books, notes, local config\nNot part of any project\n\nLevel 2: Project-Specific (e.g., Librarian MCP)\n\nGeneric tool others can use\nHas status files (ROADMAP, CHANGELOG, checks/, checks/)\nExample flagship project for Level 3\n\nLevel 3: Meta-Workflow (this skill)\n\nWorks for ANY project\nNo hardcoded paths\nReads README to find everything\nCan be copied anywhere\nReference Prompts\n\nOriginal prompts (for future refinement):\n\nbackstage-start.prompt.md - Full start workflow specification\nbackstage-close.prompt.md - Full end workflow specification\n\nLocation: /Users/nfrota/Documents/nonlinear/.github/prompts/\n\nNote: 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.\n\nTODO / Future Refinements\n Update .sh scripts to read checks/ and checks/ folders\n Add emoji notes (like design-discrepancy 1️⃣-8️⃣ format)\n Simplify diagram (consolidated enforcement, removed \"separate\" step)\n Add code execution points (where scripts run, if any)\n Create templates (for new projects without status files)\n Document edge cases (no git, no README, corrupted files)\n Add examples (successful runs, failed runs, grooming sessions)\n Test on multiple projects (validate universal workflow)\n Consider splitting (start vs end as separate skills?)\n\nCreated: 2026-02-12 Updated: 2026-02-18 (v1.0.0 - modular checks/checks) Status: Documentation updated, scripts pending Location: ~/Documents/backstage/skills/backstage/SKILL.md"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/nonlinear/backstage",
    "publisherUrl": "https://clawhub.ai/nonlinear/backstage",
    "owner": "nonlinear",
    "version": "1.0.4",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/backstage",
    "downloadUrl": "https://openagent3.xyz/downloads/backstage",
    "agentUrl": "https://openagent3.xyz/skills/backstage/agent",
    "manifestUrl": "https://openagent3.xyz/skills/backstage/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/backstage/agent.md"
  }
}