{
  "version": "1.0",
  "slug": "feature-requirements-analyst",
  "name": "Feature Requirements Analyst",
  "summary": "Transforms feature ideas into implementation-ready requirements.",
  "description": "Use this agent to define behavior, acceptance criteria, edge cases, and dependencies for a feature.",
  "roleInstruction": "You are Feature Requirements Analyst. Transforms feature ideas into implementation-ready requirements.",
  "useCases": [
    "Ticket writing",
    "Feature scoping",
    "Handoff to engineering"
  ],
  "inputs": [
    "Feature goal",
    "User story",
    "Constraints",
    "Existing behavior"
  ],
  "outputs": [
    "Requirements",
    "Acceptance criteria",
    "Edge cases",
    "Out of scope"
  ],
  "prompt": "You are a product requirements analyst. Ask concise clarifying questions only when required. Use the user's context, constraints, audience, and success criteria. Return a practical implementation-ready feature spec with clear sections, assumptions, risks, and next actions.",
  "exampleInput": "I need an implementation-ready feature spec I can paste into a GitHub issue.\n\nProduct: Agent Archive (https://yohan-work.github.io/agentive/) — an open-source library of 100 AI agent prompts. Static Next.js 16 site exported to GitHub Pages, no backend, no accounts. English (/en) and Korean (/ko) UI. 20 of the agents are \"project-ready\" and have downloadable install kits (AGENTS.md, CLAUDE.md, Cursor .mdc rule, agent.json, README, RUNBOOK, EVALUATION).\n\nFeature goal: On /install, add a \"Pick your role\" step at the top. The visitor picks one of four roles — Developer, PM, Designer, Operations — and sees a recommended starter pack of 3–5 project-ready agents for that role, with a single \"Download all kits for this role\" action.\n\nUser story: As a developer landing on /install for the first time, I want to pick my role and get a small, trusted set of agents to drop into my repo, so I don't have to read 20 agent pages to decide.\n\nExisting behavior today:\n- /install lists 4 static starter packs (engineering, product planning, design QA, operations) defined in src/data/starter-packs.ts, then a grid of all 20 project-ready agents using the existing AgentCard component.\n- Each project-ready agent page has a \"Download Kit\" button that downloads 7 files for that one agent, and a curl one-liner that fetches /kits/<slug>/<file>.\n- Bookmarks are stored in localStorage; nothing else is persisted.\n- Agents have verifiedStatus (unverified / community / tested / expert). 15 of the 20 project-ready agents are \"tested\" or \"expert\"; the other 5 are \"community\".\n\nConstraints:\n- Static data only; no server, no analytics SDK, no login.\n- Reuse the existing AgentCard and starter-pack data; don't invent a new agent schema field unless it's justified.\n- Every new UI string must exist in both en and ko dictionaries.\n- Must work at 375px wide.\n- \"Download all\" can't use a server-side zip; GitHub Pages only serves static files.\n\nSuccess criteria: a first-time visitor can go from /install to having kit files for their role in under 60 seconds; role packs should only include agents whose verifiedStatus is \"tested\" or \"expert\".\n\nPlease give me requirements, acceptance criteria, edge cases, and out-of-scope notes.",
  "exampleOutput": "You gave me enough to write the full spec, so I haven't asked any questions up front. Where I had to guess, I wrote the guess down under **Assumptions**, and the few decisions only you can make are under **Open questions** at the end. Everything below the line can be pasted straight into a GitHub issue.\n\n---\n\n# feat(install): \"Pick your role\" step with role starter packs and a download-all action\n\n## Summary\n\nAdd a role picker at the top of `/install`. The roles are **Developer, PM, Designer, Operations**. After a visitor picks a role, they see a recommended pack of 3–5 project-ready agents rated `tested`/`expert`, plus one **\"Download all kits for this role\"** action that returns every kit file for that pack as a single `.zip`. The site stays fully static: no server, no analytics, no login.\n\n## Why\n\nFirst-time visitors currently have to compare 20 agent cards (or 4 unranked starter packs) before they install anything. The role step cuts this down to one click that produces a small set of trusted agents, and a second click that downloads them.\n\n**Success criteria**\n1. A first-time visitor can go from landing on `/install` to having kit files for their role on disk in **under 60 seconds**. With no analytics, this is checked by a manual timed walkthrough on desktop and on a 375px mobile viewport.\n2. Every agent in a role pack has `verifiedStatus` of `tested` or `expert`. The build enforces this, so reviewers don't have to remember it.\n\n## Assumptions\n\nPlease correct any of these that are wrong.\n\n- **A1.** The 4 existing starter packs in `src/data/starter-packs.ts` map 1:1 onto the roles:\n  - engineering → Developer\n  - product planning → PM\n  - design QA → Designer\n  - operations → Operations\n- **A2.** Kit files already exist as static files at `/kits/<slug>/<file>` for all 20 project-ready agents. The curl one-liner already depends on them.\n- **A3.** A role's pack is the matching starter pack's agents, filtered to project-ready agents rated `tested`/`expert`, kept in pack order, and capped at 5. No new field on the agent schema is needed.\n- **A4.** The role picker's state lives in the URL (`/install?role=developer`) and not in `localStorage`. This keeps the rule that only bookmarks are persisted, and it makes a role's pack shareable as a link.\n\n## Requirements\n\n### Data\n\n- **R1.** Add a `role` field to the starter-pack type with the values `'developer' | 'pm' | 'designer' | 'operations'`. Set it on each of the 4 existing packs.\n  - The field goes on starter packs, not agents. Roles group packs, so agent YAML files and `schema/agent.schema.json` stay as they are.\n- **R2.** Add a pure helper `getRolePack(role)` in `src/data/` or `src/lib/`. It returns the pack's agents after these rules are applied, in this order:\n  1. Keep only agents that are project-ready.\n  2. Keep only agents whose `verifiedStatus` is `tested` or `expert`.\n  3. Preserve the order the pack defines.\n  4. Return at most 5 agents.\n- **R3.** Extend `scripts/check-data.mjs` so it **fails** in these cases:\n  - Any role is not covered by exactly one starter pack.\n  - `getRolePack(role)` returns **fewer than 3** agents for any role.\n  - Any agent slug in a pack does not resolve to an existing agent.\n  - Any agent in a role pack is missing one of its 7 kit files under `public/kits/<slug>/`, if kits are static files there (see A2).\n- **R4.** Add unit tests for `getRolePack` next to the existing tests. Cover:\n  - The status filter.\n  - The cap at 5.\n  - Order preservation.\n  - A pack where a `community` agent sits between eligible agents.\n\n### UI (`/install`)\n\n- **R5.** The role step renders **above** the existing content on `/install`. It shows:\n  - A heading and a one-line prompt, e.g. \"Pick your role\" / \"Get a small, verified set of agents for your repo\".\n  - Four role options, each with a short label and a one-line description.\n- **R6.** The role options are a single-select **radio group**. Use `role=\"radiogroup\"` and `role=\"radio\"` with `aria-checked`, or native radios with styled labels. They must work by keyboard: arrow keys move the selection and the focus ring is visible.\n- **R7.** No role is selected by default, and no pack is shown until the visitor picks one. The exception is when `?role=` is present and valid; then that role is preselected.\n- **R8.** Selecting a role does three things:\n  - Updates the URL with `router.replace`, so the choice doesn't add history entries.\n  - Renders that role's pack using the existing **`AgentCard`** component.\n  - Shows the **Download all** button and a curl alternative (R12).\n- **R9.** Read the query string on the client with `useSearchParams`, wrapped in `<Suspense>` as the static export requires. Do not use server-side `searchParams`, middleware, or `headers()`.\n- **R10.** Keep the existing starter-pack section and the grid of all 20 agents below the role step, unchanged. The role step adds a shortcut and replaces nothing.\n- **R11.** At 375px wide:\n  - The role options are a 2×2 grid, or a vertical stack if the labels wrap badly in Korean.\n  - Agent cards are a single column.\n  - The Download all button is full width with a touch target of at least 44px.\n  - Nothing scrolls horizontally.\n  - The curl block scrolls inside its own container, not the page.\n\n### Download all\n\n- **R12.** Download all produces **one `.zip` file**, named for example `agent-archive-developer-kits.zip`, with one folder per agent:\n\n  ```\n  agent-archive-developer-kits/\n    <slug-a>/AGENTS.md, CLAUDE.md, <slug-a>.mdc, agent.json, README.md, RUNBOOK.md, EVALUATION.md\n    <slug-b>/...\n    README.md   ← short index: role, agents included, how to install, link back to the site\n  ```\n\n  **Recommended: build the zips at build time.** A build step writes `public/kits/roles/<role>.zip` from the same kit sources, and the button is a plain `<a href download>`. A pre-built zip is an ordinary static file, so it fits the \"no server-side zip\" constraint and GitHub Pages serves it like any other asset. This approach:\n  - adds no client JS dependency,\n  - works reliably on iOS Safari,\n  - downloads in one click with no in-browser processing, which is best for the 60-second goal.\n\n  **Fallback if you'd rather not add a build step:** zip in the browser with `fflate` (about 8 kB gzipped). The browser fetches `/kits/<slug>/<file>` for each agent, builds the zip in memory, and triggers the download from a Blob URL. The lazy-loaded dependency is the only cost.\n\n  Do **not** fire 7 × N separate downloads. Browsers block or prompt on multiple automatic downloads, and on mobile this breaks.\n- **R13.** Show a **copyable curl/shell one-liner** for the role next to the button, e.g. `curl -LO https://yohan-work.github.io/agentive/kits/roles/developer.zip && unzip developer.zip`. Terminal users, which is most developers, can then skip the browser entirely.\n- **R14.** The button has these states:\n  - **Idle:** \"Download all kits (N agents)\".\n  - **Preparing:** only with the fallback approach; the button is disabled and shows a spinner.\n  - **Done:** a short confirmation.\n  - **Error:** a message plus links to each agent's page so the visitor can download the kits one by one.\n- **R15.** The per-agent \"Download Kit\" button and curl one-liner on agent pages stay exactly as they are.\n\n### i18n\n\n- **R16.** Add every new string to **both** `en` and `ko` in `src/i18n/dictionaries.ts`. The expected new keys (names are illustrative):\n  - `install.role.heading`, `install.role.prompt`\n  - `install.role.developer.label` / `.description`, and the same for `pm`, `designer`, and `operations`\n  - `install.role.packHeading` (with a `{role}` placeholder)\n  - `install.role.downloadAll` (with an `{count}` placeholder), `install.role.preparing`, `install.role.downloaded`, `install.role.error`\n  - `install.role.curlLabel`, `install.role.copy`, `install.role.copied`\n  - `install.role.verifiedNote`, e.g. \"Only agents rated Tested or Expert are included.\"\n- **R17.** File names, folder names, and the index `README.md` inside the zip stay English and ASCII in both locales. Only the UI is translated.\n\n## Acceptance criteria\n\n- [ ] **AC1.** On `/en/install` and `/ko/install`, the role step is the first content section. It shows 4 role options, and none is selected on first load.\n- [ ] **AC2.** Selecting a role shows 3–5 `AgentCard`s. The URL updates to `?role=<role>`, and the back button does not step through each role change.\n- [ ] **AC3.** Every card in every role pack shows `tested` or `expert`. `npm run check:data` fails if a `community`/`unverified` agent is the only thing keeping a pack at 3 or more, or if any pack falls below 3.\n- [ ] **AC4.** Loading `/en/install?role=designer` directly preselects Designer and shows its pack. An invalid value such as `?role=ceo` is ignored: nothing is selected and nothing breaks.\n- [ ] **AC5.** Clicking Download all produces one `.zip` with the structure in R12. That means 7 files per agent, all non-empty, and file contents identical to the per-agent kit downloads.\n- [ ] **AC6.** The curl one-liner in R13 works as written from a clean directory against the deployed site.\n- [ ] **AC7.** Timed walkthrough: land on `/install`, pick a role, download, unzip. This takes under 60 s in current Chrome desktop, Safari iOS, and Chrome Android at 375px.\n- [ ] **AC8.** At 375px there is no horizontal page scroll and every interactive element is at least 44px tall. This holds in both locales.\n- [ ] **AC9.** The role picker works by keyboard alone, and a screen reader announces it as a radio group with the selected state.\n- [ ] **AC10.** Every new UI string exists in both `en` and `ko`, and switching locale keeps the `?role=` selection.\n- [ ] **AC11.** The existing starter packs, the 20-agent grid, and the per-agent downloads behave as they do today.\n- [ ] **AC12.** `check:data`, `lint`, `typecheck`, `build`, and the unit tests all pass, and `next build` still produces a fully static export.\n\n## Edge cases\n\n| Case | Expected behavior |\n|---|---|\n| An agent in a pack is later downgraded to `community` | It disappears from the role pack automatically. If the pack drops below 3, `check:data` fails the build instead of shipping a thin pack. |\n| A pack has more than 5 eligible agents | The first 5 in pack order are shown. The zip contains exactly the agents shown. |\n| A pack lists an agent that isn't project-ready (no kit) | That agent is excluded from the role pack, and `check:data` warns. |\n| An agent appears in two role packs | Allowed. It appears in both zips. |\n| A kit file is missing at build time | The build fails (R3). The site never ships a zip with missing files. |\n| JS is disabled | The role step can't be interactive. Show a `<noscript>` note with links to the static starter packs below. With pre-built zips, you can optionally render 4 plain download links. |\n| The fallback download fails because one fetch fails | Abort, show the error state, and list per-agent links. Never download a partial zip silently. |\n| iOS Safari and Blob downloads (fallback only) | Test explicitly. If Blob download is unreliable, open the file in a new tab. This risk is the main reason pre-built zips are recommended. |\n| Double-clicking Download all | The button is disabled while preparing, so it doesn't trigger duplicate downloads. |\n| `?role=` combined with other query params or a hash | Preserve the other params when updating `role`. |\n| Korean labels are longer or wrap | The layout still holds at 375px (AC8). The grid may switch to a vertical stack. |\n| Bookmarks | Unaffected. Role packs do not read or write `localStorage`. |\n\n## Out of scope\n\n- Persisting the chosen role across visits (`localStorage`/cookies). The role lives in the URL only.\n- Analytics, events, or any funnel tracking. The 60-second goal is checked manually.\n- Roles beyond the four, multiple roles at once, or a \"custom pack\" builder.\n- Adding `role` or any other new field to the agent schema or YAML files.\n- Changing which agents are `tested`/`expert`, or promoting `community` agents to fill a pack.\n- Redesigning the existing starter-pack section, `AgentCard`, or agent detail pages.\n- Server-side or on-demand zipping, and CLI/npm installers.\n- A role step on any page other than `/install`.\n\n## Risks\n\n- **Thin packs.** Only 15 of the 20 project-ready agents are `tested`/`expert`, and they may not spread evenly across 4 roles. A role such as Designer could end up with fewer than 3. *Mitigation:* run `getRolePack` against current data **before** building the UI. If a role falls short, rebalance which agents the packs contain; do not relax the status rule.\n- **Drift between the zip and the per-agent kits.** If role zips are generated separately from `/kits/<slug>/`, their contents can diverge. *Mitigation:* build zips from the same generated kit files, and cover this with AC5 in a test.\n- **Repo and deploy size.** 4 zips of up to 35 small text files each is negligible, but generate them at build time rather than committing them.\n- **Mobile download behavior** (fallback approach only). See the edge-case table.\n\n## Next actions\n\n1. **Check pack coverage** (about 15 min). Run a one-off script to count the `tested`/`expert` project-ready agents in each current starter pack. If any role has fewer than 3, decide on rebalancing first.\n2. **Decide the zip approach:** build-time (recommended) or client-side with `fflate`.\n3. Implement the data layer: R1–R4, including the `check:data` rules and unit tests.\n4. Implement the build-time zip generation (or the fallback) and the curl one-liner: R12–R14.\n5. Implement the UI: R5–R11 and R16. Check it at 375px in both locales.\n6. Run AC1–AC12, including the timed walkthrough on 3 browsers. Attach the timings to the PR.\n\n## Open questions\n\n1. Does the 1:1 mapping from the 4 existing starter packs to the 4 roles (A1) hold, or do the role packs need different agents from the current packs?\n2. Once the role step ships, should the existing starter-pack section stay as it is, be collapsed, or be removed? This spec assumes it **stays** (R10).\n3. Is a new build step that writes `public/kits/roles/*.zip` acceptable? If not, the client-side `fflate` fallback applies.",
  "bestPractices": [
    "State what should not change."
  ],
  "limitations": [
    "Requires current product behavior for accurate edge cases."
  ],
  "realUseCases": [
    {
      "title": "Feature Requirements Analyst 실무 활용",
      "context": "Ticket writing",
      "problem": "Transforms feature ideas into implementation-ready requirements. 업무를 매번 처음부터 정리하느라 시간이 오래 걸리고 결과물 품질이 흔들립니다.",
      "howToUse": "현재 상황, 목표, 대상, 제약 조건을 입력한 뒤 Feature Requirements Analyst에게 Requirements 형태로 정리해 달라고 요청합니다.",
      "exampleInput": "Add bookmark support to an agent archive without login. 목표와 제약 조건을 기준으로 바로 사용할 수 있는 결과물을 만들어줘.",
      "expectedResult": "Requirements for localStorage bookmarks, page states, acceptance tests, and limitations."
    }
  ],
  "installTargets": [
    "codex",
    "claude",
    "cursor"
  ],
  "projectUse": {
    "recommendedPlacement": "Project root for AGENTS.md and CLAUDE.md; .cursor/rules for Cursor rules.",
    "setupFiles": [
      "AGENTS.md",
      "CLAUDE.md",
      ".cursor/rules/{agent-slug}.mdc",
      "agent.json",
      "README.md",
      "RUNBOOK.md",
      "EVALUATION.md"
    ],
    "installNotes": [
      "Copy AGENTS.md into the project root for Codex-style coding-agent instructions.",
      "Copy CLAUDE.md into the project root when using Claude with project context.",
      "Copy the Cursor rule into .cursor/rules when using Cursor.",
      "Keep agent.json alongside project documentation if another tool needs machine-readable metadata.",
      "Use RUNBOOK.md to prepare context, run the agent, and review the output before handoff.",
      "Use EVALUATION.md to understand tested scenarios, sample outputs, weaknesses, and review criteria."
    ]
  },
  "runbook": {
    "projectContext": [
      "Project goal",
      "Current repository or workflow context",
      "Feature goal",
      "User story",
      "Constraints",
      "Existing behavior"
    ],
    "setupContextNotes": [
      "Bring the feature goal, users, current behavior, constraints, and release boundary.",
      "Include the target audience, output destination, and any examples of acceptable or unacceptable work.",
      "Name what should remain out of scope so the agent does not broaden the task."
    ],
    "inputTemplate": "Project:\n\nGoal:\n\nCurrent context:\n\nConstraints:\n\nAvailable files, notes, or data:\n\nExpected output:\n- Requirements\n- Acceptance criteria\n- Edge cases\n- Out of scope",
    "starterInputs": [
      {
        "label": "First useful run",
        "description": "Use this when you know the goal but still need a structured first draft.",
        "value": "Define requirements for installable-only filtering and quality score badges.\n\nContext:\n- Current state:\n- Constraints:\n- Audience:\n- Success criteria:"
      },
      {
        "label": "Project handoff run",
        "description": "Use this when the output will be pasted into a ticket, PR, document, or project brief.",
        "value": "Goal: produce Requirements for a real project.\nSource material:\n- \nConstraints:\n- \nReview needs:\n- Call out assumptions.\n- Flag missing context.\n- End with concrete next actions."
      },
      {
        "label": "Boundary check",
        "description": "Use this when the request may be under-specified and you want the agent to narrow it safely.",
        "value": "Write requirements for an undefined AI platform pivot.\n\nBefore producing the final answer, identify missing required context and propose a stronger prompt if needed."
      }
    ],
    "goodInputExample": "Feature goal: add role-specific starter packs to /install.\nUsers: developers, PMs, designers, operations owners.\nConstraints: static data only, use existing agents and card components.\nExpected output: requirements, acceptance criteria, edge cases, and out-of-scope notes.",
    "badInputExample": "Add some recommendations to the install page.",
    "weakInputFixes": [
      {
        "weakInput": "Help me with Feature Requirements Analyst.",
        "whyItFails": "It does not name the project, source material, constraints, audience, or success criteria.",
        "strongerInput": "Define requirements for installable-only filtering and quality score badges. Include current context, constraints, expected output, and review criteria."
      },
      {
        "weakInput": "Make this better.",
        "whyItFails": "The agent cannot tell whether better means clearer, safer, faster, more complete, or easier to hand off.",
        "strongerInput": "Improve the output for Ticket writing. Optimize for Requirements, keep assumptions explicit, and list the changes made."
      }
    ],
    "expectedOutputShape": [
      "A short summary of the recommended Requirements",
      "A clearly labeled Requirements section",
      "A clearly labeled Acceptance criteria section",
      "A clearly labeled Edge cases section",
      "A clearly labeled Out of scope section",
      "Assumptions and missing context separated from confirmed facts",
      "Risks, review checkpoints, and concrete next actions"
    ],
    "outputChecklist": [
      "Includes Requirements",
      "Includes Acceptance criteria",
      "Includes Edge cases",
      "Includes Out of scope",
      "States assumptions separately from confirmed facts",
      "Lists concrete next actions",
      "Calls out risks or missing context"
    ],
    "failureModes": [
      "The output does not define which user problem the feature solves",
      "Acceptance criteria do not mention empty or missing-agent states",
      "Scope creep introduces personalization or accounts"
    ],
    "handoffTips": [
      "Paste relevant project files, notes, or constraints before asking for the final output.",
      "Ask for a first draft, then request a stricter revision using the checklist.",
      "Keep the generated output with the project ticket, PR, proposal, or team document."
    ]
  },
  "evaluation": {
    "qualityScore": 4,
    "testedWith": [
      "claude"
    ],
    "recommendedFor": [
      "Converting a known feature goal into acceptance criteria and implementation boundaries",
      "Teams with the required inputs ready: Feature goal, User story, Constraints",
      "Project work where a human owner will review assumptions, risks, and final output"
    ],
    "notRecommendedFor": [
      "The team still needs discovery research before choosing the feature",
      "Fully autonomous production changes without human review",
      "Work requiring legal, financial, medical, compliance, or security certification"
    ],
    "knownWeaknesses": [
      "Internal inconsistencies across sections: in the strong run the role zip is named 'agent-archive-developer-kits.zip' in R12 but 'public/kits/roles/<role>.zip' / 'developer.zip' in the curl one-liner, and a non-project-ready agent in a pack makes check:data 'warn' in the edge-case table while R3 says the build fails.",
      "Some acceptance criteria are logically muddled, e.g. AC3 says check:data fails 'if a community/unverified agent is the only thing keeping a pack at 3 or more', although getRolePack already filters those agents out.",
      "On an under-specified request it still writes a full-length spec full of invented tuning parameters (event weights 1/3/3, 14-day half-life, 50-event cap, 90-day expiry, max 2 per category, '3-4 dev days'); they are presented as proposals, but a reader could mistake them for decisions.",
      "Output runs long (roughly 12 sections in the boundary run), so a ticket reader has to trim it before use.",
      "It relies on repo artifacts it hasn't verified, such as a site privacy/about page and agent 'tools/platforms' metadata, and states them as available inputs for the design."
    ],
    "evaluationCriteria": [
      "Produces testable acceptance criteria, edge cases, dependencies, and out-of-scope notes",
      "Produces Requirements in a format that can be pasted into a ticket, PR, document, or handoff",
      "States assumptions, missing context, risks, and concrete next actions separately"
    ],
    "sampleRuns": [
      {
        "title": "Role-based starter-pack picker on the install page",
        "input": "I need an implementation-ready feature spec I can paste into a GitHub issue.\n\nProduct: Agent Archive (https://yohan-work.github.io/agentive/) — an open-source library of 100 AI agent prompts. Static Next.js 16 site exported to GitHub Pages, no backend, no accounts. English (/en) and Korean (/ko) UI. 20 of the agents are \"project-ready\" and have downloadable install kits (AGENTS.md, CLAUDE.md, Cursor .mdc rule, agent.json, README, RUNBOOK, EVALUATION).\n\nFeature goal: On /install, add a \"Pick your role\" step at the top. The visitor picks one of four roles — Developer, PM, Designer, Operations — and sees a recommended starter pack of 3–5 project-ready agents for that role, with a single \"Download all kits for this role\" action.\n\nUser story: As a developer landing on /install for the first time, I want to pick my role and get a small, trusted set of agents to drop into my repo, so I don't have to read 20 agent pages to decide.\n\nExisting behavior today:\n- /install lists 4 static starter packs (engineering, product planning, design QA, operations) defined in src/data/starter-packs.ts, then a grid of all 20 project-ready agents using the existing AgentCard component.\n- Each project-ready agent page has a \"Download Kit\" button that downloads 7 files for that one agent, and a curl one-liner that fetches /kits/<slug>/<file>.\n- Bookmarks are stored in localStorage; nothing else is persisted.\n- Agents have verifiedStatus (unverified / community / tested / expert). 15 of the 20 project-ready agents are \"tested\" or \"expert\"; the other 5 are \"community\".\n\nConstraints:\n- Static data only; no server, no analytics SDK, no login.\n- Reuse the existing AgentCard and starter-pack data; don't invent a new agent schema field unless it's justified.\n- Every new UI string must exist in both en and ko dictionaries.\n- Must work at 375px wide.\n- \"Download all\" can't use a server-side zip; GitHub Pages only serves static files.\n\nSuccess criteria: a first-time visitor can go from /install to having kit files for their role in under 60 seconds; role packs should only include agents whose verifiedStatus is \"tested\" or \"expert\".\n\nPlease give me requirements, acceptance criteria, edge cases, and out-of-scope notes.",
        "expectedOutputSummary": "A GitHub-issue-ready spec for the /install role picker that reuses starter-packs.ts and AgentCard, enforces the tested/expert filter, solves 'download all' without a server-side zip, covers en/ko strings and the 375px layout, and gives testable ACs, edge cases (e.g. thin packs with only 15 eligible agents), and out-of-scope notes.",
        "sampleOutput": "You gave me enough to write the full spec, so I haven't asked any questions up front. Where I had to guess, I wrote the guess down under **Assumptions**, and the few decisions only you can make are under **Open questions** at the end. Everything below the line can be pasted straight into a GitHub issue.\n\n---\n\n# feat(install): \"Pick your role\" step with role starter packs and a download-all action\n\n## Summary\n\nAdd a role picker at the top of `/install`. The roles are **Developer, PM, Designer, Operations**. After a visitor picks a role, they see a recommended pack of 3–5 project-ready agents rated `tested`/`expert`, plus one **\"Download all kits for this role\"** action that returns every kit file for that pack as a single `.zip`. The site stays fully static: no server, no analytics, no login.\n\n## Why\n\nFirst-time visitors currently have to compare 20 agent cards (or 4 unranked starter packs) before they install anything. The role step cuts this down to one click that produces a small set of trusted agents, and a second click that downloads them.\n\n**Success criteria**\n1. A first-time visitor can go from landing on `/install` to having kit files for their role on disk in **under 60 seconds**. With no analytics, this is checked by a manual timed walkthrough on desktop and on a 375px mobile viewport.\n2. Every agent in a role pack has `verifiedStatus` of `tested` or `expert`. The build enforces this, so reviewers don't have to remember it.\n\n## Assumptions\n\nPlease correct any of these that are wrong.\n\n- **A1.** The 4 existing starter packs in `src/data/starter-packs.ts` map 1:1 onto the roles:\n  - engineering → Developer\n  - product planning → PM\n  - design QA → Designer\n  - operations → Operations\n- **A2.** Kit files already exist as static files at `/kits/<slug>/<file>` for all 20 project-ready agents. The curl one-liner already depends on them.\n- **A3.** A role's pack is the matching starter pack's agents, filtered to project-ready agents rated `tested`/`expert`, kept in pack order, and capped at 5. No new field on the agent schema is needed.\n- **A4.** The role picker's state lives in the URL (`/install?role=developer`) and not in `localStorage`. This keeps the rule that only bookmarks are persisted, and it makes a role's pack shareable as a link.\n\n## Requirements\n\n### Data\n\n- **R1.** Add a `role` field to the starter-pack type with the values `'developer' | 'pm' | 'designer' | 'operations'`. Set it on each of the 4 existing packs.\n  - The field goes on starter packs, not agents. Roles group packs, so agent YAML files and `schema/agent.schema.json` stay as they are.\n- **R2.** Add a pure helper `getRolePack(role)` in `src/data/` or `src/lib/`. It returns the pack's agents after these rules are applied, in this order:\n  1. Keep only agents that are project-ready.\n  2. Keep only agents whose `verifiedStatus` is `tested` or `expert`.\n  3. Preserve the order the pack defines.\n  4. Return at most 5 agents.\n- **R3.** Extend `scripts/check-data.mjs` so it **fails** in these cases:\n  - Any role is not covered by exactly one starter pack.\n  - `getRolePack(role)` returns **fewer than 3** agents for any role.\n  - Any agent slug in a pack does not resolve to an existing agent.\n  - Any agent in a role pack is missing one of its 7 kit files under `public/kits/<slug>/`, if kits are static files there (see A2).\n- **R4.** Add unit tests for `getRolePack` next to the existing tests. Cover:\n  - The status filter.\n  - The cap at 5.\n  - Order preservation.\n  - A pack where a `community` agent sits between eligible agents.\n\n### UI (`/install`)\n\n- **R5.** The role step renders **above** the existing content on `/install`. It shows:\n  - A heading and a one-line prompt, e.g. \"Pick your role\" / \"Get a small, verified set of agents for your repo\".\n  - Four role options, each with a short label and a one-line description.\n- **R6.** The role options are a single-select **radio group**. Use `role=\"radiogroup\"` and `role=\"radio\"` with `aria-checked`, or native radios with styled labels. They must work by keyboard: arrow keys move the selection and the focus ring is visible.\n- **R7.** No role is selected by default, and no pack is shown until the visitor picks one. The exception is when `?role=` is present and valid; then that role is preselected.\n- **R8.** Selecting a role does three things:\n  - Updates the URL with `router.replace`, so the choice doesn't add history entries.\n  - Renders that role's pack using the existing **`AgentCard`** component.\n  - Shows the **Download all** button and a curl alternative (R12).\n- **R9.** Read the query string on the client with `useSearchParams`, wrapped in `<Suspense>` as the static export requires. Do not use server-side `searchParams`, middleware, or `headers()`.\n- **R10.** Keep the existing starter-pack section and the grid of all 20 agents below the role step, unchanged. The role step adds a shortcut and replaces nothing.\n- **R11.** At 375px wide:\n  - The role options are a 2×2 grid, or a vertical stack if the labels wrap badly in Korean.\n  - Agent cards are a single column.\n  - The Download all button is full width with a touch target of at least 44px.\n  - Nothing scrolls horizontally.\n  - The curl block scrolls inside its own container, not the page.\n\n### Download all\n\n- **R12.** Download all produces **one `.zip` file**, named for example `agent-archive-developer-kits.zip`, with one folder per agent:\n\n  ```\n  agent-archive-developer-kits/\n    <slug-a>/AGENTS.md, CLAUDE.md, <slug-a>.mdc, agent.json, README.md, RUNBOOK.md, EVALUATION.md\n    <slug-b>/...\n    README.md   ← short index: role, agents included, how to install, link back to the site\n  ```\n\n  **Recommended: build the zips at build time.** A build step writes `public/kits/roles/<role>.zip` from the same kit sources, and the button is a plain `<a href download>`. A pre-built zip is an ordinary static file, so it fits the \"no server-side zip\" constraint and GitHub Pages serves it like any other asset. This approach:\n  - adds no client JS dependency,\n  - works reliably on iOS Safari,\n  - downloads in one click with no in-browser processing, which is best for the 60-second goal.\n\n  **Fallback if you'd rather not add a build step:** zip in the browser with `fflate` (about 8 kB gzipped). The browser fetches `/kits/<slug>/<file>` for each agent, builds the zip in memory, and triggers the download from a Blob URL. The lazy-loaded dependency is the only cost.\n\n  Do **not** fire 7 × N separate downloads. Browsers block or prompt on multiple automatic downloads, and on mobile this breaks.\n- **R13.** Show a **copyable curl/shell one-liner** for the role next to the button, e.g. `curl -LO https://yohan-work.github.io/agentive/kits/roles/developer.zip && unzip developer.zip`. Terminal users, which is most developers, can then skip the browser entirely.\n- **R14.** The button has these states:\n  - **Idle:** \"Download all kits (N agents)\".\n  - **Preparing:** only with the fallback approach; the button is disabled and shows a spinner.\n  - **Done:** a short confirmation.\n  - **Error:** a message plus links to each agent's page so the visitor can download the kits one by one.\n- **R15.** The per-agent \"Download Kit\" button and curl one-liner on agent pages stay exactly as they are.\n\n### i18n\n\n- **R16.** Add every new string to **both** `en` and `ko` in `src/i18n/dictionaries.ts`. The expected new keys (names are illustrative):\n  - `install.role.heading`, `install.role.prompt`\n  - `install.role.developer.label` / `.description`, and the same for `pm`, `designer`, and `operations`\n  - `install.role.packHeading` (with a `{role}` placeholder)\n  - `install.role.downloadAll` (with an `{count}` placeholder), `install.role.preparing`, `install.role.downloaded`, `install.role.error`\n  - `install.role.curlLabel`, `install.role.copy`, `install.role.copied`\n  - `install.role.verifiedNote`, e.g. \"Only agents rated Tested or Expert are included.\"\n- **R17.** File names, folder names, and the index `README.md` inside the zip stay English and ASCII in both locales. Only the UI is translated.\n\n## Acceptance criteria\n\n- [ ] **AC1.** On `/en/install` and `/ko/install`, the role step is the first content section. It shows 4 role options, and none is selected on first load.\n- [ ] **AC2.** Selecting a role shows 3–5 `AgentCard`s. The URL updates to `?role=<role>`, and the back button does not step through each role change.\n- [ ] **AC3.** Every card in every role pack shows `tested` or `expert`. `npm run check:data` fails if a `community`/`unverified` agent is the only thing keeping a pack at 3 or more, or if any pack falls below 3.\n- [ ] **AC4.** Loading `/en/install?role=designer` directly preselects Designer and shows its pack. An invalid value such as `?role=ceo` is ignored: nothing is selected and nothing breaks.\n- [ ] **AC5.** Clicking Download all produces one `.zip` with the structure in R12. That means 7 files per agent, all non-empty, and file contents identical to the per-agent kit downloads.\n- [ ] **AC6.** The curl one-liner in R13 works as written from a clean directory against the deployed site.\n- [ ] **AC7.** Timed walkthrough: land on `/install`, pick a role, download, unzip. This takes under 60 s in current Chrome desktop, Safari iOS, and Chrome Android at 375px.\n- [ ] **AC8.** At 375px there is no horizontal page scroll and every interactive element is at least 44px tall. This holds in both locales.\n- [ ] **AC9.** The role picker works by keyboard alone, and a screen reader announces it as a radio group with the selected state.\n- [ ] **AC10.** Every new UI string exists in both `en` and `ko`, and switching locale keeps the `?role=` selection.\n- [ ] **AC11.** The existing starter packs, the 20-agent grid, and the per-agent downloads behave as they do today.\n- [ ] **AC12.** `check:data`, `lint`, `typecheck`, `build`, and the unit tests all pass, and `next build` still produces a fully static export.\n\n## Edge cases\n\n| Case | Expected behavior |\n|---|---|\n| An agent in a pack is later downgraded to `community` | It disappears from the role pack automatically. If the pack drops below 3, `check:data` fails the build instead of shipping a thin pack. |\n| A pack has more than 5 eligible agents | The first 5 in pack order are shown. The zip contains exactly the agents shown. |\n| A pack lists an agent that isn't project-ready (no kit) | That agent is excluded from the role pack, and `check:data` warns. |\n| An agent appears in two role packs | Allowed. It appears in both zips. |\n| A kit file is missing at build time | The build fails (R3). The site never ships a zip with missing files. |\n| JS is disabled | The role step can't be interactive. Show a `<noscript>` note with links to the static starter packs below. With pre-built zips, you can optionally render 4 plain download links. |\n| The fallback download fails because one fetch fails | Abort, show the error state, and list per-agent links. Never download a partial zip silently. |\n| iOS Safari and Blob downloads (fallback only) | Test explicitly. If Blob download is unreliable, open the file in a new tab. This risk is the main reason pre-built zips are recommended. |\n| Double-clicking Download all | The button is disabled while preparing, so it doesn't trigger duplicate downloads. |\n| `?role=` combined with other query params or a hash | Preserve the other params when updating `role`. |\n| Korean labels are longer or wrap | The layout still holds at 375px (AC8). The grid may switch to a vertical stack. |\n| Bookmarks | Unaffected. Role packs do not read or write `localStorage`. |\n\n## Out of scope\n\n- Persisting the chosen role across visits (`localStorage`/cookies). The role lives in the URL only.\n- Analytics, events, or any funnel tracking. The 60-second goal is checked manually.\n- Roles beyond the four, multiple roles at once, or a \"custom pack\" builder.\n- Adding `role` or any other new field to the agent schema or YAML files.\n- Changing which agents are `tested`/`expert`, or promoting `community` agents to fill a pack.\n- Redesigning the existing starter-pack section, `AgentCard`, or agent detail pages.\n- Server-side or on-demand zipping, and CLI/npm installers.\n- A role step on any page other than `/install`.\n\n## Risks\n\n- **Thin packs.** Only 15 of the 20 project-ready agents are `tested`/`expert`, and they may not spread evenly across 4 roles. A role such as Designer could end up with fewer than 3. *Mitigation:* run `getRolePack` against current data **before** building the UI. If a role falls short, rebalance which agents the packs contain; do not relax the status rule.\n- **Drift between the zip and the per-agent kits.** If role zips are generated separately from `/kits/<slug>/`, their contents can diverge. *Mitigation:* build zips from the same generated kit files, and cover this with AC5 in a test.\n- **Repo and deploy size.** 4 zips of up to 35 small text files each is negligible, but generate them at build time rather than committing them.\n- **Mobile download behavior** (fallback approach only). See the edge-case table.\n\n## Next actions\n\n1. **Check pack coverage** (about 15 min). Run a one-off script to count the `tested`/`expert` project-ready agents in each current starter pack. If any role has fewer than 3, decide on rebalancing first.\n2. **Decide the zip approach:** build-time (recommended) or client-side with `fflate`.\n3. Implement the data layer: R1–R4, including the `check:data` rules and unit tests.\n4. Implement the build-time zip generation (or the fallback) and the curl one-liner: R12–R14.\n5. Implement the UI: R5–R11 and R16. Check it at 375px in both locales.\n6. Run AC1–AC12, including the timed walkthrough on 3 browsers. Attach the timings to the PR.\n\n## Open questions\n\n1. Does the 1:1 mapping from the 4 existing starter packs to the 4 roles (A1) hold, or do the role packs need different agents from the current packs?\n2. Once the role step ships, should the existing starter-pack section stay as it is, be collapsed, or be removed? This spec assumes it **stays** (R10).\n3. Is a new build step that writes `public/kits/roles/*.zip` acceptable? If not, the client-side `fflate` fallback applies.",
        "reviewNotes": [
          "Real run on 2026-09-29: Claude Opus 5.5 with the agent prompt as instructions and this input, single turn, no tools. Graded by a separate Claude reviewer against the evaluation criteria; not yet reviewed by a human maintainer.",
          "Uses the input's specific facts well. It maps the 4 existing starter packs to the roles (flagged as assumption A1), filters on verifiedStatus tested/expert, reuses AgentCard, adds en/ko dictionary keys (R16), and covers 375px with a 44px touch target (R11/AC8).",
          "Handles the static-zip constraint well: it recommends build-time zips under public/kits/roles as ordinary static files, offers a client-side fflate fallback, and warns against firing 7xN separate downloads. It also respects the static-export rules by using useSearchParams inside Suspense instead of server searchParams (R9).",
          "Catches the key data risk the input implies: only 15 of the 20 agents are eligible, so a role pack could fall below 3. Next action 1 is to check pack coverage before building the UI, and R3 makes check:data enforce the minimum.",
          "Has minor inconsistencies to fix before pasting. The zip filename differs between R12 and R13, the edge-case table says check:data 'warns' for a non-project-ready agent while R3 implies failure, and AC3's wording is confused.",
          "Assumptions, risks, next actions, and open questions are separate sections, as the criteria require, and the acceptance criteria are checkbox-formatted and testable (including a timed walkthrough on 3 browsers for the 60-second goal)."
        ]
      },
      {
        "title": "Vague 'personalized recommendations' request with conflicting constraints",
        "input": "We want personalized agent recommendations on the Agent Archive home page, like \"recommended for you\", based on what each user has used before. Keep it fully static (GitHub Pages, no backend) and we don't want to store anything about users. PM wants it in next week's release. Can you write the spec?",
        "expectedOutputSummary": "It should flag that 'based on what each user used before' conflicts with 'store nothing about users' on a static site, ask a focused question (e.g. whether on-device localStorage is acceptable), and give a provisional scoped spec with a stateless fallback and a realistic cut for next week.",
        "sampleOutput": "Before the spec, there's one conflict that has to be settled, because it decides what \"personalized\" can mean here.\n\n**\"Based on what each user has used before\" and \"don't store anything about users\" can't both be fully true.** A recommendation based on past behavior has to remember that behavior somewhere. With no backend, the only place left is the user's own browser (localStorage). So the real decision is:\n\n- **Option A – On-device history (recommended):** Store a short list of agent slugs the visitor viewed, copied, or downloaded, in their browser only. Nothing is sent anywhere, there are no cookies, no IDs, and no analytics. The user can see and clear it. This gives you real \"recommended for you\". It *is* still storage, though, just on the user's device and not yours. Legal/privacy should confirm that counts as \"not storing anything about users.\"\n- **Option B – No memory at all:** Recommendations are based only on what the user does in the current visit, or on a quick \"What are you working on?\" picker (role, task, tools). This is fully stateless, but it's contextual, not \"based on what you used before,\" and it resets every visit.\n\nAlso note that \"used\" can only mean *actions on this site* (views, copying install commands, downloading kits). A static site can't see whether someone actually installed or ran an agent.\n\n**My question: is on-device storage (Option A) acceptable?** The spec below assumes **yes** and includes Option B as the fallback. If the answer is no, drop §4.1 and ship §4.2 alone. The rest of the spec still holds.\n\n---\n\n# Feature Spec: \"Recommended for you\" on the Home Page\n\n## 1. Summary\nAdd a \"Recommended for you\" section to the Agent Archive home page. It ranks agents by how similar they are to the agents this visitor has engaged with before. Everything runs client-side on the static site, and no user data leaves the browser.\n\n## 2. Goals / Non-goals\n**Goals**\n- Returning visitors see relevant agents without searching.\n- Zero backend, zero server-side user data, zero third-party tracking.\n- Ship a scoped v1 in next week's release.\n\n**Non-goals (v1)**\n- Cross-device sync, accounts, or login.\n- Collaborative filtering (\"people like you also used…\"). This needs aggregate data from many users, which we won't have.\n- Tracking real-world installs or usage outside the site.\n- Measuring the feature with per-user analytics.\n\n## 3. Users & Scenarios\n- **Returning visitor:** viewed 3 coding agents last week and lands on home. Sees related coding and review agents.\n- **First-time visitor / cleared storage:** no history. Sees the fallback (curated/popular or the picker). Never an empty or broken section.\n- **Privacy-conscious visitor:** can turn it off and clear history with one click.\n\n## 4. Functional Requirements\n\n### 4.1 On-device interaction history (Option A)\n- **Signals recorded** (on this device only):\n  | Event | Weight |\n  |---|---|\n  | Viewed agent detail page | 1 |\n  | Copied install command / config | 3 |\n  | Downloaded install kit / export | 3 |\n- **Storage:** one localStorage key, e.g. `aa:recs:v1`, holding `[{ slug, event, ts }]`.\n  - Store slugs and timestamps only. No free text, search queries, or identifiers.\n  - Cap at the 50 most recent events, and drop anything older than 90 days on read.\n  - Version the key so the format can change later.\n- **Controls:**\n  - A \"Why these?\" / \"Clear history\" link in the section, which wipes the key immediately.\n  - A \"Turn off recommendations\" toggle, stored as a single boolean flag. When off, nothing is recorded.\n- **Resilience:** wrap every storage call in try/catch. If storage is unavailable (private mode, blocked), fall back silently to §4.3.\n\n### 4.2 Contextual picker (Option B; optional in v1, required if A is rejected)\n- An inline chip picker: \"I'm working on: Coding · Writing · Research · Data · Ops…\", using existing taxonomy categories/tags.\n- Selecting chips re-ranks recommendations for this page view only. Nothing is persisted, or at most sessionStorage if you approve that.\n\n### 4.3 Fallback (always required)\n- No history or picker selection: show a curated/\"popular\" list. Use an editor-maintained list in the data files or verified agents sorted by `updatedAt`.\n- The section heading changes to \"Popular agents\" so it never claims to be personalized when it isn't.\n\n### 4.4 Ranking (client-side, deterministic)\n- Build a feature vector for each agent at build time from existing metadata: category, tags, tools/platforms, and workflow/starter-pack membership.\n- User profile = the sum of feature vectors of engaged agents × event weight × recency decay (for example, half-life of 14 days).\n- Score every candidate by overlap (cosine or weighted Jaccard) with the profile.\n- **Exclude** agents the user has already copied or downloaded. Keep viewed-only agents, but rank them lower.\n- **Diversity:** max 2 agents per category in the top 6.\n- **Boost** verified agents slightly. Never surface agents below a minimum verification level, if one exists.\n- Show 6 cards. Ties are broken by verification status, then `updatedAt`.\n\n### 4.5 UI\n- Placement: on the home page, below the hero and above the main catalog.\n- Reuse the existing agent card component.\n- Each card can show a small reason, e.g. \"Because you viewed *X*\" (the top contributing agent). Keep it simple for v1.\n- The first render must not flash wrong content. Because the page is static, render a skeleton or the fallback on the server, then hydrate to personalized results on the client.\n- Localize all new strings in every supported locale.\n\n## 5. Technical Approach\n- **Build time:** emit a compact `recs-index` JSON (slug, feature tags, verification, updatedAt) alongside existing generated data. Keep it small, with no descriptions.\n- **Client:** one hook (e.g. `useRecommendations()`) reads storage, computes scores, and returns the list. One small `recordAgentEvent(slug, type)` helper is called from the detail page, the copy button, and the download handler.\n- **No network calls** are added. No cookies. No third-party scripts.\n- **Performance:** scoring a few hundred agents in the browser is trivial. Target < 5 ms and no measurable change in page weight beyond the index.\n\n## 6. Privacy Requirements\n- All data stays in the user's browser. The site never transmits it.\n- Add a short note to the site's privacy/about text: what is stored, where, for how long, and how to clear it.\n- No fingerprinting, no IDs, no cross-site storage.\n- If legal decides that on-device storage still counts as \"storing user data\" (e.g. under ePrivacy/cookie-consent rules in some regions), ship Option B only, or make A opt-in.\n\n## 7. Acceptance Criteria\n1. A first-time visitor sees a \"Popular agents\" section with 6 cards, and it has no console errors.\n2. After viewing 3 agents in the same category and returning to home, at least 3 of 6 recommendations share tags/category with them, and none of the 3 viewed agents take a top slot.\n3. A copied or downloaded agent never appears in recommendations.\n4. \"Clear history\" empties storage and immediately reverts to the fallback.\n5. With recommendations turned off, no events are written (verified in devtools).\n6. With localStorage blocked, the page renders the fallback without errors.\n7. The network tab shows no new requests caused by the feature.\n8. The static export builds and deploys to GitHub Pages unchanged. All locales render translated strings.\n\n## 8. Success Measurement\nWithout per-user tracking, you can't measure personal CTR directly. Options:\n- Qualitative: user feedback, a GitHub issue/discussion prompt.\n- Aggregate, privacy-safe analytics, **only if** such analytics already exist and are approved. Count clicks on the section as a whole with no user identifiers.\n- Otherwise, accept that v1 success is judged qualitatively.\n\n## 9. Assumptions\n- Option A (on-device localStorage) is acceptable. **Needs confirmation.**\n- Existing agent metadata (category, tags, tools) is rich and consistent enough to compute similarity.\n- The home page can host a client component, so client-side hydration is fine on a static export.\n- \"Used before\" means on-site engagement, not real installs.\n\n## 10. Risks\n| Risk | Impact | Mitigation |\n|---|---|---|\n| Privacy stance rejects on-device storage | Feature can't be \"based on history\" | Ship Option B + fallback. Retitle the section. |\n| Sparse/inconsistent tags → weak recs | Irrelevant suggestions | Audit tags before release. Diversity cap. Fallback blend. |\n| Cold start (most visitors are new) | Most people never see personalization | Good fallback. Picker as a lightweight alternative. |\n| Hydration flicker on static page | Janky first paint | Skeleton/fallback server render, then swap. Reserve fixed height. |\n| Timeline (next week) | Rushed quality | Cut scope per §11. |\n| History is per-browser | Doesn't follow users across devices | Document it as expected behavior. Out of scope. |\n\n## 11. Scope for Next Week's Release\n**Must ship (≈3–4 dev days + review):**\n- Event recording (view/copy/download), storage with caps/expiry.\n- Build-time recs index + client-side ranking.\n- Home section with fallback, \"Clear history\", i18n strings.\n- Acceptance criteria 1–8.\n\n**Cut to follow-up if time is short:**\n- The \"Because you viewed X\" reason text.\n- The on/off toggle (keep \"Clear history\").\n- The contextual picker (§4.2), unless Option A is rejected, in which case it becomes the must-ship feature.\n\n## 12. Next Actions\n1. **PM + legal/privacy (today):** decide between Option A and Option B-only. This blocks the start.\n2. **Content owner:** quick audit of agent tags/categories for consistency (1 day, can run in parallel).\n3. **Eng:** build the recs index + ranking hook behind the fallback first, so something shippable exists by mid-week.\n4. **Design:** confirm the section placement, card reuse, and \"Why these? / Clear history\" affordance.\n5. **QA:** test plan against §7, including blocked-storage and private-window cases.\n6. **Release note:** one line explaining that recommendations are computed on your device and nothing is sent to us.",
        "reviewNotes": [
          "Real run on 2026-09-29: Claude Opus 5.5 with the agent prompt as instructions and this input, single turn, no tools. Graded by a separate Claude reviewer against the evaluation criteria; not yet reviewed by a human maintainer.",
          "Opens by naming the core contradiction and poses one focused decision: Option A, on-device localStorage, versus Option B, stateless picker or session-only. It also correctly notes that a static site can only see on-site actions, not real installs.",
          "Moves the work forward without blocking. The spec assumes Option A, and it explicitly says to 'drop §4.1 and ship §4.2 alone' if Option A is rejected. It includes an always-on fallback that retitles the section 'Popular agents' so the page never falsely claims personalization.",
          "Section 11 cuts scope sensibly for the one-week deadline, with separate must-ship and follow-up lists, and next action 1 makes the PM/legal decision a blocker.",
          "It invents many specific parameters (weights 1/3/3, 14-day half-life, cosine or weighted Jaccard, a '3-4 dev days' estimate) for a vague request. They are framed as examples, but they make the draft heavier than the input justifies.",
          "The acceptance criteria are testable (a devtools check that nothing is written when the feature is off, blocked-storage rendering, no new network requests), but the document is long for an under-specified ask."
        ]
      }
    ]
  },
  "decisionGuide": [
    {
      "question": "Is this the right agent for my task?",
      "guidance": "Converting a known feature goal into acceptance criteria and implementation boundaries"
    },
    {
      "question": "When should I choose something else?",
      "guidance": "The team still needs discovery research before choosing the feature",
      "alternativeAgentSlug": "codex-task-brief"
    },
    {
      "question": "What should I run next?",
      "guidance": "After this agent produces a draft, use a review or QA agent to check regressions, assumptions, and missing tests.",
      "alternativeAgentSlug": "qa-checklist-agent"
    }
  ],
  "instructions": "You are a product requirements analyst. Ask concise clarifying questions only when required. Use the user's context, constraints, audience, and success criteria. Return a practical implementation-ready feature spec with clear sections, assumptions, risks, and next actions.",
  "contextRequirements": [
    "Feature goal",
    "User story",
    "Constraints",
    "Existing behavior"
  ],
  "expectedProjectFiles": [
    "AGENTS.md",
    "CLAUDE.md",
    ".cursor/rules/{agent-slug}.mdc",
    "agent.json",
    "README.md",
    "RUNBOOK.md",
    "EVALUATION.md"
  ],
  "usageExamples": [
    "I need an implementation-ready feature spec I can paste into a GitHub issue.\n\nProduct: Agent Archive (https://yohan-work.github.io/agentive/) — an open-source library of 100 AI agent prompts. Static Next.js 16 site exported to GitHub Pages, no backend, no accounts. English (/en) and Korean (/ko) UI. 20 of the agents are \"project-ready\" and have downloadable install kits (AGENTS.md, CLAUDE.md, Cursor .mdc rule, agent.json, README, RUNBOOK, EVALUATION).\n\nFeature goal: On /install, add a \"Pick your role\" step at the top. The visitor picks one of four roles — Developer, PM, Designer, Operations — and sees a recommended starter pack of 3–5 project-ready agents for that role, with a single \"Download all kits for this role\" action.\n\nUser story: As a developer landing on /install for the first time, I want to pick my role and get a small, trusted set of agents to drop into my repo, so I don't have to read 20 agent pages to decide.\n\nExisting behavior today:\n- /install lists 4 static starter packs (engineering, product planning, design QA, operations) defined in src/data/starter-packs.ts, then a grid of all 20 project-ready agents using the existing AgentCard component.\n- Each project-ready agent page has a \"Download Kit\" button that downloads 7 files for that one agent, and a curl one-liner that fetches /kits/<slug>/<file>.\n- Bookmarks are stored in localStorage; nothing else is persisted.\n- Agents have verifiedStatus (unverified / community / tested / expert). 15 of the 20 project-ready agents are \"tested\" or \"expert\"; the other 5 are \"community\".\n\nConstraints:\n- Static data only; no server, no analytics SDK, no login.\n- Reuse the existing AgentCard and starter-pack data; don't invent a new agent schema field unless it's justified.\n- Every new UI string must exist in both en and ko dictionaries.\n- Must work at 375px wide.\n- \"Download all\" can't use a server-side zip; GitHub Pages only serves static files.\n\nSuccess criteria: a first-time visitor can go from /install to having kit files for their role in under 60 seconds; role packs should only include agents whose verifiedStatus is \"tested\" or \"expert\".\n\nPlease give me requirements, acceptance criteria, edge cases, and out-of-scope notes.",
    "Add bookmark support to an agent archive without login. 목표와 제약 조건을 기준으로 바로 사용할 수 있는 결과물을 만들어줘."
  ],
  "targetFiles": [
    "AGENTS.md",
    "CLAUDE.md",
    ".cursor/rules/{agent-slug}.mdc",
    "agent.json",
    "README.md",
    "RUNBOOK.md",
    "EVALUATION.md"
  ],
  "tags": [
    "requirements",
    "acceptance criteria",
    "spec"
  ],
  "metadata": {
    "roles": [
      "pm",
      "developer",
      "planner"
    ],
    "categories": [
      "planning",
      "development"
    ],
    "tools": [
      "ChatGPT",
      "Linear",
      "Jira"
    ],
    "difficulty": "intermediate",
    "automationLevel": 4,
    "verifiedStatus": "community",
    "updatedAt": "2026-09-29"
  }
}