Commit 94b879d
authored
docs(agents): accurate guidance, guardrail map, and check:guidance-refs (#8557)
* fix(audits): guard the route wrapper against lib/mothership, not the removed lib/copilot
The Copilot modules moved to lib/mothership in the v1.0.0 rename, so the
route-wrapper graph guard was banning a directory that no longer exists.
* improvement(audits): add check:guidance-refs and fix the stale references it found
Agent guidance (CLAUDE.md, every AGENTS.md, .claude/rules, .agents/skills)
names paths, scripts, skills, and import specifiers that agents follow
literally. The new audit resolves each one and fails on any that no longer
exists. Fixes the references it found: lib/copilot -> lib/mothership,
stores/workflows/store -> stores/workflows/workflow/store, a relative landing
path, deleted selector-provider and legacy landing mentions, and illustrative
example imports rewritten as placeholders.
* improvement(audits): check rule frontmatter globs in check:guidance-refs
A paths glob that matches nothing silently stops the rule from loading.
sim-api-contracts still targeted the removed apps/sim/hooks/selectors; drop
it, and name check:api-validation:strict as the gate the rule describes.
* docs(agents): consolidate guidance and add the local gate to CLAUDE.md
- CLAUDE.md: "How your work is checked" (the local gate and a rule-to-check
map), sharper comment rules (no narration, restated names, or change
history), drop filler, fix the type-check command description.
- Rules: one source for the text scale (sim-styling), use-client boundary
(sim-queries), testing principles (CLAUDE.md); fix an in-place sort in a
list-ordering example and an ESLint directive the repo does not use; drop
change-history narration and rotting line-number references.
* docs(agents): fix stale facts in connector, model, column-type, and selector skills
Verified against the code: fetchWithRetry moved to secure-fetch.server,
deletion reconciliation is checkpoint.unsafe (shouldReconcileDeletions is
gone), the legacy Search toggle is removed, inline-content connectors may
hash content, reasoningEffort/thinking provider lists, column-type metadata
update path, check:api-validation:strict as the gate. CLAUDE.md now names
the coerceValue switch and relative barrel re-exports as the documented
exceptions the code relies on. Selector rules in connector skills point at
validate-selector instead of restating it.
* docs(agents): fix contradictions and stale facts in platform skills
tool-registry-boundary told tests to re-mock a global (check:test-patterns
fails that); db-migrate listed a nonexistent annotate rule and omitted the
pending-drop-tables contract; permission-group skills cited a removed
descriptions record, a nonexistent key-order test, and a single
principal-wide capability where there are two; v2-api-conventions cited a
removed helper; memory-load-check called a pattern the connectors use
cargo-culting. Gates now name check:api-validation:strict / check:audits,
ship runs CI's schema/migration sync step, test-audit points at CLAUDE.md
instead of copying it, and incident narration became current-state rules.
* docs(agents): align UI skills with the settings, emcn, and state rules
add-settings-page's audit greps used a pathspec that matches nothing, and
its registration steps named types that no longer exist
(SETTINGS_SECTION_REGISTRY and SECTION_MODULES are the mechanism). The
emcn review taught the legacy Button variants and a destructive Delete
chip that sim-settings-pages forbids. The design skills now carry repo
precedence notes (no global styles, emcn owns chrome, framer-motion,
hover-hover:, fixed fonts and weights). The you-might-not-need-* skills
recognize URL state, the list-preference exception, and the Map memo the
component rule prescribes.
* docs(agents): fix contradictions and stale facts in integration skills
Verified against the code: tags live on BlockMeta, not BlockConfig;
check-block-registry requires required user-only params to be filled by a
subBlock of the same id, so remapping them in tools.config.params fails CI;
subblock ids are unique per condition; matchEvent may return a
NextResponse; createHmacVerifier needs requireSecret to fail closed;
FileToolProcessor is executor-side; provider scopes live in
lib/auth/connectors/providers.ts; BYOK needs PROVIDER_SECTIONS; polling
crons need the matching docker/crontab line. Duplicated option-list and
regenerate sections now point at one copy.
* docs(agents): map the new ratchets and lint rules in the guardrail table
* docs(agents): correct audit findings in guidance and gate docs
Restore the connector byte-cap rule's skip list, list every CI gate step,
name the real baseline flags and generated-artifact checks, make
api-validation strict-only guidance explicit, pass a base ref to
check-block-registry, and teach check:guidance-refs about bun run --cwd.
* docs(agents): drop the hand-kept rule-to-check table from CLAUDE.md
Name the enforcing check on the rule's own bullet instead, and tighten the
Comments bullet.
* improvement(audits): share rule frontmatter parsing and fail on dead graph guards
check:guidance-refs reuses sync-skills' parseRule, reads workspace manifests
once from the root workspaces globs, and matches rule globs against one git
listing instead of a filesystem scan per glob (~2.5s to ~0.2s). Markdown
links now go through the shared path check. check:application-graph fails
when a forbidden prefix matches nothing under apps/sim.
* fix(audits): resolve wildcard and root package exports, ignore deleted files and test-only guards
check:guidance-refs now requires a bare @sim/<pkg> import to have a '.' export, checks that a wildcard export match maps to an existing file, and drops index entries missing from the working tree before matching rule path globs. check:application-graph no longer counts a leftover test file as keeping a non-directory forbidden prefix alive.
* docs(agents): correct review findings in skills and rules
Scope SSRF, client-boundary, forcedToolUse, canonicalParamId, integration metadata, and HEAD claims to what the code does; fix the ship migration pathspec, the babysit conflict path, enrichment folder placeholders, framer-motion samples, and stale connector and column-type references.
* fix(audits): resolve import specifiers to module files only; tighten review-flagged guidance
* docs(agents): keep the repo-wide ES2023 ban in sim-components after rebase
* fix(audits): require exact export targets to exist and resolve markdown links strictly
* fix(audits): check require() specifiers and keep path resolution inside the repo1 parent 588b8ce commit 94b879d
73 files changed
Lines changed: 856 additions & 615 deletions
File tree
- .agents/skills
- add-block-preview
- add-block
- add-column-type
- add-connector
- add-enrichment
- add-hosted-key
- add-integration
- add-managed-cli
- add-model
- add-permission-group-item
- add-selector
- add-settings-page
- add-tools
- add-trigger
- babysit
- cleanup
- db-migrate
- design-taste-frontend
- emcn-design-review
- emil-design-eng
- make-interfaces-feel-better
- memory-load-check
- migrate-application-operation
- react-query-best-practices
- ship
- test-audit
- tool-registry-boundary
- v2-api-conventions
- validate-connector
- validate-integration
- validate-model
- validate-permission-group-item
- validate-selector
- validate-trigger
- you-might-not-need-a-comment
- you-might-not-need-a-memo
- you-might-not-need-state
- you-might-not-need-url-state
- .claude/rules
- .cursor/rules
- apps/sim/app/(landing)
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | 373 | | |
376 | 374 | | |
377 | 375 | | |
| |||
500 | 498 | | |
501 | 499 | | |
502 | 500 | | |
| 501 | + | |
503 | 502 | | |
504 | 503 | | |
505 | 504 | | |
| |||
616 | 615 | | |
617 | 616 | | |
618 | 617 | | |
619 | | - | |
| 618 | + | |
620 | 619 | | |
621 | 620 | | |
622 | 621 | | |
| |||
679 | 678 | | |
680 | 679 | | |
681 | 680 | | |
682 | | - | |
| 681 | + | |
683 | 682 | | |
684 | 683 | | |
685 | 684 | | |
| |||
697 | 696 | | |
698 | 697 | | |
699 | 698 | | |
700 | | - | |
| 699 | + | |
701 | 700 | | |
702 | 701 | | |
703 | 702 | | |
| |||
726 | 725 | | |
727 | 726 | | |
728 | 727 | | |
729 | | - | |
730 | 728 | | |
731 | 729 | | |
732 | 730 | | |
733 | 731 | | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
734 | 745 | | |
735 | 746 | | |
736 | 747 | | |
| |||
748 | 759 | | |
749 | 760 | | |
750 | 761 | | |
| 762 | + | |
751 | 763 | | |
752 | 764 | | |
753 | 765 | | |
| |||
778 | 790 | | |
779 | 791 | | |
780 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
781 | 800 | | |
782 | 801 | | |
783 | 802 | | |
| |||
937 | 956 | | |
938 | 957 | | |
939 | 958 | | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
959 | 965 | | |
960 | 966 | | |
961 | 967 | | |
962 | 968 | | |
963 | | - | |
| 969 | + | |
964 | 970 | | |
965 | 971 | | |
966 | 972 | | |
| |||
996 | 1002 | | |
997 | 1003 | | |
998 | 1004 | | |
999 | | - | |
| 1005 | + | |
1000 | 1006 | | |
1001 | 1007 | | |
1002 | 1008 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
| 145 | + | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
160 | 160 | | |
0 commit comments