Skip to content

chore(template): add Documentation Specialist as 3rd PM direct report - #97

Merged
HongmingWang-Rabbit merged 2 commits into
mainfrom
chore/template-documentation-specialist
Apr 15, 2026
Merged

chore(template): add Documentation Specialist as 3rd PM direct report#97
HongmingWang-Rabbit merged 2 commits into
mainfrom
chore/template-documentation-specialist

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Adds a 13th workspace to the molecule-dev template — Documentation Specialist — owning end-to-end documentation across all Molecule AI surfaces. Pairs with the new Molecule-AI/docs repo (Fumadocs + Next.js 15) that will be deployed to doc.moleculesai.app.

Context

CEO directive 2026-04-15: deploy a document specialist for documenting everything including what's in our repository and in our customer facing page doc.moleculesai.app.

I just shipped:

  1. Molecule-AI/docs — new public repo, scaffolded with Fumadocs (open-source MIT, Next.js 15 App Router native, Tailwind v4, MDX). Three hand-written pages (index, quickstart, concepts) + 9 stub pages with the agent's TODO marker.
  2. This PR — wires the agent into the molecule-dev template.

Framework choice rationale

Framework Verdict Why
Fumadocs ✅ chosen MIT open source; built on Next.js 15 App Router; matches our existing canvas stack; flexible enough to grow into custom doc components for our agent canvas flows; ships search/dark-mode/Shiki out of the box
Mintlify Rejected Paid SaaS subscription — vendor lock-in conflicts with self-hosting on doc.moleculesai.app
Nextra Rejected More opinionated than Fumadocs; less room to grow into custom MDX components
Docusaurus Rejected Not Next.js-native; would split our React build pipeline in two

Where it sits in the org

Third PM direct report, parallel to Research Lead and Dev Lead. Docs is its own swim lane that spans engineering (docs follow code) and research/product (concepts and terminology).

PM
├── Research Lead
├── Dev Lead
└── Documentation Specialist   ← new (13th workspace)

Schedules added (2)

Cron When Job
0 9 * * * Daily 09:00 UTC Pair every merged platform PR (last 24h) with a docs PR; backfill one stub page on the docs site; crawl live site for broken links/dead anchors; delegate_task to PM with audit_summary{category=docs}
0 11 * * 1 Weekly Monday 11:00 UTC Stale page detection (>30 days untouched on fast-moving surfaces); terminology consistency check (one canonical name per concept); link-rot scan; same audit_summary contract

Both schedules end with the structured audit_summary routing per #75 (category: docs) so PM fans out via the platform-level category_routing.

Routing

Adds docs: [Documentation Specialist] to category_routing in the defaults block. Any agent that emits an audit_summary with category=docs is auto-routed here.

Plugins

