atomize(dev-tree): nest sub-teams under dev-lead/, dissolve teams/, --strict CI gate (Phase 3c-3) #3

Merged
claude-ceo-assistant merged 1 commits from atomize/lift-subteams-into-dev-lead into main 2026-05-08 11:12:39 +00:00

Summary

Phase 3c-3 of internal#77. Completes the structural atomization Hongming asked for in Q3+Q5: every workspace is a self-contained folder, no cross-tree .. refs anywhere, and the validator now hard-fails on violations via --strict.

Tree shape after this PR

dev-department/
├── dev-department.yaml                      # roots: [!include ./dev-lead/workspace.yaml]
├── .molecule-ci/scripts/validate-tree.py    # +bug-fixes from PR #2
├── .github/workflows/validate.yml           # now runs --strict
│
└── dev-lead/                                # 27 nested workspace folders, all atomized
    ├── workspace.yaml                       # was teams/dev.yaml
    ├── system-prompt.md, prompts, schedules/
    │
    ├── core-lead/                           # was teams/core-platform.yaml
    │   ├── workspace.yaml
    │   └── core-{be,fe,qa,security,uiux,devops,offsec}/
    ├── cp-lead/                             # was teams/controlplane.yaml
    │   ├── workspace.yaml
    │   └── cp-{be,qa,security}/
    ├── app-lead/                            # was teams/app-docs.yaml
    │   ├── workspace.yaml
    │   └── app-{fe,qa}/, technical-writer/, documentation-specialist/   ← Q1
    ├── infra-lead/                          # was teams/infra.yaml
    │   ├── workspace.yaml
    │   └── infra-{sre,runtime-be}/
    ├── sdk-lead/                            # was teams/sdk.yaml
    │   ├── workspace.yaml
    │   └── sdk-dev/, plugin-dev/
    ├── release-manager/                     # floater
    ├── integration-tester/                  # floater
    ├── fullstack-engineer/                  # floater
    └── triage-operator/                     # ← Q2

teams/ is deleted entirely — its 8 yaml files are absorbed into the appropriate *-lead/workspace.yaml and <workspace>/workspace.yaml files.

Mechanical changes

Folder moves (history preserved via git mv)

