version: 1
name: Check and review the guestbook
description: Check JavaScript syntax, ask an agent to review the files, and keep its report.
steps:
  - id: check
    name: Check JavaScript
    exec: node
    args: [--check, app.js]
  - id: review
    name: Review the guestbook
    agent:
      prompt: |
        The JavaScript syntax check passed. Read app.js and index.html.
        Review note entry, character limits, and browser storage. Do not edit
        the project files. Write a concise Markdown report to
        ${{ run.dir }}/review.md with findings and checks still needing a browser.
        Distinguish code inspection from tests you actually ran.
      permission-mode: ask
    timeout: 10m
  - id: report
    name: Show the review
    present:
      file: ${{ run.dir }}/review.md
