Skip to content

Add Patterns docs section with 4 seed patterns#67

Merged
chris-colinsky merged 5 commits into
mainfrom
feature/patterns-docs-section
May 24, 2026
Merged

Add Patterns docs section with 4 seed patterns#67
chris-colinsky merged 5 commits into
mainfrom
feature/patterns-docs-section

Conversation

@chris-colinsky
Copy link
Copy Markdown
Member

@chris-colinsky chris-colinsky commented May 24, 2026

Summary

  • Adds a Patterns docs section at docs/patterns/, sibling to Concepts in the site nav
  • Seeds with 4 patterns drawn from downstream usage: parameterized entry point, tool-dispatch-as-node, session-as-checkpoint-resume, bypass-if-output-exists
  • Each page follows a problem / approach / snippet / when-right + when-not / cross-references structure
  • Updates mkdocs.yml nav (Patterns between Concepts and Examples) and the mkdocs-llmstxt plugin sections so patterns also surface in /llms-full.txt
  • Adds an entry to CHANGELOG under [Unreleased]

Patterns are user-level how-to recipes composing existing primitives, not framework contracts. New patterns can be added without spec coordination.

Test plan

  • uv run mkdocs build --strict succeeds
  • Preview http://127.0.0.1:8765/patterns/ via uv run mkdocs serve
  • Verify Patterns appears in nav between Concepts and Examples
  • After merge + deploy, verify https://openarmature.ai/patterns/ resolves and /llms-full.txt includes the patterns content

Add docs/patterns/, sibling to Concepts, seeded with four recipes
from downstream usage: parameterized entry point, tool-dispatch-
as-node, session-as-checkpoint-resume, and bypass-if-output-exists.

Each page follows a problem / approach / snippet / when-right-and-
when-not / cross-references structure. Patterns are user-level
how-to recipes composing existing primitives, not framework
contracts; new patterns can be added without spec coordination.

Updates mkdocs.yml nav (Patterns between Concepts and Examples)
and the llmstxt plugin sections. CHANGELOG notes the addition
under Unreleased.
Copilot AI review requested due to automatic review settings May 24, 2026 21:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Patterns” section to the MkDocs documentation site, intended to provide user-level recipes that compose existing OpenArmature primitives (rather than introducing new framework contracts).

Changes:

  • Adds docs/patterns/ with an index page and 4 seeded pattern pages.
  • Updates mkdocs.yml nav and llmstxt plugin sections so Patterns appear in site navigation and /llms-full.txt.
  • Adds an “[Unreleased]” changelog entry for the new docs section.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
mkdocs.yml Adds Patterns to nav and to llmstxt sections so they render and export.
docs/patterns/index.md Introduces the Patterns section and catalog links.
docs/patterns/parameterized-entry-point.md Documents a state-driven “router” entry pattern (snippet currently has runnable-code issues).
docs/patterns/tool-dispatch-as-node.md Documents an agent tool loop pattern (snippet currently has type/validity issues).
docs/patterns/session-as-checkpoint-resume.md Documents multi-turn state via resume (snippet currently has API mismatch issues).
docs/patterns/bypass-if-output-exists.md Documents output-bypass middleware pattern.
CHANGELOG.md Notes the addition of the Patterns docs section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/patterns/tool-dispatch-as-node.md Outdated
Comment thread docs/patterns/tool-dispatch-as-node.md
Comment thread docs/patterns/session-as-checkpoint-resume.md Outdated
Comment thread docs/patterns/session-as-checkpoint-resume.md Outdated
Comment thread docs/patterns/parameterized-entry-point.md Outdated
Comment thread CHANGELOG.md Outdated
Pattern 1: clarify the router lambda's inline comment so a reader
who lands mid-snippet without the surrounding prose still sees
the intent.

Pattern 3: switch state messages to list[Message] for consistency
with pattern 2, add the Message import, and use attribute access
(.content) rather than dict subscript at the read site.

Per spec review on PR #67.
Pattern 1 (parameterized-entry-point): convert plan, execute,
report to async def to match GraphBuilder.add_node's signature
(Callable[[StateT], Awaitable[...]]); replace the inline router
lambda with a named async router function since lambdas cannot
be async.

Pattern 2 (tool-dispatch-as-node): replace the set-literal
parameters={...} with a minimal JSON Schema dict; add import json
and serialize non-string tool outputs before constructing
ToolMessage, since ToolMessage.content is typed str.

Pattern 3 (session-as-checkpoint-resume): SQLiteCheckpointer's
constructor parameter is path, not db_path.

CHANGELOG: align the structure phrasing with the actual page
headings (when this is the right pattern / when it isn't).
Copilot AI review requested due to automatic review settings May 24, 2026 21:59
SQLiteCheckpointer's constructor parameter is path, not db_path.
Same typo as the patterns snippet flagged in PR review; surfaced
while grepping for other occurrences.

The tests and examples reference a local variable named db_path
but pass it positionally (or via path=db_path), which is correct.
This concept page is the only remaining spot using db_path= as a
kwarg.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread docs/patterns/tool-dispatch-as-node.md Outdated
Comment thread docs/patterns/session-as-checkpoint-resume.md Outdated
Match the convention in docs/concepts/state-and-reducers.md.
Pattern 2 and pattern 3 State models had list/dict fields with
mutable defaults (=[], ={}); convert to Field(default_factory=...)
and import Field from pydantic.

Patterns 1 and 4 have no mutable defaults so they're unchanged.
@chris-colinsky chris-colinsky merged commit e9f14e4 into main May 24, 2026
6 checks passed
@chris-colinsky chris-colinsky deleted the feature/patterns-docs-section branch May 24, 2026 22:07
@chris-colinsky chris-colinsky mentioned this pull request May 26, 2026
6 tasks
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