Skip to content

aspiers/ai-config / .agents/skills/upstreaming-status

upstreaming-status

Verified

Reports how local Git branches are progressing toward canonical upstream inclusion as a compact terminal table plus a browser-rendered HTML report, with branch purpose, stack dependencies, Git Machete topology, ahead/behind counts, change-request status, and next action. Use when asked for upstreaming status, local branch submission progress, which branches have change requests, or what remains before they can land.

FileKindSize
SKILL.mdskill md9.9 KB
assets/report.htmlother12.5 KB
scripts/render-report.pyexecutablescript10.4 KB

assets/report.html

View on GitHub
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>{{TITLE}}</title>
    <style>
      :root {
        color-scheme: light dark;
        --bg: #f5f7fa;
        --panel: #ffffff;
        --text: #172033;
        --muted: #5d6778;
        --border: #d7dce5;
        --accent: #3157c8;
        --local: #697386;
        --published: #a66b00;
        --draft: #7253ba;
        --blocked: #bc2f3b;
        --ready: #147d57;
        --closed: #697386;
        --merged: #147d57;
        --shadow: 0 10px 28px rgb(30 42 68 / 10%);
      }
      @media (prefers-color-scheme: dark) {
        :root {
          --bg: #111722;
          --panel: #1a2230;
          --text: #edf2f7;
          --muted: #aeb9c7;
          --border: #344054;
          --accent: #91a9ff;
          --local: #aeb9c7;
          --published: #efbd64;
          --draft: #c4a7ff;
          --blocked: #ff8a80;
          --ready: #5bd6a2;
          --closed: #aeb9c7;
          --merged: #5bd6a2;
          --shadow: 0 10px 28px rgb(0 0 0 / 28%);
        }
      }
      * {
        box-sizing: border-box;
      }
      body {
        background: var(--bg);
        color: var(--text);
        font:
          16px/1.5 system-ui,
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          sans-serif;
        margin: 0;
      }
      main {
        padding: clamp(1.25rem, 4vw, 3rem);
      }
      h1 {
        font-size: clamp(1.8rem, 5vw, 3rem);
        line-height: 1.1;
        margin: 0 0 0.7rem;
      }
      h2 {
        font-size: 1.2rem;
      }
      a {
        color: var(--accent);
      }
      a:focus-visible {
        outline: 3px solid var(--accent);
        outline-offset: 3px;
      }
      .summary {
        font-size: 1.1rem;
        margin-bottom: 0.35rem;
      }
      .meta {
        color: var(--muted);
        margin: 0 0 1.5rem;
      }
      .table-wrap {
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: var(--shadow);
        overflow-x: auto;
      }
      table {
        border-collapse: collapse;
        min-width: 1040px;
        width: 100%;
      }
      caption {
        font-weight: 700;
        padding: 0.85rem 1rem;
        text-align: left;
      }
      th,
      td {
        border-bottom: 1px solid var(--border);
        padding: 0.85rem 1rem;
        text-align: left;
        vertical-align: top;
      }
      th {
        background: color-mix(in srgb, var(--panel), var(--accent) 6%);
        font-size: 0.9rem;
      }
      tbody tr:last-child td {
        border-bottom: 0;
      }
      tbody tr {
        box-shadow: inset 4px 0 var(--stage);
      }
      .stage-local {
        --stage: var(--local);
      }
      .stage-published {
        --stage: var(--published);
      }
      .stage-draft {
        --stage: var(--draft);
      }
      .stage-blocked {
        --stage: var(--blocked);
      }
      .stage-ready {
        --stage: var(--ready);
      }
      .stage-closed {
        --stage: var(--closed);
      }
      .stage-merged {
        --stage: var(--merged);
      }
      code {
        font-family:
          ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
          "Courier New", monospace;
        font-size: 0.95em;
      }
      .branch {
        width: 40%;
      }
      .branch > code {
        white-space: nowrap;
      }
      .description {
        color: var(--muted);
        margin: 0.45rem 0 0;
      }
      .meta {
        color: var(--muted);
      }
      .dependencies {
        margin: 0;
        padding-left: 1.25rem;
      }
      .dependencies li + li {
        margin-top: 0.25rem;
      }
      .no-dependencies {
        color: var(--muted);
      }
      .divergence {
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }
      .machete,
      .notes {
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-top: 1.5rem;
        padding: 1rem 1.25rem;
      }
      .machete h2,
      .notes h2 {
        margin: 0 0 0.5rem;
      }
      .machete p {
        color: var(--muted);
        margin: 0 0 0.75rem;
      }
      .machete pre {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        margin: 0;
        overflow-x: auto;
        padding: 1rem;
      }
      .machete pre code {
        font-size: 0.9rem;
      }
      .notes ul {
        margin: 0;
        padding-left: 1.25rem;
      }
      .empty {
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1rem;
      }
      .hidden,
      [hidden] {
        display: none !important;
      }
      .view {
        align-items: end;
        background: var(--panel);
        border: 1px solid var(--border);
        border-radius: 12px;
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem 1.5rem;
        margin-bottom: 1rem;
        padding: 0.85rem 1rem;
      }
      .view fieldset {
        border: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        margin: 0;
        padding: 0;
      }
      .view legend,
      .view .field > span {
        color: var(--muted);
        display: block;
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
        padding: 0;
      }
      .view select,
      .view input[type="search"] {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 6px;
        color: var(--text);
        font: inherit;
        padding: 0.3rem 0.5rem;
      }
      .chip {
        border: 1px solid var(--border);
        border-left: 4px solid var(--stage);
        border-radius: 999px;
        cursor: pointer;
        padding: 0.2rem 0.7rem 0.2rem 0.5rem;
        white-space: nowrap;
      }
      .chip:has(input:checked) {
        background: color-mix(in srgb, var(--panel), var(--stage) 18%);
      }
      .chip:has(input:focus-visible),
      .view select:focus-visible,
      .view input:focus-visible {
        outline: 3px solid var(--accent);
        outline-offset: 2px;
      }
      .unblocked-toggle {
        white-space: nowrap;
      }
      .count {
        color: var(--muted);
        margin: 0 0 0 auto;
      }
    </style>
  </head>
  <body>
    <main>
      <h1>{{HEADING}}</h1>
      <p class="summary">{{SUMMARY}}</p>
      <p class="meta">{{META}}</p>
      {{EMPTY}}
      <form
        class="view{{TABLE_HIDDEN}}"
        id="view"
        data-storage-key="{{STORAGE_KEY}}"
        aria-label="Sort and filter branches"
      >
        <label class="field">
          <span>Sort by</span>
          <select name="sort">
            <option value="progress-desc" selected>Progress (most first)</option>
            <option value="progress">Progress (least first)</option>
            <option value="stack">Stack order</option>
            <option value="size">Branch size (smallest first)</option>
            <option value="name">Name A–Z</option>
            <option value="staleness">Staleness (most behind first)</option>
          </select>
        </label>
        <fieldset>
          <legend>Stages</legend>
          {{STAGE_FILTERS}}
        </fieldset>
        <label class="field">
          <span>Search</span>
          <input type="search" name="q" placeholder="Branch, description, PR…" />
        </label>
        <label class="field{{WHO_HIDDEN}}">
          <span>Whose move</span>
          <select name="who">
            <option value="">Anyone</option>
            <option value="me">Needs me</option>
            <option value="upstream">Waiting on upstream</option>
          </select>
        </label>
        <label
          class="unblocked-toggle"
          title="Hide branches that still need another source branch to merge first"
        >
          <input type="checkbox" name="unblocked" /> Nothing left to land first
        </label>
        <p class="count" id="count" aria-live="polite"></p>
      </form>
      <div class="table-wrap{{TABLE_HIDDEN}}">
        <table>
          <caption>
            Source branches
          </caption>
          <thead>
            <tr>
              <th scope="col" class="branch">Branch and description</th>
              <th scope="col">Depends on</th>
              <th scope="col">Upstream ↕</th>
              <th scope="col">Upstream progress</th>
              <th scope="col">Next step</th>
            </tr>
          </thead>
          <tbody>
            {{ROWS}}
          </tbody>
        </table>
      </div>
      <section class="machete">
        <h2>Git Machete status graph</h2>
        <p>The configured stack topology, shown separately from upstream progress.</p>
        <pre><code>{{MACHETE_GRAPH}}</code></pre>
      </section>
      {{NOTES}}
    </main>
    <script>
      (() => {
        const form = document.getElementById("view");
        const tbody = document.querySelector("tbody");
        const rows = [...tbody.rows];
        const count = document.getElementById("count");
        const stages = [...form.querySelectorAll('[name="stage"]')];
        const { sort, q, who, unblocked } = form.elements;
        const storageKey = form.dataset.storageKey;
        const byNumber = (key, direction = 1) => (a, b) =>
          direction * (a.dataset[key] - b.dataset[key]);
        const sorters = {
          progress: () => 0,
          "progress-desc": byNumber("progress", -1),
          stack: byNumber("stack"),
          size: byNumber("ahead"),
          name: (a, b) => a.dataset.name.localeCompare(b.dataset.name),
          staleness: byNumber("behind", -1),
        };

        // The view lives in the URL hash so a reload after regeneration
        // keeps it; localStorage restores it when the report opens afresh.
        function serialise() {
          const params = new URLSearchParams({ sort: sort.value });
          params.set(
            "stages",
            stages.filter((box) => box.checked).map((box) => box.value).join(",")
          );
          if (q.value) params.set("q", q.value);
          if (who.value) params.set("who", who.value);
          if (unblocked.checked) params.set("unblocked", "1");
          return params.toString();
        }

        function restore() {
          let saved = location.hash.slice(1);
          try {
            saved ||= localStorage.getItem(storageKey) || "";
          } catch {}
          if (!saved) return;
          const params = new URLSearchParams(saved);
          if (Object.hasOwn(sorters, params.get("sort"))) sort.value = params.get("sort");
          if (params.has("stages")) {
            const wanted = params.get("stages").split(",");
            stages.forEach((box) => (box.checked = wanted.includes(box.value)));
          }
          q.value = params.get("q") || "";
          who.value = params.get("who") || "";
          unblocked.checked = params.get("unblocked") === "1";
        }

        function matches(row) {
          const text = row.textContent.toLowerCase();
          return (
            stages.some((box) => box.checked && box.value === row.dataset.stage) &&
            text.includes(q.value.trim().toLowerCase()) &&
            (!who.value || row.dataset.waitingOn === who.value) &&
            (!unblocked.checked || row.dataset.unblocked === "1")
          );
        }

        function apply() {
          const compare = sorters[sort.value];
          rows.sort((a, b) => compare(a, b) || a.dataset.rank - b.dataset.rank);
          let shown = 0;
          for (const row of rows) {
            row.hidden = !matches(row);
            shown += !row.hidden;
            tbody.append(row);
          }
          const hidden = rows.length - shown;
          count.textContent =
            `Showing ${shown} of ${rows.length} branches` +
            (hidden ? ` · ${hidden} hidden by filters` : "");
        }

        // Save only views the user picked, so changed defaults still apply.
        function update() {
          apply();
          const state = serialise();
          history.replaceState(null, "", "#" + state);
          try {
            localStorage.setItem(storageKey, state);
          } catch {}
        }

        restore();
        // Some scripted drivers fire only "change" on selects.
        form.addEventListener("input", update);
        form.addEventListener("change", update);
        form.addEventListener("submit", (event) => event.preventDefault());
        window.addEventListener("hashchange", () => {
          restore();
          apply();
        });
        apply();
      })();
    </script>
  </body>
</html>
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall