Enforce hook-based output path and artifact placement governance for generated HubSpot artifacts.
output/, reports/, cache/, logs/)orgs/{org}/platforms/hubspot/{portal}/)scripts/, hooks/, agents/, or other source-controlled directoriesNot for: Tempfile lifecycle (use hubspot-hook-subprocess-and-tempfile-safety), CMS publish paths, or Salesforce export paths.
| Artifact Type | Canonical Path | Tolerated Path | Blocked Path |
|---|
| Portal export (contacts, deals) | output/hubspot/{portal}/exports/ | output/ root | scripts/, hooks/ |
| Migration run data | output/migrations/{run-id}/ | output/ root | Any source dir |
| Audit/compliance reports | reports/hubspot/{portal}/ | reports/ root | agents/, commands/ |
| Hook runtime logs | logs/ | None | Any non-logs/ dir |
| Cache files | cache/hubspot/{portal}/ | .cache/ | config/, templates/ |
| Temp scratch files | $TMPDIR via mktemp | /tmp/ | Plugin source dirs |
Write or Bash tool call that creates a file. Parse the output path from tool_input.file_path or the bash command's redirection target.HUBSPOT_PORTAL_ID is set in the environment, the path must contain it.scripts/, hooks/, agents/, commands/, skills/, or templates/, emit a block decision with a clear remediation path.warn with the recommended canonical path in the remediation field of the response envelope.{ts, artifact_type, path, decision, canonical_path} to logs/output-path-audit.jsonl for compliance review.Use this skill for output path validation and artifact placement governance only.
Defer to hubspot-hook-subprocess-and-tempfile-safety for tempfile lifecycle and to hubspot-hook-response-contracts for envelope formatting.