Skip to content

Repo-owned workflow file with lifecycle hooks (.propr/workflow.yml) #2660

Closed

Description

@integry

Problem

A repository's ProPR behavior lives almost entirely in instance Settings: prompt additions, validation expectations, preview instructions, concurrency and lifecycle scripts. The only repo-owned file ProPR reads is .propr/setup.sh, plus preview assets.

As a result, workflow policy isn't versioned with the code, isn't reviewed in PRs, and doesn't travel when a repository moves to another instance. It also can't differ between branches.

OpenAI's Symphony keeps policy in a repo-owned WORKFLOW.md that teams version and review like any other code:

  • YAML front matter holds the typed settings;
  • the body is a strict template prompt;
  • lifecycle hooks cover after_create, before_run, after_run and before_remove, with a timeout;
  • changes apply to the next run without a restart.

Proposal

Add an optional .propr/workflow.yml, read from the task's base branch at run time:

hooks:                      # run inside the agent container, like setup.sh today
  after_create: .propr/setup.sh     # default; existing repos keep working unchanged
  before_run: npm run build --if-present
  after_run: ./scripts/collect-artifacts.sh
  timeout_ms: 600000
instructions: .propr/instructions.md   # appended to implementation/follow-up prompts
validation:                 # commands the agent must run and report before finishing
  - npm test
  - npm run lint
previews:
  types: [image]
  instructions: "Capture the settings page at 1280px"
limits:
  max_parallel_tasks: 3
  • Precedence: instance Settings define the defaults and hard limits, and the repo file refines within them. Nothing in the repo can raise limits past the instance's, change credentials, grant network access, or add mounts.
  • Validation: invalid files fail the run early with a clear error on the issue or PR. A JSON schema is published in the docs for editor support.
  • Hook safety: hooks run inside the sandboxed agent container, never on the worker or host. Repository content is untrusted input.
  • Visibility: the task page shows which workflow file revision a run used.
  • Migration: repositories without the file behave exactly as today, and setup.sh stays the implicit after_create. propr init scaffolds a commented workflow.yml.

Acceptance criteria

  • A repo with only .propr/setup.sh behaves as before.
  • Hooks run at their documented points with the timeout enforced. before_run failing fails the attempt, while after_run and before_remove failures are logged and ignored.
  • instructions and validation show up in the agent prompt, and the completion comment reports the validation results.
  • Settings limits can't be exceeded from the file, enforced by a test.
  • Branch-specific files work: a run uses the file on its base branch.
  • Documented in repository-best-practices.md and a new "Repository workflow file" reference page.

Open questions

  • Is workflow.yml the right shape, or is a Markdown file with front matter (Symphony-style) better for prompt-heavy policy?
  • Should MCP and the Settings UI surface the effective merged config per repository and branch?

Activity

  1. propr-dev commented on Sep 30, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-6-astra model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-6-astra
    • Branch: 2660/gpt-6-astra-repo-owned-workflow-file--20260930-2351-vrd
    • Base Branch: main
    • Worktree: issue-2660-20260930-2351-gpt-6-astra-vrd

    🔍 Track Task Execution

  2. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions