adobe-to-docusign-migrator/CLAUDE.md

54 lines
2.1 KiB
Markdown

# Adobe Sign → DocuSign Migrator — Claude Instructions
## Definition of Done
Every feature, phase, or change is NOT complete until:
1. **Code works** — the feature behaves as described
2. **Tests pass** — unit, integration, and/or regression tests are written and green
3. **README.md is updated** — any new usage, CLI flags, endpoints, or setup steps are documented
4. **EXECUTION-BOARD.md is updated** — completed items checked off, lessons learned added
5. **Pushed to Gitea** — changes committed with a meaningful message and pushed
Do not mark a task complete or report it as done until all five are satisfied.
## Project Overview
Python toolkit + FastAPI web UI for migrating templates from Adobe Sign to DocuSign.
- **CLI pipeline** (`src/`): download → compose → upload
- **Web UI** (`web/`): browser-based auth, side-by-side template browser, one-click migration
- **Tests** (`tests/`): unit, API, end-to-end, and regression suites
## Key Files
- `src/compose_docusign_template.py` — core field mapping logic
- `src/upload_docusign_template.py` — upsert upload (PUT if exists, POST if not)
- `web/app.py` — FastAPI entrypoint
- `web/routers/` — auth, templates, migrate endpoints
- `tests/test_regression.py` — snapshot tests against real template outputs
- `tests/fixtures/expected/` — regression snapshots (update with `--update-snapshots`)
- `field-mapping.md` — Adobe Sign → DocuSign field type mapping table
- `docs/IMPLEMENTATION-PLAN.md` — feature design and test specs
- `docs/agent-harness/EXECUTION-BOARD.md` — living kanban board
## Running the Web UI
```bash
uvicorn web.app:app --reload --port 8000
```
## Running Tests
```bash
pytest tests/ -v # all tests
pytest tests/test_regression.py -v # regression only
pytest tests/ --update-snapshots # regenerate snapshots
```
## Environment
Credentials live in `.env` (never committed). See `.env-sample` for all required keys.
Add `SESSION_SECRET_KEY` for the web session signing key.
Add `DOCUSIGN_CLIENT_SECRET` and `DOCUSIGN_REDIRECT_URI` for web OAuth flow.