Skip to content

feat: per-profile drafts dir (keep personal runs out of the public folder) - #42

Merged
Imasaikiran merged 1 commit into
mainfrom
feat/per-profile-drafts-dir
Jun 7, 2026
Merged

Imasaikiran merged 1 commit into
mainfrom
feat/per-profile-drafts-dir

Conversation

@Imasaikiran

Copy link
Copy Markdown
Owner

Summary

Lets a profile decide where its drafts are written, so personal runs never land in the public drafts/ folder.

  • New optional brand.yaml field: output.drafts_dir.
    • Omitted (demo + cron, unchanged): drafts go to the shared repo drafts/.
    • Relative path: resolves against the profile's own folder. A personal profile (kept under examples/, git-excluded) writes its drafts into its own directory, so they can never be committed to the public repo.
    • Absolute path: used as-is.
  • resolveDraftsRoot() added to lib/emit.ts (pure, unit-tested: default / relative / absolute).
  • Wired through run.ts (returns the raw spec) and cli.ts (resolves it).
  • _template/brand.yaml documents the field with a commented example.

Why

Today the output path is hardcoded to <repo>/drafts/. Any profile run writes there, including a personal one, which risks an accidental public commit (it happened, and had to be reverted). This makes the safe location automatic via config, matching the "brand.yaml is the single source of truth" rule.

Test plan

  • resolveDraftsRoot unit tests (default, relative-to-profile, absolute)
  • engine typecheck clean
  • engine suite: 157/157
  • verified: sai-voice -> drafts/, a profile with drafts_dir: drafts -> its own folder

🤖 Generated with Claude Code

… public folder

Adds optional brand.yaml output.drafts_dir. Omitted (demo + cron): drafts still go to the shared repo drafts/. Set to a relative path: drafts resolve against the profile's own folder, so a personal profile writes into its git-excluded directory and can never be committed to the public repo. resolveDraftsRoot() is unit-tested; _template documents the field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
linkedin-engine Ready Ready Preview, Comment Jun 7, 2026 7:25pm

@Imasaikiran
Imasaikiran merged commit 2d93ec7 into main Jun 7, 2026
4 checks passed
@Imasaikiran
Imasaikiran deleted the feat/per-profile-drafts-dir branch June 7, 2026 19:26

This branch was successfully deployed

1 active deployment
Preview — 219a15c9 Deployed Jun 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant