Skip to content

fix(startup-banner): correct AGENTS/SKILLS/EXTENSIONS stats and add info dashboard#25

Open
aporcelli wants to merge 2 commits into
Gentleman-Programming:mainfrom
aporcelli:fix/startup-banner-accuracy
Open

fix(startup-banner): correct AGENTS/SKILLS/EXTENSIONS stats and add info dashboard#25
aporcelli wants to merge 2 commits into
Gentleman-Programming:mainfrom
aporcelli:fix/startup-banner-accuracy

Conversation

@aporcelli
Copy link
Copy Markdown
Contributor

@aporcelli aporcelli commented May 20, 2026

Problem

The startup banner HUD displays inaccurate information:

  • AGENTS label counts skill-registered commands from pi.getCommands(), not actual SDD agent files
  • EXTENSIONS reads settings.extensions[] which is always empty; real extensions are declared in each installed package's pi.extensions manifest
  • No distinction between SDD phase agents and on-demand skills

Solution

AGENTS → AGENTS + SKILLS (split)

Before After
AGENTS: N loaded (skill commands) AGENTS: N phases (SDD agent files)
SKILLS: N loaded (skill commands)
  • AGENTS counts files in ~/.pi/agent/agents/sdd-*.md
  • SKILLS keeps the original pi.getCommands().filter(source==="skill") count

EXTENSIONS: now counts real extension files

Scans each installed package's package.json and sums pi.extensions entries, instead of reading the always-empty settings.extensions[].

Dashboard layout (wide mode)

PATH:       /home/user/project        EXTENSIONS: N active
GIT:        On branch main            PLUGINS:    N package(s)
MCP:        N server(s)               SKILLS:     N loaded
AGENTS:     N phases                  TOOLS:      N custom
VER:        v0.75.4

Technical changes

  • Added readdir import for counting SDD agent files
  • Added countSddAgents() — reads ~/.pi/agent/agents/ for sdd-*.md files
  • Fixed countPackageExtensions() — resolves each npm package's package.json, reads pi.extensions, sums counts. Fixed early return null bug that aborted the entire function on git packages
  • Removed broken settings.extensions[] lookup
  • Reordered dashboard rows: Left: PATH, GIT, MCP, AGENTS, VER | Right: EXTENSIONS, PLUGINS, SKILLS, TOOLS

Changes

File Change
extensions/startup-banner.ts Enhanced HUD: split AGENTS/SKILLS, fixed EXTENSIONS count, reordered layout

Test Plan

  • Verified AGENTS shows correct count of sdd-*.md files in agent dir
  • Verified SKILLS count matches pi.getCommands() output
  • Verified EXTENSIONS matches sum of pi.extensions across installed packages
  • Verified PLUGINS count matches settings.packages length
  • Verified layout renders correctly in both wide and narrow terminal widths

…ith accurate counts

The startup banner displayed 'AGENTS: 213 loaded' but was counting
skill-registered commands, not agents. Additionally, 'EXTENSIONS: 0 active'
was reading settings.extensions[] which is always empty — real extensions
are declared in each package's pi.extensions manifest.

Changes:
- Add SDD agent count (11 phases) from ~/.pi/agent/agents/sdd-*.md
- Rename AGENTS count to SKILLS (uses pi.getCommands() skill count: 213)
- Fix EXTENSIONS count by scanning pi.extensions from each package.json
- Reorder info dashboard layout per user preference:
  Left: PATH, GIT, MCP, AGENTS, VER
  Right: EXTENSIONS, PLUGINS, SKILLS, TOOLS
Copy link
Copy Markdown
Collaborator

@Alan-TheGentleman Alan-TheGentleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup here, the direction for splitting AGENTS/SKILLS and counting real extension manifests makes sense.

I’m requesting changes because this PR also removes the existing startup gating around CLI commands and small/unsupported terminal modes. That changes behavior outside the stats/dashboard fix: the banner can clear/render during flows like pi update, pi install, scripted runs, or constrained terminals where current main intentionally skips or downgrades the intro.

Can you restore the CLI/TTY/terminal-size/resize guard semantics from current main while keeping the stats/dashboard changes? Also please remove or finish the new sparkle path, since renderStarCell() currently always returns null and leaves the sparkle variables effectively dead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants