- PID Pal explains running processes in plain, calm, educational language.
- System truth is non-negotiable: never invent process facts or behaviors.
- LLMs are interpreters, not authorities; prefer "likely" and say when unsure.
- The tool is read-only; do not add features that modify or terminate processes.
- Keep the three layers cleanly separated:
- Observation (
src/pidpal/core/observer.py,src/pidpal/platform/): deterministic data collection only. - Interpretation (
src/pidpal/core/interpreter.py,src/pidpal/knowledge/): heuristics and curated facts. - Explanation (
src/pidpal/core/explainer.py,src/pidpal/llm/): human language, LLM optional.
- Observation (
- Avoid coupling layers (no heuristics in observers, no system calls in explainers).
- Degrade gracefully without LLM access; fallback output should remain useful.
- Prefer cross-platform patterns even when only Linux is implemented today.
- Core pipeline:
src/pidpal/core/observer.py,src/pidpal/core/interpreter.py,src/pidpal/core/explainer.py - Shared actions:
src/pidpal/core/actions.py(reusable functions for both CLI modes) - Platform adapters:
src/pidpal/platform/ - Knowledge base:
src/pidpal/knowledge/binaries.json,src/pidpal/knowledge/heuristics.py - LLM providers:
src/pidpal/llm/ - CLI:
src/pidpal/ui/cli.py(entry point, classic mode) - Interactive:
src/pidpal/ui/interactive.py(guided mode wizard) - Formatting:
src/pidpal/ui/formatter.py - Config and cache:
src/pidpal/utils/config.py,src/pidpal/utils/cache.py - Docs:
docs/architecture.md,docs/ROADMAP.md,docs/usage.md,docs/quickstart.md - Tests:
tests/unit/,tests/integration/(includestest_guided_mode.py) - Scripts:
scripts/test.sh,scripts/build.sh,scripts/setup-github-project.sh
Completed:
- MVP v0.1.0 features (issues #7-#15)
- Epic #19: Guided Mode (issues #20-#24)
- Shared actions module (
core/actions.py) - Guided mode wizard (
ui/interactive.py) - CLI routing with
--interactiveand--no-interactiveflags - Integration tests for guided mode
- Documentation updates
- Shared actions module (
Next Up:
- Epic #26: Token & Cost Observability (issues #27-#32)
- Issue #17: GitHub Actions CI/CD pipeline
PID Pal supports two modes:
- Classic mode:
pidpal <PID>- Single command, immediate output - Guided mode:
pidpal(no args) or--interactive- Menu-driven wizard
Use --no-interactive to force classic mode in scripts.
- Python 3.10+, type hints where practical, dataclasses for data models.
- Keep line length at 100 (Black) and run
rufffor linting. - Add or update tests with behavior changes; keep fixtures small and readable.
- Favor clear error messages at the CLI boundary; avoid tracebacks in normal mode.
- When adding knowledge entries, keep descriptions factual and non-alarmist.
- Do not send secrets to LLMs; sanitize or omit sensitive env/config data.
- Prompts must cite observable facts and avoid overconfident claims.
- Never claim security guarantees or threat assessments without evidence.
- If an explanation is uncertain, say so plainly.
- Start from the vision doc:
PID Pal — Vision, Purpose, and Instruction Set.md. - Keep changes focused; avoid refactors unless they unblock work.
- Update docs and examples when user-facing behavior changes.
- If a task requires system access or privileged actions, ask explicitly first.
- Behavior change covered by unit or integration tests where feasible.
- CLI output changes are reflected in
docs/usage.mdorexamples/sample_outputs.md. - LLM prompt changes reviewed for tone, evidence-based language, and uncertainty.
- No new hardcoded paths or OS-specific assumptions without platform guards.
- Error messages are user-friendly and surfaced at the CLI boundary.
- Prefer issues/epics as the source of truth for scope and acceptance criteria.
- Create a focused branch (
feature/,fix/,docs/,test/,refactor/). - Implement smallest viable change, then iterate with tests/docs.
- Run relevant checks locally before sharing changes.
- Note limitations or follow-ups when leaving TODOs.
- Unit tests for core logic changes:
tests/unit/. - Integration tests for CLI behavior:
tests/integration/. - Mock external dependencies (psutil, LLM APIs) in unit tests.
- Avoid network calls in tests; use fixtures and stubs.
- Scope is aligned to an issue or clearly justified.
- Tests added or updated; skipped tests explained.
- Docs/examples updated if user-facing behavior changed.
- Lint/format pass locally (
black,ruff). - No secrets or private data in logs, prompts, or fixtures.
- Tests:
pytest tests/ - Format:
black src/ tests/ - Lint:
ruff check src/ tests/ - Type check:
mypy src/pidpal - Build:
scripts/build.sh