Skip to content

feat(cli): add doctor and refresh terminal UX - #231

Merged
harlan-zw merged 14 commits into
mainfrom
feat/doctor
Oct 8, 2026
Merged

harlan-zw merged 14 commits into
mainfrom
feat/doctor

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Requested Skill discovery, cleanup, and terminal UX improvements.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Skills scattered across Agent targets and projects need an inventory before cleanup. Add skilld doctor with home-only discovery, exclude globs, content fingerprints, and separate skills.sh triage.

Doctor starts with recommendations for skills.sh migration, unknown installs, ownership problems, and identical copies. Each group opens projects or folders before individual Skills. Symlink views include direct links and linked parent folders, with their destinations. Counts distinguish physical Skills from linked paths. Broken links remain visible when worktrees are included. Linked worktrees are excluded even through explicit roots and aliases. Broad home .local discovery is skipped. Configured Skill roots and active symlink targets remain included without scanning adjacent app data. Explicit exclusions and scan scope still apply. Filters change the view; action reviews still list every affected target. Doctor shows scan progress and previews migration or removal before changing files. Applying an action rechecks targets, saves recovery copies, and preserves unrelated lock metadata. Migration uses verified source delivery and stops when identity or target placement cannot be established.

Unify colours, spacing, narrow layouts, and keyboard focus across command output, help, pickers, approval prompts, updates, and upgrades. Doctor adds readable scan problems and full notices, plus a durable action summary after returning to the shell. Machine output retains its existing envelopes and streams.

Add the original skilld-tui-design Skill, distilled from the reviewed tui-design and OpenShell tui-development Skills. Its source review records exact revisions and the adopted and rejected guidance.

On this workstation, one before/after home scan fell from 25.03s to 6.74s after excluding generated paths. Both scans found 93 skilld installs and 23 skills.sh installs. Historical commit searches and project-to-global deduplication remain outside Doctor's actions. Managed Skills use the existing update workflow.

Shared CLI presentation and Doctor discovery feed reviewed migration or removal through source verification and local storage

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Agent verification from Codex:

  • The home sweep found 432 Skill directories, including 23 skills.sh installs, in 22.07 seconds.
  • The terminal fixture preserved files on Escape. Enter removed its target and lock entry, then retained recovery files.
  • This image replays the captured terminal output at its original 112 × 30 dimensions.
  • Live source checking returned TRUSTED_ROOT_UNCONFIGURED. This development build lacks the release trust pin. Migration delivery passed fixture integration tests; production delivery was not exercised.
  • The automated review service returned NetworkFailure: fetch failed through its Control CLI.

The skills.sh removal preview shows affected paths and requires Enter before changing files

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 8, 2026
@harlan-github-agent

harlan-github-agent Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-10-08 06:42 UTC.

GitHub merged this pull request.

No material findings were recorded.

a6f2f8a1-f669-484b-927d-ad081c783b4f

@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-running An Agent holds a Task on this issue or pull request right now. label Oct 8, 2026
@harlan-zw harlan-zw changed the title feat(doctor): sweep Skills and triage skills.sh installs feat(cli): add doctor and refresh terminal UX Oct 8, 2026
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Agent verification for f70457c0:

  • Exercised the Doctor TUI at 80×24 and 100×28, including review, cancel, apply, help, problems, and full notices.
  • Removed a disposable skills.sh install. Cancel preserved files; apply saved files, metadata, and recovery instructions.
  • Migrated a disposable copy of skilld-dev/skilld/review-skill through real verified source delivery. The source commit was ac1c91db2a4ec9c42cbe34e84449c76f1bbdbef6.
  • Confirmed the skills.sh entry was removed, the skilld lockfile was created, and skilld verify review-skill --plain succeeded.
  • Confirmed incomplete source contents stopped migration. Existing user Skills were untouched.
  • Exercised the live multi-Skill picker: filtering, selection, cancellation, and terminal restoration.
  • Measured one home scan before and after the new exclusions: 25.03s and 6.74s. Both found 93 skilld installs and 23 skills.sh installs.

The local binary includes the repository's release verification keys. The review service returned NetworkFailure: fetch failed.

Doctor shows the resolved source commit and exact disposable target before migration

Shared static CLI rendering with fixture search results, update relations, and an empty installed list

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 8, 2026
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Agent verification: the live home scan displayed 421 Skills through seven opening rows. Checked recommendation drilldown, symlink filtering, and explicit duplicate labels.

Completed removal through the new navigation on a scratch fixture at 80×24. Confirmed recovery metadata, backup contents, and the durable shell summary. The home scan remained read-only.

Recommendations at 100 columns

Scratch action review at 80 columns, light palette

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 8, 2026
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Agent verification: reproduced linked-parent misclassification and a missing broken-link report before fixing both. The live terminal fixture now shows one Skill with two linked paths, including the parent link and its raw destination.

Checked 335 direct links from the earlier home inventory against the filesystem; every target matched the recorded canonical path. Four cleanup fixtures verify link-only source preservation, retarget rejection, alias deduplication, and linked-parent preservation.

Linked parent and direct symlink paths

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 8, 2026
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. label Oct 8, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: BLOCKED.

Read the Review results

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 8, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 8, 2026
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-running An Agent holds a Task on this issue or pull request right now. label Oct 8, 2026
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Agent verification: the live home scan visited 32,709 directories in 4.52 seconds. It retained all 10 active linked Skills stored in home app data, including skilld and copywriting. Worker-home Skills were absent. The earlier scan visited 70,503 directories; this is an observation, not a controlled benchmark.

Fixtures cover configured Agent roots and stores, exclusion overrides, project-only scope, external-root containment, linked referents, and broad opt-in.

@harlan-github-agent harlan-github-agent Bot added the harlan-agent-blocked The automated Review found a material defect in this head commit. label Oct 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Open (84/100): The required quality check fails on the pull-request head.

Proof: The supplied durable Review status reports that required check "quality" fails on head e1a1e6a. This job runs lint, typecheck, build, JavaScript tests, API-contract tests, and Doctor tests, so the head has n.

Next: Inspect the failing quality-job step, repair its underlying failure, and publish a head where the required check passes.

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy.

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: BLOCKED.

Read the Review results

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 8, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

@harlan-zw
harlan-zw merged commit 9d7baa3 into main Oct 8, 2026
4 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Oct 8, 2026
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.

1 participant