molecule-dev-department/dev-department.yaml
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

87 lines
4.1 KiB
YAML

# Molecule AI — Dev Department subtree manifest
#
# This file is the importable-subtree's root config. It carries the same
# shape as a full org template's `org.yaml` — defaults + category_routing
# + plugin set + roots — but is consumed via gitops-style symlink from a
# parent template (see README §Subtree contract).
#
# Hongming-confirmed name: dev-department.yaml (2026-05-08).
#
# Refs:
# internal#77 — gitops-style extraction RFC
# molecule-core#102 — symlink-resolution contract pinned by tests
name: Molecule AI Dev Department
description: >-
Importable subtree containing the engineering org tree:
Dev Lead + Core Platform + Controlplane + App-Docs (incl. Documentation
Specialist) + Infra + SDK sub-teams, plus floaters (Release Manager,
Integration Tester, Fullstack), plus Triage Operator.
# Defaults applied to every workspace in this subtree. Per-workspace
# `plugins:` field UNIONs with this list (see Hongming Q1: per-workspace
# plugins are first-class). A leading `!` or `-` opts a default plugin
# OUT for one workspace.
#
# Same shape as parent's org.yaml `defaults:` block. When this manifest
# is grafted into a parent template via the symlink contract, the
# parent's own defaults still apply at the parent-template level — these
# only set defaults INSIDE the dev tree.
defaults:
runtime: claude-code
tier: 2
plugins:
- ecc # Everything Claude Code guardrails + coding skills
- molecule-dev # Molecule AI codebase conventions, past bugs, review-loop
- superpowers # systematic-debugging, TDD, planning, verification
- molecule-careful-bash # refuse destructive shell (rm -rf, push --force, DROP TABLE)
- molecule-prompt-watchdog # warn on destructive user prompts
- molecule-audit-trail # append every Edit/Write to .claude/audit.jsonl
- molecule-session-context # auto-load cron learnings + PR/issue counts on SessionStart
- molecule-skill-cron-learnings # per-tick learning JSONL (pairs with session-context)
- molecule-skill-update-docs # keep architecture / README / edit-history aligned
# Audit-summary routing — Auditors fan out findings to the listed roles.
# Roles are by display name (Dev Lead, Backend Engineer, ...) not by
# workspace folder name. Roles must exist in this subtree's roots:
# block — the validator will catch dangling references in a follow-up.
category_routing:
security: [Backend Engineer, DevOps Engineer]
offensive: [Security Auditor, Backend Engineer, DevOps Engineer]
ui: [Frontend Engineer]
ux: [Frontend Engineer]
infra: [DevOps Engineer, Platform Engineer, SRE Engineer]
cloud: [DevOps Engineer, Platform Engineer, SRE Engineer, Backend Engineer]
qa: [QA Engineer]
performance: [Backend Engineer]
docs: [Documentation Specialist]
mixed: [Dev Lead]
research: [Research Lead]
plugins: [Technical Researcher]
template: [Dev Lead]
channels: [DevOps Engineer]
idle_prompt: "" # Off by default — set per-workspace to enable idle reflection
# Roots block: list the top-level workspaces of this subtree.
#
# Each root entry resolves through `!include` to a workspace.yaml file.
# The validator walks each referenced workspace.yaml recursively via its
# `children:` field.
#
# Atomization rule (Hongming Q3+Q5): `children:` paths inside a
# workspace.yaml SHOULD be relative-and-down-only (`./<child>`); no `..`.
# The `.molecule-ci/scripts/validate-tree.py` CI gate enforces this.
# CURRENT STATE: extracted tree retains the parent template's flat shape
# with `teams/*.yaml` !include'ing siblings via `..`. Atomization to
# nested folders is Phase 3c-3 (next PR).
#
# Phase 3c-2 (this PR): roots: points at teams/dev.yaml as the single
# Dev Lead root that recursively pulls in core-platform, controlplane,
# app-docs, infra, sdk sub-teams + release-manager + integration-tester
# + fullstack-engineer floaters + documentation-specialist + triage-operator
# (the last two added per Hongming Q1+Q2).
roots:
- !include ./dev-lead/workspace.yaml