Skip to content

feat(06): polish and harden — donna-tools CLI, UAT gate, docs, tool learning, bootstrap refactor#36

Merged
pingvinen merged 37 commits into
mainfrom
gsd/phase-06-polish-and-harden-version-check-skip-setup-guard-simplify-adjust-tool-uat-merge-gate-docs-and-readme-improvements-enhance-tool-learning-refactor-skill-bootstrap
Apr 3, 2026
Merged

feat(06): polish and harden — donna-tools CLI, UAT gate, docs, tool learning, bootstrap refactor#36
pingvinen merged 37 commits into
mainfrom
gsd/phase-06-polish-and-harden-version-check-skip-setup-guard-simplify-adjust-tool-uat-merge-gate-docs-and-readme-improvements-enhance-tool-learning-refactor-skill-bootstrap

Conversation

@pingvinen

@pingvinen pingvinen commented Mar 27, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 06: Polish and harden Donna's internals — consolidate shared logic, improve docs, and add CI guardrails.

  • donna-tools.cjs — new CLI module with init, commit, daily-path, resolve-secret subcommands, replacing ~800 lines of duplicated bootstrap/git logic across 9 workflows
  • UAT merge gate — GitHub Actions workflow that blocks PR merge until the phase's latest UAT has status: complete and issues: 0 (scoped to the PR's phase via branch name)
  • Cascading tool learning — 4-stage capability discovery for unknown CLI tools: local docs → --help → web docs → source code (user opt-in)
  • Installer hardening — copies donna-tools.cjs and all dependencies to ~/.donna/, skip-setup guard for configured systems
  • adjust-tool simplification — removed inline type-change logic, blocks with guidance to use remove-tool + re-add
  • /donna:remove-tool — new skill for clean tool removal from tools.md
  • README improvements — skills grouped into 4 logical categories, tool commands consolidated under "Tool management"

Stats

  • 18 files changed, +1401 / -824 lines (non-planning)
  • 368 new test lines (donna-tools), 48 new test lines (installer), stubs tests updated
  • 9 workflows simplified via donna-tools.cjs delegation

Test plan

  • Automated UAT — 10 passed, 0 issues
  • Human UAT — 7 passed, 0 issues (retest after fixing 5 issues from first round)
  • npm test — 321 passing
  • npm run lint — clean
  • UAT gate CI check — passing

🤖 Generated with Claude Code

pingvinen and others added 27 commits March 27, 2026 17:07
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Triggers on PR opened, sync, reopened, labeled, unlabeled events
- Checks for uat:pass label using event payload (no API call needed)
- Case-insensitive grep for resilience
- Fails with exit 1 when label is absent, blocking merge
- Minimal read-only permissions
- Replace flat commands table with 4 sub-sections: Setup and configuration, Daily workflow, Tool management, Help and feedback
- Add 'Why not automate tool pulls?' section explaining cost, context, and conflict reasons
- All 12 commands preserved, no information lost
- Tests for init: no config, valid config, version check cache hit/miss
- Tests for commit: nothing to commit, staged files, auto-push
- Tests for daily-path: path format, directory creation
- Tests for resolve-secret: known key, not found, placeholder patterns
- Tests for CLI exports: main and subcommand handlers
- installer.cjs: suppress setup prompt when config.md has storage_repo (D-04)
- installer.test.cjs: add skip-setup guard tests (shows/suppresses message)
- adjust-tool.md: remove type change as option 5 (D-05)
- adjust-tool.md: update objective to drop 'or type' wording
- README.md: remove 'type' from adjust-tool description in prose and table
- Create 06-03-SUMMARY.md with plan outcomes
- Update STATE.md with decision and session info
- init: reads config, runs migrations, syncs Obsidian, checks npm registry once per day
- commit: stages files, runs git commit, conditional push based on auto_push
- daily-path: computes today's daily file path, creates directory if missing
- resolve-secret: reads secrets.md, validates placeholder patterns
- version check: caches in ~/.donna/version-check.md, 3s timeout, never throws
- exports runInit/runCommit/runDailyPath/runResolveSecret for unit testing with injectable fetch
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…arden-version-check-skip-setup-guard-simplify-adjust-tool-uat-merge-gate-docs-and-readme-improvements-enhance-tool-learning-refactor-skill-bootstrap
…arden-version-check-skip-setup-guard-simplify-adjust-tool-uat-merge-gate-docs-and-readme-improvements-enhance-tool-learning-refactor-skill-bootstrap

