Skip to content

feat(docs): top level docs for repository structure and sops#255

Merged
sergiofilhowz merged 1 commit into
mainfrom
feat/workers-arch-and-sop-documentation
Jun 12, 2026
Merged

feat(docs): top level docs for repository structure and sops#255
sergiofilhowz merged 1 commit into
mainfrom
feat/workers-arch-and-sop-documentation

Conversation

@sergiofilhowz

@sergiofilhowz sergiofilhowz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduce a top-level docs/ tree for worker onboarding and shared architecture, and repoint existing references to it.

  • docs/sops/ — procedures: new-worker.md (cross-cutting checklist), binary-worker.md (moved from repo root; sections 1–12 unchanged), release.md (cut, troubleshoot, verify)
  • docs/architecture/ — shared reference: worker model, iii.worker.yaml, deploy modes, CI/testing, skills/permissions, per-worker architecture docs
  • docs/README.md — navigation index (“I want to…” → doc)

Root README.md, worker-readme.md, and worker READMEs now link into docs/ instead of the old binary-worker.md / AGENTS-NEW-WORKER.md paths.

Notable details

  • binary-worker.md move is verbatim apart from link rewrites and a one-line header pointer; code comments citing §5/§7/§9/§11 still land on the same sections.
  • new-worker.md §6 documents the full release wiring surface (create-tag options, release tag patterns, ALLOWED_WORKERS, BOOTSTRAP_WORKERS) and flags known drift (email ships skills but isn’t in ALLOWED_WORKERS).
  • Stale harness reference removed — docs no longer cite harness/src/skills.rs::BOOTSTRAP_NAMES (file gone after TS harness rewrite); BOOTSTRAP_WORKERS in validate_worker.py is the source of truth.
  • session-manager release wiring — added to create-tag.yml options and release.yml tag patterns (small CI/CD fix bundled with the docs work).

Test plan

  • Relative links across docs/ and touched READMEs resolve
  • No remaining in-repo references to root binary-worker.md or AGENTS-NEW-WORKER.md
  • pytest .github/scripts/tests/ passes
  • docs/ not picked up by worker discovery (iii.worker.yaml absent)

Summary by CodeRabbit

  • Documentation

    • Added comprehensive architecture documentation covering worker model, lifecycle, deploy modes, YAML schema, skills, permissions, and testing/CI patterns.
    • Added standard operating procedures (SOPs) for creating new workers and releasing worker updates.
    • Added workers documentation hub with navigation and directory structure.
    • Updated documentation references across workers and configuration files.
  • Chores

    • Extended CI/CD workflows to support additional worker modules.
    • Updated validation error messages with improved documentation links.

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview, Comment Jun 12, 2026 7:00pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR restructures worker documentation by migrating from scattered legacy references to a centralized docs/sops/ and docs/architecture/ hierarchy, introducing comprehensive SOPs for adding workers and releasing versions, and expanding session-manager support in CI/CD automation.

Changes

Documentation Architecture and Workflow Updates

Layer / File(s) Summary
Documentation hubs and navigation structure
docs/README.md, docs/architecture/README.md, docs/sops/README.md
Creates entry-point README files organizing documentation into hubs: docs/ as the main workers documentation index with task-based navigation; docs/architecture/ as the shared architecture reference table of contents; and docs/sops/ as the standard operating procedures directory with checklist links and typical flow guidance.
Worker architecture reference: model, contract, and deployment
docs/architecture/worker-model.md, docs/architecture/iii-worker-yaml.md, docs/architecture/deploy-modes.md
Documents foundational worker concepts: lifecycle/discovery/communication model in worker-model.md; iii.worker.yaml schema with required/optional fields and examples in iii-worker-yaml.md; and deploy-mode semantics (binary/image/bundle) with CI routing, boot behavior, and config.collect.yaml handling in deploy-modes.md.
Standard operating procedures: new-worker and release
docs/sops/new-worker.md, docs/sops/release.md, docs/sops/binary-worker.md
Provides comprehensive checklists: new-worker.md covers folder naming, file requirements by deploy mode, repo registration, CI gates, test contracts, release wiring, skills authoring, and first-release preflight; release.md documents the full pipeline from tag creation through publish steps, registry semantics, variants, and troubleshooting; binary-worker.md is updated to reference new-worker.md and release.md.
Advanced architecture: testing, CI, skills, and per-worker documentation
docs/architecture/testing-and-ci.md, docs/architecture/skills-and-permissions.md, docs/architecture/per-worker-architecture.md
Detailed specifications: testing-and-ci.md covers worker discovery, PR validation rules, language-specific jobs, interface smoke testing, e2e workflows, and script tests; skills-and-permissions.md documents SKILL.md authoring/publishing and iii-permissions.yaml rule syntax; per-worker-architecture.md provides guidance for writing worker-specific architecture docs with recommended structure.
Validation script and workflow automation
.github/scripts/validate_worker.py, .github/workflows/create-tag.yml, .github/workflows/release.yml, README.md
Updates validate_worker.py to clarify bootstrap worker skills requirements and improve bundled-worker error messages with docs/sops/ paths; adds session-manager to workflow dispatch and tag trigger patterns; updates root README with new documentation structure, deploy-mode references, and CI/CD section guidance linking to testing-and-ci.md and release.md.
Distributed reference migration
coder/src/*, storage/src/*, coder/tests/*, storage/tests/*, email/README.md, iii-lsp/README.md, storage/README.md, todo-worker*/README.md, worker-readme.md
Across 14 files: updates documentation links and code comments from legacy AGENTS-NEW-WORKER.md or workers/binary-worker.md references to the new docs/sops/ paths, migrating guides to docs/sops/new-worker.md and verification checklists to docs/sops/binary-worker.md.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • iii-hq/workers#212: Updates to .github/scripts/validate_worker.py for skills/SKILL.md validation and error messaging in bootstrapped/bundled workers.
  • iii-hq/workers#110: Modifies .github/workflows/release.yml tag-trigger patterns overlapping with the session-manager integration in this PR.
  • iii-hq/workers#40: Refactors tag-driven publish and release pipeline that connects to the workflow and documentation updates for session-manager release automation.

Suggested reviewers

  • andersonleal
  • ytallo

Poem

🐰 Docs take flight, a forest fair,
SOPs bright with structure rare;
Session-manager joins the dance,
New-worker guides at every glance,
From chaos springs a schema bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main change: introducing top-level documentation for repository structure and standard operating procedures (SOPs), which aligns with the extensive docs additions and reference updates across the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/workers-arch-and-sop-documentation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 17 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/iii-worker-yaml.md`:
- Around line 24-27: Update the "targets" documentation to explicitly state that
any custom `targets` list must include the Linux boot artifact triple
`x86_64-unknown-linux-gnu` (the release path always boots that artifact), and
add a short warning that omitting it will allow publish to build but will fail
at boot; reference the existing default matrix in `_rust-binary.yml` for
examples and show a minimal example `targets:` snippet that preserves the
required triple.
- Around line 31-35: Update docs so it's clear that the interface_smoke field
controls both the interface boot smoke and the release workflow's registry
publish gating: document that setting interface_smoke: false disables the
interface boot smoke AND causes the release job gating condition
(needs.setup.outputs.interface_smoke != 'false') to skip the registry publish
while build jobs still run; amend docs/architecture/testing-and-ci.md to include
this behavior and ensure wording matches docs/architecture/iii-worker-yaml.md
where interface_smoke is described.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3ef0475a-68c7-495a-b28f-7917caa6ad00

📥 Commits

Reviewing files that changed from the base of the PR and between 5e81a6e and 80f2661.

📒 Files selected for processing (28)
  • .github/scripts/validate_worker.py
  • .github/workflows/create-tag.yml
  • .github/workflows/release.yml
  • README.md
  • coder/src/config.rs
  • coder/src/functions/mod.rs
  • coder/tests/integration.rs
  • coder/tests/manifest.rs
  • docs/README.md
  • docs/architecture/README.md
  • docs/architecture/deploy-modes.md
  • docs/architecture/iii-worker-yaml.md
  • docs/architecture/per-worker-architecture.md
  • docs/architecture/skills-and-permissions.md
  • docs/architecture/testing-and-ci.md
  • docs/architecture/worker-model.md
  • docs/sops/README.md
  • docs/sops/binary-worker.md
  • docs/sops/new-worker.md
  • docs/sops/release.md
  • email/README.md
  • iii-lsp/README.md
  • storage/README.md
  • storage/src/config.rs
  • storage/tests/integration.rs
  • todo-worker-python/README.md
  • todo-worker/README.md
  • worker-readme.md

Comment on lines +24 to +27
When `targets` is omitted, all nine default triples are built: macOS
x86_64/aarch64, Windows x86_64/i686/aarch64, Linux x86_64 gnu/musl,
aarch64 gnu, and armv7 gnueabihf (the matrix lives in
[`_rust-binary.yml`](../../.github/workflows/_rust-binary.yml)).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Call out the required Linux boot target.

The targets list reads like an arbitrary subset, but the release path always boots the x86_64-unknown-linux-gnu artifact. If a manifest omits that triple, publish will build successfully but fail at boot time. Please document that custom targets must keep the Linux gnu target.

🛠️ Suggested doc tweak
-When `targets` is omitted, all nine default triples are built: macOS
-x86_64/aarch64, Windows x86_64/i686/aarch64, Linux x86_64 gnu/musl,
-aarch64 gnu, and armv7 gnueabihf (the matrix lives in
-[`_rust-binary.yml`](../../.github/workflows/_rust-binary.yml)).
+When `targets` is omitted, all nine default triples are built: macOS
+x86_64/aarch64, Windows x86_64/i686/aarch64, Linux x86_64 gnu/musl,
+aarch64 gnu, and armv7 gnueabihf (the matrix lives in
+[`_rust-binary.yml`](../../.github/workflows/_rust-binary.yml)).
+
+If you override `targets`, keep `x86_64-unknown-linux-gnu` in the list;
+publish boots that artifact.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
When `targets` is omitted, all nine default triples are built: macOS
x86_64/aarch64, Windows x86_64/i686/aarch64, Linux x86_64 gnu/musl,
aarch64 gnu, and armv7 gnueabihf (the matrix lives in
[`_rust-binary.yml`](../../.github/workflows/_rust-binary.yml)).
When `targets` is omitted, all nine default triples are built: macOS
x86_64/aarch64, Windows x86_64/i686/aarch64, Linux x86_64 gnu/musl,
aarch64 gnu, and armv7 gnueabihf (the matrix lives in
[`_rust-binary.yml`](../../.github/workflows/_rust-binary.yml)).
If you override `targets`, keep `x86_64-unknown-linux-gnu` in the list;
publish boots that artifact.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~26-~26: The official name of this software platform is spelled with a capital “H”.
Context: ...nd armv7 gnueabihf (the matrix lives in _rust-binary.yml). ## Opt-o...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/iii-worker-yaml.md` around lines 24 - 27, Update the
"targets" documentation to explicitly state that any custom `targets` list must
include the Linux boot artifact triple `x86_64-unknown-linux-gnu` (the release
path always boots that artifact), and add a short warning that omitting it will
allow publish to build but will fail at boot; reference the existing default
matrix in `_rust-binary.yml` for examples and show a minimal example `targets:`
snippet that preserves the required triple.

