> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scriptonia.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Product Manager

> ProductManager produces PRD, PLAN, requirements, and related docs during execution.

## Purpose and Responsibilities

* Create **PRD.md**, **PLAN.md**, and other requirement/spec files in `docs/` and similar.
* Align with **FrontendDev** and **BackendDev** so specs are implementable.
* Work with **ToolManager** on meta and export.

***

## Input/Output

### Input (from `generateFileContentWithAgent`)

* `file: FileDefinition` — e.g. `{ name: "PRD.md", type: "markdown", description: "..." }`
* `requirements` — `refined_requirements` (title, description, features, target\_audience, technical\_requirements)
* `config: PlatformConfig` — `platform`, `techStack`, `folderStructure`
* `filePath` — e.g. `docs/PRD.md`
* `workflowContext` — idea, analysis, answers, platformOptions, selectedPlatform, paymentDetails
* `existingDeliverables` — Related deliverables from other agents for coordination

### Output

* **Markdown** (or other `file.type`) string written into the deliverable. No fixed schema; content must match the file’s role (PRD, PLAN, etc.).

***

## Prompt Engineering

* ****`Agent system (in platform-templates):`****\
  `"You are a Product Manager agent. You create product requirements, user stories, and specifications. Coordinate with FrontendDev and BackendDev to ensure requirements are clear and implementable."`
* **Full prompt** in `generateFileContentWithAgent` includes: workflow context, `requirements`, `file`/`filePath`, `config.platform` and `techStack`, `relatedFiles`, and instructions to produce unique, path-specific, production-ready content in the correct format.
* **Model:** `callOpenRouter(..., 'GROK', { temperature: 0.8 })`. For Supabase, a separate detailed Supabase prompt is used with `callOpenRouter(..., 'GROK', { temperature: 0.7 })`.

***

## File Assignment

`getAgentForFile` assigns to **ProductManager** when the path contains:

* `PRD`, `PLAN`, or `requirements`

***

## Examples

* **docs/PRD.md** — Product requirements, user stories, success criteria.
* **docs/PLAN.md** — Phases, milestones, dependencies.
* **docs/SEO\_CONTENT.md** (Website) — SEO strategy and content plan.
* **docs/HUMAN\_REVIEW\.md**, **docs/PROJECT\_RULES.md** (Web App).

***

## Customization Options

* **System prompt:** Change the ProductManager entry in `agentSystemPrompts` in `lib/platform-templates.ts`.
* **Assignment:** Update `getAgentForFile` to include new paths (e.g. `docs/PITCH.md` → ProductManager).
* **Templates:** Add new `FileDefinition`s under `docs/` in the platform `folderStructure` in `lib/platform-templates.ts`.

***
