product-manager-agent 0.3.0__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.
- product_manager_agent-0.3.0/LICENSE +21 -0
- product_manager_agent-0.3.0/PKG-INFO +224 -0
- product_manager_agent-0.3.0/README.md +193 -0
- product_manager_agent-0.3.0/pyproject.toml +109 -0
- product_manager_agent-0.3.0/setup.cfg +4 -0
- product_manager_agent-0.3.0/src/pm_agent/__init__.py +7 -0
- product_manager_agent-0.3.0/src/pm_agent/__main__.py +4 -0
- product_manager_agent-0.3.0/src/pm_agent/application/__init__.py +1 -0
- product_manager_agent-0.3.0/src/pm_agent/application/action_service.py +164 -0
- product_manager_agent-0.3.0/src/pm_agent/application/context_service.py +143 -0
- product_manager_agent-0.3.0/src/pm_agent/application/conversation_service.py +136 -0
- product_manager_agent-0.3.0/src/pm_agent/application/decision_service.py +17 -0
- product_manager_agent-0.3.0/src/pm_agent/application/error_logger.py +161 -0
- product_manager_agent-0.3.0/src/pm_agent/application/integration_service.py +147 -0
- product_manager_agent-0.3.0/src/pm_agent/application/prompt_service.py +12 -0
- product_manager_agent-0.3.0/src/pm_agent/application/retrieval_service.py +21 -0
- product_manager_agent-0.3.0/src/pm_agent/application/session_service.py +16 -0
- product_manager_agent-0.3.0/src/pm_agent/application/summary_service.py +46 -0
- product_manager_agent-0.3.0/src/pm_agent/config.py +125 -0
- product_manager_agent-0.3.0/src/pm_agent/domain/__init__.py +1 -0
- product_manager_agent-0.3.0/src/pm_agent/domain/approval_rules.py +119 -0
- product_manager_agent-0.3.0/src/pm_agent/domain/enums.py +35 -0
- product_manager_agent-0.3.0/src/pm_agent/domain/models.py +238 -0
- product_manager_agent-0.3.0/src/pm_agent/domain/policies.py +313 -0
- product_manager_agent-0.3.0/src/pm_agent/domain/repository_refs.py +37 -0
- product_manager_agent-0.3.0/src/pm_agent/domain/transitions.py +18 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/__init__.py +1 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/hosts/__init__.py +4 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/hosts/base.py +8 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/hosts/integrations.py +1321 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/hosts/opencode.py +27 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/hosts/standalone.py +20 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/models/__init__.py +3 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/models/openai_compatible.py +117 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/repository/__init__.py +3 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/repository/local_analyzer.py +199 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/security/__init__.py +1 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/security/redaction.py +30 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/__init__.py +3 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/connection.py +28 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/migrations.py +31 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/schema/001_initial.sql +149 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/schema/002_legacy_import_tracking.sql +6 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/schema/003_approval_rules.sql +14 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/schema/__init__.py +1 -0
- product_manager_agent-0.3.0/src/pm_agent/infrastructure/sqlite/store.py +999 -0
- product_manager_agent-0.3.0/src/pm_agent/ports/__init__.py +1 -0
- product_manager_agent-0.3.0/src/pm_agent/ports/host.py +18 -0
- product_manager_agent-0.3.0/src/pm_agent/ports/memory.py +20 -0
- product_manager_agent-0.3.0/src/pm_agent/ports/model.py +42 -0
- product_manager_agent-0.3.0/src/pm_agent/ports/repository_context.py +18 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/__init__.py +1 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/approval.py +50 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/cli.py +558 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/completer.py +121 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/file_scanner.py +125 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/input.py +107 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/mentions.py +114 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/renderers.py +348 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/repl.py +833 -0
- product_manager_agent-0.3.0/src/pm_agent/presentation/streaming.py +76 -0
- product_manager_agent-0.3.0/src/pm_agent/project.py +609 -0
- product_manager_agent-0.3.0/src/pm_agent/prompts/__init__.py +4 -0
- product_manager_agent-0.3.0/src/pm_agent/prompts/builder.py +114 -0
- product_manager_agent-0.3.0/src/pm_agent/prompts/parser.py +144 -0
- product_manager_agent-0.3.0/src/pm_agent/prompts/response_schema.json +58 -0
- product_manager_agent-0.3.0/src/pm_agent/prompts/system.md +46 -0
- product_manager_agent-0.3.0/src/product_manager_agent.egg-info/PKG-INFO +224 -0
- product_manager_agent-0.3.0/src/product_manager_agent.egg-info/SOURCES.txt +73 -0
- product_manager_agent-0.3.0/src/product_manager_agent.egg-info/dependency_links.txt +1 -0
- product_manager_agent-0.3.0/src/product_manager_agent.egg-info/entry_points.txt +2 -0
- product_manager_agent-0.3.0/src/product_manager_agent.egg-info/requires.txt +9 -0
- product_manager_agent-0.3.0/src/product_manager_agent.egg-info/top_level.txt +1 -0
- product_manager_agent-0.3.0/tests/test_core.py +51 -0
- product_manager_agent-0.3.0/tests/test_mentions.py +174 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024–2026 sm-me-uwe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: product-manager-agent
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Stateful Technical PM Agent — multi-project CLI with persistent per-project context
|
|
5
|
+
Author-email: Sm_mE <mohammad79eshrati@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/sm-me-dev/pm-agent
|
|
8
|
+
Project-URL: Source, https://github.com/sm-me-dev/pm-agent
|
|
9
|
+
Project-URL: Issues, https://github.com/sm-me-dev/pm-agent/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/sm-me-dev/pm-agent/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: ai,agent,pm,orchestrator,llm,project-management
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Software Development
|
|
17
|
+
Classifier: Environment :: Console
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Requires-Python: >=3.12
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: openai>=1.60.0
|
|
23
|
+
Requires-Dist: prompt-toolkit>=3.0.48
|
|
24
|
+
Requires-Dist: rich>=13.7.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-cov>=5.0; extra == "dev"
|
|
28
|
+
Requires-Dist: ruff>=0.4.0; extra == "dev"
|
|
29
|
+
Requires-Dist: mypy>=1.8.0; extra == "dev"
|
|
30
|
+
Dynamic: license-file
|
|
31
|
+
|
|
32
|
+
# PM-Agent
|
|
33
|
+
|
|
34
|
+
**Stateful Technical PM Agent** — a CLI tool that brings persistent project-management
|
|
35
|
+
context to AI-assisted development. Each project gets its own configuration, memory,
|
|
36
|
+
decision log, and action audit trail in a local SQLite database.
|
|
37
|
+
|
|
38
|
+
## Status
|
|
39
|
+
|
|
40
|
+
Alpha — under active development. The CLI is stable for daily use; the schema and API
|
|
41
|
+
may change before a 1.0 release.
|
|
42
|
+
|
|
43
|
+
## Key Concepts
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
my-project/
|
|
47
|
+
.pm-agent/ ← created by `pm-agent init`
|
|
48
|
+
project.toml ← machine-readable project config (commit this)
|
|
49
|
+
memory.md ← human-editable notes (commit this)
|
|
50
|
+
state.db ← SQLite state DB (gitignored, auto-created)
|
|
51
|
+
logs/ ← action error logs (gitignored)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Project Discovery
|
|
55
|
+
|
|
56
|
+
`pm-agent` walks up from your current directory looking for `.pm-agent/`. If
|
|
57
|
+
found, that directory becomes the project root. If not found, it looks for a
|
|
58
|
+
`.git` directory as a fallback. This means:
|
|
59
|
+
|
|
60
|
+
- Run `pm-agent status` from any subdirectory of your project.
|
|
61
|
+
- Pass `--project-root /path` to pin an exact root (bypasses discovery).
|
|
62
|
+
- Pass `--repo /path` to set a different starting point for discovery.
|
|
63
|
+
|
|
64
|
+
### Commands
|
|
65
|
+
|
|
66
|
+
| Command | Description |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `pm-agent init` | Initialize `.pm-agent/` in the current repo |
|
|
69
|
+
| `pm-agent` / `pm-agent repl` | Start the interactive REPL |
|
|
70
|
+
| `pm-agent status` | Show project state and active config |
|
|
71
|
+
| `pm-agent doctor` | Check environment, config, and permissions |
|
|
72
|
+
| `pm-agent spec show` | Display the project specification |
|
|
73
|
+
| `pm-agent memory show` | Display project memory |
|
|
74
|
+
| `pm-agent memory add <text>` | Append a dated memory entry |
|
|
75
|
+
| `pm-agent migrate` | Import legacy global DB into `.pm-agent/state.db` |
|
|
76
|
+
|
|
77
|
+
## Installation
|
|
78
|
+
|
|
79
|
+
Requires **Python 3.12+** and an OpenAI-compatible chat endpoint
|
|
80
|
+
(Ollama, OpenAI, or any compatible API).
|
|
81
|
+
|
|
82
|
+
### Quick install (recommended)
|
|
83
|
+
|
|
84
|
+
**Linux / macOS:**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl -fsSL https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.sh | bash
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
To pin a version:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
PM_AGENT_VERSION=0.3.0 curl -fsSL https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.sh | bash
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Windows (PowerShell):**
|
|
97
|
+
|
|
98
|
+
```powershell
|
|
99
|
+
irm https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.ps1 | iex
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
To pin a version:
|
|
103
|
+
|
|
104
|
+
```powershell
|
|
105
|
+
$env:PM_AGENT_VERSION = "0.3.0"; irm https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.ps1 | iex
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> **Security note:** piping from the web to your shell is convenient but skips
|
|
109
|
+
> normal verification. Review the script before running:
|
|
110
|
+
> - [install.sh](scripts/install.sh)
|
|
111
|
+
> - [install.ps1](scripts/install.ps1)
|
|
112
|
+
|
|
113
|
+
The installer detects or installs [pipx](https://github.com/pypa/pipx) and
|
|
114
|
+
uses it to install `pm-agent` into an isolated environment.
|
|
115
|
+
|
|
116
|
+
### pipx (any platform)
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pipx install product-manager-agent
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### From source
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
git clone https://github.com/sm-me-dev/pm-agent.git
|
|
126
|
+
cd pm-agent
|
|
127
|
+
pip install -e ".[dev]"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Verify
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pm-agent --help
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Quickstart
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
cd /path/to/your/repo
|
|
140
|
+
pm-agent init # creates .pm-agent/
|
|
141
|
+
pm-agent # starts the REPL
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pm-agent status # inspect project state
|
|
146
|
+
pm-agent doctor # run diagnostics
|
|
147
|
+
pm-agent migrate # import legacy data if you used pm-agent before v0.3
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Configuration Precedence
|
|
151
|
+
|
|
152
|
+
1. CLI flags (`--model`, `--db`, `--repo`, etc.)
|
|
153
|
+
2. Environment variables (`PM_AGENT_*`)
|
|
154
|
+
3. `.pm-agent/project.toml` (per-project)
|
|
155
|
+
4. `~/.config/pm-agent/config.toml` (user-global)
|
|
156
|
+
5. Built-in defaults
|
|
157
|
+
|
|
158
|
+
### Key Environment Variables
|
|
159
|
+
|
|
160
|
+
| Variable | Default | Description |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| `PM_AGENT_MODEL` | `glm-5.2` | Model name |
|
|
163
|
+
| `PM_AGENT_BASE_URL` | `http://localhost:11434/v1` | API endpoint |
|
|
164
|
+
| `PM_AGENT_API_KEY` | — | API key |
|
|
165
|
+
| `PM_AGENT_HISTORY_LIMIT` | `75` | Messages in context window |
|
|
166
|
+
| `PM_AGENT_ALWAYS_APPROVE` | `false` | Auto-approve all actions |
|
|
167
|
+
|
|
168
|
+
## Project Config (`project.toml`)
|
|
169
|
+
|
|
170
|
+
```toml
|
|
171
|
+
[project]
|
|
172
|
+
name = "my-project"
|
|
173
|
+
language = "python"
|
|
174
|
+
test_command = "pytest"
|
|
175
|
+
lint_command = "ruff check"
|
|
176
|
+
build_command = ""
|
|
177
|
+
|
|
178
|
+
[constraints]
|
|
179
|
+
allowed_paths = []
|
|
180
|
+
approval_default = "prompt"
|
|
181
|
+
blocked_actions = []
|
|
182
|
+
|
|
183
|
+
[paths]
|
|
184
|
+
# context_dir = ""
|
|
185
|
+
# error_log_path = ""
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Migration from Legacy Global DB
|
|
189
|
+
|
|
190
|
+
If you previously used pm-agent with a global state database at
|
|
191
|
+
`~/.local/share/pm-agent/state.db`, migrate to project-local storage:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
cd /path/to/your/repo
|
|
195
|
+
pm-agent init # one-time setup
|
|
196
|
+
pm-agent migrate # copy existing data into .pm-agent/state.db
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
The migration is idempotent — running it multiple times is safe.
|
|
200
|
+
|
|
201
|
+
## Safety
|
|
202
|
+
|
|
203
|
+
- Repository access is read-only by default.
|
|
204
|
+
- External actions require per-payload approval (configurable via rules).
|
|
205
|
+
- All actions are logged with an immutable audit trail.
|
|
206
|
+
|
|
207
|
+
## Development
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
git clone https://github.com/sm-me-dev/pm-agent.git
|
|
211
|
+
cd pm-agent
|
|
212
|
+
pip install -e ".[dev]"
|
|
213
|
+
pytest
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for full development workflow.
|
|
217
|
+
|
|
218
|
+
## Release
|
|
219
|
+
|
|
220
|
+
See [RELEASE.md](RELEASE.md) for the release process.
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
MIT
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# PM-Agent
|
|
2
|
+
|
|
3
|
+
**Stateful Technical PM Agent** — a CLI tool that brings persistent project-management
|
|
4
|
+
context to AI-assisted development. Each project gets its own configuration, memory,
|
|
5
|
+
decision log, and action audit trail in a local SQLite database.
|
|
6
|
+
|
|
7
|
+
## Status
|
|
8
|
+
|
|
9
|
+
Alpha — under active development. The CLI is stable for daily use; the schema and API
|
|
10
|
+
may change before a 1.0 release.
|
|
11
|
+
|
|
12
|
+
## Key Concepts
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
my-project/
|
|
16
|
+
.pm-agent/ ← created by `pm-agent init`
|
|
17
|
+
project.toml ← machine-readable project config (commit this)
|
|
18
|
+
memory.md ← human-editable notes (commit this)
|
|
19
|
+
state.db ← SQLite state DB (gitignored, auto-created)
|
|
20
|
+
logs/ ← action error logs (gitignored)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Project Discovery
|
|
24
|
+
|
|
25
|
+
`pm-agent` walks up from your current directory looking for `.pm-agent/`. If
|
|
26
|
+
found, that directory becomes the project root. If not found, it looks for a
|
|
27
|
+
`.git` directory as a fallback. This means:
|
|
28
|
+
|
|
29
|
+
- Run `pm-agent status` from any subdirectory of your project.
|
|
30
|
+
- Pass `--project-root /path` to pin an exact root (bypasses discovery).
|
|
31
|
+
- Pass `--repo /path` to set a different starting point for discovery.
|
|
32
|
+
|
|
33
|
+
### Commands
|
|
34
|
+
|
|
35
|
+
| Command | Description |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `pm-agent init` | Initialize `.pm-agent/` in the current repo |
|
|
38
|
+
| `pm-agent` / `pm-agent repl` | Start the interactive REPL |
|
|
39
|
+
| `pm-agent status` | Show project state and active config |
|
|
40
|
+
| `pm-agent doctor` | Check environment, config, and permissions |
|
|
41
|
+
| `pm-agent spec show` | Display the project specification |
|
|
42
|
+
| `pm-agent memory show` | Display project memory |
|
|
43
|
+
| `pm-agent memory add <text>` | Append a dated memory entry |
|
|
44
|
+
| `pm-agent migrate` | Import legacy global DB into `.pm-agent/state.db` |
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
Requires **Python 3.12+** and an OpenAI-compatible chat endpoint
|
|
49
|
+
(Ollama, OpenAI, or any compatible API).
|
|
50
|
+
|
|
51
|
+
### Quick install (recommended)
|
|
52
|
+
|
|
53
|
+
**Linux / macOS:**
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
curl -fsSL https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.sh | bash
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To pin a version:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
PM_AGENT_VERSION=0.3.0 curl -fsSL https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.sh | bash
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Windows (PowerShell):**
|
|
66
|
+
|
|
67
|
+
```powershell
|
|
68
|
+
irm https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.ps1 | iex
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
To pin a version:
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
$env:PM_AGENT_VERSION = "0.3.0"; irm https://raw.githubusercontent.com/sm-me-dev/pm-agent/main/scripts/install.ps1 | iex
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
> **Security note:** piping from the web to your shell is convenient but skips
|
|
78
|
+
> normal verification. Review the script before running:
|
|
79
|
+
> - [install.sh](scripts/install.sh)
|
|
80
|
+
> - [install.ps1](scripts/install.ps1)
|
|
81
|
+
|
|
82
|
+
The installer detects or installs [pipx](https://github.com/pypa/pipx) and
|
|
83
|
+
uses it to install `pm-agent` into an isolated environment.
|
|
84
|
+
|
|
85
|
+
### pipx (any platform)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pipx install product-manager-agent
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### From source
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git clone https://github.com/sm-me-dev/pm-agent.git
|
|
95
|
+
cd pm-agent
|
|
96
|
+
pip install -e ".[dev]"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Verify
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pm-agent --help
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Quickstart
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
cd /path/to/your/repo
|
|
109
|
+
pm-agent init # creates .pm-agent/
|
|
110
|
+
pm-agent # starts the REPL
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pm-agent status # inspect project state
|
|
115
|
+
pm-agent doctor # run diagnostics
|
|
116
|
+
pm-agent migrate # import legacy data if you used pm-agent before v0.3
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Configuration Precedence
|
|
120
|
+
|
|
121
|
+
1. CLI flags (`--model`, `--db`, `--repo`, etc.)
|
|
122
|
+
2. Environment variables (`PM_AGENT_*`)
|
|
123
|
+
3. `.pm-agent/project.toml` (per-project)
|
|
124
|
+
4. `~/.config/pm-agent/config.toml` (user-global)
|
|
125
|
+
5. Built-in defaults
|
|
126
|
+
|
|
127
|
+
### Key Environment Variables
|
|
128
|
+
|
|
129
|
+
| Variable | Default | Description |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| `PM_AGENT_MODEL` | `glm-5.2` | Model name |
|
|
132
|
+
| `PM_AGENT_BASE_URL` | `http://localhost:11434/v1` | API endpoint |
|
|
133
|
+
| `PM_AGENT_API_KEY` | — | API key |
|
|
134
|
+
| `PM_AGENT_HISTORY_LIMIT` | `75` | Messages in context window |
|
|
135
|
+
| `PM_AGENT_ALWAYS_APPROVE` | `false` | Auto-approve all actions |
|
|
136
|
+
|
|
137
|
+
## Project Config (`project.toml`)
|
|
138
|
+
|
|
139
|
+
```toml
|
|
140
|
+
[project]
|
|
141
|
+
name = "my-project"
|
|
142
|
+
language = "python"
|
|
143
|
+
test_command = "pytest"
|
|
144
|
+
lint_command = "ruff check"
|
|
145
|
+
build_command = ""
|
|
146
|
+
|
|
147
|
+
[constraints]
|
|
148
|
+
allowed_paths = []
|
|
149
|
+
approval_default = "prompt"
|
|
150
|
+
blocked_actions = []
|
|
151
|
+
|
|
152
|
+
[paths]
|
|
153
|
+
# context_dir = ""
|
|
154
|
+
# error_log_path = ""
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Migration from Legacy Global DB
|
|
158
|
+
|
|
159
|
+
If you previously used pm-agent with a global state database at
|
|
160
|
+
`~/.local/share/pm-agent/state.db`, migrate to project-local storage:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
cd /path/to/your/repo
|
|
164
|
+
pm-agent init # one-time setup
|
|
165
|
+
pm-agent migrate # copy existing data into .pm-agent/state.db
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The migration is idempotent — running it multiple times is safe.
|
|
169
|
+
|
|
170
|
+
## Safety
|
|
171
|
+
|
|
172
|
+
- Repository access is read-only by default.
|
|
173
|
+
- External actions require per-payload approval (configurable via rules).
|
|
174
|
+
- All actions are logged with an immutable audit trail.
|
|
175
|
+
|
|
176
|
+
## Development
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git clone https://github.com/sm-me-dev/pm-agent.git
|
|
180
|
+
cd pm-agent
|
|
181
|
+
pip install -e ".[dev]"
|
|
182
|
+
pytest
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for full development workflow.
|
|
186
|
+
|
|
187
|
+
## Release
|
|
188
|
+
|
|
189
|
+
See [RELEASE.md](RELEASE.md) for the release process.
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
MIT
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 77.0.3"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "product-manager-agent"
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "Stateful Technical PM Agent — multi-project CLI with persistent per-project context"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICEN[CS]E*"]
|
|
13
|
+
authors = [{ name = "Sm_mE", email = "mohammad79eshrati@gmail.com" }]
|
|
14
|
+
keywords = ["ai", "agent", "pm", "orchestrator", "llm", "project-management"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Topic :: Software Development",
|
|
21
|
+
"Environment :: Console",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"openai>=1.60.0",
|
|
26
|
+
"prompt-toolkit>=3.0.48",
|
|
27
|
+
"rich>=13.7.0",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/sm-me-dev/pm-agent"
|
|
32
|
+
Source = "https://github.com/sm-me-dev/pm-agent"
|
|
33
|
+
Issues = "https://github.com/sm-me-dev/pm-agent/issues"
|
|
34
|
+
Changelog = "https://github.com/sm-me-dev/pm-agent/blob/main/CHANGELOG.md"
|
|
35
|
+
|
|
36
|
+
[project.optional-dependencies]
|
|
37
|
+
dev = [
|
|
38
|
+
"pytest>=8.0",
|
|
39
|
+
"pytest-cov>=5.0",
|
|
40
|
+
"ruff>=0.4.0",
|
|
41
|
+
"mypy>=1.8.0",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.scripts]
|
|
45
|
+
pm-agent = "pm_agent.__main__:main"
|
|
46
|
+
|
|
47
|
+
[tool.setuptools]
|
|
48
|
+
package-dir = {"" = "src"}
|
|
49
|
+
|
|
50
|
+
[tool.setuptools.packages.find]
|
|
51
|
+
where = ["src"]
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.package-data]
|
|
54
|
+
"pm_agent.prompts" = ["*.md", "*.json"]
|
|
55
|
+
"pm_agent.infrastructure.sqlite.schema" = ["*.sql"]
|
|
56
|
+
|
|
57
|
+
[tool.pytest.ini_options]
|
|
58
|
+
testpaths = ["tests"]
|
|
59
|
+
addopts = "-q --strict-markers"
|
|
60
|
+
pythonpath = ["src", "."]
|
|
61
|
+
filterwarnings = [
|
|
62
|
+
"error::DeprecationWarning",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[tool.ruff]
|
|
66
|
+
line-length = 100
|
|
67
|
+
target-version = "py312"
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
select = ["E", "F", "I", "B", "UP", "W"]
|
|
71
|
+
ignore = ["E501"]
|
|
72
|
+
|
|
73
|
+
[tool.mypy]
|
|
74
|
+
python_version = "3.12"
|
|
75
|
+
strict = false
|
|
76
|
+
warn_unused_ignores = true
|
|
77
|
+
ignore_missing_imports = true
|
|
78
|
+
|
|
79
|
+
[[tool.mypy.overrides]]
|
|
80
|
+
module = "pm_agent.infrastructure.models.openai_compatible"
|
|
81
|
+
ignore_errors = true
|
|
82
|
+
|
|
83
|
+
[[tool.mypy.overrides]]
|
|
84
|
+
module = "pm_agent.presentation.cli"
|
|
85
|
+
ignore_errors = true
|
|
86
|
+
|
|
87
|
+
[[tool.mypy.overrides]]
|
|
88
|
+
module = "pm_agent.presentation.repl"
|
|
89
|
+
ignore_errors = true
|
|
90
|
+
|
|
91
|
+
[[tool.mypy.overrides]]
|
|
92
|
+
module = "pm_agent.infrastructure.hosts.integrations"
|
|
93
|
+
ignore_errors = true
|
|
94
|
+
|
|
95
|
+
[[tool.mypy.overrides]]
|
|
96
|
+
module = "pm_agent.infrastructure.repository.local_analyzer"
|
|
97
|
+
ignore_errors = true
|
|
98
|
+
|
|
99
|
+
[[tool.mypy.overrides]]
|
|
100
|
+
module = "pm_agent.infrastructure.sqlite.store"
|
|
101
|
+
ignore_errors = true
|
|
102
|
+
|
|
103
|
+
[[tool.mypy.overrides]]
|
|
104
|
+
module = "pm_agent.presentation.streaming"
|
|
105
|
+
ignore_errors = true
|
|
106
|
+
|
|
107
|
+
[[tool.mypy.overrides]]
|
|
108
|
+
module = "pm_agent.presentation.input"
|
|
109
|
+
ignore_errors = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Application orchestration services."""
|