Phase 9: CI-Driven Operating Model
Goal: Update the agency operating model to reflect CI-driven infrastructure deploys and establish cross-pillar feedback loops so the process layer stays in sync with the platform layer automatically.
Owner: Betty Sue + Dottie (docs), Dev agent (trigger implementation)
Repo: n/a (docs-only for 9a-9g;
forgejo_admin/pal-e-platform for 9h trigger implementation)Depends on: Phase 6 (autonomy protocol),
plan-pal-e-platform Phase 6.3/6.4 (CI pipeline must exist before fully documenting it)Why
The platform is maturing from manual
tofu apply on a laptop to CI-driven deploys where merge = deploy. This fundamentally changes: (1) what "deployed" means in the agent workflow, (2) what failure modes agents encounter, (3) how platform changes cascade to SOP updates. Without this phase, the operating model drifts from reality every time the platform ships a CI improvement.The 2026-03-14 state lock incident proved this concretely: two sessions ran
tofu apply simultaneously, blocking each other. CI serialization is the mechanical enforcement of the single-writer principle — but only if the operating model acknowledges it.Scope
| # | Deliverable | Type | Owner | Status |
|---|---|---|---|---|
| 9a | <code>convention-apply-before-merge</code> — deprecated pattern + break-glass procedure | convention | Betty Sue | COMPLETED |
| 9b | <code>convention-cross-pillar-triggers</code> — the meta-pattern for platform-to-agency feedback | convention | Betty Sue | COMPLETED |
| 9c | Update <code>agent-workflow</code> state machine — add deployed/deploy-failed states, post-merge deploy verification, new step 12 in The Flow | SOP update | Dottie | COMPLETED |
| 9d | Update <code>sop-ci-pipeline-recovery</code> — add 4 infra CI failure modes (tofu plan/apply failures, state lock, unhealthy resource) | SOP update | Dottie | COMPLETED |
| 9e | Update <code>sop-post-merge-docs</code> — add deploy verification step (item 2) and cross-pillar impact check (item 10) | SOP update | Dottie | COMPLETED |
| 9f | Update <code>convention-agent-autonomy-levels</code> — merge=deploy rationale, break-glass as L0, CI recovery as L1 (3 rows changed/added) | convention update | Dottie | COMPLETED |
| 9g | Update <code>project-pal-e-agency</code> architecture diagram — feedback loop with TRIGGERS arrows added to three-pillar diagram | architecture | Dottie | COMPLETED |
| 9h | Implement Woodpecker trigger step — on merge to main, if CI/deploy files changed, auto-create Forgejo issue for agency review. <strong>Forgejo Issue: forgejo_admin/pal-e-platform #62 (MERGED — PR #63)</strong> | implementation | Dev agent | COMPLETED |
| 9i | <code>convention-arch-sop-pairing</code> — architecture notes MUST link to corresponding SOPs (or document why none needed). Enables systematic audit of arch-SOP drift. Inventory: 1/10 paired, 8 exempt, 10 need links. | convention | Betty Sue | COMPLETED |
| 9j | Cross-pillar review: <code>sop-secrets-management</code> — assessed and updated with 6 CI-driven changes: dual-path sync docs, 17 repo secrets cataloged, procedure rewritten for merge=deploy, Mermaid diagram updated, cross-references added. First real exercise of the cross-pillar trigger pattern. | SOP review | Betty Sue + Lucas | COMPLETED |
Sequencing: 9a+9b are prerequisites (define the patterns). 9c-9g can be parallelized (Dottie batch). 9h depends on platform Phase 6.4 being live.
Deliverables
- Convention notes: apply-before-merge, cross-pillar-triggers
- Updated SOPs: agent-workflow, sop-ci-pipeline-recovery, sop-post-merge-docs
- Updated conventions: convention-agent-autonomy-levels
- Updated architecture: project-pal-e-agency four-pillar diagram with feedback arrows
- Woodpecker pipeline step: auto-create agency review issue on platform merge (9h, future)
Related
plan-pal-e-agency— parent planplan-pal-e-platform— platform plan (Phases 6.3/6.4 are the triggering work)convention-agent-autonomy-levels— affected conventionagent-workflow— affected SOPsop-ci-pipeline-recovery— affected SOPsop-post-merge-docs— affected SOP