pm-engine 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ # Auto-generated files
2
+ /README.md
3
+ /dist/
4
+ /src/pm_engine/templates/
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: pm-engine
3
+ Version: 1.0.1
4
+ Summary: A spec-driven, state-tracked AI coding framework for Gemini CLI
5
+ Requires-Python: >=3.9
6
+ Requires-Dist: rich>=13.0.0
7
+ Requires-Dist: typer>=0.9.0
8
+ Description-Content-Type: text/markdown
9
+
10
+ # PM Engine 🧠⚡️
11
+
12
+ **A spec-driven, state-tracked AI coding framework for Gemini CLI.**
13
+
14
+ 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.
15
+
16
+ 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.
17
+
18
+ ---
19
+
20
+ ## 🚀 Quick Start
21
+
22
+ You can run PM Engine instantly without installing anything globally. Navigate to your project folder and run:
23
+
24
+ **Using Node (`npm`):**
25
+ ```bash
26
+ npx pm-engine init
27
+ ```
28
+ **Using Python (uv):**
29
+ ```bash
30
+ uvx pm-engine init
31
+ ```
32
+ _This will instantly scaffold a `.pm-engine/` directory and inject custom PM personas into your local `.gemini/skills/` folder_.
33
+
34
+ ## 🛠️ The Workflow (Meet the Team)
35
+ Once initialized, start the Gemini CLI in your project directory.
36
+
37
+ ### 1. `/discover` (The Elite Lead PM)
38
+ Start by pitching your idea to the PM agent.
39
+
40
+ ```
41
+ /discover I want to build a real-time collaborative to-do list app.
42
+ ```
43
+ _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`._
44
+
45
+ ### 2. `/plan` (The Staff Engineer)
46
+ Turn the PRD into an architecture blueprint.
47
+
48
+ ```
49
+ /plan
50
+ ```
51
+ _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`._
52
+
53
+ ### 3. `/execute phase-x` (The Execution Agent)
54
+ Time to build.
55
+
56
+ ```
57
+ /execute phase-1
58
+ ```
59
+ _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._
60
+
61
+ ### 4. `/review` (The Principal QA Engineer)
62
+ Audit the work.
63
+
64
+ ```
65
+ /review
66
+ ```
67
+ _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._
68
+
69
+ ### 5. `/status` (The Scrum Master Sync)
70
+ Close your laptop for the weekend? When you come back, just type:
71
+
72
+ ```
73
+ /status
74
+ ```
75
+ _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._
76
+
77
+ ## 🧠 Architecture: The Dual-Brain System
78
+ PM Engine splits your AI's brain into two distinct, machine-readable halves:
79
+
80
+ - **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.
81
+ - **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.
82
+
83
+ ## 📦 Manual Installation & Updates
84
+ If you prefer to install the CLI globally instead of using npx/uvx:
85
+
86
+ ### NPM:
87
+
88
+ ```bash
89
+ npm install -g pm-engine
90
+ # To update:
91
+ npm update -g pm-engine
92
+ ```
93
+ ### UV:
94
+
95
+ ```bash
96
+ uv tool install pm-engine
97
+ # To update:
98
+ uv tool upgrade pm-engine
99
+ ```
100
+
101
+ ## 🤝 Contributing
102
+ PM Engine is built as a monorepo to support both Node and Python ecosystems efficiently.
103
+
104
+ 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/`!
@@ -0,0 +1,95 @@
1
+ # PM Engine 🧠⚡️
2
+
3
+ **A spec-driven, state-tracked AI coding framework for Gemini CLI.**
4
+
5
+ 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.
6
+
7
+ 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.
8
+
9
+ ---
10
+
11
+ ## 🚀 Quick Start
12
+
13
+ You can run PM Engine instantly without installing anything globally. Navigate to your project folder and run:
14
+
15
+ **Using Node (`npm`):**
16
+ ```bash
17
+ npx pm-engine init
18
+ ```
19
+ **Using Python (uv):**
20
+ ```bash
21
+ uvx pm-engine init
22
+ ```
23
+ _This will instantly scaffold a `.pm-engine/` directory and inject custom PM personas into your local `.gemini/skills/` folder_.
24
+
25
+ ## 🛠️ The Workflow (Meet the Team)
26
+ Once initialized, start the Gemini CLI in your project directory.
27
+
28
+ ### 1. `/discover` (The Elite Lead PM)
29
+ Start by pitching your idea to the PM agent.
30
+
31
+ ```
32
+ /discover I want to build a real-time collaborative to-do list app.
33
+ ```
34
+ _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`._
35
+
36
+ ### 2. `/plan` (The Staff Engineer)
37
+ Turn the PRD into an architecture blueprint.
38
+
39
+ ```
40
+ /plan
41
+ ```
42
+ _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`._
43
+
44
+ ### 3. `/execute phase-x` (The Execution Agent)
45
+ Time to build.
46
+
47
+ ```
48
+ /execute phase-1
49
+ ```
50
+ _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._
51
+
52
+ ### 4. `/review` (The Principal QA Engineer)
53
+ Audit the work.
54
+
55
+ ```
56
+ /review
57
+ ```
58
+ _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._
59
+
60
+ ### 5. `/status` (The Scrum Master Sync)
61
+ Close your laptop for the weekend? When you come back, just type:
62
+
63
+ ```
64
+ /status
65
+ ```
66
+ _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._
67
+
68
+ ## 🧠 Architecture: The Dual-Brain System
69
+ PM Engine splits your AI's brain into two distinct, machine-readable halves:
70
+
71
+ - **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.
72
+ - **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.
73
+
74
+ ## 📦 Manual Installation & Updates
75
+ If you prefer to install the CLI globally instead of using npx/uvx:
76
+
77
+ ### NPM:
78
+
79
+ ```bash
80
+ npm install -g pm-engine
81
+ # To update:
82
+ npm update -g pm-engine
83
+ ```
84
+ ### UV:
85
+
86
+ ```bash
87
+ uv tool install pm-engine
88
+ # To update:
89
+ uv tool upgrade pm-engine
90
+ ```
91
+
92
+ ## 🤝 Contributing
93
+ PM Engine is built as a monorepo to support both Node and Python ecosystems efficiently.
94
+
95
+ 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/`!
@@ -0,0 +1,24 @@
1
+ import shutil
2
+ from pathlib import Path
3
+
4
+ def bundle():
5
+ print("📦 Bundling core-prompts for Python packaging...")
6
+ root_dir = Path(__file__).parent.parent.parent
7
+ source_dir = root_dir / "core-prompts"
8
+ dest_dir = Path(__file__).parent / "src" / "pm_engine" / "templates"
9
+
10
+ if dest_dir.exists():
11
+ shutil.rmtree(dest_dir)
12
+
13
+ shutil.copytree(source_dir, dest_dir)
14
+ print("✓ Templates bundled successfully into src/pm_engine/templates")
15
+
16
+ # Copy README.md for packaging
17
+ readme_src = root_dir / "README.md"
18
+ readme_dest = Path(__file__).parent / "README.md"
19
+ if readme_src.exists():
20
+ shutil.copy(readme_src, readme_dest)
21
+ print("✓ README.md copied for packaging")
22
+
23
+ if __name__ == "__main__":
24
+ bundle()
@@ -0,0 +1,20 @@
1
+ [project]
2
+ name = "pm-engine"
3
+ version = "1.0.1"
4
+ description = "A spec-driven, state-tracked AI coding framework for Gemini CLI"
5
+ readme = "README.md"
6
+ requires-python = ">=3.9"
7
+ dependencies = [
8
+ "typer>=0.9.0",
9
+ "rich>=13.0.0",
10
+ ]
11
+
12
+ [project.scripts]
13
+ pm-engine = "pm_engine.cli:app"
14
+
15
+ [build-system]
16
+ requires = ["hatchling"]
17
+ build-backend = "hatchling.build"
18
+
19
+ [tool.hatch.build.targets.wheel]
20
+ packages = ["src/pm_engine"]
File without changes
@@ -0,0 +1,21 @@
1
+ import typer
2
+ from rich.console import Console
3
+ from .commands.init import init_project
4
+
5
+ app = typer.Typer(help="A spec-driven AI coding framework for Gemini CLI")
6
+ console = Console()
7
+
8
+ @app.command()
9
+ def init():
10
+ """Scaffold the .pm-engine directory and inject Gemini CLI skills"""
11
+ console.print("\n[bold blue]🚀 Initializing PM Engine...[/bold blue]\n")
12
+ try:
13
+ init_project()
14
+ console.print("\n[bold green]✨ PM Engine initialized successfully![/bold green]")
15
+ console.print("[dim]Run[/dim] [cyan]/discover[/cyan] [dim]in Gemini CLI to start your first PM sync.[/dim]\n")
16
+ except Exception as e:
17
+ console.print(f"\n[bold red]❌ Initialization failed:[/bold red] {str(e)}")
18
+ raise typer.Exit(code=1)
19
+
20
+ if __name__ == "__main__":
21
+ app()
File without changes
@@ -0,0 +1,38 @@
1
+ import os
2
+ import shutil
3
+ from pathlib import Path
4
+ from rich.console import Console
5
+
6
+ console = Console()
7
+
8
+ def init_project():
9
+ target_dir = Path.cwd()
10
+ pm_engine_dir = target_dir / ".pm-engine"
11
+ gemini_skills_dir = target_dir / ".gemini" / "skills"
12
+
13
+ # In the built package, templates are inside the pm_engine module
14
+ source_prompts_dir = Path(__file__).parent.parent / "templates"
15
+
16
+ console.print("[dim]📁 Creating directory infrastructure...[/dim]")
17
+ (pm_engine_dir / "product").mkdir(parents=True, exist_ok=True)
18
+ (pm_engine_dir / "state" / "phases").mkdir(parents=True, exist_ok=True)
19
+ gemini_skills_dir.mkdir(parents=True, exist_ok=True)
20
+
21
+ def copy_template(src_rel, dest_rel):
22
+ src_file = source_prompts_dir / src_rel
23
+ dest_file = target_dir / dest_rel
24
+
25
+ if src_file.exists():
26
+ shutil.copy(src_file, dest_file)
27
+ else:
28
+ console.print(f"[bold yellow]⚠️ Missing template:[/bold yellow] {src_file}")
29
+
30
+ console.print("[dim]📄 Injecting PM and State templates...[/dim]")
31
+ copy_template("product/PRD.md.tmpl", ".pm-engine/product/PRD.md")
32
+ copy_template("state/STATE.md.tmpl", ".pm-engine/state/STATE.md")
33
+
34
+ console.print("[dim]🔌 Wiring up Gemini CLI personas...[/dim]")
35
+ for skill in ["discover", "plan", "execute", "review", "status"]:
36
+ copy_template(f"skills/{skill}.md.tmpl", f".gemini/skills/{skill}.md")
37
+
38
+ console.print("[bold green]✓ Scaffolding complete.[/bold green]")