Triage
Before any structuring, the engine checks SGR eligibility, actor roles, funding source, and exclusions — stopping early when a case is out of scope instead of generating false confidence.
Territorial Pre-Investment AI
When Colombian municipalities have the need but not the formulation capacity, this engine orders territorial chaos into traceable SGR/MGA artifacts — canon-driven, phase-gated, and built to stop before it lies.
Problem
Small and medium Colombian municipalities face a structural gap: clear public needs, intense pressure to secure regalías, and almost no installed capacity to structure defendible SGR/MGA pre-investment projects.
The territorial gap
Ordering chaos into defensible pre-investment structure — not disguising weak methodology with polished prose.
The bottleneck is not typing documents faster. It is poorly formulated problems, budgets and indicators without traceability, phase confusion between Perfil and Prefactibilidad, and projects that look polished but fail methodological review.
We are a software-engineering consultancy — not a traditional studies-and-designs firm. The product bet was building an internal formulation factory: disciplined SGR/MGA methodology, AI where it accelerates reasoning, real sources, verifiable artifacts, and a system that knows when to stop instead of inventing viability.
Solution
SGR and MGA rules live as canon. Each case produces a versioned artifact trail in project/. A 15-step pipeline with human gates turns incomplete territorial inputs into deliverables a formulator can defend.
Triage
Before any structuring, the engine checks SGR eligibility, actor roles, funding source, and exclusions — stopping early when a case is out of scope instead of generating false confidence.
Structure
Problem tree, objectives, alternatives, value chain, and MGA structure — with parallel internal reviewers at the structure step to catch causal and catalog errors before they reach a viability instance.
Verify
Normative SGR matrix, ex-ante scope review, and phase-gate validation. Perfil requirements never mixed with Prefactibilidad — the most common failure mode in real territorial submissions.
Deliver
Gap report and maturation plan with full traceability — artifacts planning secretariats and allied consultants can continue from, not a chat transcript that disappears after the session.
What makes it work in practice
Normalized rules, checklists, and methodology in knowledge/ — read-only during case execution so normative source never drifts mid-formulation.
Preflight triage through maturation plan — each step declares inputs, outputs, stop criteria, and explicit phase gates for Perfil vs. Prefactibilidad.
Every step is a contract: what it reads, produces, must not do, and when it halts — not open-ended prompts that improvise methodology.
25 specialized agents with granular permissions. The runner orchestrates; subagents reason with only the context their contract allows.
Every field tagged provisto, inferido, supuesto, vacio, or no_verificado_en_canon. Missing data stays visible — never fabricated into a false viability story.
Markdown outputs with Resumen Para Siguiente Paso — sources, assumptions, gaps, and pending decisions. Reviewable by humans and allied consultants, not trapped in chat history.
Impact
Success is measured by what planning teams and reviewers can use — ordered pre-investment structure, traceable assumptions, and early detection of methodological weakness before a project reaches a viability instance.
01 - Territorial reality
Municipalities with reprioritized needs and political pressure to secure regalías — but without the formulation capacity to structure a defendible SGR/MGA pre-investment case.
02 - Engineered response
An internal formulation factory: canon-driven pipeline, 25 bounded agents, phase gates, and artifact-first deliverables that allied consultants can continue from.
03 - What changes
Faster, more traceable formulation with explicit stop conditions — gaps surfaced before presentation, not masked by polished documents that fail review.
System at a glance
15
Pipeline steps
Deterministic steps 0–14 from preflight triage through maturation plan, each with explicit stop criteria.
25
Configured agents
Step executors, parallel internal reviewers, auxiliaries, and external doc scout.
15+
Skill contracts
Reusable skills declaring inputs, outputs, limits, and stop conditions.
Generic AI makes municipalities look ready when they are not
The system reframes AI from a writer into a formulation discipline — producing artifacts planning secretariats can audit and gaps reviewers can act on before resources are spent.
Architecture
Canon vs. artifacts, the 15-step agent pipeline, permission boundaries, and an internal runtime designed for auditable territorial work.
A lightweight runner coordinates 15 step agents that read canon and prior case artifacts, write verifiable Markdown outputs, and halt on critical gaps — with parallel internal reviewers at the MGA structure step where causal errors are most costly.
| Layer | Role | Stack |
|---|---|---|
| Formulador | Provides case inputs and declares phase (Perfil / Prefactibilidad). | Human gate |
| sgr-mga-runner | Orchestrator — invokes subagents via task, verifies artifacts, logs decisions. | OpenCode |
| 15 Step Agents | Read canon, reason, write project/ artifacts per skill contract. | Skills · Subagents |
| knowledge/ | SGR rules, MGA methodology, checklists — read-only during cases. | Markdown · Git |
| project/ | 00_input through 09_plan — dynamic case outputs with traceability. | Markdown · Git |
| LangGraph (planned) | Declarative DAG orchestration when pipeline complexity and volume justify migration. | Future |
Decisions
Lessons
What held up on real territorial work.
What the next iteration targets.
What changed my engineering judgment.
Next step
The implementation lives in a private repository used in active consultancy work. Reach out to walk through the pipeline design, governance model, or how artifact-first agents differ from document generators.
Keep exploring