feat: differentiate template operational configs#742
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🧰 Additional context used📓 Path-based instructions (4)docs/design/*.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
{**/*.py,cli/**/*.go}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
tests/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (14)📓 Common learnings📚 Learning: 2026-03-22T16:44:15.487ZApplied to files:
📚 Learning: 2026-03-16T06:24:56.341ZApplied to files:
📚 Learning: 2026-03-19T07:12:14.508ZApplied to files:
📚 Learning: 2026-03-19T07:12:14.508ZApplied to files:
📚 Learning: 2026-03-20T08:28:32.845ZApplied to files:
📚 Learning: 2026-03-17T06:30:14.180ZApplied to files:
📚 Learning: 2026-03-22T16:44:15.487ZApplied to files:
📚 Learning: 2026-03-15T18:28:13.207ZApplied to files:
📚 Learning: 2026-03-22T16:44:15.487ZApplied to files:
📚 Learning: 2026-03-15T18:28:13.207ZApplied to files:
📚 Learning: 2026-03-14T15:43:05.601ZApplied to files:
📚 Learning: 2026-03-19T07:12:14.508ZApplied to files:
📚 Learning: 2026-03-17T22:08:13.456ZApplied to files:
🧬 Code graph analysis (1)tests/unit/templates/test_loader.py (1)
🪛 LanguageTooldocs/design/communication.md[style] ~89-~89: Consider using a different adjective to strengthen your wording. (FULL_ENTIRE) 🔇 Additional comments (10)
WalkthroughUpdated operational defaults across built-in templates and documentation. Five YAML templates ( 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the operational profiles of built-in company templates by assigning specific autonomy levels, communication patterns, and workflow types to each archetype. It ensures that each template accurately reflects a distinct organizational structure and behavior. The changes are supported by new regression tests and comprehensive updates to the design documentation, enhancing clarity and consistency across the system. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively differentiates the operational configurations for the built-in templates, providing more meaningful archetypes. The changes are well-supported by updates to the documentation and a new parametrized regression test to prevent future regressions. My main feedback is a suggestion to improve maintainability by reducing data duplication between the new test and the documentation, which will make future updates easier and less error-prone.
tests/unit/templates/test_loader.py
Outdated
| [ | ||
| ("solo_founder", "full", "event_driven", "kanban"), | ||
| ("startup", "semi", "hybrid", "agile_kanban"), | ||
| ("dev_shop", "semi", "hybrid", "agile_kanban"), | ||
| ("product_team", "semi", "meeting_based", "agile_kanban"), | ||
| ("agency", "supervised", "hierarchical", "kanban"), | ||
| ("research_lab", "full", "event_driven", "kanban"), | ||
| ("full_company", "supervised", "hierarchical", "agile_kanban"), | ||
| ], |
There was a problem hiding this comment.
These hardcoded test parameters in @pytest.mark.parametrize duplicate the information that is now also present in the documentation table in docs/design/organization.md. This creates a maintenance challenge, as any future changes to these operational profiles will need to be updated in the YAML template, this test, and the documentation, increasing the risk of them becoming out of sync.
To improve maintainability and establish a single source of truth, you could consider creating a shared data file (e.g., a JSON or YAML file) that holds these configurations. The test could then load its parameters from this file, and the documentation could potentially be updated using a script that reads from the same file. This would ensure consistency across the codebase with less manual effort.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/unit/templates/test_loader.py`:
- Around line 356-376: The parameter matrix defined with pytest.mark.parametrize
(the ("name", "autonomy_level", "communication", "workflow") decorator and its
explicit "name" list) must be guarded so new built-in templates cannot be
missed; add an assertion in the same test that compares the set of parametrized
"name" values against the canonical list returned by the production code that
exposes built-in templates (call the loader function that lists built-ins in
your codebase, e.g., the function that returns available builtin template names)
and fail with a clear message if they differ so the test will break when a new
builtin is added.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 966d23d9-bb84-4f9b-8dcb-6bae9c712609
📒 Files selected for processing (9)
docs/design/communication.mddocs/design/operations.mddocs/design/organization.mdsrc/synthorg/templates/builtins/agency.yamlsrc/synthorg/templates/builtins/full_company.yamlsrc/synthorg/templates/builtins/product_team.yamlsrc/synthorg/templates/builtins/research_lab.yamlsrc/synthorg/templates/builtins/solo_founder.yamltests/unit/templates/test_loader.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Test (Python 3.14)
- GitHub Check: Build Sandbox
- GitHub Check: Build Web
- GitHub Check: Build Backend
- GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions (4)
docs/design/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
When approved deviations occur, update the relevant
docs/design/page to reflect the new reality.
Files:
docs/design/communication.mddocs/design/operations.mddocs/design/organization.md
**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.py: Nofrom __future__ import annotations—Python 3.14 has PEP 649 native lazy annotations.
Useexcept A, B:(no parentheses) per PEP 758 except syntax for Python 3.14.
Type hints are required on all public functions; use mypy strict mode.
Use Google-style docstrings required on public classes and functions, enforced by ruff D rules.
Fordict/listfields in frozen Pydantic models, rely onfrozen=Truefor field reassignment prevention and usecopy.deepcopy()at system boundaries (tool execution, LLM provider serialization, inter-agent delegation, persistence serialization).
Never mix static config fields with mutable runtime fields in one model. Use frozen Pydantic models for config/identity and separate mutable-via-copy models for runtime state that evolves.
Use Pydantic v2 (BaseModel,model_validator,computed_field,ConfigDict). Use@computed_fieldfor derived values instead of storing redundant fields. UseNotBlankStrfor all identifier/name fields (including optional and tuple variants) instead of manual whitespace validators.
Files:
tests/unit/templates/test_loader.py
{**/*.py,cli/**/*.go}
📄 CodeRabbit inference engine (CLAUDE.md)
Line length is 88 characters (enforced by ruff).
Files:
tests/unit/templates/test_loader.py
tests/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
tests/**/*.py: Use test markers:@pytest.mark.unit,@pytest.mark.integration,@pytest.mark.e2e,@pytest.mark.slow.
Test timeout is 30 seconds per test globally inpyproject.toml—do not add per-filepytest.mark.timeout(30)markers; only non-default overrides liketimeout(60)are allowed.
Prefer@pytest.mark.parametrizefor testing similar cases.
In tests, usetest-provider,test-small-001, etc. instead of vendor-specific names.
Use Hypothesis for property-based testing in Python with@givenand@settingsdecorators. Use profiles:ci(50 examples, default) anddev(1000 examples).
For timing-sensitive tests, mocktime.monotonic()andasyncio.sleep()to make them deterministic instead of widening timing margins.
For tasks that must block indefinitely until cancelled (e.g., simulating slow providers), useasyncio.Event().wait()instead ofasyncio.sleep(large_number)—it is cancellation-safe and carries no timing assumptions.
Files:
tests/unit/templates/test_loader.py
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-16T06:24:56.341Z
Learning: Applies to docs/design/**/*.md : Design specification pages in `docs/design/` must be consulted before implementing features (7 pages: index, agents, organization, communication, engine, memory, operations)
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-19T07:12:14.508Z
Learning: Applies to docs/design/*.md : Design spec pages: 7 pages in `docs/design/` — index, agents, organization, communication, engine, memory, operations
📚 Learning: 2026-03-22T16:44:15.487Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-22T16:44:15.487Z
Learning: Applies to docs/design/*.md : When approved deviations occur, update the relevant `docs/design/` page to reflect the new reality.
Applied to files:
docs/design/communication.md
📚 Learning: 2026-03-16T06:24:56.341Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-16T06:24:56.341Z
Learning: Applies to docs/design/**/*.md : Design specification pages in `docs/design/` must be consulted before implementing features (7 pages: index, agents, organization, communication, engine, memory, operations)
Applied to files:
docs/design/communication.mddocs/design/organization.md
📚 Learning: 2026-03-19T07:12:14.508Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-19T07:12:14.508Z
Learning: Applies to src/synthorg/communication/**/*.py : Communication package (communication/): message bus, dispatcher, messenger, channels, delegation, loop prevention, conflict resolution; meeting/ subpackage for meeting protocol (round-robin, position papers, structured phases), scheduler (frequency, participant resolver), orchestrator
Applied to files:
docs/design/communication.md
📚 Learning: 2026-03-20T08:28:32.845Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-20T08:28:32.845Z
Learning: Applies to src/synthorg/templates/**/*.py : Templates: pre-built company templates, personality presets, and builder.
Applied to files:
src/synthorg/templates/builtins/full_company.yamldocs/design/organization.md
📚 Learning: 2026-03-17T06:30:14.180Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T06:30:14.180Z
Learning: Applies to src/synthorg/budget/**/*.py : Budget tracking includes pre-flight/in-flight checks, auto-downgrade, billing periods, cost tiers, quota/subscription. CFO includes anomaly detection, efficiency analysis, downgrade recommendations.
Applied to files:
src/synthorg/templates/builtins/full_company.yaml
📚 Learning: 2026-03-17T22:08:13.456Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-17T22:08:13.456Z
Learning: Security: SecOps agent, rule engine (soft-allow/hard-deny, fail-closed), audit log, output scanner, output scan response policies (redact/withhold/log-only/autonomy-tiered), risk classifier, risk tier classifier, action type registry, ToolInvoker security integration, progressive trust (4 strategies: disabled/weighted/per-category/milestone), autonomy levels (presets, resolver, change strategy), timeout policies (park/resume).
Applied to files:
docs/design/operations.md
📚 Learning: 2026-03-19T07:12:14.508Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-19T07:12:14.508Z
Learning: Applies to docs/design/*.md : Design spec pages: 7 pages in `docs/design/` — index, agents, organization, communication, engine, memory, operations
Applied to files:
docs/design/organization.md
📚 Learning: 2026-03-14T15:43:05.601Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-14T15:43:05.601Z
Learning: Applies to docs/** : Docs source in docs/ (Markdown, built with Zensical); design spec in docs/design/ (7 pages: index, agents, organization, communication, engine, memory, operations)
Applied to files:
docs/design/organization.md
📚 Learning: 2026-03-19T07:12:14.508Z
Learnt from: CR
Repo: Aureliolo/synthorg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-19T07:12:14.508Z
Learning: Applies to src/synthorg/**/*.py : Package structure: src/synthorg/ organized as: api/ (REST+WebSocket, Litestar), auth/ (auth subpackage), backup/ (scheduled/manual backups), budget/ (cost tracking, CFO), cli/ (superseded by Go CLI), communication/ (message bus, meetings), config/ (YAML loading), core/ (domain models, resilience config), engine/ (orchestration, task state, coordination, approval gates, stagnation detection, context budget, compaction), hr/ (hiring, performance, promotion), memory/ (pluggable backend, Mem0, retrieval, consolidation), persistence/ (operational data, SQLite, settings), observability/ (logging, correlation, sinks), providers/ (LLM abstraction, LiteLLM, auth types, presets, runtime CRUD), settings/ (runtime-editable, typed definitions, encryption, config bridge), security/ (SecOps, rule engine, output scanning, progressive trust, autonomy levels), templates/ (company templates, personalities), tools/ (registry, built-in tools, git, sandbox, code_runner, MCP...
Applied to files:
docs/design/organization.md
🧬 Code graph analysis (1)
tests/unit/templates/test_loader.py (1)
src/synthorg/templates/loader.py (1)
load_template(161-217)
🪛 LanguageTool
docs/design/communication.md
[style] ~89-~89: Consider using a different adjective to strengthen your wording.
Context: ...arch Lab, hierarchical for Agency and Full Company, meeting_based for Product Te...
(FULL_ENTIRE)
🔇 Additional comments (10)
src/synthorg/templates/builtins/product_team.yaml (1)
108-109: Operational profile for Product Team is consistent.
communication: "meeting_based"paired withworkflow: "agile_kanban"is aligned with the intended archetype mapping.docs/design/operations.md (1)
845-847: Docs update cleanly captures autonomy-by-archetype behavior.Good addition of concrete examples plus a pointer to the Company Types table for full defaults.
src/synthorg/templates/builtins/agency.yaml (1)
25-25: Agency template operational defaults look correct.
supervisedautonomy andhierarchicalcommunication are coherent and aligned with the PR mapping.Also applies to: 121-121
src/synthorg/templates/builtins/solo_founder.yaml (1)
25-25: Solo Founder template change is aligned and consistent.
fullautonomy withevent_drivencommunication matches the intended lightweight, independent operation profile.Also applies to: 50-50
src/synthorg/templates/builtins/research_lab.yaml (1)
25-25: Research Lab defaults are correctly specialized.The switch to
fullautonomy andevent_drivencommunication is coherent for the archetype.Also applies to: 85-85
src/synthorg/templates/builtins/full_company.yaml (1)
33-33: Full Company operational profile update is appropriate.
supervisedautonomy plushierarchicalcommunication aligns well with full-hierarchy enterprise behavior.Also applies to: 246-246
docs/design/communication.md (1)
88-91: Communication docs now reflect archetype-driven defaults clearly.Good call adding concrete pattern examples and linking readers to the canonical Company Types table.
tests/unit/templates/test_loader.py (1)
351-388: Great regression coverage for operational config mapping.This parametrized test directly protects the archetype defaults across autonomy, communication, and workflow.
docs/design/organization.md (2)
12-21: Company Types operational profile table update is correct.The new columns and per-template defaults align with the intended differentiated operational configs and improve spec clarity.
176-177: Inline default-value annotations are helpful and accurate.Good clarification that these are template defaults and that per-template values are defined in the Company Types table.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #742 +/- ##
=======================================
Coverage 92.27% 92.27%
=======================================
Files 573 573
Lines 29655 29655
Branches 2870 2870
=======================================
Hits 27365 27365
Misses 1810 1810
Partials 480 480 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…tion, workflow) Assign each builtin template an operational profile matching its organizational archetype instead of using identical defaults everywhere. Closes #717 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add Autonomy/Communication/Workflow columns to Company Types table, add cross-references from Operations and Communication pages, fix stale "Recommended for Full Company" label on Hybrid pattern. Pre-reviewed by 5 agents, 5 findings addressed Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Addresses CodeRabbit feedback: test_matrix_covers_all_builtins() now asserts the parametrized test names match BUILTIN_TEMPLATES, so adding a new template without updating the config matrix fails immediately. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
f1c7ab0 to
540ccee
Compare
🤖 I have created a release *beep* *boop* --- ## [0.4.8](v0.4.7...v0.4.8) (2026-03-22) ### Features * add auto_cleanup config and improve update UX ([#741](#741)) ([289638f](289638f)) * add reporting lines, escalation paths, and workflow handoffs to templates ([#745](#745)) ([c374cc9](c374cc9)) * differentiate template operational configs ([#742](#742)) ([9b48345](9b48345)) * diversify personality preset assignments across templates ([#743](#743)) ([15487a5](15487a5)) * improve template metadata -- skill taxonomy, descriptions, tags, and display names ([#752](#752)) ([f333f24](f333f24)) ### Bug Fixes * resolve log analysis findings (Ollama prefix, logging, init) ([#748](#748)) ([8f871a4](8f871a4)) * use git tag for dev release container image tags ([#749](#749)) ([f30d071](f30d071)) * use subordinate_id/supervisor_id in HierarchyResolver ([#751](#751)) ([118235b](118235b)) ### Performance * add long-lived cache headers for content-hashed static assets ([#747](#747)) ([4d350b5](4d350b5)) * use worksteal distribution for pytest-xdist ([#750](#750)) ([b7dd7de](b7dd7de)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
autonomy.level,communication, andworkflowacross 7 builtin YAML templates so each archetype has a meaningful operational profilefullevent_drivenkanbansemihybridagile_kanbansemihybridagile_kanbansemimeeting_basedagile_kanbansupervisedhierarchicalkanbanfullevent_drivenkanbansupervisedhierarchicalagile_kanbanTest plan
TestBuiltinOperationalConfigsasserts all 7 templates' autonomy, communication, and workflow valuesCloses #717
🤖 Generated with Claude Code