Files
pad/internal
xarmian 96a32aa39d feat(bootstrap,skill): add needs_onboarding flag + retire legacy Onboarding workflow (TASK-1504,1505) (#578)
PLAN-1496's bootstrap-signal + skill-cleanup pair, shipped together
because TASK-1505's nudge rendering depends on TASK-1504's bootstrap
field.

TASK-1504 (bootstrap: needs_onboarding):
- internal/store/items.go: new WorkspaceHasUserCreatedItems(workspaceID)
  store method. Backed by SELECT EXISTS with the predicate
  `source != 'template'` — defined as the inverse of template seeding
  rather than enumerating user-side source values, so new attribution
  surfaces (mcp, api, future) count automatically.
- internal/server/handlers_bootstrap.go: AgentBootstrap struct gets
  the NeedsOnboarding bool field (always emitted — not omitempty,
  since the agent reads it on every /pad invocation). BuildAgentBootstrap
  computes it via the new store method. On query error the flag falls
  back to false (safe default: don't nag).
- Visibility filtering deliberately omitted — needs_onboarding is a
  workspace-level state signal, not a per-user view. Two members
  reading bootstrap concurrently should see the same answer.
- Two focused tests:
  - TestBootstrapNeedsOnboardingFlag walks the lifecycle (fresh
    workspace → create user item → flag flips).
  - TestBootstrapNeedsOnboardingIgnoresTemplateSeeds locks the
    template-seeds-don't-count invariant on the startup template,
    which ships seeded conventions, playbooks, and the onboard
    playbook itself.

TASK-1505 (skill update):
- skills/pad/SKILL.md:
  - Context Loading section: new bullet documenting needs_onboarding
    with the exact nudge wording the agent should render when true,
    plus the "don't nag past first user item" + "respect prior
    decline" rules.
  - Onboarding workflow section: deleted (~30 lines). Replaced with
    a one-paragraph pointer at the /pad onboard playbook. The skill
    is the dispatcher; the playbook body is the script.
  - Routing entry under "set up my workspace": simplified from the
    bloated PR #577 round-3/4 text into a clean two-bullet form
    (canonical phrasing + legacy IDEA-1 phrasing both → /pad onboard).
- internal/mcp/prompts_data.go: the pad_onboard MCP prompt body
  was duplicating the same step-by-step script the SKILL.md section
  carried. Replaced with the same dispatch-to-playbook pointer.
  internal/mcp/prompts_test.go: TestPromptsLockstep_CoreCommands
  fragments updated to assert the new dispatch fragments
  (`pad playbook list`, `pad playbook show onboard`).

Parent: PLAN-1496.
2026-05-17 13:57:12 -04:00
..
2026-03-26 01:52:36 +00:00