Importable dev-team subtree for molecule-ai org templates. Extracted from molecule-ai-org-template-molecule-dev (internal#77). Atomized: each workspace owns its persona, plugins, skills, and .env. Composed via folder-tree (no !include cross-references).
Go to file
claude-ceo-assistant 1dd614a4f1 atomize(dev-tree): nest sub-teams + leaf workspaces under dev-lead/, dissolve teams/
Phase 3c-3 of internal#77 (dev-department extraction).

Atomization completes the structural goal of the RFC (Hongming Q3+Q5):
each workspace is a self-contained folder; no cross-tree '..' refs;
the validator can enforce orphans-impossible-by-construction in --strict mode.

What changed:

  Folder moves (history preserved via git mv):
  - core-be, core-fe, core-qa, core-security, core-uiux, core-devops,
    core-offsec → core-lead/<self>/
  - cp-be, cp-qa, cp-security → cp-lead/<self>/
  - app-fe, app-qa, technical-writer, documentation-specialist
    → app-lead/<self>/
  - infra-sre, infra-runtime-be → infra-lead/<self>/
  - sdk-dev, plugin-dev → sdk-lead/<self>/
  - core-lead, cp-lead, app-lead, infra-lead, sdk-lead,
    release-manager, integration-tester, fullstack-engineer,
    triage-operator → dev-lead/<self>/

  Workspace.yaml content:
  - dev-lead/workspace.yaml: lifted from teams/dev.yaml. children: paths
    rewritten from team-yaml-style ('!include core-platform.yaml') and
    floater-style ('!include ../release-manager/workspace.yaml') to
    canonical './<child>/workspace.yaml'.
  - dev-lead/<sub-team>-lead/workspace.yaml: lifted from teams/<sub-team>.yaml.
    children: paths rewritten from '../<child>/workspace.yaml' to
    './<child>/workspace.yaml'.
  - dev-lead/app-lead/documentation-specialist/workspace.yaml: lifted from
    teams/documentation-specialist.yaml (Q1 placement).
  - dev-lead/triage-operator/workspace.yaml: lifted from
    teams/triage-operator.yaml (Q2 placement).
  - All files_dir: paths updated to full path-from-org-root
    (e.g. 'core-be' → 'dev-lead/core-lead/core-be',
     'core-lead' → 'dev-lead/core-lead', etc.). When parent template
    imports via the 'dev-lead' symlink (Phase 3d), files_dir resolves
    correctly relative to parent's org-root.

  Manifest:
  - dev-department.yaml roots: changed from '!include teams/dev.yaml'
    to '!include ./dev-lead/workspace.yaml'.

  Composition layer:
  - teams/ entirely deleted (8 yaml files removed). The composition is
    now expressed structurally via the folder tree.

  CI gate:
  - .github/workflows/validate.yml runs validate-tree.py --strict.
    Cross-tree '..' refs now hard-fail.

Validator state on this commit (--strict):
  filesystem workspace folders : 28
  reachable from manifest      : 28
  orphans                      : 0
  cross-tree '..' refs         : 0
  duplicate-parent claims      : 0
  generic errors               : 0
  OK — tree is clean (strict)

Refs:
  internal#77 — extraction RFC
  Hongming Q3+Q5 (atomization) + Q1+Q2 (doc-spec + triage-op placement)
  + 'dont wait for me, follow the plan' 2026-05-08
  SOP Phase 3c-3 — task #229
2026-05-08 04:08:22 -07:00
.github/workflows atomize(dev-tree): nest sub-teams + leaf workspaces under dev-lead/, dissolve teams/ 2026-05-08 04:08:22 -07:00
.molecule-ci/scripts extract(dev-tree): port dev tree from molecule-ai-org-template-molecule-dev with history 2026-05-08 04:02:00 -07:00
dev-lead atomize(dev-tree): nest sub-teams + leaf workspaces under dev-lead/, dissolve teams/ 2026-05-08 04:08:22 -07:00
.gitattributes scaffold(0001): validator + CI gate + dev-department.yaml manifest 2026-05-07 20:48:16 -07:00
.gitignore scaffold(0001): validator + CI gate + dev-department.yaml manifest 2026-05-07 20:48:16 -07:00
dev-department.yaml atomize(dev-tree): nest sub-teams + leaf workspaces under dev-lead/, dissolve teams/ 2026-05-08 04:08:22 -07:00
LICENSE Initial commit 2026-05-08 03:35:37 +00:00
README.md scaffold(0001): validator + CI gate + dev-department.yaml manifest 2026-05-07 20:48:16 -07:00
SECRETS_MATRIX.md fix(personas): migrate gh CLI → tea (Gitea CLI) + curl-via-API (#45) 2026-05-07 02:54:35 -07:00
SHARED_RULES.md fix(post-suspension): migrate github.com/Molecule-AI refs to git.moleculesai.app (Class G #168) 2026-05-07 12:59:14 -07:00

molecule-ai/molecule-dev-department

Importable engineering-tree subtree for Molecule AI org templates.

This repo is not a standalone org template. It is designed to be grafted into a parent template (e.g. molecule-ai-org-template-molecule-dev) via filesystem symlink at deploy time. The parent template owns the org identity, top-level workspaces (PM, Marketing, Research, …), and imports this repo's dev-lead/ subtree as its engineering org.

Why a separate repo

molecule-ai-org-template-molecule-dev had grown to ~60 workspace folders + 11 teams/*.yaml composition files + 17 orphaned folders that no !include chain reached. The orphan accumulation was a sign the structure had outgrown a single repo.

Splitting the dev tree out:

  • Atomizes engineering as a self-contained unit that other org templates can reuse (one link to add the whole department).
  • Makes orphan accumulation impossible — the validator (CI gate) walks the manifest → roots → children and fails on any folder not reachable.
  • Lets the dev tree evolve on its own cadence without churning the parent template.
  • Keeps the parent template's structure focused on org identity (PM, Marketing, Research) and removes the ~50% of mass that's dev-specific.

Full design rationale: internal#77 RFC

Subtree contract

This repo is consumed by parent templates via this convention:

  1. Operator-side deploy layout clones both repos as siblings under /org-templates/:

    /org-templates/
      molecule-ai-org-template-molecule-dev/   ← parent template
      molecule-dev-department/                 ← THIS repo
    
  2. Parent template has a relative directory symlink at its root (or under teams/):

    parent-template/
      org.yaml
      dev → ../molecule-dev-department/        ← symlink
    
  3. Parent's org.yaml imports the subtree:

    workspaces:
      - !include teams/pm.yaml
      - !include teams/marketing.yaml
      - !include dev/dev-lead/workspace.yaml   ← into the symlinked subtree
    
  4. Workspace files_dir: paths inside this repo use the symlink prefix (dev/<workspace-name>) so they resolve correctly when the subtree is imported via the parent. This means the subtree is not directly importable as a standalone org template — by design.

The platform's org importer (workspace-server/internal/handlers/org_include.go) follows symlinks at the OS layer (os.ReadFile is symlink-aware) while its security check (filepath.Abs / filepath.Rel) operates on path strings (passes for symlinked paths because the link's path is inside the parent root). The contract is pinned by tests in molecule-core PR #102.

Repo layout

.
├── dev-department.yaml         ← manifest: defaults + category_routing + roots
├── .molecule-ci/scripts/
│   └── validate-tree.py        ← orphan / reachability lint (CI gate)
├── .github/workflows/
│   └── validate.yml            ← runs validate-tree.py on every PR
├── README.md                   ← this file
├── LICENSE                     ← MIT
└── <workspace-folders>         ← scaffolded empty; populated by Phase 3c-2

After Phase 3c-2 (extract dev tree with git history) the repo will contain the dev-lead/ workspace tree with nested sub-teams. After Phase 3c-3 (move documentation-specialist + triage-operator into the tree per Hongming Q1+Q2) those workspaces will live under dev-lead/app-docs/documentation-specialist/ and dev-lead/triage-operator/ respectively.

Validating locally

.molecule-ci/scripts/validate-tree.py
# OK — tree is clean

# Or with explicit manifest:
.molecule-ci/scripts/validate-tree.py dev-department.yaml

The validator:

  • Walks dev-department.yaml → roots → children recursively, including through !include directives.
  • Lists every directory containing workspace.yaml.
  • Reports orphans (filesystem dirs not reachable from manifest), cross-tree .. traversal in children: paths, duplicate parents, and missing workspace.yaml.
  • Exits non-zero on any violation.

CI runs the same script via .github/workflows/validate.yml on every push and PR — orphan accumulation is caught at PR time, not at deploy time.

Phase status

Phase Status Where
1 — Investigate platform org importer ✓ done internal#77 comment 1886
2 — Design (SSOT, alternatives, security, versioning) ✓ done internal#77
3a — Platform external: ref support parked (deferred) task #222
3b — Validator + CI gate ✓ done this commit
3c-1 — Scaffold this repo ✓ done this commit
3c-2 — Extract dev tree with history pending task #224
3c-3 — Atomize structure + move doc-spec + triage-op pending task #224
3d — Slim parent template + wire symlink + delete orphans pending task #225
4 — End-to-end verify on staging pending task #226

Refs

  • internal#77 — extraction RFC
  • molecule-core#102 — symlink-resolution test
  • Hongming GO 2026-05-08 ("you own this feature and repos, start")

License

MIT — see LICENSE