WIZ-5 Stack detection + starter-pack file #676

Closed
opened 2026-05-01 19:27:05 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a platform engineer, I want the wizard to scan each watched repo's manifest files and propose stack-specific starter packs, so the customize screen has actionable suggestions instead of an empty form.

Acceptance criteria

Detection endpoint

  • GET /onboarding/detect-stack?repos=owner/a,owner/b returns { <stack>: <weight 0..1>, ... }.
  • Implementation reads root-level manifests via ForgePort.readFile per repo: package.json, Cargo.toml, pyproject.toml, go.mod, mix.exs, *.gemspec, composer.json. Each match adds 1 to that stack's count; weights normalised across detected stacks.
  • Cache (repo-set hash → result) for 60 s.
  • Returns {} when no manifests detected.

Starter packs file

  • New config/starter-packs.json shipped with at least: typescript, rust, python, go, ruby entries. Schema:
    {
      "typescript": {
        "plugins":  [{ "name": "...", "applies_to": ["code", "review"] }, ...],
        "mcps":     [],
        "system_prompt_appendices": [
          { "title": "Conventional Commits", "body": "...", "applies_to": ["code", "code-lead"] }
        ]
      },
      "rust": { ... }
    }
    
  • CI parses the file; invalid additions fail the build.

Endpoint

  • GET /onboarding/starter-packs returns the file contents.

Tests

  • Detection: a repo with package.json + Cargo.toml returns { typescript: 0.5, rust: 0.5 }.
  • Detection: no manifests returns {}.
  • Starter-pack file validates: every applies_to references a real role.

Out of scope

  • Catalog editing UI.
  • Auto-import from upstream sources.

References

  • specs/first-login-wizard.md §Story WIZ-5
  • apps/server/src/infrastructure/forge/forgejo-port.tsreadFile.
## User story As a platform engineer, I want the wizard to scan each watched repo's manifest files and propose stack-specific starter packs, so the customize screen has actionable suggestions instead of an empty form. ## Acceptance criteria ### Detection endpoint - [ ] `GET /onboarding/detect-stack?repos=owner/a,owner/b` returns `{ <stack>: <weight 0..1>, ... }`. - [ ] Implementation reads root-level manifests via `ForgePort.readFile` per repo: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `mix.exs`, `*.gemspec`, `composer.json`. Each match adds 1 to that stack's count; weights normalised across detected stacks. - [ ] Cache `(repo-set hash → result)` for 60 s. - [ ] Returns `{}` when no manifests detected. ### Starter packs file - [ ] New `config/starter-packs.json` shipped with at least: `typescript`, `rust`, `python`, `go`, `ruby` entries. Schema: ```json { "typescript": { "plugins": [{ "name": "...", "applies_to": ["code", "review"] }, ...], "mcps": [], "system_prompt_appendices": [ { "title": "Conventional Commits", "body": "...", "applies_to": ["code", "code-lead"] } ] }, "rust": { ... } } ``` - [ ] CI parses the file; invalid additions fail the build. ### Endpoint - [ ] `GET /onboarding/starter-packs` returns the file contents. ### Tests - [ ] Detection: a repo with `package.json` + `Cargo.toml` returns `{ typescript: 0.5, rust: 0.5 }`. - [ ] Detection: no manifests returns `{}`. - [ ] Starter-pack file validates: every `applies_to` references a real role. ## Out of scope - Catalog editing UI. - Auto-import from upstream sources. ## References - `specs/first-login-wizard.md` §Story WIZ-5 - `apps/server/src/infrastructure/forge/forgejo-port.ts` — `readFile`.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
charles/claude-hooks#676
No description provided.