Skip to content

Use prompt-driven project manager agent#41

Merged
lolipopshock merged 3 commits into
agent/implement-issue-34/codex-25127393901from
stacked/project-manager-agent-assessment
Apr 29, 2026
Merged

Use prompt-driven project manager agent#41
lolipopshock merged 3 commits into
agent/implement-issue-34/codex-25127393901from
stacked/project-manager-agent-assessment

Conversation

@lolipopshock

Copy link
Copy Markdown
Contributor

Summary

  • Replace the deterministic project-management scoring CLI with a prompt-driven project-manager agent run stacked on Add opt-in project management scoring workflow #39
  • Let the agent assess open issues/PRs, optionally execute managed priority/effort label add/remove operations, and return the summary
  • Add a final summary publication CLI that writes the Actions step summary and optionally comments on today’s Daily Summary discussion
  • Update docs/configuration and regression coverage for summary publication

Verification

  • npm --prefix .agent test

Stacked on #39.

@sepo-agent-app sepo-agent-app Bot added agent Handled by the agent and removed agent/orchestrate labels Apr 29, 2026
@sepo-agent-app

sepo-agent-app Bot commented Apr 29, 2026

Copy link
Copy Markdown

Sepo automation handoff dispatched: orchestrate -> review (round 2/5).

manual orchestrate start on PR; dispatching review

@sepo-agent-app

Copy link
Copy Markdown

Rubrics Review

Total Score Verdict Rubrics Scored
100 PASS 7
Dimension Rubric Result Score Evidence
coding_workflow / generic Read docs and linked context first pass 6/6 PR #41 is explicitly stacked on #39; #39’s discussion requested prompt-driven PM behavior, priority/* plus effort/*, six-hour cadence, Daily Summary discussion posting, and docs/tests updates. The PR diff implements those points.
coding_workflow / generic Reuse existing code pass 8/8 The workflow reuses scheduled-activity-gate, resolve-github-auth, resolve-agent-provider, setup-agent-runtime, and run-agent-task; the summary publisher reuses .agent/src/discussion.ts and .agent/src/output.ts instead of embedding GraphQL/output logic inline.
coding_workflow / generic Validate delegated route authorization pass 8/8 The agent task preserves requested_by: ${{ github.actor }} and only switches to approve-all when both dry_run=false and apply_labels=true; otherwise it runs read-approved. Manual execution is additionally gated by enabled=true, while scheduled runs are gated by AGENT_PROJECT_MANAGEMENT_ENABLED.
coding_workflow / generic Keep docs in sync pass 7/7 .agent/docs/architecture/supported-workflows.md and .agent/docs/customization/configuration-list.md are updated for prompt-driven PM runs, dry-run/label behavior, schedule, summary posting, category, and limit settings.
coding_workflow / generic No per-file inventory tables in docs pass 6/6 The docs update workflow/configuration behavior only; it does not add per-file inventory tables.
coding_workflow / generic Make surgical changes pass 8/8 The diff is scoped to replacing project-management scoring with the prompt-driven workflow, adding the final summary publisher, updating the prompt/docs, and adjusting focused tests.
coding_style / generic Prefer simple implementations pass 7/7 The implementation keeps the workflow direct: resolve config, run one project-manager prompt, then publish the returned markdown with a small CLI. The prompt gives clear managed-label rules without adding a new framework.

Notes

  • Main score drivers: the PR follows the parent PR’s direction, keeps workflow glue on existing shared actions, and updates the relevant docs and regression tests.
  • surface-stateful-failures, orchestration follow-up defaults, accepted stop comments, default merge strategy, and rubric-authoring guidance were not scored because they do not genuinely apply to this PR’s changed behavior.
  • No rubric-specific follow-up needed.

Findings

  • INFO: The PR satisfies the applicable selected rubrics. No rubric-specific blocking or warning findings.

Final Rubric Verdict

PASS

github_token: ${{ steps.auth.outputs.token }}
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
claude_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
permission_mode: ${{ steps.project_config.outputs.permission_mode }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In label-application mode this switches the agent to approve-all while the job token has issues: write, pull-requests: write, and discussions: write. GitHub permissions cannot restrict that token to only managed priority/* / effort/* label add/remove operations, so the prompt is the only guardrail preventing comments, closes, edits, or other mutations. The prior deterministic CLI enforced the managed-label boundary in code. Please keep the model in read mode and have it emit a structured plan that a deterministic CLI validates and applies, or otherwise add a hard execution boundary that only permits the intended label mutations.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

sepo-agent-app Bot commented Apr 29, 2026

Copy link
Copy Markdown

Sepo automation handoff dispatched: review -> fix-pr (round 3/5).

agent planner selected fix-pr: Latest review synthesis for PR #41 has Final Verdict NEEDS_REWORK and explicitly recommends FIX_PR for concrete branch changes; round budget remains.

@sepo-agent-app

Copy link
Copy Markdown

Sepo pushed fixes for this PR. Branch: stacked/project-manager-agent-assessment. Requested by @lolipopshock.

  • Kept the project-manager agent prompt-driven but forced the agent run to approve-reads only.
  • Added a deterministic managed-label apply CLI that parses the agent’s structured plan, creates allowed managed labels, applies only priority/* and effort/* add/remove operations, and excludes unrelated mutations.
  • Wired the workflow to run label application after the read-only agent phase and publish the validated result summary.
  • Updated project-manager prompt/docs/configuration for the new plan-and-apply contract.
  • Added regression coverage for dry-run skipping, allowed label creation, stale managed-label removal, desired managed-label addition, and unrelated mutation exclusion.
Verification
  • npm --prefix .agent test passed: 392 tests.

@sepo-agent-app

sepo-agent-app Bot commented Apr 29, 2026

Copy link
Copy Markdown

Sepo automation handoff dispatched: fix-pr -> review (round 4/5).

agent planner selected review: fix-pr completed successfully on PR #41 after the prior review explicitly recommended FIX_PR for NEEDS_REWORK; a follow-up review is needed to confirm the hard label-write boundary and regression coverage are resolved.

@sepo-agent-app

Copy link
Copy Markdown

I’ve got enough evidence for the rubric review. The current head appears to satisfy the previously raised hard-boundary issue: run-agent-task is read-approved, and the separate CLI filters the agent plan down to known priority/* and effort/* labels before any mutation.## Rubrics Review

Total Score Verdict Rubrics Scored
100 PASS 7
Dimension Rubric Result Score Evidence
coding_workflow / generic Read docs and linked context first pass 6/6 PR #41 is explicitly stacked on #39 and follows the linked plan: prompt-driven PM pass, six-hour cadence, priority/* and effort/* labels, Daily Summary publication, docs, and tests.
coding_workflow / generic Reuse existing code pass 8/8 The workflow reuses scheduled-activity-gate, resolve-github-auth, resolve-agent-provider, setup-agent-runtime, and run-agent-task; summary posting reuses .agent/src/discussion.ts and .agent/src/output.ts.
coding_workflow / generic Validate delegated route authorization pass 8/8 The agent run uses permission_mode: approve-reads and preserves requested_by: ${{ github.actor }}; writes are moved to a deterministic CLI that only applies validated managed label operations.
coding_workflow / generic Keep docs in sync pass 7/7 .agent/docs/architecture/supported-workflows.md and .agent/docs/customization/configuration-list.md document prompt-driven PM behavior, dry-run/label application, summary posting, category, and limit settings.
coding_workflow / generic No per-file inventory tables in docs pass 6/6 The docs update behavior and configuration entries only; no per-file inventory table was added.
coding_workflow / generic Make surgical changes pass 8/8 The diff is scoped to replacing deterministic scoring with a prompt-driven agent, adding deterministic label-plan application and summary publication, and updating focused tests/docs.
coding_style / generic Prefer simple implementations pass 7/7 The implementation keeps a straightforward flow: agent assesses and emits a JSON plan, deterministic CLI validates/applies managed labels, final CLI publishes the summary.

Notes

  • Main score drivers: the current PR head addresses the important authorization-boundary concern by keeping the agent read-only and moving label writes into a testable deterministic path.
  • Regression coverage now includes dry-run skipping, allowed label creation, managed add/remove operations, unrelated label exclusion, and summary publication.
  • surface-stateful-failures, orchestration follow-up defaults, accepted stop comments, default merge strategy, and rubric-authoring guidance were not scored because they do not genuinely apply to the changed behavior.
  • No rubric-specific follow-up needed.

Findings

  • INFO: The implementation satisfies the applicable selected rubrics. No rubric-specific blocking or warning findings.

Final Rubric Verdict

PASS

const dryRun = boolEnv("AGENT_PROJECT_MANAGEMENT_DRY_RUN", true);
const applyLabels = boolEnv("AGENT_PROJECT_MANAGEMENT_APPLY_LABELS", false);
const summary = readFileSync(bodyFile, "utf8");
const plan = parseManagedLabelPlan(summary);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseManagedLabelPlan() returns an empty plan both for a valid {"label_changes":[]} plan and for missing/malformed JSON. In non-dry-run label-application mode that means an agent output contract failure is reported as Applied 0 managed ... operation(s) and the workflow continues to publish a clean summary. Please distinguish a valid empty plan from no parseable plan and fail the apply step when label application is requested but the structured plan is absent or invalid.

`,
);

const result = runCli(tempDir, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test invokes a CLI that writes Actions outputs but does not provide an isolated GITHUB_OUTPUT, so it can inherit the parent workflow file-command path. In the review environment npm --prefix .agent test failed with EPERM while writing the ambient _runner_file_commands/set_output_* file. Please set GITHUB_OUTPUT to a temp file here, as the dry-run test above does, or explicitly clear it.

@sepo-agent-app

This comment has been minimized.

@sepo-agent-app

sepo-agent-app Bot commented Apr 29, 2026

Copy link
Copy Markdown

Sepo automation handoff dispatched: review -> fix-pr (round 5/5).

agent planner selected fix-pr: Latest review synthesis for PR #41 has Final Verdict NEEDS_REWORK and explicitly recommends FIX_PR for concrete unresolved branch changes; round budget allows one more handoff.

@sepo-agent-app

Copy link
Copy Markdown

Sepo pushed fixes for this PR. Branch: stacked/project-manager-agent-assessment. Requested by @lolipopshock.

Implemented the follow-up fixes for PR #41.

  • parseManagedLabelPlan() now distinguishes valid plans from missing/malformed fenced JSON.
  • Real label application (dry_run=false, apply_labels=true) now fails when the agent output lacks a valid label_changes plan.
  • Explicit valid empty plans still succeed as true no-ops.
  • Added regressions for missing/malformed plans and explicit empty plans.
  • Isolated GITHUB_OUTPUT in the label-apply test and GITHUB_OUTPUT/GITHUB_STEP_SUMMARY in the summary publication test to avoid workflow file-command leaks.

Verification: npm --prefix .agent test passed, 395 tests.

@lolipopshock

Copy link
Copy Markdown
Contributor Author

@sepo-agent /review

@sepo-agent-app

Copy link
Copy Markdown

Rubrics Review

Total Score Verdict Rubrics Scored
100 PASS 8
Dimension Rubric Result Score Evidence
coding_workflow / generic Read docs and linked context first pass 6/6 PR #41 is stacked on #39, whose discussion requested prompt-driven PM behavior, priority/* plus effort/*, six-hour cadence, and Daily Summary posting. The current diff implements that scope.
coding_workflow / generic Reuse existing code pass 8/8 The workflow reuses repo-local actions for auth/provider/runtime/task execution, and keeps GitHub label/discussion logic in typed CLIs/modules instead of inline workflow glue. See agent-project-manager.yml.
coding_workflow / generic Validate delegated route authorization pass 8/8 The delegated agent run is approve-reads, preserves requested_by: ${{ github.actor }}, and label writes happen only in the deterministic post-agent CLI. See agent-project-manager.yml.
coding_workflow / generic Keep docs in sync pass 7/7 Workflow docs and configuration docs describe prompt-driven triage, dry-run behavior, deterministic managed-label application, six-hour schedule, and summary posting. See supported-workflows.md and configuration-list.md.
coding_workflow / generic Surface stateful failures pass 7/7 Real label application now fails if the agent output lacks a valid fenced label_changes plan, while tests cover missing, malformed, and explicit empty plans. See apply-project-management-labels.ts and apply-project-management-labels-cli.test.ts.
coding_workflow / generic No per-file inventory tables in docs pass 6/6 Docs update behavior and configuration entries only; no per-file inventory table was added.
coding_workflow / generic Make surgical changes pass 8/8 The diff is scoped to replacing deterministic scoring with prompt-driven assessment, deterministic managed-label application, summary publication, prompt/docs, and focused tests.
coding_style / generic Prefer simple implementations pass 7/7 The flow is direct: agent emits a markdown summary plus JSON plan, the CLI filters to known managed labels, applies issue/PR label operations, and publishes the summary. See project-management-labels.ts.

Notes

  • Main score drivers: the current head fixes the prior authorization and stateful-failure concerns by keeping the agent read-only, validating the label plan, and making label writes deterministic and test-covered.
  • Verification: npm --prefix .agent test passed locally on PR head 44c859d with 395 tests.
  • Not scored: one-shot follow-up orchestration, accepted stop comments, default merge strategy, and rubric-authoring guidance do not apply to this PR’s implementation surface.
  • No rubric-specific follow-up needed.

Findings

  • INFO: The implementation satisfies the applicable selected rubrics. No rubric-specific blocking or warning findings.

Final Rubric Verdict

PASS

@sepo-agent-app

Copy link
Copy Markdown

AI Review Synthesis

Dual-agent review by Claude and Codex.
Requested by @lolipopshock.

Summary of PR/Issue

  • PR Use prompt-driven project manager agent #41 replaces deterministic project-management scoring with a prompt-driven project-manager agent.
  • The current head keeps the agent read-only, has it emit a markdown summary plus structured label-change plan, and applies managed label changes through deterministic code.
  • It supports managed priority/* and effort/* labels, dry-run behavior, six-hour scheduled runs, and optional Daily Summary discussion posting.
  • The PR also updates docs and adds focused tests for label-plan validation, label application, and summary publication.

Review

The latest reviewer inputs agree that the prior blocking issues have been addressed. No unresolved actionable issues remain in the current PR head.

Issue Severity Description
No actionable issues remain INFO The write-boundary, invalid-plan handling, and test hermeticity concerns are fixed in the current head. Rubrics review and code review both report no blocking or warning findings.

Progress

  • Prior approve-all agent mutation authority was fixed by running the project-manager agent with approve-reads.
  • Managed label writes now happen in a deterministic post-agent CLI that filters to allowed priority/* and effort/* operations.
  • Missing or malformed label plans now fail real label-application mode, while explicit valid empty plans remain allowed.
  • Tests now cover missing, malformed, and empty plans, managed label application, unrelated mutation exclusion, and isolated workflow output files.
  • Verification reported by reviewers: npm --prefix .agent test / npm test passed with 395 tests.

Recommended Next Step

NO_AUTOMATED_ACTION: No unresolved actionable branch-change work remains from the current review inputs.

Final Verdict

SHIP

Action Items

  • No required branch-change work remains.

@lolipopshock
lolipopshock merged commit 5ac163f into agent/implement-issue-34/codex-25127393901 Apr 29, 2026
1 check passed
@sepo-agent-app

Copy link
Copy Markdown

Rubrics Update

No changes were committed to agent/rubrics from PR #41.

no rubric changes

I did not update the rubrics branch. PR #41’s reusable lessons were from bot-authored review comments, not trusted human preference, and the substance is already covered by existing active rubrics: validate-delegated-route-authorization and surface-stateful-failures. The rubrics checkout is clean.

@lolipopshock
lolipopshock deleted the stacked/project-manager-agent-assessment branch May 17, 2026 02:57
zixiaowang17 pushed a commit to zixiaowang17/target-trial that referenced this pull request Jul 18, 2026
…full

Enable cache_mode: full by default with a trusted seed workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Handled by the agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants