platform-cli: GCP org placement, new phases/templates, gitignore cleanup - #3
Open
gas6262 wants to merge 11 commits into
Open
platform-cli: GCP org placement, new phases/templates, gitignore cleanup#3gas6262 wants to merge 11 commits into
gas6262 wants to merge 11 commits into
Conversation
- AgentRoleConfig in manifest schema: name, sleep_seconds, max_turns - Three built-in agent templates: developer, reviewer, ops - loop.sh takes agent name arg, reads from agents/<name>/ - setup-vm.sh discovers all agents, starts each in tmux window - Scaffold step B.10 generates agents/ directory per manifest roles - Default to all 3 agents if no roles specified in manifest Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Automates the GitHub App manifest flow so each scaffolded project gets its own scoped bot identity (`<name>[bot]`) instead of borrowing a human's token: serves a pre-filled manifest + opens the browser for one click, captures the redirect code, creates the App, stores its private key in the project's Secret Manager, waits for the install, and prints the loop.sh wiring (app_id / installation_id / bot_name / bot_email). Also ships templates/agents/github-app-token.sh — the helper the generated loop.sh uses to mint short-lived installation tokens each iteration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add platform-cli create-agent-identity: per-project GitHub App bot
Adds a CI-status step to the developer agent prompt template's open-PR loop, mirroring ai4us2's agents/developer/PROMPT.md: check `gh pr checks`, re-run failed jobs once to rule out a flake, then check out the branch, read `gh run view --log-failed`, fix, push, and reply — never leave a PR you authored with red required checks. Also updates the decision flowchart and the "move on to new tasks" gate. Folds in the in-progress template sync already staged in the working tree (worktree-model Step 1, closed-PR triage, merge-conflict step).
…ub PRs Mirrors ai4us2's loop.sh fix. The open-PR cap counted every open PR on the repo, but PRs the owner demotes to Backlog stay open on GitHub indefinitely, inflating the count past the cap and wedging the whole fleet in a pre-Claude backoff while real Todo work waited. Count Linear issues in "In Review" instead — the actual review queue awaiting the owner. count_open_prs -> count_in_review; MAX_OPEN_PRS -> MAX_IN_REVIEW (legacy AGENT_MAX_OPEN_PRS honored as fallback); REVIEW_STATE overridable via AGENT_LINEAR_REVIEW_STATE. Board-status header and both developer prompt templates updated to in_review/max_in_review.
…s, gitignore Bundles the accumulated uncommitted work on the scaffolder into one reviewable change: - GCP org placement: new steps/_gcp_org.py (resolve org + adopt orphan projects into it) wired into phase_g and the library pipeline, plus a manifest cloud.org_id field — so scaffolded projects always land under the org instead of "No organization". - New phase steps: phase_l_deploy, phase_m_pipelines, phase_n_agents, phase_o_linear, phase_p_library_pipeline. - New/updated templates: library-node variants (settings, AGENTS, README), npm-publish + worker cloudbuild, reconcile.py, plus refinements to existing agent/cloudbuild/terraform/worker templates. - Example manifests: carouselr.yaml, fresler-table.yaml. - .gitignore: ignore Python bytecode + egg-info and stop tracking them (removes 41 generated files from the index that were causing constant drift). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cli drift capture Integrates the remotely-merged create-agent-identity work with the local drift capture (GCP org placement, new phases/templates, gitignore cleanup).
Ports the ai4us2 fix to the scaffolder so generated projects get a working screenshot flow instead of the broken `` / gh-issue-comment embed (which never renders — worse on private repos, where raw/blob URLs also 404 in-browser). - templates/project/pr-screenshot.sh.j2: uploads a screenshot to an unlisted gist (binary over git; REST gists are text-only) and prints a markdown image tag whose raw URL renders INLINE in a PR body. Verified end-to-end on a real private PR. Project name templated into the gist description / git author. - phase_b_scaffold.py: render it to agents/pr-screenshot.sh (chmod 755), matching the reconcile.py precedent. - developer/PROMPT.md.j2: use the script; screenshot the changed page (or home page if unclear); explicitly forbid the broken embed methods. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
App installation tokens can't create gists, so a scaffolded project's VM must be gh auth login'd with a user PAT that has gist scope. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Captures the accumulated drift in the repo-scaffold CLI into one reviewable PR (separate from the fresler-table docs work).
Highlights
GCP org placement (fixes projects landing under "No organization")
steps/_gcp_org.py:resolve_org_id()(env → manifest → auto-detect) andensure_project_in_org()which adopts an orphaned project into the org (only moves projects with no org parent). Wired into bothphase_g_gcp.pyandphase_p_library_pipeline.py, on create and reuse.project.cloud.org_id(schema + context) to pin an org, overridable viaPLATFORM_GCP_ORG_ID.New pipeline phases
phase_l_deploy,phase_m_pipelines,phase_n_agents,phase_o_linear,phase_p_library_pipeline.Templates & examples
Library-node variants (settings/AGENTS/README),
npm-publish+workercloudbuild,reconcile.py, refinements to agent/cloudbuild/terraform/worker templates, and example manifests (carouselr.yaml,fresler-table.yaml).Repo hygiene
.gitignorenow ignores__pycache__/,*.pyc,*.egg-info/, and 41 previously-tracked generated files are removed from the index — this was the main source of ongoing drift.Notes for review
leet/directory was intentionally left out of this PR.🤖 Generated with Claude Code