# Conflicts:
#	.planning/STATE.md
#	README.md
…tool

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace single --help call for unknown CLIs with 4-stage cascade
- Stage 1: local docs (README/docs in tool package directory)
- Stage 2: CLI help baseline (--help, combined with Stage 1)
- Stage 3: web docs fetch if fewer than 3 capabilities found
- Stage 4: source code analysis with user opt-in (AskUserQuestion)
- Well-known tool baselines (gh, jira, kubectl) unchanged
- REST/GraphQL/MCP sections unchanged
…rces

- Replace single --help call for unknown CLIs with 4-stage cascade
- Stage 1: local docs (README/docs in tool package directory)
- Stage 2: CLI help baseline (--help, combined with Stage 1)
- Stage 3: web docs fetch if invocations could not be validated
- Stage 4: source code analysis with user opt-in (AskUserQuestion)
- Preserve 'Do NOT ask user to re-select capabilities' constraint
- Well-known tool baselines (gh, jira, kubectl) unchanged
- REST/MCP 're-learning not applicable' note preserved
…arden-version-check-skip-setup-guard-simplify-adjust-tool-uat-merge-gate-docs-and-readme-improvements-enhance-tool-learning-refactor-skill-bootstrap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Copy donna-tools.cjs to ~/.donna/ after workflows copy
- Guard with fs.existsSync to handle older package versions gracefully
- Runs on every install/upgrade (idempotent)
- Replace read-config + check-pending-migrations with donna-tools init
- Replace inline git commit blocks with donna-tools commit
- Replace manual daily path construction with donna-tools daily-path
- Version update hint printed when update_available is non-null
- Update stubs.test.cjs to check donna-tools.cjs init instead of old patterns
- Add SUMMARY for 06-05 (workflow migration to donna-tools.cjs)
- Update STATE.md: advance to plan 3, add bootstrap decision
- Update ROADMAP.md: 4/5 summaries complete for phase 06
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace inline secrets.md parsing with donna-tools.cjs resolve-secret
in run-tools, relearn-tools, and add-tool workflows. Closes the last
verification gap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pingvinen pingvinen self-assigned this Mar 27, 2026
Comment thread .github/workflows/uat-gate.yml Outdated
pingvinen and others added 9 commits April 3, 2026 14:11
…E, cascade

- Copy version.cjs, migrator.cjs, changelog.cjs, output.cjs alongside
  donna-tools.cjs in installer (fixes blocker: workflows crash in real install)
- UAT gate now checks HUMAN-UAT.md status in .planning/ instead of label
- Move add-tool/adjust-tool to Tool management section in README
- Cascade learning follows links/imports instead of fixed line limits

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When user asks to change a tool's type, explain that type affects how
capabilities are learned and direct them to remove + re-add instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New workflow + stub for removing tools from tools.md with confirmation.
Adjust-tool type guard now directs to /donna:remove-tool instead of
manual file editing. README updated with new command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gate now finds both *-HUMAN-UAT.md and *-RETEST-UAT.md files, groups
by phase directory to use the latest, and verifies issues: 0 — not
just status: complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract phase number from branch name (gsd/phase-XX-...) and only
check UAT files for that phase. Prevents old phases with stale
issues from blocking unrelated PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pingvinen pingvinen merged commit 34f571c into main Apr 3, 2026
6 checks passed
@pingvinen pingvinen deleted the gsd/phase-06-polish-and-harden-version-check-skip-setup-guard-simplify-adjust-tool-uat-merge-gate-docs-and-readme-improvements-enhance-tool-learning-refactor-skill-bootstrap branch April 3, 2026 14:00
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Released in v0.10.0

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