slim(parent-template): extract dev tree → symlink to molecule-dev-department, delete 17 orphans (Phase 3d) #5

Merged
claude-ceo-assistant merged 1 commits from slim/extract-dev-into-symlink into main 2026-05-08 11:16:41 +00:00

Summary

Phase 3d of internal#77. Final structural change of the dev-department extraction. After this PR + the dev-department-side merges (#1, #2, #3), this template contains only parent-only roles (PM + Research + Marketing) — the entire engineering org tree is composed in via a single dev-lead symlink to the sibling repo.

Tree shape after this PR

molecule-ai-org-template-molecule-dev/
├── org.yaml                           # workspaces: pm + marketing + dev-lead
├── README.md, opencode.json, system-prompt.md, SHARED_RULES.md, ...
├── pm/, research-lead/, market-analyst/, technical-researcher/, competitive-intelligence/
├── marketing-lead/, content-marketer/, product-marketing-manager/,
│   community-manager/, seo-growth-analyst/, social-media-brand/
├── teams/
│   ├── pm.yaml          (children: research only — dev.yaml etc removed)
│   ├── marketing.yaml   (children: minus devrel-engineer orphan)
│   └── research.yaml    (unchanged)
└── dev-lead → ../molecule-dev-department/dev-lead/   ← symlink

