architecture
Use when the user asks to improve architecture, find refactoring opportunities, surface deepening opportunities, consolidate tightly-coupled modules, or make a…
Use when you need a single-pane cross-repo health view across all vault-registered GitLab and GitHub projects. Discovers repos from `_overview.md` frontmatter in `<vault>/01-projects/*/`, aggregates open issues, MRs, critical labels, and stale signals via parallel `glab`/`gh`
$ npx -y skills add Kanevry/session-orchestrator --skill gitlab-portfolio --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/gitlab-portfolioContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when you need a single-pane cross-repo health view across all vault-registered GitLab and GitHub projects. Discovers repos from `_overview.md` frontmatter in `<vault>/01-projects/*/`, aggregates open issues, MRs, critical labels, and stale signals via parallel `glab`/`gh`
name: gitlab-portfolio description: > Use when you need a single-pane cross-repo health view across all vault-registered GitLab and GitHub projects. Discovers repos from `_overview.md` frontmatter in `<vault>/01-projects/*/`, aggregates open issues, MRs, critical labels, and stale signals via parallel `glab`/`gh` calls, then writes an idempotent `_PORTFOLIO.md` dashboard. Runs automatically at session-start Phase 2 when `gitlab-portfolio.enabled=true`. Triggers: "show portfolio status", "refresh the portfolio dashboard", "which repos have critical issues", "run /portfolio". <example>Context: session-start, gitlab-portfolio.enabled=true, vault has 5 registered repos. user: "/session deep" assistant: "Portfolio: 3 critical issues across 2 repos — run /portfolio for details. Dashboard written to vault/01-projects/_PORTFOLIO.md."</example> model: sonnet
> Aggregates cross-repo health signals from vault-registered projects into a single `_PORTFOLIO.md` dashboard — idempotent, opt-in, and `_generator`-marked.
gitlab-portfolio gives you a single-pane view of your entire project portfolio. It iterates all vault-registered repositories, dispatches parallel CLI calls to `glab` / `gh`, and writes a structured Markdown dashboard at `<vault-dir>/01-projects/_PORTFOLIO.md`. The result is a living status snapshot — updated on demand or at session-start — that never overwrites hand-edited files.
Implementation: `scripts/lib/gitlab-portfolio/aggregator.mjs` — `discoverRepos()`.
Iterates `<vault-dir>/01-projects/*/` subdirectories:
1. **Primary** — Read `_overview.md` YAML frontmatter. Look for `gitlab: <namespace/repo>` and/or `github: <owner/repo>`. Both keys may be present on a single repo. 2. **Fallback** — If `_overview.md` is absent or missing those keys, read `.vault.yaml` at the project root: `spec.links.gitlab` / `spec.links.github`. 3. **Skip** — Directories with neither source are silently skipped.
Output is an array of `RepoDescriptor` objects: `{ slug, gitlab, github }`.
Implementation: `scripts/lib/gitlab-portfolio/aggregator.mjs` — `aggregateAll(repos, config)`.
All repos are fetched in parallel via `Promise.allSettled`. Per-repo CLI dispatch:
# GitLab glab issue list --repo <namespace/repo> --state opened --output json glab mr list --repo <namespace/repo> --state opened --output json # GitHub gh issue list --repo <owner/repo> --state open --json number,title,labels,createdAt,updatedAt,milestone gh pr list --repo <owner/repo> --state open --json number,title,labels,createdAt,updatedAt
Per-repo summary fields derived from JSON output:
| Field | Derivation | |---|---| | `openIssues` / `openMRs` | array lengths | | `critical` | issues where any label matches `critical-labels` (case-insensitive) | | `stale` | issues where `updatedAt` older than `stale-days` days | | `nextMilestone` | earliest non-null `milestone.title` across open issues | | `lastActivity` | max `updatedAt` across all issues + MRs | | `topIssues` | first 3 open issues sorted by `createdAt` ascending (oldest open first) |
On CLI failure per repo: behaviour is controlled by `mode` (see Error Handling).
Implementation: `scripts/lib/gitlab-portfolio/markdown-writer.mjs` — `renderDashboard(summaries, config)`.
**Output path:** `<vault-dir>/01-projects/_PORTFOLIO.md`. Frontmatter keys: `_generator: session-orchestrator-gitlab-portfolio@1`, `created` (ISO8601, set once), `updated` (ISO8601, refreshed each write), `repos` (count). Atomic write: content built in memory, committed via a single `writeFileSync`.
`parseFrontmatter` and `emitAction` imported from `scripts/lib/vault-mirror/utils.mjs`. Rules:
1. No file → `created`. 2. File exists, `_generator` absent or differs → `skipped-handwritten` (never overwrite human content). 3. File exists, generator matches, `updated` ≤ fresh data → `updated`. 4. File exists, generator matches, `updated` > fresh data → `skipped-noop`.
Stdout action shape: `{"action":"updated","path":"01-projects/_PORTFOLIO.md","repos":16,"critical":3}`
Opt-in via the `gitlab-portfolio:` block in Session Config (`CLAUDE.md` / `AGENTS.md`):
gitlab-portfolio: enabled: true mode: warn # warn | strict | off stale-days: 30 critical-labels: ["priority::critical", "priority::high"]
| Field | Default | Meaning | |---|---|---| | `enabled` | `false` | Master switch. | | `mode` | `warn` | `warn` / `strict` / `off` — failure handling; `off` ≡ disabled. | | `stale-days` | `30` | Issues older than N days are flagged stale. | | `critical-labels` | `["priority::critical","priority::high"]` | Label substrings that classify an issue as critical (case-insensitive). |
**`--vault-dir` validation (SEC, GH #44).** The `--vault-dir` CLI argument and `vault-integration.vault-dir` Session Config value are validated against the user's home directory via `validatePathInsideProject` (`scripts/lib/path-utils.mjs`). Both phases apply:
Give your agents a working rhythm. You type three commands: /session reads your repository, your open issues and the last session, proposes what to work on, and waits for your correction.
Repo: Kanevry/session-orchestrator
Use when the user asks to improve architecture, find refactoring opportunities, surface deepening opportunities, consolidate tightly-coupled modules, or make a…
Use this skill when running an autonomous session-orchestration loop. Chains session-start → session-plan → wave-executor → session-end for N iterations with…
Use this skill when scaffolding the minimum repository structure required by session-orchestrator. Invoked automatically by the Bootstrap Gate when CLAUDE.md,…
Use when you have a feature idea but the scope or UX is still ambiguous — runs a lightweight Socratic design dialogue (3-5 AUQ rounds) and writes a spec…
Use when detecting drift between CLAUDE.md (or AGENTS.md, the Codex CLI alias) / _meta narrative and live repository state. Ten checks: absolute-path…
Monitor iterative improvement loops for convergence. Three signals — shrinking diff, pass-rate plateau, velocity — drive a Stop/Continue/Investigate decision…