Inspiration

AI can generate impressive business content quickly, but important strategy decisions require more than a good response in a chat window. They need structured evidence, visible trade-offs, quality controls, accountability, and human judgment.

Independent consultants and small strategy teams often face a choice between informal AI conversations and heavyweight enterprise platforms. I wanted to explore a third path: a lightweight, local-first strategy workflow in which AI contributes to the work while a human remains responsible for the decision.

That became AI Strategy Factory.

What it does

AI Strategy Factory turns a structured business brief into a review-ready strategy draft and, after explicit human approval, a traceable Markdown strategy artifact.

The workflow:

  • validates the submitted strategy brief;
  • creates a durable and immutable strategy run;
  • generates structured recommendations using a configured provider;
  • performs automated advisory quality checks;
  • optionally adds a separate local Ollama critique;
  • presents the draft and quality report for human review;
  • records an explicit approval or rejection decision; and
  • creates a checksum-protected strategy artifact only after approval.

The model cannot approve its own output. Quality scores cannot change workflow state. A human reviewer retains final authority.

The current project is a synthetic-data demonstration environment. It is not presented as production-ready for confidential client information.

How I built it

AI Strategy Factory combines:

  • n8n for structured intake, orchestration, recovery guidance, and human review;
  • FastAPI and Python for validation, lifecycle rules, generation, quality checks, review decisions, and artifact creation;
  • PostgreSQL for durable workflow state and audit records;
  • Ollama with gemma4:31b for optional local strategy generation and critique;
  • a deterministic fake provider for repeatable testing and demonstrations;
  • Docker for the n8n and PostgreSQL infrastructure;
  • Pydantic and JSON contracts for structured input and output validation;
  • idempotency and SHA-256 checksums for repeatability and artifact integrity;
  • separate service and review tokens for the implemented authentication boundary;
  • pytest and workflow-contract scripts for automated verification; and
  • Remotion for the narrated project demonstration.

The current n8n workflow contains 20 nodes, remains inactive and unpublished, contains no credential-bearing nodes, and is unavailable through MCP.

The most recent local service test run completed with 108 tests passed, eight optional PostgreSQL integration tests skipped, and no failures.

How I used Codex and GPT-5.6

Codex powered by GPT-5.6 was the primary development collaborator across the repository.

I supplied the product concept, constraints, priorities, architectural decisions, safety boundaries, and acceptance decisions. Codex helped inspect the repository, propose scoped changes, implement code and workflow updates, run tests, diagnose failures, compare results, and improve the documentation and presentation.

I used Codex across several working surfaces:

  • the VS Code extension for implementation, refactoring, testing, and debugging;
  • ChatGPT on the web for planning, research, and longer-running review; and
  • the macOS desktop app for coordinating repository work, operating local tools, and producing supporting assets.

Codex contributed across the full engineering lifecycle:

  • staged product and architecture planning;
  • n8n workflow development and verification;
  • FastAPI and Python implementation;
  • provider integration and local-model evaluation;
  • SQLite-to-PostgreSQL migration;
  • authentication and safety controls;
  • testing, backup, restore, and operational scripts;
  • setup, API, architecture, security, and judge documentation; and
  • the Remotion video and project infographics.

I did not manually inspect every generated line. Instead, I retained authority over key decisions and used layered tests, workflow-contract checks, repeated synthetic runs, migration reconciliation, checksum verification, and service health checks to validate the resulting system.

The AI roles are deliberately separate:

  1. Codex was the development agent.
  2. GPT-5.6 powered the Codex development collaboration.
  3. Ollama with Gemma 4 is the application’s optional local inference path.

GPT-5.6 is not a hidden runtime dependency. The implemented local application path requires no OpenAI API key.

Challenges I ran into

The main challenge was making AI generation dependable without hiding uncertainty or removing human responsibility.

Specific challenges included:

  • enforcing structured model output;
  • validating cross-references and generated recommendations;
  • preventing duplicate generation and review operations;
  • separating quality advice from approval authority;
  • preserving draft and artifact integrity;
  • coordinating services running across macOS and Docker;
  • migrating durable state from SQLite to PostgreSQL;
  • recovering safely from model, browser, or service failures; and
  • keeping the n8n workflow inactive, credential-free, and synthetic-only.

Local model latency also shaped the workflow design. Generation and critique can take several minutes, so the workflow now exposes readiness guidance, run identifiers, recovery instructions, and explicit timeout behavior.

Accomplishments that I’m proud of

I am proud that the project became a working product lifecycle rather than only a prompt or automation demonstration.

The repository now includes:

  • a complete structured-brief-to-artifact workflow;
  • explicit human approval and rejection;
  • deterministic and local-model provider paths;
  • advisory quality reports bound to the exact draft checksum;
  • PostgreSQL persistence with migration and rollback support;
  • backup and isolated restore verification;
  • idempotent API behavior;
  • checksum-verified strategy and quality artifacts;
  • 108 passing local automated tests;
  • an inactive, credential-free 20-node n8n workflow;
  • a three-model directional local benchmark; and
  • reproducible setup, operations, troubleshooting, and judge documentation.

The PostgreSQL cutover reconciled a 31-run synthetic baseline and verified 29 physical artifact checksums. These are technical validation metrics, not claims about real-world customer impact.

What I learned

Reliable AI product development requires much more than a good prompt.

Clear contracts, lifecycle states, validation rules, quality controls, authentication boundaries, audit trails, recovery procedures, and meaningful human review are essential when AI contributes to consequential work.

I also learned that quality evaluation must remain advisory. A numeric score can help a reviewer focus, but it should not silently become decision authority.

Finally, shared platform components should be extracted only after real workflows demonstrate a genuine common need. AI Strategy Factory is the first reference implementation; the wider factory platform remains a direction rather than a completed product suite.

What’s next

The next priorities are to:

  • improve the end-user review experience;
  • measure time-to-draft and revision effort in controlled synthetic trials;
  • conduct the pending blinded human model evaluation;
  • strengthen evidence sourcing and confidence indicators;
  • add a professional strategy-consulting playbook;
  • complete the deferred privacy, ownership, retention, and operational controls required before real client use;
  • test the workflow with authorized pilot users; and
  • use the evidence from this first factory to decide which components should become a reusable platform.

Podcast and Job Application factories are possible future verticals, but the immediate priority is proving that AI Strategy Factory creates a useful, trustworthy strategy workflow for its intended audience.

Built With

  • ai-governance
  • chatgpt
  • codex
  • docker
  • fastapi
  • gemma-4
  • generative-ai
  • gpt-5-6
  • human-in-the-loop
  • json-schema
  • local-ai
  • markdown
  • mcp
  • n8n
  • ollama
  • postgresql
  • pytest
  • python
  • quality-assurance
  • remotion
  • strategy
  • visual-studio-code
  • workflow-automation
Share this project:

Updates

posted an update

Just made the submission before running out of Codex credits!

Building with Codex has been a great experience, but I definitely learned that GPT-5.6 can burn through credits much faster than I expected on larger agentic coding tasks. My last sprint was a race against the remaining credits.

Next it looks like I will have to learn to save tokens.

Luckily the project is submitted, and I'm looking forward to seeing what everyone else has built.

Good luck to all the participants!

BuildWithAI #Codex #Hackathon #Devpost

Log in or sign up for Devpost to join the conversation.