PTM is the atomic counterpart to the SPF Builder. Where SPF composes a multi-step flow (string → pattern → flow), PTM makes a ticket for a single predefined project task — no SPF string is assembled.
Pick a project → pick the agent → pick one of that agent's tasks → make the ticket.
The ticket's project is the business unit the work is for; the task is the capability doing it. They need not be the same project — WPS-CPL-BUS-ICS × GOO-TSK-003 (YouTube) is "YouTube work, for ICS". A separate Task from project selector chooses where the task list comes from.
The task dropdown is filtered to the selected agent — only tasks the agent is Responsable (TASKEXECUTIVE) for. Contributors are deliberately excluded (matching them sent marketing tickets to the wrong agent). Each task's description is the standing brief; the ticket body only says what to do this time.
Derived fields:
| Field | Derived from |
|-------|--------------|
| type_code (000APP) | the ticket's project app (PJ-FLA → 000FLA; ICS → 000ICS) |
| system tag(s) | that app, plus the task's project app when it differs (ICS × GOO-TSK-003 → ics, goo) |
| category_code (ticket group) | the chosen agent (pam → PAM) |
| fk_user_assign | that agent's Dolibarr user id |
| subject | the task label (editable) |
| out: report path | SHA\{AgentFolder}\{TicketRef}-<task-slug>.md |
Third party is mandatory (NZRT rule — the counterparty is the app's vendor: a git ticket → GitHub, a dol ticket → Association Dolibarr). Create/Dispatch stays disabled until one is chosen.
Actions
- Preview (dry-run) — builds the payload only; creates nothing.
- Create ticket — opens the ticket (needs
DOLIBARR_API_KEY + confirm).
- Create + dispatch agent ▶ — creates the ticket open, writes doc refs into
note_public, then dispatches the assigned agent (run-agents.ps1 → claude.exe -p). Only the eight domain agents are dispatchable; xc creates the ticket only.
Run
python "C:\RPO-SAI\SYS\PLA\WIN\FRA\FAI\ORG\RPO-NZT\OPS\RPO-agt\COD\ptm_app\app.py"
# open http://127.0.0.1:8770
Credentials load from create_agents/.env. Shares spf_app/ticket_core.py with SPF — one ticket lifecycle code path.