Skip to content

docs(skill): teach this season's flow anti-patterns in the automation authoring skill#1921

Merged
os-zhuang merged 1 commit into
mainfrom
docs/automation-skill-antipatterns
Jun 15, 2026
Merged

docs(skill): teach this season's flow anti-patterns in the automation authoring skill#1921
os-zhuang merged 1 commit into
mainfrom
docs/automation-skill-antipatterns

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Upstream root-cause fix for AI authoring mistakes. The objectstack-ai/templates are AI-written, so the highest-leverage prevention is teaching the AI the correct patterns at the source — not only catching them at build. This complements the build-time guardrails landed this session (#1918 / #1920): skill = source, lint = safety net.

What

Adds a "Valid-but-silently-wrong (passes build, fails at runtime)" subsection to skills/objectstack-automation → Common Pitfalls, capturing every anti-pattern fixed or linted this season, each with ❌/✅:

  1. Single-brace value interpolation{var} / {record.tags.0} (array index) / {$User.Id} / {TODAY()+30}; NOT {{double}} (formula dialect) or bare $source.id (literal). ([P2] flow: create_record node value semantics ambiguous (literal vs CEL vs macro vs ref) #1315)
  2. create_record outputVariable holds the RECORD{newRec.id}, not {newRec}. ([P2] create_record outputVariable may not be referenceable in later flow nodes (needs confirm) #1873)
  3. Time-relative rules = schedule + range query, not record-change == date-equality. ([P2] Provide a declarative time-relative trigger (avoid fragile date-equality on record-change) #1874)
  4. script nodes must name a callable — built-in actionType or a function via defineStack({ functions }); inline config.script is not executed. ([P1] Flow action/script nodes pointing to unregistered callables silently no-op; no template fn-registration path #1870)
  5. Conditions are bare CEL / stdlib-only — unknown functions fail the build; don't wrap field refs in {…}. ([P1] Flow trigger conditions with unknown functions are silently skipped (no error, passes build) #1877 / Record-change trigger plugin loads but flows never fire on data writes (7.4.1) #1491)

Verification

Docs-only. pnpm check:skill-docs passes (the generated skills/README.md + content/docs/guides/skills.mdx derive from SKILL.md frontmatter, which is unchanged). Empty changeset (no package version change).

This is the "source" half of the project's core goal (prevent AI authoring mistakes); the build lints are the "safety net" half.

🤖 Generated with Claude Code

… authoring skill

Upstream root-cause fix for AI authoring mistakes: the templates are AI-written,
so the highest-leverage prevention is teaching the AI the correct patterns at the
source, not only catching them at build.

Adds a "Valid-but-silently-wrong (passes build, fails at runtime)" subsection to
skills/objectstack-automation Common Pitfalls, capturing the anti-patterns fixed/
linted this season, each with ❌/✅:
- single-brace value interpolation; no `{{double}}` / bare `$ref` (#1315)
- `create_record` outputVariable is the RECORD → `{var.id}` (#1873)
- time-relative rules = schedule + range query, NOT record-change date-equality (#1874)
- `script` nodes must name a built-in actionType or a registered `function`;
  inline `config.script` is not executed (#1870)
- conditions are bare CEL using only the stdlib; unknown fns fail the build;
  don't wrap field refs in `{…}` (#1877/#1491)

Docs-only; `check:skill-docs` passes (frontmatter-derived docs unaffected); empty changeset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 15, 2026 3:43pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling size/s labels Jun 15, 2026
@os-zhuang
os-zhuang merged commit 3efadb5 into main Jun 15, 2026
13 checks passed
@os-zhuang
os-zhuang deleted the docs/automation-skill-antipatterns branch June 15, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant