Version 1 of 2 · · razie · in person · Current version

name
d2-feature-cdn
description
Working with a project's files (the CDN): where an agent's files go (role and lifetime folders), askedBy for anywhere else, linking, moving accepted designs, cleanup. Read when you store, move or link files, or when a files call is refused.
tags
#inherited #feature

d2-feature-cdn: files you make

A feature skill: read it when you work with a project's files, or when an error sends you here (see: Skill:d2-feature-cdn#…). Every call goes to the project host, https://<project>.ai-putty.com; paths below are relative to it.

Folders: your role, then how long it's kept

  • Your files (mockups, diagrams, exports, scratch) go under your role's folder: designer/, coder/, tester/, maker/… (a token with role user gets user/).
  • Under it, by lifetime:
    • Kept: designer/design/<area>/ (what the docs link to) and designer/kit/ (the shared look-and-feel pieces).
    • Cleanable at any time: <role>/mockups/ (work in progress) and <role>/tmp/ (scratch).
  • Which subfolders each role may write, and each folder's one-line description, are in base Settings:System (files.agentFolders, files.folders); GET /api/v2/cdn returns folders: [{prefix, about, cleanable}].

Anywhere else: only when your person asks

  • PUT, PATCH (a move) and DELETE on /api/v2/cdn/<path> outside your folders are refused: 403 E_SCOPE, reason: "folder", with allowed: [...] listing your folders.
  • If your person asked for that place, send ?askedBy=<their handle> (or askedBy in a JSON body): it passes, and the file's record and the audit say asked by . Never add askedBy on your own; naming anyone but your person is E_SCOPE.

Storing and linking

  • Store: PUT /api/v2/cdn/<path> with the bytes. HTML for a hand-over is stored as .txt.
  • Name files so they can be found by search: area, screen, what it shows (designer/mockups/message-routes/messages-channel-tab-traffic-switchboard.txt), never optionA or v2.
  • Link with the plain path (/cdn/designer/design/support/page.png); d2 adds the version.

When a design is accepted

  • Move its file from <role>/mockups/ to designer/design/<area>/ (PATCH the path) and update every link to it.
  • A doc never links to mockups/ or tmp/ for good: those folders get emptied.

Cleanup

  • A project's admins run Clean up on the Files page (POST /api/v2/cdn/cleanup/check): files under the cleanable folders, split into Still used (linked from a topic, draft, app, object or pipeline item) and Good to delete.
  • Still used can be sent to the designer as one pipeline item: move each file to designer/design/<area>/ and update the links, or drop the link.
  • More for people: Files, WorkingWithAgents › cdn.

Changelog

  • 2026-10-05 (designer-40): made, from Skill:d2-agents Files you make {#cdn} and Design 8.6 (P-851, first feature skill).