Skip to content

feat: enhance paca skills - #647

Merged
pikann merged 6 commits into
masterfrom
feature/enhance-skills
Oct 27, 2026
Merged

pikann merged 6 commits into
masterfrom
feature/enhance-skills

Conversation

@pikann

@pikann pikann commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refactors Paca's bundled skill set and rebuilds it around Paca's own features, following the practices in mattpocock/skills (engineering): interview before building, work in thin vertical slices, verify, and leave a written record.

Changes

bundledskills refactor (services/api/internal/platform/bundledskills)

  • Skill text moves out of a 1,300-line Go file (backtick-escaped strings, plus a second ¤ convention for role policy) into plain Markdown under content/<name>.md, embedded with go:embed.
  • catalog.go is a one-line-per-skill table; skills.go holds List/IsBuiltinName; derive.go holds the CLI→agent derivation. Only paca and paca-do have a hand-written <name>.agent.md.
  • No behavior change: List() output for both flavors was diffed before/after and is byte-identical.

Improved existing skills

  • paca-do: test-first vertical slices for code; feedback-loop-first diagnosis for non-obvious bugs; current Git tools (workspace_prepare, git_commit, git_push, change_request_open); PR body = summary / evidence / risk.
  • paca-breakdown: tracer-bullet slices; dependencies recorded as real blocks task links.
  • paca-clarify: recommended answer per question, verify before asking, glossary/decision docs, agent-ready briefs.
  • paca-test: failures record exact reproductions.
  • paca router: routes to the new skills; uses search_tasks / search_docs.

New skills built on Paca features

paca-review (PR review on spec + standards axes), paca-triage, paca-retro, paca-feedback (browser-extension page comments → tasks), paca-board (types, statuses, custom fields, views), paca-team (members, roles, permissions), paca-automation.

Breaking: paca-workflow → paca-automation

paca-workflow documented the removed get_workflow / create_workflow tools. The MCP server now exposes get/create/update/delete_automation, so the skill was rewritten for Trigger → Condition → Action graphs under a new name. Machines that installed earlier keep a stale ~/.claude/skills/paca-workflow until removed.

Docs and tests

  • Updated README.md, ROADMAP.md, docs/guides/install-skills.md, docs/ai-agent/default-skills.md (including the new "adding a skill" flow).
  • New guard tests: TestList_EngineeringPractices, TestList_PacaFeatureSkills.

Also on this branch (unrelated to skills)

  • Agents can read project-shared conversations from other agents (conversations.read), with docs/tests (domain/agent, service/agent, apps/mcp conversation tools).
  • Resizable panes: pane-resize-handle, pane-width, sidebar/roadmap wiring, and shared.json strings in all 9 locales.

Testing

  • go test passes for bundledskills, platform/plugin, service/agent, and the HTTP handlers.
  • Skills were not exercised against a live agent or MCP server; tool names were taken from apps/mcp/src/tools.

Notes

  • Per docs/ai-agent/default-skills.md, agent-runner doesn't consume the bundled skills yet, so these changes reach CLI installs (install-paca-skills.sh) and ACP-bridge agents once the API is redeployed.

- Introduced a new skill for interacting with Paca project management, including detailed instructions for task management, sprint planning, and documentation.
- Implemented a function to derive agent-flavor content from CLI-flavor skills, ensuring compatibility with the Paca MCP server.
- Removed the legacy role policy skill implementation to streamline the skill set.
- Added a new file to manage bundled skills, allowing for better organization and retrieval of skills based on the target flavor (CLI or agent).

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Skill storage refactor. The hardcoded Go raw-string catalog (bundledskills.go and role_policy_skill.go with its ¤-for-backtick hack) is replaced by real Markdown under content/, embedded with //go:embed content/*.md; catalog.go now holds a small skillEntry list and loads content at init, skills.go keeps List/IsBuiltinName, and derive.go keeps the mechanical cli→agent transform.
  • Catalog. 19 skills; paca and paca-do keep hand-authored agent variants (content/<name>.agent.md), paca-setup stays CLIOnly, everything else derives its agent flavor.
  • paca-workflow retired, 7 skills added. paca-automation (replaces workflow — Trigger→Condition→Action graphs), paca-review (PR review on spec + standards axes), paca-triage, paca-retro, paca-feedback, paca-board, paca-team; both paca routers now route to all of them.
  • Engineering practices folded in. paca-do (test-first, bug-diagnosis loop, PR body), paca-breakdown (tracer bullets, expand→migrate→contract, blocks links), paca-clarify (recommended answers, glossary/decisions, standalone brief), paca-test (exact reproduction).
  • paca-do.agent.md git workflow rewritten from the retired clone_repository/push_branch/github_* tools to workspace_inspect/workspace_prepare/git_commit/git_push/change_request_open/repo_search_code.
  • Docs and tests. README, ROADMAP, docs/ai-agent/default-skills.md, docs/guides/install-skills.md updated; TestList_EngineeringPractices and TestList_PacaFeatureSkills added.

