Skip to content

STD-RIG-001: Drupal as a First-Class Gas City Rig

Author: Thomas Scola Status: Working Proposal → Binding Architectural Authority Target: Bluefly AI Software Factory / Gas City Factory Authority: Oracle /opt/bluefly/blucity


Core Principle

DRUPAL IS A RIG.
GAS CITY OWNS ORCHESTRATION.
BEADS OWNS DURABLE ENGINEERING WORK.
FORMULAS OWN REPEATABLE ENGINEERING PROCESS.
PACKS CARRY PROVEN BEHAVIOR.

A Drupal repository maps to:

RIG = WHERE Drupal engineering work happens

Skill Generation Law

SKILLS ARE THE OUTPUT OF THE CONTEXT CHAIN.
SKILLS ARE NOT PRE-BUILT FROM READING DOCS.

CONTEXT CHAIN:
  INTENT → BEAD → FORMULA → RIG → AGENT → EXECUTION → TEST → PROOF
                                                                  ↓
                                                               SKILL

SPECULATIVE_SKILL_CATALOGS = VIOLATION
SKILLS_FROM_UPSTREAM_DOCS_ONLY = VIOLATION
SKILLS_FROM_PROVEN_FACTORY_WORK = CORRECT

One Factory

ONE_CITY=YES
ONE_DURABLE_WORK_GRAPH=YES
LOCAL_DDEV_CITY=NO
LOCAL_DOLT_AUTHORITY=NO

Rig Model

CUSTOM_RIG_MANIFEST=NO
GAS_CITY_NATIVE_RIG_CONFIG=YES

Portable Rig identity: city.toml Machine-specific path binding: .gc/site.toml

Three Bluefly-Owned Integration Pieces

  1. ddev-gascity — DDEV execution adapter (small, NOT orchestrator)
  2. blucity-packs — reusable Drupal factory behavior (PROVEN methods only)
  3. recipe_blucity — Drupal-side capabilities required by the factory (minimal)

Division of Concerns

Component Responsibility
Gas City Work orchestration, dependency graph, agent lifecycle, events
Drupal Rig Repository/project scope
Beads / Dolt Durable engineering work state
Drupal Pack Agents, formulas, skills, commands — PROVEN behavior only
ddev-gascity DDEV-specific execution integration
recipe_blucity Drupal-side application capabilities
GitLab Source, MRs, CI, packages, releases
Drupal runtime Application/content/business workflow execution

Pack Law

A PACK SHOULD CARRY WORKING METHODS.
IT SHOULD NOT BE A SPECULATIVE CATALOG OF METHODS WE HOPE TO USE SOMEDAY.

ONLY PROMOTE PROVEN BEHAVIOR INTO THE DRUPAL PACK.

Drupal Package Doctrine

CORE → CONTRIB → CONFIGURATION → RECIPE → CANVAS/SDC
→ ECA/FLOWDROP → DRUPAL AI → TOOL API/MCP
→ EXISTING BLUEFLY MODULE → CUSTOM

Engineering Agents vs Drupal-Hosted Agents

Gas City Engineering Agent Drupal-Hosted Agent
Purpose Build/maintain the Drupal project Perform application/user work
Runtime Gas City provider/session Drupal runtime
Work authority Beads Drupal entities/workflow
Scope Repository/build/CI/release Content/application behavior
Workflow Gas City Formula ECA/Flowdrop/Drupal AI
Persistence Beads work graph Drupal database

Drupal Rig Maturity Levels

Level Gate
0 — Rig REGISTERED, SOURCE_KNOWN, BEAD_NAMESPACE_KNOWN
1 — Executable COMPOSER=PASS, DDEV=PASS, DRUSH=PASS
2 — Factory-enabled DRUPAL_PACK_IMPORTED, FORMULA_RUN=PASS
3 — AI-operable RECIPE_BLUCITY_APPLIED, TOOL_API_OR_MCP, AUDIT
4 — Governed SHARED_CI, WITNESS, RELEASE_PROOF, RUNTIME_PROOF

Milestones (Sequential, Not Parallel)

  1. Register one real Drupal Rig (AMCS)
  2. Execute one simple work Bead
  3. Create drupal-change Formula
  4. Add minimal DDEV integration
  5. Apply minimal recipe_blucity
  6. Run it again (WOULD_RUN_AGAIN=YES)
  7. Promote into reusable Drupal Pack

Formula Improvement Loop

RUN → REVIEW → IDENTIFY HUMAN JUDGMENT → IDENTIFY FAILURE
→ CHANGE FORMULA/PROMPT/SKILL → RUN AGAIN

MANUAL_RELAY_COUNT=
UNMODELED_JUDGMENT=
FAILED_STEPS=
RETRIES=
PROMPT_GAPS=
TOOL_GAPS=
WOULD_RUN_AGAIN=

What We Explicitly Do Not Build Yet

CUSTOM .gascity/rig.toml
SECOND LOCAL CITY
SECOND WORK GRAPH
CUSTOM SCHEDULER
CUSTOM EVENT BUS
CUSTOM SECRET BROKER
LARGE ENROLL CLI
FULL DRUPAL OPERATIONS PACK
DOZENS OF SPECULATIVE FORMULAS
AUTOMATIC ORDERS FOR UNPROVEN WORKFLOWS
CONTRACTPLANE AS WORK AUTHORITY
SKILLS FROM READING DOCS WITHOUT PROVEN WORK

References

  • Full architectural document: provided by Thomas Scola, 2026-09-23
  • Gas City docs: https://docs.gascity.com/
  • STD-AUTH-001: authority precedence and Light Factory model
  • STD-ECON-001: factory economic gate