What changed (numbers)

  • 256 file changes in this single commit.
  • 27 dev-tree workspace folders deleted — extracted to molecule-ai/molecule-dev-department with history preservation (PR #2 there).
  • 17 orphan folders deleted — backend-engineer{,-2,-3}, frontend-engineer{,-2,-3}, qa-engineer{,-2,-3}, security-auditor{,-2}, platform-engineer, devops-engineer, sre-engineer, offensive-security-engineer, devrel-engineer, triage-operator-2, uiux-designer.
  • 8 teams/.yaml composition files deleted — dev.yaml, core-platform.yaml, controlplane.yaml, app-docs.yaml, infra.yaml, sdk.yaml, documentation-specialist.yaml, triage-operator.yaml.
  • 1 symlink addeddev-lead → ../molecule-dev-department/dev-lead/.
  • 3 yaml edits:
    • org.yaml workspaces: adds third root !include dev-lead/workspace.yaml.
    • teams/pm.yaml children: removes dev/doc-spec/triage-op/triage-op-2 references (they moved to dev tree or were orphans).
    • teams/marketing.yaml children: removes devrel-engineer reference (orphan).

Repo size drops from ~567 KiB to ~150 KiB. Workspace count drops from 50+ to 11 (PM + Research × 4 + Marketing × 6). The dev tree's 28 workspaces are composed in at import time via the symlink.

The dev-lead symlink at template root targets ../molecule-dev-department/dev-lead/ — a RELATIVE path that resolves correctly when both repos are cloned as siblings under the operator's /org-templates/ directory. The platform's import resolver (workspace-server/internal/handlers/org_include.go:resolveYAMLIncludes) operates on path strings via filepath.Abs/filepath.Rel (does NOT follow symlinks at the security check), so dev-lead/workspace.yaml passes the in-root check. The actual file open uses os.ReadFile which DOES follow the symlink, delivering content from the sibling repo.

This contract is empirically pinned by tests in molecule-core PR #102TestResolveYAMLIncludes_FollowsDirectorySymlink proves the resolver follows directory symlinks across repo boundaries while the security check stays sound.

Operator-side deploy contract

For this template to import correctly, both repos must be cloned as siblings:

/org-templates/
├── molecule-dev/                        ← THIS template (parent-side)
│   └── dev-lead → ../molecule-dev-department/dev-lead/
└── molecule-dev-department/             ← extracted dev tree
    └── dev-lead/...

The operator's existing convention already uses unprefixed dir names (molecule-dev, reno-stars, etc.). Adding the second repo means:

git clone https://git.moleculesai.app/molecule-ai/molecule-dev-department.git \
  /org-templates/molecule-dev-department

If the operator clones with a different dir name, the symlink target needs to match. Documented for the deploy runbook.

Hostile self-review (SOP Phase 4)

  • Weakest spot 1: this PR depends on a sibling clone of dev-department on the operator host. If the operator hasn't pulled the new repo, POST /org/import against this template will fail with 'target does not exist' on the dev-lead symlink. Mitigation: deploy step needs to ensure the sibling clone exists before any /org/import call referencing this template.
  • Weakest spot 2: history loss for the 27 extracted folders viewed FROM THIS template's git log. The history is preserved in molecule-dev-department's git log (via filter-repo) — but this template's git log -- core-be/ will now show only the deletion commit, not the original creation/edit history. Acceptable tradeoff for the structural cleanup.
  • Weakest spot 3: I have NOT yet validated end-to-end against POST /org/import on a staging tenant. That's Phase 4 (task #226) — happens after this merges. Local Python validator surfaces a false-positive on the symlink-resolved-outside-root path, but the actual platform Go resolver passes it (per the molecule-core PR #102 tests). The validator-vs-platform divergence is a known follow-up — filed separately.

Refs

  • internal#77 — extraction RFC
  • molecule-ai/molecule-dev-department PRs #1 (scaffold), #2 (extract with history), #3 (atomize) — all merged
  • molecule-core PR #102 — symlink-resolution contract test
  • Hongming GO 2026-05-08 ("dont wait for me, follow the plan")
  • SOP Phase 3d — task #225
## Summary Phase 3d of [internal#77](https://git.moleculesai.app/molecule-ai/internal/issues/77). Final structural change of the dev-department extraction. After this PR + the dev-department-side merges (#1, #2, #3), this template contains only parent-only roles (PM + Research + Marketing) — the entire engineering org tree is composed in via a single `dev-lead` symlink to the sibling repo. ## Tree shape after this PR ``` molecule-ai-org-template-molecule-dev/ ├── org.yaml # workspaces: pm + marketing + dev-lead ├── README.md, opencode.json, system-prompt.md, SHARED_RULES.md, ... ├── pm/, research-lead/, market-analyst/, technical-researcher/, competitive-intelligence/ ├── marketing-lead/, content-marketer/, product-marketing-manager/, │ community-manager/, seo-growth-analyst/, social-media-brand/ ├── teams/ │ ├── pm.yaml (children: research only — dev.yaml etc removed) │ ├── marketing.yaml (children: minus devrel-engineer orphan) │ └── research.yaml (unchanged) └── dev-lead → ../molecule-dev-department/dev-lead/ ← symlink ``` ## What changed (numbers) - **256 file changes** in this single commit. - **27 dev-tree workspace folders deleted** — extracted to molecule-ai/molecule-dev-department with history preservation (PR #2 there). - **17 orphan folders deleted** — backend-engineer{,-2,-3}, frontend-engineer{,-2,-3}, qa-engineer{,-2,-3}, security-auditor{,-2}, platform-engineer, devops-engineer, sre-engineer, offensive-security-engineer, devrel-engineer, triage-operator-2, uiux-designer. - **8 teams/<dev-tree>.yaml composition files deleted** — dev.yaml, core-platform.yaml, controlplane.yaml, app-docs.yaml, infra.yaml, sdk.yaml, documentation-specialist.yaml, triage-operator.yaml. - **1 symlink added** — `dev-lead → ../molecule-dev-department/dev-lead/`. - **3 yaml edits**: - `org.yaml workspaces:` adds third root `!include dev-lead/workspace.yaml`. - `teams/pm.yaml children:` removes dev/doc-spec/triage-op/triage-op-2 references (they moved to dev tree or were orphans). - `teams/marketing.yaml children:` removes devrel-engineer reference (orphan). Repo size drops from ~567 KiB to ~150 KiB. Workspace count drops from 50+ to 11 (PM + Research × 4 + Marketing × 6). The dev tree's 28 workspaces are composed in at import time via the symlink. ## Symlink contract The `dev-lead` symlink at template root targets `../molecule-dev-department/dev-lead/` — a RELATIVE path that resolves correctly when both repos are cloned as siblings under the operator's `/org-templates/` directory. The platform's import resolver (`workspace-server/internal/handlers/org_include.go:resolveYAMLIncludes`) operates on path strings via `filepath.Abs`/`filepath.Rel` (does NOT follow symlinks at the security check), so `dev-lead/workspace.yaml` passes the in-root check. The actual file open uses `os.ReadFile` which DOES follow the symlink, delivering content from the sibling repo. This contract is empirically pinned by tests in [molecule-core PR #102](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/102) — `TestResolveYAMLIncludes_FollowsDirectorySymlink` proves the resolver follows directory symlinks across repo boundaries while the security check stays sound. ## Operator-side deploy contract For this template to import correctly, both repos must be cloned as siblings: ``` /org-templates/ ├── molecule-dev/ ← THIS template (parent-side) │ └── dev-lead → ../molecule-dev-department/dev-lead/ └── molecule-dev-department/ ← extracted dev tree └── dev-lead/... ``` The operator's existing convention already uses unprefixed dir names (`molecule-dev`, `reno-stars`, etc.). Adding the second repo means: ``` git clone https://git.moleculesai.app/molecule-ai/molecule-dev-department.git \ /org-templates/molecule-dev-department ``` If the operator clones with a different dir name, the symlink target needs to match. Documented for the deploy runbook. ## Hostile self-review (SOP Phase 4) - **Weakest spot 1**: this PR depends on a sibling clone of dev-department on the operator host. If the operator hasn't pulled the new repo, `POST /org/import` against this template will fail with 'target does not exist' on the dev-lead symlink. Mitigation: deploy step needs to ensure the sibling clone exists before any `/org/import` call referencing this template. - **Weakest spot 2**: history loss for the 27 extracted folders viewed FROM THIS template's git log. The history is preserved in molecule-dev-department's git log (via filter-repo) — but this template's `git log -- core-be/` will now show only the deletion commit, not the original creation/edit history. Acceptable tradeoff for the structural cleanup. - **Weakest spot 3**: I have NOT yet validated end-to-end against `POST /org/import` on a staging tenant. That's Phase 4 (task #226) — happens after this merges. Local Python validator surfaces a false-positive on the symlink-resolved-outside-root path, but the actual platform Go resolver passes it (per the molecule-core PR #102 tests). The validator-vs-platform divergence is a known follow-up — filed separately. ## Refs - [internal#77](https://git.moleculesai.app/molecule-ai/internal/issues/77) — extraction RFC - molecule-ai/molecule-dev-department PRs #1 (scaffold), #2 (extract with history), #3 (atomize) — all merged - [molecule-core PR #102](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/102) — symlink-resolution contract test - Hongming GO 2026-05-08 ("dont wait for me, follow the plan") - SOP Phase 3d — task #225
claude-ceo-assistant added 1 commit 2026-05-08 11:16:31 +00:00
slim(parent-template): delete 17 orphans + extract dev tree, wire dev-lead symlink to molecule-dev-department
All checks were successful
CI / validate (push) Successful in 56s
CI / validate (pull_request) Successful in 52s
f331bebac1
Phase 3d of internal#77 (dev-department extraction).

What changed:

  Deletions:
  - 17 orphan workspace folders not reachable from any teams/*.yaml
    !include chain in this template (caught at extract time by
    validate-tree.py): backend-engineer{,-2,-3}, frontend-engineer{,-2,-3},
    qa-engineer{,-2,-3}, security-auditor{,-2}, platform-engineer,
    devops-engineer, sre-engineer, offensive-security-engineer,
    devrel-engineer, triage-operator-2, uiux-designer.
  - 27 dev-tree workspace folders extracted to molecule-ai/molecule-dev-department
    (history preserved via git filter-repo): dev-lead, core-{lead,be,fe,qa,
    security,uiux,devops,offsec}, cp-{lead,be,qa,security}, app-{lead,fe,qa},
    technical-writer, infra-{lead,sre,runtime-be}, sdk-{lead,dev}, plugin-dev,
    release-manager, integration-tester, fullstack-engineer,
    documentation-specialist, triage-operator.
  - 8 teams/<dev-tree>.yaml composition files (dev.yaml, core-platform.yaml,
    controlplane.yaml, app-docs.yaml, infra.yaml, sdk.yaml,
    documentation-specialist.yaml, triage-operator.yaml).

  Additions:
  - dev-lead → ../molecule-dev-department/dev-lead/ (symlink). Resolves
    correctly when both repos are cloned as siblings under operator's
    /org-templates/ (current convention: /org-templates/molecule-dev/
    + /org-templates/molecule-dev-department/). Platform's
    resolveYAMLIncludes follows the symlink at file-read while its
    security check (filepath.Abs/Rel) operates on path strings, so
    'dev-lead/workspace.yaml' counts as 'inside parent root' even though
    its content lives in the sibling repo. Contract pinned by
    molecule-core PR #102's tests.

  Edits:
  - org.yaml workspaces: gains '!include dev-lead/workspace.yaml' (third
    root after pm.yaml + marketing.yaml). The other two roots are
    unchanged.
  - teams/pm.yaml children: removed dev.yaml, documentation-specialist.yaml,
    triage-operator.yaml, triage-operator-2 (orphan). Comments document
    where each moved.
  - teams/marketing.yaml children: removed devrel-engineer (orphan).

This template is now ~50% smaller and contains only parent-only roles:
PM + Research (research-lead, market-analyst, technical-researcher,
competitive-intelligence) + Marketing (marketing-lead, content-marketer,
product-marketing-manager, community-manager, seo-growth-analyst,
social-media-brand). Engineering org tree is composed in via
the dev-lead symlink + dev-department repo.

Refs:
  internal#77 — extraction RFC
  molecule-ai/molecule-dev-department PRs #1, #2, #3 (scaffold + extract + atomize)
  molecule-core PR #102 — symlink-resolution contract test
  Hongming GO 2026-05-08 ("approved, keep going" + "dont wait for me, follow the plan")
  SOP Phase 3d — task #225
claude-ceo-assistant merged commit 392c4fe68f into main 2026-05-08 11:16:41 +00:00
claude-ceo-assistant deleted branch slim/extract-dev-into-symlink 2026-05-08 11:16:41 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-ai-org-template-molecule-dev#5
No description provided.