Comment on lines +31 to +35
| Field | Purpose | Consumer |
|---|---|---|
| `interface_smoke: false` | Skip interface boot smoke + registry publish | `ci.yml`, `release.yml` |
| `runtime` / `scripts.start` | Local boot definition; presence routes publish boot to `iii-add` for non-binary/bundle deploys | `manifest_version.py deploy-mode`, `iii worker add` |
| `scripts.install` | Build command for local install | `iii worker add` (local source) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "interface_smoke" .github/workflows .github/scripts

Repository: iii-hq/workers

Length of output: 1359


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show release.yml semantics around the interface_smoke gate
sed -n '1,260p' .github/workflows/release.yml | nl -ba | sed -n '1,260p'

# Show ci.yml semantics around the interface_smoke gate
sed -n '150,260p' .github/workflows/ci.yml | nl -ba | sed -n '1,260p'

# Find and show documentation text about interface_smoke (e.g., testing-and-ci.md)
rg -n "interface_smoke" docs -S || true
rg -n "interface_smoke" . -S --glob '!**/node_modules/**' --glob '!**/dist/**' | head -n 50

Repository: iii-hq/workers

Length of output: 101


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show relevant parts of release.yml (with line numbers via cat -n)
cat -n .github/workflows/release.yml | sed -n '1,260p'

# Show relevant parts of ci.yml
cat -n .github/workflows/ci.yml | sed -n '150,260p'

# Locate docs and show the surrounding interface_smoke text
rg -n "interface_smoke" docs -S || true
docfile="$(rg -l "interface_smoke" docs -S | head -n 1 || true)"
if [ -n "$docfile" ]; then
  echo "=== $docfile ==="
  cat -n "$docfile" | sed -n '1,260p'
fi

# Also print the specific comment blocks near the earlier matches in workflows
rg -n "A worker may declare `interface_smoke: false`|opts out of interface boot smoke|interface_smoke != 'false'|needs.setup.outputs.interface_smoke != 'false'" .github/workflows -S

Repository: iii-hq/workers

Length of output: 24968


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the exact table row in the file under review
echo "=== docs/architecture/iii-worker-yaml.md (around interface_smoke) ==="
cat -n docs/architecture/iii-worker-yaml.md | sed -n '1,120p'

# Show testing-and-ci.md section that defines interface_smoke opt-out semantics
echo "=== docs/architecture/testing-and-ci.md (interface_smoke section) ==="
cat -n docs/architecture/testing-and-ci.md | sed -n '1,140p'

# Show any other doc references for cross-check
echo "=== Other docs mentioning interface_smoke ==="
rg -n "interface_smoke" docs/architecture -S

Repository: iii-hq/workers

Length of output: 7704


Clarify interface_smoke: false scope across CI vs release docs.

interface_smoke: false skips the interface boot smoke and gates the release workflow’s registry publish job (needs.setup.outputs.interface_smoke != 'false'), while build jobs still run. docs/architecture/testing-and-ci.md should mention this (so it doesn’t read like a CI-only smoke opt-out), keeping it consistent with docs/architecture/iii-worker-yaml.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/iii-worker-yaml.md` around lines 31 - 35, Update docs so
it's clear that the interface_smoke field controls both the interface boot smoke
and the release workflow's registry publish gating: document that setting
interface_smoke: false disables the interface boot smoke AND causes the release
job gating condition (needs.setup.outputs.interface_smoke != 'false') to skip
the registry publish while build jobs still run; amend
docs/architecture/testing-and-ci.md to include this behavior and ensure wording
matches docs/architecture/iii-worker-yaml.md where interface_smoke is described.

@sergiofilhowz sergiofilhowz merged commit cccef22 into main Jun 12, 2026
25 checks passed
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.

2 participants