Skip to main content

A spec-driven, state-tracked AI coding framework for Gemini CLI

Project description

PM Engine 🧠⚡️

A spec-driven, state-tracked AI coding framework for Gemini CLI.

AI agents don't suffer from a lack of coding ability; they suffer from a lack of product management and architectural discipline. pm-engine acts as a full, elite virtual product team inside your terminal. It forces the AI to challenge your assumptions, lock in a rigorous Product Requirements Document (PRD), and execute code against a rigidly tracked state machine.

Whether you're scaffolding a fast Astro personal site or building a complex web app, this framework prevents context rot, stops AI hallucination (slop), and manages your project via strict Agile and System Design principles.


🚀 Quick Start

You can run PM Engine instantly without installing anything globally. Navigate to your project folder and run:

Using Node (npm):

npx pm-engine init

Using Python (uv):

uvx pm-engine init

This will instantly scaffold a .pm-engine/ directory and inject custom PM personas into your local .gemini/skills/ folder.

🛠️ The Workflow (Meet the Team)

Once initialized, start the Gemini CLI in your project directory.

1. /discover (The Elite Lead PM)

Start by pitching your idea to the PM agent.

/discover I want to build a real-time collaborative to-do list app.

The Lead PM will NOT write code. It will brutally interrogate your assumptions, demanding clear user pain points, KPIs, non-functional requirements (NFRs), and out-of-scope boundaries. Once agreed, it generates a comprehensive PRD.md.

2. /plan (The Staff Engineer)

Turn the PRD into an architecture blueprint.

/plan

The Staff Engineer reads the PRD and defines your database schemas, internal APIs, and architectural decisions (ADRs). It generates a rigid, phase-by-phase execution checklist in STATE.md.

3. /execute phase-x (The Execution Agent)

Time to build.

/execute phase-1

The Execution bot reads the exact, granular tasks for Phase 1 and writes the code sequentially. It aggressively updates checkboxes in STATE.md as it works. Because its context is constrained to the active phase, it refuses to hallucinate future features or drift out-of-scope.

4. /review (The Principal QA Engineer)

Audit the work.

/review

The Principal Engineer audits the code diffs against the PRD.md and STATE.md. It scans for security flaws, unhandled edge cases, and architectural regressions. If it passes, the Phase is marked as "Complete" in the state matrix.

5. /status (The Scrum Master Sync)

Close your laptop for the weekend? When you come back, just type:

/status

The Sync Agent reads the state files, remembers exactly where the team left off, briefs you on open blockers, and tells you the exact command to run next to resume velocity.

🧠 Architecture: The Dual-Brain System

PM Engine splits your AI's brain into two distinct, machine-readable halves:

  • The Product Engine (.pm-engine/product/PRD.md): The persistent memory of what we are building, who we are building it for, and what we are explicitly NOT building. It acts as the ultimate boundary against scope creep.
  • The Execution Engine (.pm-engine/state/STATE.md): The rigid state tracker and architecture blueprint. It preserves the context window over long coding sessions by tracking checklists, active files, and blocked dependencies.

📦 Manual Installation & Updates

If you prefer to install the CLI globally instead of using npx/uvx:

NPM:

npm install -g pm-engine
# To update:
npm update -g pm-engine

UV:

uv tool install pm-engine
# To update:
uv tool upgrade pm-engine

🤝 Contributing

PM Engine is built as a monorepo to support both Node and Python ecosystems efficiently.

All AI system prompts live in the root core-prompts/ directory. Both the JS (npm) and Python (uv) CLI wrappers pull from this single source of truth during their respective build processes. If you want to improve how the PM team behaves, tweak the persona templates in core-prompts/!

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pm_engine-1.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pm_engine-1.0.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pm_engine-1.0.2.tar.gz.

File metadata

  • Download URL: pm_engine-1.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pm_engine-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ed0f3f0e1c2a730079b724affac408e01aa53d305edf07ed485b10504fb6d7a1
MD5 19b05eda8b55eb7932afc132ac35243c
BLAKE2b-256 7e291a2043665b7d8265a3389bfed8224fecc3878c7b3d10eaf97267fb870838

See more details on using hashes here.

File details

Details for the file pm_engine-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pm_engine-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pm_engine-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ac0daeef46943b64354518592d8d5e00fbd295e041b0553463e5f3314bf4d4b8
MD5 97f2281a1f0fa05fafa389be101d5020
BLAKE2b-256 077ea771572dd9f6e0485680d6d563003be3ed9b6d10dc2030abd3f6f14e91e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page