name: project_index
description: "Compiles a master MANUSCRIPT-README.md index of all project deliverables, revisions, and publication status."
debug: true
system: agent_prompt

agent_prompt:
  - "= identity.md"

sections:
  - agent
  - project
  - deliverables
  - message
  - instructions

steps:
  - type: think
    hint: |
      You are {agent.name}. Compile a comprehensive MANUSCRIPT-README.md for this project.

      Look at the PROJECT DELIVERABLES section above — it lists every file committed during this project.

      Write a well-structured README that includes:

      ## [Book Title] — Book 1
      **[Company Name] | Author: [Lead Author] | Creative Director: [Creative Director]**

      > [Opening hook line from Chapter 1]

      Brief pitch (2-3 sentences about the project's concept, genre, and target audience).

      ---

      ## Publication Status
      [Based on the editorial report in deliverables — GO / NO-GO verdict, score if available, date]

      ---

      ## Reading Order
      A table with columns: Chapter Number | Chapter Title | POV | File
      (Pull from the final-chapter-*.md files in deliverables)

      ---

      ## Chapter Continuity Chain
      A table showing how each chapter connects to the next:
      Transition | Previous chapter ends... | Next chapter opens...
      (Pull quotes from the actual chapter files)

      ---

      ## Revisions Applied
      If any revise-*.md files exist in deliverables, list them with what was revised.

      ---

      ## Research & Planning Documents
      List all non-chapter deliverables (outline, trend report, editorial report, launch strategy, etc.)

      ---

      ## Team
      A table of agents, roles, and contributions based on the project context.

      ---

      ## Iteration History
      If earlier draft files exist (write-chapter-*, rewrite-chapter-*, etc.), note them briefly.

      ---

      *Generated by [Company Name] AI team | PAE Multi-Agent System*

  - type: document
    filename: "MANUSCRIPT-README"

  - type: close
    rag_update: true

adjudication:
  enabled: true
  pass_threshold: 65
  deliverable_type: coordination
  criteria:
    completeness:
      weight: 45
      description: "All project deliverables are catalogued"
    accuracy:
      weight: 35
      description: "Details about deliverables and team are correct"
    structure:
      weight: 20
      description: "Index is well-organized and navigable"
