---
phase: 04-integration-publishing
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
  - pyproject.toml
  - uv.lock
autonomous: true

must_haves:
  truths:
    - "pip install pcn-torch does NOT install PyTorch (torch removed from install_requires)"
    - "pip show pcn-torch shows Requires: numpy, rich (NOT torch)"
    - "torchvision is available in the dev environment for running examples/cifar10.py"
    - "pyproject.toml includes author, classifiers, keywords, and project URLs"
  artifacts:
    - path: "pyproject.toml"
      provides: "Package metadata + peer dependency correctness"
      contains: "Enrique Mendez"
    - path: "pyproject.toml"
      provides: "Dev dependency for torchvision"
      contains: "torchvision"
  key_links:
    - from: "pyproject.toml [project].dependencies"
      to: "torch NOT listed"
      via: "peer dependency pattern"
      pattern: "^dependencies"
    - from: "pyproject.toml [dependency-groups].dev"
      to: "torchvision>=0.15"
      via: "uv add --group dev"
      pattern: "torchvision"
---

<objective>
Update pyproject.toml with correct PyPI metadata and peer dependency configuration for the v1.0.0 release.

Purpose: The current pyproject.toml has `torch>=2.0` in production dependencies (wrong — forces CPU PyTorch on all users) and is missing author, classifiers, keywords, and project URLs needed for PyPI discoverability. This plan fixes those issues before building.

Output: pyproject.toml with torch removed from install_requires, torchvision added to dev deps, and complete PyPI metadata (authors, classifiers, keywords, project URLs).
</objective>

<execution_context>
@C:\Users\RDCHLEM1\.claude/get-shit-done/workflows/execute-plan.md
@C:\Users\RDCHLEM1\.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/04-integration-publishing/04-CONTEXT.md
@.planning/phases/04-integration-publishing/04-RESEARCH.md
@pyproject.toml
</context>

<tasks>

<task type="auto">
  <name>Task 1: Remove torch from dependencies, add metadata and torchvision dev dep</name>
  <files>pyproject.toml</files>
  <action>
Rewrite the `[project]` section of pyproject.toml with these exact changes:

1. REMOVE `"torch>=2.0"` from `[project].dependencies`. The final dependencies array must be:
   ```toml
   dependencies = [
       "numpy>=2.2.6",
       "rich>=14.0",
   ]
   ```
   Add a comment on the line after: `# torch is a peer dependency — install from https://pytorch.org`

2. ADD `authors` field under `requires-python`:
   ```toml
   authors = [
       { name = "Enrique Mendez" },
   ]
   ```

3. ADD `classifiers` array after `dependencies`:
   ```toml
   classifiers = [
       "Development Status :: 5 - Production/Stable",
       "Intended Audience :: Developers",
       "Intended Audience :: Science/Research",
       "License :: OSI Approved :: MIT License",
       "Operating System :: OS Independent",
       "Programming Language :: Python :: 3",
       "Programming Language :: Python :: 3 :: Only",
       "Programming Language :: Python :: 3.10",
       "Programming Language :: Python :: 3.11",
       "Programming Language :: Python :: 3.12",
       "Topic :: Scientific/Engineering :: Artificial Intelligence",
       "Topic :: Scientific/Engineering :: Image Recognition",
       "Typing :: Typed",
   ]
   ```

4. ADD `keywords` array after `classifiers`:
   ```toml
   keywords = [
       "predictive coding",
       "neural networks",
       "pytorch",
       "machine learning",
       "deep learning",
       "biologically plausible",
   ]
   ```

5. ADD `[project.urls]` section after `[project]` (before `[dependency-groups]`):
   ```toml
   [project.urls]
   Homepage = "https://github.com/emv-dev/pcn-torch"
   Repository = "https://github.com/emv-dev/pcn-torch"
   "Bug Tracker" = "https://github.com/emv-dev/pcn-torch/issues"
   Paper = "https://arxiv.org/abs/2506.06332"
   ```

6. ADD `torchvision>=0.15` to the `[dependency-groups].dev` array:
   ```toml
   [dependency-groups]
   dev = [
       "ruff>=0.15",
       "mypy>=1.19",
       "pytest>=9.0",
       "pytest-cov>=7.0",
       "torchvision>=0.15",  # required for examples/cifar10.py only
   ]
   ```

After editing, run:
```bash
uv sync
```
This installs torchvision into the dev environment and updates uv.lock.

Verify the sync completes without errors. If there is a torchvision/torch version conflict, use `uv add --group dev "torchvision>=0.15"` instead to let uv resolve the compatible version.
  </action>
  <verify>
Run the following checks:

```bash
# 1. Confirm torch is NOT in production dependencies
grep -A 10 "^\[project\]" pyproject.toml | grep "torch"
# Expected: no output (torch not in project deps)

# 2. Confirm torchvision IS in dev deps
grep "torchvision" pyproject.toml
# Expected: torchvision>=0.15 line in dev group

# 3. Confirm author is set
grep "Enrique Mendez" pyproject.toml
# Expected: { name = "Enrique Mendez" }

# 4. Confirm classifiers block exists
grep "Development Status" pyproject.toml
# Expected: "Development Status :: 5 - Production/Stable"

# 5. Confirm project URLs exist
grep "arxiv.org" pyproject.toml
# Expected: Paper = "https://arxiv.org/abs/2506.06332"

# 6. Confirm torchvision importable (uv sync ran successfully)
uv run python -c "import torchvision; print(torchvision.__version__)"
# Expected: version string printed, no ImportError

# 7. Confirm existing tests still pass (no regressions from removing torch dep)
uv run pytest tests/ -q
# Expected: all tests pass (torch is still in the venv via torchvision's dependency)
```
  </verify>
  <done>
- pyproject.toml has torch removed from [project].dependencies
- pyproject.toml has authors, classifiers, keywords, [project.urls] filled in
- torchvision is in [dependency-groups].dev
- `uv run python -c "import torchvision"` succeeds
- `uv run pytest tests/ -q` shows all tests passing
  </done>
</task>

</tasks>

<verification>
```bash
# Final check: simulate what pip install pcn-torch would install
uv run python -c "
import importlib.metadata as m
dist = m.distribution('pcn-torch')
print('Requires:', dist.metadata.get_all('Requires-Dist'))
print('Author:', dist.metadata['Author-email'])
"
# Expected: Requires list shows numpy, rich (NOT torch)

# Also verify the toml is valid
uv run python -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))"
# Expected: no exception
```
</verification>

<success_criteria>
- torch is removed from [project].dependencies in pyproject.toml
- torchvision>=0.15 is in [dependency-groups].dev
- authors = [{ name = "Enrique Mendez" }] is present
- Full classifiers array (13 items) is present
- keywords array (6 items) is present
- [project.urls] section with 4 URLs is present
- uv sync completed successfully (uv.lock updated)
- All 101 existing tests still pass
</success_criteria>

<output>
After completion, create `.planning/phases/04-integration-publishing/04-01-SUMMARY.md`
</output>
