Skip to content

Bluefly Factory OS

Authority: BLUEFLY_CONSTITUTION.md is the supreme document, the single one you'd hand a new agent to rebuild the system if every repo were deleted. Authority order: Constitution > Product Contracts > Factory Contracts > Generated Outputs > Implementation Systems. If two documents disagree, the higher authority wins. CLAUDE.md, AGENTS.md, ai.json, llms.txt are generated projections of it, never hand-edit them; run constitution project.

The Axiom: Bluefly owns composition. Bluefly does not own implementation.

BLUEFLY_CONSTITUTION.md        ← authority
├── constitution/constitution.yaml   (canonical, machine-readable)
├── CLAUDE.md · AGENTS.md · ai.json · llms.txt   (generated projections)
├── schema/factory.schema.json
├── factories/amcs/factory.yaml   (reference Factory Contract)
└── scripts/constitution.py · scripts/factory.py   (the gates)

Conformance gates:

python3 scripts/constitution.py project constitution/constitution.yaml .   # regenerate projections
python3 scripts/constitution.py verify  constitution/constitution.yaml .   # fail on drift
python3 scripts/constitution.py conform constitution/constitution.yaml <file>   # fail if it contradicts authority
python3 scripts/factory.py check factories/amcs/factory.yaml               # the Factory gate


The Factory Operating System for digital organizations, a Claude Code + Claude Desktop plugin. Bluefly is not an AI platform, an agent framework, or a Drupal consultancy. Bluefly is the thing that assembles platforms into products.

The architecture (frozen)

PRODUCT  ─▶  FACTORY  ─▶  OUTPUTS  ─▶  DOMAINS  ─▶  SYSTEMS
- Product: what the customer buys (AMCS Healthcare Factory). The root of everything. - Factory: how Bluefly manufactures the product. factory.yaml is the single source of truth. - Outputs: generated artifacts, authoritative nowhere. - Domains: ownership boundaries (seven of them). - Systems: the upstreams the outputs compile into.

The rule: Product → Factory → Output → Capability → System. Anything that can't be expressed this way is at the wrong layer.

The ownership model: Bluefly owns composition. It does not own implementation. Drupal = business authority · Gas City = execution · ContextControl/ContractPlane/Cedar/Dragonfly = memory/contract/policy/verification authority · Canvas/AGUI/OpenClaw/Dashboard = the four experience surfaces (builder/user/operator/administrator) · A2A = transport only. Factory is a Bluefly primitive that compiles into Gas City primitives (Pack→Formula→Order→Agent→Bead).

What's here

  • factories/amcs/factory.yaml: the AMCS Factory Contract (reference implementation).
  • schema/factory.schema.json: the contract schema (v3).
  • scripts/factory.py: a runnable validator / composer / auditor (PyYAML required; jsonschema optional).
  • scripts/preflight.py: the packaging gate. Run it before every submission; it encodes every claude.ai plugin-validation rule this bundle has ever failed.
  • reference/factory-operating-model.md: the binding model.
  • reference/corpus-reconciliation.md: where this plugin and BluCity-Docs diverge (read before trusting portfolio or runtime facts here).
  • skills/: the blu factory business API.

Use it now

python3 scripts/factory.py check factories/amcs/factory.yaml   # CI gate: schema + compose-first + 25 invariants
python3 scripts/factory.py plan  factories/amcs/factory.yaml   # the compile graph
python3 scripts/factory.py audit factories/amcs/factory.yaml   # ownership + governance, fail-closed
In Claude: "create a higher-education factory", "verify the AMCS factory", "what does this factory compile into", "audit before publish".

Skills (the blu-cli business API)

factory (always-on model) · agent-contract (what every Gas City agent must emit) · product-definition (run BEFORE factory-create for any new SKU, offering, pack, or add-on) · factory-create · factory-verify · factory-plan · factory-audit · factory-upgrade · factory-publish · factory-recover.

agent-contract

The response contract and Factory Receipt schema for every agent Gas City dispatches. A run that produces no receipt did not happen. Twelve invariants are enforced in the schema itself (PASS may not exceed the evidence verdict, OBSERVE changes nothing, OPERATE authority must be earned, AUTH_BLOCKED requires its nine diagnostic fields, an applied change needs a proven rollback) and sixteen more in scripts/validate_receipt.py. scripts/conformance_test.py proves every invariant rejects a real violation and accepts honest work. The runnable Gas City pack is built separately and consumes these artifacts rather than restating them.

python3 skills/agent-contract/scripts/conformance_test.py
python3 skills/agent-contract/scripts/validate_receipt.py <receipt.json> --write

product-definition

Forces an idea through human need → product → positioning → economics → offer → launch → growth and emits a canonical Product Definition (skills/product-definition/references/product-definition-template.md) plus derived artifacts. SKILL.md is the method; references/ is the theory library (product theory, customer psychology, market research, positioning/messaging/brand, pricing/economics, MVP/validation, GTM, growth/retention, ownership, portfolio taxonomy, open-source strategy, Bluefly commercial doctrine). Stage 0 tries to kill the proposed product first (owner search, classification enum, neighbor boundaries) before defining it; output opens with an Executive Decision and closes with an Evidence State table. Calibration runs for AMCS and ContextControl in references/worked-examples.md, including what the 2026 GTM tab overturned in both. Commercial authority is the current GTM document in Drive, not the repos; Stage 0 searches it first. Catalysts must be dated and primary-sourced (the verified Q4 2026 Drupal set is in bluefly-commercial-doctrine.md), operational authority is earned per remediation class rather than granted, and the definition is explicitly not the leadership document. Grounded in BluCity-Docs: Commercial Work Gate, Service-to-Product rule, founder-locked commercial model, Portfolio Registry objects (Mountain/Product/Offering/Pack), six Gas City primitives.

Before you package or submit

python3 scripts/preflight.py                                   # packaging gate, exit 1 on any violation
python3 scripts/constitution.py verify constitution/constitution.yaml .
python3 scripts/factory.py check factories/amcs/factory.yaml
python3 skills/agent-contract/scripts/conformance_test.py

preflight.py checks the manifest (kebab-case name, semver, description at most 500 characters, no XML tags), rejects any directory named bin at any depth, validates every SKILL.md frontmatter (name matches its directory, description present and free of XML tags), resolves every references/ and scripts/ path a skill cites, and enforces house style (no em dashes anywhere, including scripts). All four gates must be green before the bundle is submitted.

Non-negotiables (the audit enforces these, fail-closed)

Product is the root · seven domains are ownership boundaries (Bluefly owns composition) · Authority is Drupal business authority only · ContextControl is mandatory memory authority · Cedar + Dragonfly fail-closed · four experience surfaces stay distinct · AGUI extended never replaced · A2A is transport not authority · Gas City owns runtime (no rebuilt engines) · compose before any custom code.

Install

Install the packaged .plugin in Cowork / Claude Code, or drop this directory into your local plugins path. Source of record: blueflyio/agentictools/plugins.