All 25 leaf workspace folders moved into their new nested location. Git renames are visible in the diff (e.g. app-fe/* → dev-lead/app-lead/app-fe/*).

Workspace.yaml content updates

  • dev-lead/workspace.yaml ← lifted from teams/dev.yaml. children: rewritten:
    • !include core-platform.yaml!include ./core-lead/workspace.yaml
    • !include ../release-manager/workspace.yaml!include ./release-manager/workspace.yaml
    • (and similar for the other 7 children)
  • dev-lead/-lead/workspace.yaml ← lifted from teams/<sub-team>.yaml. children: !include ../<x>/workspace.yaml!include ./<x>/workspace.yaml.
  • dev-lead/app-lead/documentation-specialist/workspace.yaml ← lifted from teams/documentation-specialist.yaml (Q1 placement nested under app-docs sub-team).
  • dev-lead/triage-operator/workspace.yaml ← lifted from teams/triage-operator.yaml (Q2 placement as direct child of dev-lead).

files_dir: paths normalized to org-root-relative

Every workspace's files_dir: is now its full path-from-org-root. When the parent template imports via the dev-lead symlink (Phase 3d), files_dir: dev-lead/core-lead/core-be correctly resolves through the symlink. This also keeps the workspace tree introspectable from outside the platform — files_dir: always matches the actual folder location.

Examples:

  • files_dir: core-befiles_dir: dev-lead/core-lead/core-be
  • files_dir: core-leadfiles_dir: dev-lead/core-lead
  • files_dir: documentation-specialistfiles_dir: dev-lead/app-lead/documentation-specialist
  • files_dir: triage-operatorfiles_dir: dev-lead/triage-operator

Manifest

  • dev-department.yaml roots: updated from !include teams/dev.yaml to !include ./dev-lead/workspace.yaml.

CI gate

  • .github/workflows/validate.yml now runs validate-tree.py --strict. Cross-tree .. refs hard-fail. Going forward, any PR re-introducing a .. is caught at PR time.

Validator state on this PR (--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)

Hostile self-review (SOP Phase 4)

  • Weakest spot 1: lost the parent: dev-lead field from the old *-lead/workspace.yaml stubs when overwriting them with team-yaml content. Per the platform investigation (org.go:340-480) the parent: field is NOT a recognized OrgWorkspace field — it was decorative metadata. Loss is acceptable; if anything wants explicit parent linkage, it can be re-added later.
  • Weakest spot 2: files_dir paths are written assuming parent-template imports via a dev-lead symlink at parent-root. The dev-department repo is documented as subtree-only (README §Subtree contract); standalone import would resolve files_dir: dev-lead/... against dev-department's own root and fail to find the files. Acceptable per Hongming Q6 (symlink-only composition).
  • Weakest spot 3: I did NOT yet verify end-to-end against POST /org/import on staging. That's Phase 4 (next PR after parent template slim). The validator-clean state + the symlink-resolver tests in molecule-core PR #102 give high confidence, but actual import is the truth-teller.

What's still ahead

  • Phase 3d: slim parent template — delete the 17 orphans + dev-tree folders, wire dev-lead → dev-department/dev-lead symlink, update org.yaml workspaces: to !include dev-lead/workspace.yaml. Separate PR.
  • Phase 4: end-to-end verify on staging tenant via POST /org/import. Last step.

Refs

  • internal#77 — extraction RFC
  • molecule-dev-department#1 (merged) — scaffold + validator
  • molecule-dev-department#2 (merged) — extract dev tree with history
  • molecule-core#102 — symlink-resolution contract test
  • Hongming GO 2026-05-08 ("approved, keep going" + "dont wait for me, follow the plan")
  • SOP Phase 3c-3 — task #229
## Summary Phase 3c-3 of [internal#77](https://git.moleculesai.app/molecule-ai/internal/issues/77). Completes the structural atomization Hongming asked for in Q3+Q5: every workspace is a self-contained folder, no cross-tree `..` refs anywhere, and the validator now hard-fails on violations via `--strict`. ## Tree shape after this PR ``` dev-department/ ├── dev-department.yaml # roots: [!include ./dev-lead/workspace.yaml] ├── .molecule-ci/scripts/validate-tree.py # +bug-fixes from PR #2 ├── .github/workflows/validate.yml # now runs --strict │ └── dev-lead/ # 27 nested workspace folders, all atomized ├── workspace.yaml # was teams/dev.yaml ├── system-prompt.md, prompts, schedules/ │ ├── core-lead/ # was teams/core-platform.yaml │ ├── workspace.yaml │ └── core-{be,fe,qa,security,uiux,devops,offsec}/ ├── cp-lead/ # was teams/controlplane.yaml │ ├── workspace.yaml │ └── cp-{be,qa,security}/ ├── app-lead/ # was teams/app-docs.yaml │ ├── workspace.yaml │ └── app-{fe,qa}/, technical-writer/, documentation-specialist/ ← Q1 ├── infra-lead/ # was teams/infra.yaml │ ├── workspace.yaml │ └── infra-{sre,runtime-be}/ ├── sdk-lead/ # was teams/sdk.yaml │ ├── workspace.yaml │ └── sdk-dev/, plugin-dev/ ├── release-manager/ # floater ├── integration-tester/ # floater ├── fullstack-engineer/ # floater └── triage-operator/ # ← Q2 ``` `teams/` is **deleted entirely** — its 8 yaml files are absorbed into the appropriate `*-lead/workspace.yaml` and `<workspace>/workspace.yaml` files. ## Mechanical changes ### Folder moves (history preserved via `git mv`) All 25 leaf workspace folders moved into their new nested location. Git renames are visible in the diff (e.g. `app-fe/* → dev-lead/app-lead/app-fe/*`). ### Workspace.yaml content updates - **dev-lead/workspace.yaml** ← lifted from `teams/dev.yaml`. children: rewritten: - `!include core-platform.yaml` → `!include ./core-lead/workspace.yaml` - `!include ../release-manager/workspace.yaml` → `!include ./release-manager/workspace.yaml` - (and similar for the other 7 children) - **dev-lead/<sub-team>-lead/workspace.yaml** ← lifted from `teams/<sub-team>.yaml`. children: `!include ../<x>/workspace.yaml` → `!include ./<x>/workspace.yaml`. - **dev-lead/app-lead/documentation-specialist/workspace.yaml** ← lifted from `teams/documentation-specialist.yaml` (Q1 placement nested under app-docs sub-team). - **dev-lead/triage-operator/workspace.yaml** ← lifted from `teams/triage-operator.yaml` (Q2 placement as direct child of dev-lead). ### `files_dir:` paths normalized to org-root-relative Every workspace's `files_dir:` is now its full path-from-org-root. When the parent template imports via the `dev-lead` symlink (Phase 3d), `files_dir: dev-lead/core-lead/core-be` correctly resolves through the symlink. This also keeps the workspace tree introspectable from outside the platform — `files_dir:` always matches the actual folder location. Examples: - `files_dir: core-be` → `files_dir: dev-lead/core-lead/core-be` - `files_dir: core-lead` → `files_dir: dev-lead/core-lead` - `files_dir: documentation-specialist` → `files_dir: dev-lead/app-lead/documentation-specialist` - `files_dir: triage-operator` → `files_dir: dev-lead/triage-operator` ### Manifest - `dev-department.yaml roots:` updated from `!include teams/dev.yaml` to `!include ./dev-lead/workspace.yaml`. ### CI gate - `.github/workflows/validate.yml` now runs `validate-tree.py --strict`. Cross-tree `..` refs hard-fail. Going forward, any PR re-introducing a `..` is caught at PR time. ## Validator state on this PR (--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) ``` ## Hostile self-review (SOP Phase 4) - **Weakest spot 1**: lost the `parent: dev-lead` field from the old `*-lead/workspace.yaml` stubs when overwriting them with team-yaml content. Per the platform investigation (`org.go:340-480`) the `parent:` field is NOT a recognized OrgWorkspace field — it was decorative metadata. Loss is acceptable; if anything wants explicit parent linkage, it can be re-added later. - **Weakest spot 2**: `files_dir` paths are written assuming parent-template imports via a `dev-lead` symlink at parent-root. The dev-department repo is documented as subtree-only (README §Subtree contract); standalone import would resolve `files_dir: dev-lead/...` against dev-department's own root and fail to find the files. Acceptable per Hongming Q6 (symlink-only composition). - **Weakest spot 3**: I did NOT yet verify end-to-end against `POST /org/import` on staging. That's Phase 4 (next PR after parent template slim). The validator-clean state + the symlink-resolver tests in molecule-core PR #102 give high confidence, but actual import is the truth-teller. ## What's still ahead - **Phase 3d**: slim parent template — delete the 17 orphans + dev-tree folders, wire `dev-lead → dev-department/dev-lead` symlink, update `org.yaml workspaces:` to `!include dev-lead/workspace.yaml`. Separate PR. - **Phase 4**: end-to-end verify on staging tenant via `POST /org/import`. Last step. ## Refs - [internal#77](https://git.moleculesai.app/molecule-ai/internal/issues/77) — extraction RFC - molecule-dev-department#1 (merged) — scaffold + validator - molecule-dev-department#2 (merged) — extract dev tree with history - [molecule-core#102](https://git.moleculesai.app/molecule-ai/molecule-core/pulls/102) — symlink-resolution contract test - Hongming GO 2026-05-08 ("approved, keep going" + "dont wait for me, follow the plan") - SOP Phase 3c-3 — task #229
claude-ceo-assistant added 1 commit 2026-05-08 11:09:20 +00:00
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
claude-ceo-assistant merged commit 321979e4dc into main 2026-05-08 11:12:39 +00:00
claude-ceo-assistant deleted branch atomize/lift-subteams-into-dev-lead 2026-05-08 11:12:39 +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-dev-department#3
No description provided.