I verified the package tests and go vet pass, compared every moved skill against base fc88f4e (only the intended edits differ; the rest are byte-identical moves), and confirmed every tool name and parameter the new skills cite exists in apps/mcp (automation enums, member roleIds, annotation status, task-link types, and the workspace/git tool contracts including CI-config and default-branch refusals). The only residual item is the stale ~/.claude/skills/paca-workflow left by older installs, which the docs already call out.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog 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.

ℹ️ No critical issues — one minor suggestion inline, plus a docs note.

Reviewed changes

Re-review of the delta since the prior pullfrog review on d55d370 (commit bc8a727, "enhance plugin skills routing and caching mechanism").

  • Added plugin-declared routes to the skills manifest (SkillsManifest.Routes / SkillRoute) with validation rejecting a route not in names, an empty / multi-line / over-length / pipe-or-backtick-bearing when, and a duplicate route per skill.
  • Injected plugin routes into the paca router: ListWithRoutes / routeRows / applyRoutes render each route as a router-table row (slash command for the cli flavor, load_skill(name: …) for the agent flavor) at the <!-- paca:plugin-routes --> marker in content/paca.md and content/paca.agent.md, and strip that marker everywhere so a router with no plugin routes is unchanged.
  • pluginrt.ListSkillsAndRoutes returns routes only for plugin skills actually served in the same response, so the router never names a skill that is disabled, unreadable, or a bundled-name collision.
  • GET /api/v1/skills now serves plugin skills and router rows for both flavors; the agent flavor no longer excludes plugin skills (that exclusion existed for services/ai-agent's process-lifetime cache, and ai-agent is gone).
  • services/agent-runner now TTL-caches the fetched skill set (30s) and serves the last good set when a refresh fails, so a plugin install / enable / disable reaches a following conversation without an API call per conversation.
  • Docs (default-skills.md, skills-plugin-system.md) and tests (entity_test, bundledskills_test, plugin/skills_test, skills_handler_test) updated.

I verified the affected packages build and their tests pass (bundledskills, platform/domain plugin, HTTP handler, agent-runner bundledskills), and confirmed services/agent-runner is the only consumer of ?target=agent.

ℹ️ Stale "agent-runner doesn't consume skills" docs are now contradicted by this change

The new sections in this commit describe agent-runner consuming the default/plugin skill set, but neighboring lines in the same files (and one web comment) still assert the opposite, so a reader gets contradictory guidance about whether plugin skills reach an in-product agent.

Technical details
# Reconcile stale "no agent-runner consumer" documentation

## Affected sites
- `docs/ai-agent/default-skills.md:3-14` — "Known gap" notice says agent-runner does not merge Paca's default skill set or plugin skills; contradicted by the new section at `:65-67` and by the actual wiring (`services/agent-runner/cmd/agent-runner/main.go:139`, `internal/handler/handler.go:173`).
- `docs/plugins/skills-plugin-system.md:123` — "no longer has a runtime consumer on the `agent-runner` side … since nothing merges plugin skills into a conversation there", and `:142` ("no `agent-runner` equivalent exists yet"); contradicted by the new `routes` paragraph at `:88`.
- `apps/web/src/lib/agent-api.ts:126-129` — comment says `?target=agent` would omit plugin skills; no longer true.

## Required outcome
- Documentation and the web comment accurately reflect that `GET /api/v1/skills?target=agent` serves plugin skills and router rows to agent-runner on a short TTL.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog 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.

ℹ️ No critical issues — one minor suggestion inline.

Reviewed changes

Incremental re-review of the delta since the prior pullfrog review on bc8a727 (commit 6ea7afd, "enhance documentation for agent skills and update caching behavior in agent runner").

  • Reconciled the "agent-runner doesn't consume skills" docs with the behavior introduced in bc8a727: docs/ai-agent/default-skills.md and docs/plugins/skills-plugin-system.md now describe the per-conversation GET /api/v1/skills?target=agent fetch (30s cache, last good set on failure), and the SystemSkill comment in apps/web/src/lib/agent-api.ts no longer claims ?target=agent omits plugin skills — covering all three sites the prior review flagged.
  • Restarted the agent-runner skill-cache TTL on a failed refresh (services/agent-runner/internal/bundledskills/client.go: c.fetchedAt = c.now()), so a sustained API outage costs one fetch attempt per cacheTTL rather than one per conversation. Retired the prior inline thread.
  • Added TestClient_Load_RefetchesAfterTTLAndServesStaleOnFailure covering TTL expiry → refetch, stale-on-failure, and the TTL restart.

The remaining-gap notices in both docs (no per-trigger-type skills, no keyword-triggered selection) still match internal/executor — verified against handler.go:174 (cfg.Skills = append(bundled, cfg.Skills...)) and executor/skills.go.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

pikann and others added 2 commits October 27, 2026 16:55
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>

@pullfrog pullfrog 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.

ℹ️ No critical issues — one minor suggestion inline.

Reviewed changes

Incremental re-review of the delta since the prior pullfrog review on 6ea7afd (commit ef771464, "enhance skill management by removing retired skills and improving concurrent fetch handling").

  • Retired paca-workflow cleanup in the installer. scripts/install-paca-skills.sh now deletes a stale paca-workflow/SKILL.md directory from each global install target once the skills fetch succeeds, so an older install stops shipping the retired /paca-workflow command.
  • Collapsed concurrent agent-runner skill refreshes. services/agent-runner/internal/bundledskills/client.go split Load into a fresh cache-hit path and a refresh that runs under a singleflight.Group; the fetch is detached from any single caller's context (context.WithoutCancel plus the client timeout), and both paths return a copied slice so callers can't mutate the cache.
  • singleflight promoted to a direct dependency in services/agent-runner/go.mod.
  • Route lookup map. services/api/internal/platform/plugin/skills.go precomputes a per-plugin whenBySkill map instead of scanning the manifest routes for every name; output order is unchanged.
  • New guard test. TestList_AgentFlavorHasNoCLIOnlyText asserts no agent-flavor skill leaks a compatibility: line or the "not connected" fallback block, catching a silent deriveAgentContent no-op.

I traced the singleflight path (cancel-detached fetch, stale-on-failure TTL restart, clone-on-return for both the cache-hit and singleflight results) and found no correctness or race issue. go test passes for agent-runner bundledskills and api bundledskills/plugin, and shellcheck --shell=bash scripts/install-paca-skills.sh is clean.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Comment thread scripts/install-paca-skills.sh Resolved

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Incremental re-review of the delta since the prior pullfrog review on ef771464 (commit 5a1c151, "remove artifacts of retired paca-workflow skill and improve script cleanup").

  • Completed the retired-skill cleanup. scripts/install-paca-skills.sh now also removes the Gemini legacy TOML command (~/.gemini/commands/paca-workflow.toml) and, when in a git working tree, the project-scoped Cursor copy (<project>/.cursor/skills/paca-workflow/) — closing the one gap the prior review flagged. That thread is retired.
  • Fixed import grouping. golang.org/x/sync/singleflight moved out of the stdlib import block into its own group in services/agent-runner/internal/bundledskills/client.go; no behavior change.

gofmt -l is clean on the Go file, and shellcheck --shell=bash plus bash -n are clean on the installer. All prior pullfrog threads on this PR are now resolved.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit 8e74bcd into master Oct 27, 2026
15 checks passed
@pikann
pikann deleted the feature/enhance-skills branch October 27, 2026 11:08
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