Inherits the 9 universal defaults (#71 union semantics). Adds browser-automation for crawling the live docs site (visual regressions, broken links, dead anchors).

  • molecule-skill-update-docs (already in defaults) handles the cross-repo docs sync skill.
  • molecule-careful-bash, molecule-prompt-watchdog, molecule-audit-trail (defaults) provide guardrails on this agent's git operations.

Initial prompt — clones BOTH repos

The agent's initial_prompt clones both:

  • /workspace/repo — the platform monorepo (read recent commits, identify public surfaces)
  • /workspace/docs — Molecule-AI/docs (write-side, where it opens PRs)

This is the first workspace in the template that needs cross-repo access. Tracking as a follow-up: the platform's workspace_dir field currently only mounts ONE host directory; we need a way to mount multiple. For now the agent does git clones in the initial_prompt which works but doesn't get bind-mount caching benefits.

What this PR does NOT do

  • It does not create the workspace immediately on the running platform — that needs an org/import (currently failing on a pre-existing PM workspace_dir env-var issue, orthogonal). I'll sync the new workspace into the running DB manually after merge.
  • It does not configure the deployment to doc.moleculesai.app — that's a separate Vercel/DNS step the agent itself can later automate.
  • It does not write the actual content for the 9 stub pages — that's the agent's primary job once it boots.

Test plan

  • YAML valid (python -c "import yaml; yaml.safe_load(open(...))").
  • Tree-walk shows Documentation Specialist as 3rd PM child.
  • Total schedules count = 9 (was 7, added 2).
  • category_routing.docs = [Documentation Specialist].
  • After merge + provision: agent boots, clones both repos, opens its first docs sync PR within 24h.
  • First daily cron fires Tuesday 09:00 UTC.
  • First weekly cron fires next Monday 11:00 UTC.

Related

🤖 Generated with Claude Code

Adds a 13th workspace to the molecule-dev template owning end-to-end
documentation across all Molecule AI surfaces.

## Why now
- We just created Molecule-AI/docs (customer-facing site at
  doc.moleculesai.app, Fumadocs + Next.js 15) and the customer site needs
  someone to own it.
- Internal docs (README.md, docs/architecture.md, docs/edit-history/) were
  drifting — every platform PR has been opening a docs sync PR manually.
- No agent in the team owned terminology consistency or stub backfill.

## Where it sits in the org
Third PM direct report, parallel to Research Lead and Dev Lead — docs is
its own swim lane that spans engineering (docs follow code) and
research/product (concepts and terminology).

  PM
  ├── Research Lead
  ├── Dev Lead
  └── Documentation Specialist  <-- new

## Schedules (2)

1. **Daily docs sync — backfill stubs and pair recent platform PRs**
   `0 9 * * *` — every morning:
   - Pair every merged platform PR (last 24h) with a docs PR if needed
   - Backfill one stub page on the docs site
   - Crawl the live site for broken links / dead anchors
   - delegate_task to PM with audit_summary (category=docs)

2. **Weekly terminology + freshness audit**
   `0 11 * * 1` — every Monday:
   - Stale page detection (>30 days untouched on fast-moving surfaces)
   - Terminology consistency check (one canonical name per concept)
   - Link-rot scan
   - Same audit_summary contract

## Plugins
Inherits the 9 universal defaults. Adds `browser-automation` for crawling
the live docs site. `molecule-skill-update-docs` is already in defaults
so the cross-repo sync skill is available.

## Routing
Adds `docs: [Documentation Specialist]` to `category_routing` so any
agent that emits an audit_summary with category=docs is auto-routed
here by the platform.

## Bind mounts
Note: this workspace clones BOTH /workspace/repo (the platform monorepo)
and /workspace/docs (Molecule-AI/docs) in its initial_prompt so the
agent can edit either side.
…le-controlplane

Per CEO 2026-04-15: the SaaS controlplane (Molecule-AI/molecule-controlplane,
PRIVATE Go/Fly.io provisioner) needs documentation coverage too.

Updates the agent's role description, initial_prompt, and daily docs-sync
cron to handle a third repo with a strict public/private split.

## Privacy rule (the critical addition)

molecule-controlplane is private. Two-bucket model:

  Internal-only changes (handlers, schemas, infra config, billing logic,
  fly.toml, provisioner internals) → docs go INSIDE the controlplane repo
  itself (README.md, PLAN.md, docs/internal/*.md). NEVER mentioned in the
  public docs site.

  Customer-facing changes (new tier, new region, new SLA, pricing change,
  signup flow change) → sanitized PUBLIC description on doc.moleculesai.app.
  Describes the PRODUCT, never the implementation.

  When unsure: default to internal-only and ask PM before publishing.

The privacy rule is repeated three times in the prompt (top of initial_prompt,
1b inside the daily cron, and the role description) so the agent can't miss it.

## Changes
- role: extended to mention all three repos + privacy split
- initial_prompt: clones controlplane in step 1, reads README+PLAN in step 5,
  scans recent commits in step 8, lists the four owned surfaces with public/private
  labels in step 10
- Daily cron: adds step 1b "PAIR RECENT CONTROLPLANE PRS" with the (i)/(ii)
  internal/customer-facing branching logic
- SETUP block: adds controlplane git pull
@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor Author

Updated 2026-04-15 per CEO directive: Documentation Specialist now watches all THREE repos.

Added: Molecule-AI/molecule-controlplane (PRIVATE)

The SaaS controlplane (Go/Fly.io tenant provisioner) is now in scope. With a strict public/private split — privacy rule repeated 3× in the prompt:

Bucket Where docs live Examples
Internal-only (default) Inside molecule-controlplane (README.md, PLAN.md, docs/internal/) handler changes, schema migrations, fly.toml updates, billing logic, provisioner internals
Customer-facing (sanitized) Public docs site Molecule-AI/docs new tier, new region, new SLA, signup flow change, pricing change

When unsure → default to internal-only and ask PM before publishing.

Changes in this push (commit 41e39c2)

  • role description extended to cover all 3 repos with the privacy split
  • initial_prompt clones controlplane in step 1, reads README+PLAN in step 5, scans recent commits in step 8, lists 4 owned surfaces with public/private labels in step 10
  • Daily cron adds step 1b 'PAIR RECENT CONTROLPLANE PRS' with branching (internal vs customer-facing)
  • SETUP block adds cd /workspace/controlplane && git pull

What this means in practice

  • Daily 09:00 UTC tick scans merged PRs across BOTH molecule-monorepo AND molecule-controlplane
  • Internal controlplane changes get documented inside their own repo
  • Customer-facing controlplane changes get sanitized + opened as PRs against Molecule-AI/docs
  • Public docs never leak controlplane source code, file paths, internal endpoints, or schemas

Token: the agent will need read access to molecule-controlplane via its GitHub token. Add to follow-ups: ensure the workspace's GH credentials have access to the private repo before first cron tick.

@HongmingWang-Rabbit
HongmingWang-Rabbit merged commit b669b9f into main Apr 15, 2026
7 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the chore/template-documentation-specialist branch April 16, 2026 12:30
molecule-ai Bot pushed a commit that referenced this pull request Apr 21, 2026
…specialist

chore(template): add Documentation Specialist as 3rd PM direct report
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