@ethlete/agent-rules 0.1.0-next.1 → 0.1.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @ethlete/agent-rules
2
2
 
3
+ ## 0.1.0-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ca0bf2f`](https://github.com/ethlete-io/ethdk/commit/ca0bf2f09cd5bd925da52bdb17c93bb62bda8735) Thanks [@TomTomB](https://github.com/TomTomB)! - The `comments` rule is now an allowlist: four kinds of comment are allowed and everything else gets deleted.
8
+
9
+ ## 0.1.0-next.2
10
+
11
+ ### Minor Changes
12
+
13
+ - [#3043](https://github.com/ethlete-io/ethdk/pull/3043) [`a311f80`](https://github.com/ethlete-io/ethdk/commit/a311f80455bc9cc9a925fe8f72ac945a1b057315) Thanks [@github-actions](https://github.com/apps/github-actions)! - New `sdk-source` and `sdk-local-build` skills let an agent read the SDK's own sources and test an unreleased build via `file:`, from the checkout named by the local config's new `sdkSourcePath`.
14
+
15
+ ### Patch Changes
16
+
17
+ - [#3043](https://github.com/ethlete-io/ethdk/pull/3043) [`9627646`](https://github.com/ethlete-io/ethdk/commit/96276462e1c2ecde5394b8b1eafcebbb9f56a973) Thanks [@github-actions](https://github.com/apps/github-actions)! - Styleguide: changeset notes are now capped at one to two sentences, with mechanism and API inventories
18
+ explicitly sent to the docs instead.
19
+
3
20
  ## 0.1.0-next.1
4
21
 
5
22
  ### Minor Changes
package/README.md CHANGED
@@ -136,23 +136,33 @@ Available hooks:
136
136
  past 200k input tokens bills the whole context at a premium rate, so the warnings
137
137
  fire at ~140k/~170k instead of deep into the expensive range.
138
138
 
139
- ### Disabling hooks per machine
139
+ Hooks can be turned off per machine - see the local config below.
140
140
 
141
- A gitignored `ethlete-agents.config.local.json` at the repo root turns generated hooks
142
- off for one developer without touching any committed file:
141
+ ## Per-machine local config
142
+
143
+ A gitignored `ethlete-agents.config.local.json` at the repo root holds the values that
144
+ differ per developer, without touching any committed file:
143
145
 
144
146
  ```json
145
147
  {
146
- "disableHooks": true
148
+ "disableHooks": true,
149
+ "sdkSourcePath": "/absolute/path/to/ethlete-sdk"
147
150
  }
148
151
  ```
149
152
 
150
- `true` disables every generated hook; an array (`["context-warning"]`) just the named
151
- ones. The hook scripts read this file at runtime, so toggling takes effect on the next
152
- prompt - no `sync` needed - and the generated files stay identical on every machine and
153
- in CI. That is also why the local file supports nothing else: sync output must never
154
- depend on it, and `sync`/`check` warn if it contains other keys. Add the filename to
155
- your repo's `.gitignore`.
153
+ - **`disableHooks`** - `true` disables every generated hook; an array
154
+ (`["context-warning"]`) just the named ones. The hook scripts read the file at
155
+ runtime, so toggling takes effect on the next prompt - no `sync` needed.
156
+ - **`sdkSourcePath`** - a local `ethlete-sdk` checkout. The `sdk-source` and
157
+ `sdk-local-build` skills read it when the agent needs the SDK's own sources, or has to
158
+ build the SDK and install it here through a `file:` dependency. A relative path is
159
+ resolved from the repo root.
160
+
161
+ Everything in this file is read at runtime, never by `sync`: the generated files stay
162
+ identical on every machine and in CI, which is what lets `check` diff them. That is also
163
+ why the file takes nothing beyond these keys - `sync`/`check` warn about unknown keys,
164
+ and about an `sdkSourcePath` that is missing or is not an SDK checkout. Add the filename
165
+ to your repo's `.gitignore`.
156
166
 
157
167
  ## Authoring content
158
168
 
@@ -1,31 +1,61 @@
1
1
  ---
2
2
  name: comments
3
- description: Write comments for the next reader of the file, not for the reviewer of your change.
3
+ description: Comments are an allowlist of four cases. Everything else gets deleted before the change is done.
4
4
  kind: rule
5
5
  scope: both
6
6
  ---
7
7
 
8
- ## Comments: write for the next reader of this file, not for the reviewer of your change
8
+ ## Comments: almost none, and never for the reviewer of your change
9
9
 
10
- A comment earns its place by telling someone **using or editing this code** something the
11
- code cannot. Explaining _why the change was made_ is not that — it belongs in the commit
12
- message, the changeset, or the docs.
10
+ **Write no comment unless it fits one of the four cases below.** This is an allowlist, not a
11
+ set of tips. Anything outside it gets **deleted** before you call the change done — not
12
+ softened, not shortened. Code that needs prose to be understood needs a better name, a
13
+ smaller function, or a type; fix that instead of narrating it.
13
14
 
14
- Do **not** leave behind:
15
+ ### The only comments allowed
15
16
 
16
- - **Rationale for a mechanical choice.** `Record<Size, X>` with literal keys, a `@__PURE__`
17
- annotation, a factory instead of a literal, a helper moved to another file — the type,
18
- the annotation and the import already say what happens.
19
- - **Migration narration.** "moved here from X", "used to be a tuple", "so Y no longer pulls Z".
20
- Git knows. A reader six months from now does not care.
21
- - **The same explanation repeated per call site.** If a pattern needs explaining, explain it
22
- once where the pattern is defined (the helper's JSDoc, the lint rule's message, the guide)
23
- and let every use site stay silent.
24
- - **Restating the code.** `// increment the counter` above `counter++`.
17
+ 1. **An ordering or timing constraint** a reasonable edit would break. Say what breaks.
18
+ 2. **An invariant the types cannot express**, that a caller or a future edit could violate.
19
+ 3. **A workaround**, naming its concrete cause (browser bug, upstream issue, framework
20
+ limitation) and linking it where a link exists, so the next reader can tell when it may go.
21
+ 4. **Public API JSDoc** — what it does and how to call it, on something a lib actually
22
+ exports. One or two sentences. Not internals, not history, not why it is shaped that way.
25
23
 
26
- Do keep: non-obvious behaviour and ordering constraints, a real invariant a future edit could
27
- break, a workaround with the reason it exists, and public API JSDoc (what it does and how to
28
- use it — not why it is shaped that way).
24
+ Nothing else qualifies. Not "this is subtle", not "worth noting", not a heading over a group
25
+ of members, not a summary of the function underneath it.
29
26
 
30
- When you catch yourself writing "because", check whether the sentence is aimed at the reviewer
31
- of your diff. If it is, cut it.
27
+ ### The test each one still has to pass
28
+
29
+ Delete it unless **both** are true:
30
+
31
+ - a competent reader who never sees your diff would be **surprised** without it, and
32
+ - a future edit could **break something** that this sentence is the only warning about.
33
+
34
+ Unsure counts as no. A missing comment costs a minute of reading; a stale one misleads for
35
+ years.
36
+
37
+ ### Always delete
38
+
39
+ - **Restating the code** — `// increment the counter` over `counter++`; a JSDoc on `size` that
40
+ says nothing beyond "the size of the button".
41
+ - **Section headers and dividers** — `// --- Inputs ---`, `// Helpers`, `// Public API`.
42
+ - **Rationale for a mechanical choice** — `Record<Size, X>` with literal keys, a `@__PURE__`
43
+ annotation, a factory instead of a literal, a helper moved into its own file. The type, the
44
+ annotation and the import already say what happens.
45
+ - **Migration narration** — "moved here from X", "used to be a tuple", "so Y no longer pulls
46
+ Z", "renamed for clarity". Git knows; the next reader does not care.
47
+ - **The same explanation at every call site.** Explain a pattern once where it is defined (the
48
+ helper's JSDoc, the lint rule's message, the guide) and let every use site stay silent.
49
+ - **Commented-out code.**
50
+ - **`TODO`/`FIXME` without an issue link.** Fix it now or leave nothing.
51
+ - **Hedging and meta** — "note that", "for clarity", "just in case", "this is cleaner", "we
52
+ could also…".
53
+
54
+ ### Before you call the change done
55
+
56
+ Re-read every comment in your diff and cut the ones that are not one of the four. Then fix or
57
+ delete any existing comment your change made wrong — one describing behaviour that no longer
58
+ exists is worse than none.
59
+
60
+ Two signals you have already over-commented: you wrote the word "because", or the diff adds
61
+ more than a handful of comments. Both mean go back and cut.
@@ -68,3 +68,4 @@ So the table guide is `{%docsBaseUrl%}/components/table`, the menu guide
68
68
 
69
69
  - Data fetching has its own guide: {%skill:query%}
70
70
  - Theming tokens and how to register themes: {%skill:theming%}
71
+ - When the docs cannot answer it, read the SDK source: {%skill:sdk-source%}
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: sdk-local-build
3
+ description: Build the @ethlete SDK from a local ethlete-sdk checkout and install it into this repo through a `file:` dependency, so an unreleased SDK change can be tested against this app before it is published - and reverted cleanly afterwards. Read whenever an SDK-side fix needs verifying here, or when package.json already points at a local build.
4
+ kind: skill
5
+ scope: consumer
6
+ ---
7
+
8
+ # Testing an unreleased SDK build in this repo
9
+
10
+ Swapping an `@ethlete/*` dependency for a locally built one lets you verify an SDK
11
+ change against this app before it ships. It is a **temporary, local-only** state: the
12
+ `file:` specifier and the lockfile entry it produces must never be committed.
13
+
14
+ Prefer a published prerelease when one exists - installing `@ethlete/components@next`
15
+ is faster and reproducible for the whole team. Use a local build when the change is not
16
+ published yet, or when you are iterating on it.
17
+
18
+ ## 1. Prerequisites
19
+
20
+ - The checkout path comes from `sdkSourcePath` in `ethlete-agents.config.local.json`;
21
+ {%skill:sdk-source%} covers resolving it and what to check before trusting it.
22
+ - The checkout has its dependencies installed (`yarn install` in the checkout root - the
23
+ SDK repo is a Yarn 4 workspace).
24
+ - Check which branch it is on before building - unless the user said otherwise, that
25
+ should be `next`, up to date with `origin/next`. Building `main` when your app runs
26
+ `-next` prereleases swaps in a completely different API surface, and building a stale
27
+ `next` rebuilds a bug that is already fixed upstream. Ask before changing its branch.
28
+
29
+ ## 2. Build the libraries you changed
30
+
31
+ From the **checkout root**, one build per `@ethlete/*` package whose source you touched:
32
+
33
+ ```bash
34
+ npx nx build components # writes dist/libs/components
35
+ npx nx build query # writes dist/libs/query
36
+ ```
37
+
38
+ Each build also builds the libs it depends on (`types` → `core` → `query` →
39
+ `components`), so a single command is enough to produce a consistent set. Only the
40
+ packages you actually changed need to be installed here; leave the rest on their
41
+ published versions.
42
+
43
+ If a build stalls trying to reach Nx Cloud, re-run it with `NX_NO_CLOUD=true`.
44
+
45
+ ## 3. Point this repo at the build
46
+
47
+ Edit the version specifiers in `package.json` (the one declaring the dependency - in a
48
+ workspace that is the workspace package, not necessarily the root):
49
+
50
+ ```json
51
+ {
52
+ "dependencies": {
53
+ "@ethlete/components": "file:../ethlete-sdk/dist/libs/components"
54
+ }
55
+ }
56
+ ```
57
+
58
+ The path is resolved relative to that `package.json`; an absolute path works too. Then
59
+ install:
60
+
61
+ ```bash
62
+ yarn install
63
+ ```
64
+
65
+ Expect peer-dependency warnings - the built package pins peers to the SDK's own Angular
66
+ version. They are warnings, not failures; a real version conflict shows up as a build
67
+ error, and means the checkout is on the wrong branch.
68
+
69
+ ## 4. Confirm the local build is really what got installed
70
+
71
+ `yarn install` is the only thing that copies the build into `node_modules`, so verifying
72
+ is not optional - a stale package looks exactly like a change that did not work:
73
+
74
+ ```bash
75
+ grep -m1 '"version"' node_modules/@ethlete/components/package.json
76
+ rg -n "<a symbol from your change>" node_modules/@ethlete/components/fesm2022/
77
+ ```
78
+
79
+ Then **restart the dev server**. Bundlers pre-bundle dependencies and will keep serving
80
+ the old copy; if the change still does not show up, delete `.angular/cache` (and
81
+ `node_modules/.vite` if present) and start it again.
82
+
83
+ ## 5. Iterating
84
+
85
+ Every SDK edit needs the full loop - there is no watch mode across the boundary:
86
+
87
+ 1. rebuild in the checkout (`npx nx build <lib>`)
88
+ 2. `yarn install` here
89
+ 3. restart the dev server
90
+
91
+ Yarn 4 re-copies a `file:` dependency whenever its contents change, so step 2 does pick
92
+ up the rebuild. It also rewrites that package's `resolution` hash in `yarn.lock` on
93
+ every rebuild - which is one more reason the lockfile must not be committed in this
94
+ state. (With npm, `file:` symlinks instead of copying, so a rebuild is picked up without
95
+ reinstalling; the restart in step 3 is still required.)
96
+
97
+ ## 6. Clean up when you are done
98
+
99
+ Leaving a `file:` dependency behind breaks every other checkout and CI, because the path
100
+ does not exist there. Restore it as part of the same task, not later:
101
+
102
+ ```bash
103
+ git checkout package.json # or hand-restore the original version specifier
104
+ yarn install
105
+ git status --short # package.json and yarn.lock must both be clean
106
+ ```
107
+
108
+ Never commit a `file:` specifier or the lockfile it produced. If the verified fix is
109
+ still unreleased, say what has to be published (which lib, which version) instead of
110
+ shipping a local path.
111
+
112
+ ## Related
113
+
114
+ - Finding and reading the checkout: {%skill:sdk-source%}
115
+ - What the published packages document: {%skill:sdk-docs%}
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: sdk-source
3
+ description: How to read the @ethlete SDK's own source from a local ethlete-sdk checkout when the docs and the installed types are not enough. Read when you need an implementation detail, the exact behaviour behind a bug, or an API the docs do not cover - and never edit that checkout as part of work in this repo.
4
+ kind: skill
5
+ scope: consumer
6
+ vars: [docsBaseUrl]
7
+ ---
8
+
9
+ # Reading the @ethlete SDK source
10
+
11
+ The SDK is developed in a separate repository (`ethlete-sdk`). Most questions are
12
+ answered faster and more reliably by the documentation - read {%skill:sdk-docs%}
13
+ first. Reach for the source when the docs genuinely cannot answer the question:
14
+
15
+ - a behaviour looks like an SDK bug and you need to see what the code actually does
16
+ - you need an implementation detail the guides omit (event order, internal defaults,
17
+ which host directive writes which attribute)
18
+ - the installed version is ahead of - or behind - the published docs and you have to
19
+ confirm what the code in _this_ version does
20
+ - you are about to report or fix something in the SDK itself
21
+
22
+ ## 1. Resolve the checkout
23
+
24
+ The path is per machine, so it lives in the gitignored `ethlete-agents.config.local.json`
25
+ at the repo root:
26
+
27
+ ```json
28
+ {
29
+ "sdkSourcePath": "/absolute/path/to/ethlete-sdk"
30
+ }
31
+ ```
32
+
33
+ Read that file before searching anywhere. A relative path is resolved from the repo root.
34
+
35
+ If the file or the key is missing, **do not guess a path** and do not clone the
36
+ repository. Fall back to the installed package - `node_modules/@ethlete/<lib>/types/`
37
+ holds the full `.d.ts` surface of exactly the version this repo runs - and to
38
+ {%docsBaseUrl%}. Then tell the user a local checkout would help, and offer the snippet
39
+ above (the file is gitignored, so adding it changes nothing for anyone else).
40
+
41
+ ## 2. Check the branch before you read anything
42
+
43
+ A checkout sits on whatever branch the developer left it on, so the first command you
44
+ run against it is the one that tells you what you are looking at:
45
+
46
+ ```bash
47
+ git -C <sdkSourcePath> fetch --quiet # read-only, safe
48
+ git -C <sdkSourcePath> status -sb # branch, ahead/behind, dirty files
49
+ ```
50
+
51
+ **Unless the user says otherwise, the expected state is `next`, up to date with
52
+ `origin/next`.** That is the branch the SDK develops on, and the one the `-next`
53
+ prereleases are cut from. Anything else and you are reading a different SDK than the
54
+ one you are about to describe.
55
+
56
+ When it is not in that state, **say so and ask** - never switch, pull, stash or reset
57
+ it yourself. It is someone's working tree, and the read-only rule below applies:
58
+
59
+ - **On another branch** - name it and ask whether to read it as-is or whether they want
60
+ `next`. A feature branch may be exactly what you were sent to look at.
61
+ - **Behind `origin/next`** - report how far. The code you would quote may already be
62
+ fixed upstream, so read the missing commits before calling anything a bug:
63
+ `git -C <sdkSourcePath> log --oneline HEAD..origin/next`.
64
+ - **Dirty** - it may contain someone's work in progress. Say so rather than quoting it
65
+ as SDK behaviour.
66
+
67
+ ## 3. Check the checkout matches what is installed
68
+
69
+ Even on a clean `next`, the checkout can be months of work ahead of the installed
70
+ package - or behind it:
71
+
72
+ ```bash
73
+ grep '"@ethlete/' package.json # what this repo runs
74
+ grep -m1 '"version"' <sdkSourcePath>/libs/<lib>/package.json # what the checkout is at
75
+ ```
76
+
77
+ Rules when they differ:
78
+
79
+ - **The installed package wins** for anything about how this repo behaves today. The
80
+ `.d.ts` in `node_modules` is the truth about the API you are calling.
81
+ - Source that is ahead describes an **unreleased** API. Never write consumer code
82
+ against it, and never assume it is available - say what release it needs.
83
+
84
+ ## 4. Where things live
85
+
86
+ Paths are relative to the checkout root:
87
+
88
+ | Path | What is in it |
89
+ | ----------------------------------- | --------------------------------------------------------------------------- |
90
+ | `libs/components/src/lib/<domain>/` | The active UI library, one folder per domain (`button`, `menu`, `table`, …) |
91
+ | `libs/core/src/lib/` | Framework primitives: directives, signal utils, overlay runtime, theming |
92
+ | `libs/query/src/lib/` | Data fetching: `http`, `gql`, `ws`, auth, query-form |
93
+ | `libs/types/src/lib/` | Shared types |
94
+ | `libs/cdk/` | The predecessor UI toolkit, maintenance mode - only for code still on it |
95
+ | `libs/eslint-plugin/src/` | The lint rules, including the message text explaining each one |
96
+ | `apps/docs/` | The markdown behind {%docsBaseUrl%} |
97
+ | `apps/playground/` | The Storybook app - stories also live next to each component |
98
+
99
+ Inside a component domain: `<name>.component.ts` with its `.css` next to it,
100
+ `<name>.imports.ts` (the imports array to spread into a consumer component),
101
+ `headless/` for the unstyled directives, `stories/` for the Storybook stories, and
102
+ `index.ts` as the barrel. The lib's public surface is `libs/<lib>/src/index.ts` -
103
+ anything not re-exported from there is internal, whatever it looks like.
104
+
105
+ ## 5. Search it, don't read it whole
106
+
107
+ ```bash
108
+ rg -n "etButton" <sdkSourcePath>/libs/components/src --glob '!*.spec.ts' # a selector
109
+ rg -n "export const OVERLAY" <sdkSourcePath>/libs/core/src # an export
110
+ rg -n "menu" <sdkSourcePath>/apps/docs/components # the guide source
111
+ ```
112
+
113
+ Specs are the cheapest description of intended behaviour - `<name>.component.spec.ts`
114
+ next to a component usually answers "is this supposed to happen?" faster than the
115
+ implementation does.
116
+
117
+ ## 6. The checkout is read-only from here
118
+
119
+ It is a different repository with its own branch, lint, docs and changeset workflow.
120
+ Never edit it while working on a task in this repo - that covers its git state too, so
121
+ no `checkout`, `pull`, `stash` or `reset` without the user asking for it (`fetch` is
122
+ fine). Never copy its internals into consumer code either - a private helper is not a
123
+ supported API and disappears without a major version (the same goes for anything under
124
+ a `subtle` namespace).
125
+
126
+ When the fix belongs in the SDK, say so and describe it precisely: file, symbol, and
127
+ the behaviour it should have. If the user wants that fix verified against this app
128
+ before it ships, that is {%skill:sdk-local-build%}.
129
+
130
+ ## Related
131
+
132
+ - Docs and Storybook, which come first: {%skill:sdk-docs%}
133
+ - Testing an unreleased SDK build here: {%skill:sdk-local-build%}
@@ -463,7 +463,7 @@ settings-form/
463
463
  - **Do not** create a changeset for irrelevant changes (e.g., formatting, comments, internal refactoring).
464
464
  - **Do not** create a changeset for fixes to features that have not yet been released.
465
465
  - **Do not** include multiple changes in a single changeset. Each changeset should contain only one change.
466
- - **Always** start a changeset with at least one sentence describing the change. Optional follow-up markdown can be added after the initial sentence.
466
+ - **A changeset note is a TL;DR: one sentence, two at most, under 40 words.** Never a second paragraph, no matter how much work the change took. It is the line a consumer skims to decide whether the release affects them - not a summary of your work. Mechanism, API inventories, caveats and rationale belong in the docs or the commit body, never here.
467
467
  - Create changesets for dependency updates if they are relevant to the project (e.g., major version updates).
468
468
  - Write changesets in the imperative mood. For example:
469
469
  - Add button component
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/agent-rules",
3
- "version": "0.1.0-next.1",
3
+ "version": "0.1.0-next.3",
4
4
  "license": "MIT",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -20,14 +20,18 @@ export type SyncConfig = {
20
20
  hooks: string[];
21
21
  };
22
22
  /**
23
- * The gitignored local config is a per-machine override, read by the generated hook scripts at
24
- * runtime — never by `sync`. Sync output must be identical on every machine and in CI (the
25
- * generated files are committed and `check` diffs them), so the only thing a local file can do
26
- * is turn behavior off after emit: `disableHooks: true` silences every generated hook,
27
- * `disableHooks: ["context-warning"]` just the named ones.
23
+ * The gitignored local config holds per-machine values, read at runtime — by the generated hook
24
+ * scripts, and by the agent while following a skill — never by `sync`. Sync output must be
25
+ * identical on every machine and in CI (the generated files are committed and `check` diffs them),
26
+ * so nothing here may change what gets emitted:
27
+ *
28
+ * - `disableHooks: true` silences every generated hook, `["context-warning"]` just the named ones.
29
+ * - `sdkSourcePath` points at a local `ethlete-sdk` checkout, which the SDK source and local-build
30
+ * skills read when they need the SDK's own sources instead of the published package.
28
31
  */
29
32
  export type LocalConfig = {
30
33
  disableHooks?: boolean | string[];
34
+ sdkSourcePath?: string;
31
35
  };
32
36
  export type LocalConfigState = {
33
37
  exists: false;
package/src/lib/config.js CHANGED
@@ -13,7 +13,7 @@ const readRawConfig = (root) => {
13
13
  return {};
14
14
  return JSON.parse((0, fs_1.readFileSync)(path, 'utf8'));
15
15
  };
16
- const LOCAL_CONFIG_KEYS = ['disableHooks'];
16
+ const LOCAL_CONFIG_KEYS = ['disableHooks', 'sdkSourcePath'];
17
17
  const readLocalConfig = (root) => {
18
18
  const path = (0, path_1.join)(root, exports.LOCAL_CONFIG_FILE_NAME);
19
19
  if (!(0, fs_1.existsSync)(path))
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/config.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,+BAA4B;AAE5B,iDAAiD;AAEpC,QAAA,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,C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,EAAE,GAAG,OAAO,CAAC;IACzC,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACnF,MAAM,OAAO,GAAG,MAAA,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,UAAU,mCAAI,IAAA,qBAAa,EAAC,IAAI,CAAC,CAAC;IAEpE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE5B,OAAO;QACL,IAAI;QACJ,OAAO;QACP,MAAM,EAAE,GAAG,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;QAC/D,IAAI,kCAAO,IAAA,8BAAe,GAAE,GAAK,CAAC,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAE;QACnD,OAAO,EAAE,MAAA,GAAG,CAAC,OAAO,mCAAI,EAAE;QAC1B,uBAAuB,EAAE,MAAA,GAAG,CAAC,uBAAuB,mCAAI,KAAK;QAC7D,KAAK,EAAE,MAAA,GAAG,CAAC,KAAK,mCAAI,EAAE;KACvB,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,UAAU,cAiBrB"}
package/src/lib/plan.js CHANGED
@@ -31,10 +31,29 @@ const claudeMdImportsAgentsMd = (root) => {
31
31
  return /^@AGENTS\.md\s*$/m.test((0, fs_1.readFileSync)(path, 'utf8'));
32
32
  };
33
33
  exports.claudeMdImportsAgentsMd = claudeMdImportsAgentsMd;
34
+ /** Marks a directory as an `ethlete-sdk` checkout rather than some other folder. */
35
+ const SDK_CHECKOUT_MARKERS = ['libs/components', 'libs/core', 'libs/agent-rules'];
36
+ const describeSdkSourcePath = (options) => {
37
+ const { root, value } = options;
38
+ if (value === undefined)
39
+ return [];
40
+ if (typeof value !== 'string' || value.trim().length === 0) {
41
+ return [`${config_1.LOCAL_CONFIG_FILE_NAME} has an invalid "sdkSourcePath" — use a path to an ethlete-sdk checkout.`];
42
+ }
43
+ const absolute = (0, path_1.resolve)(root, value);
44
+ if (!(0, fs_1.existsSync)(absolute)) {
45
+ return [`${config_1.LOCAL_CONFIG_FILE_NAME} points "sdkSourcePath" at ${absolute}, which does not exist.`];
46
+ }
47
+ if (SDK_CHECKOUT_MARKERS.some((marker) => !(0, fs_1.existsSync)((0, path_1.join)(absolute, marker)))) {
48
+ return [`${config_1.LOCAL_CONFIG_FILE_NAME} points "sdkSourcePath" at ${absolute}, which is not an ethlete-sdk checkout.`];
49
+ }
50
+ return [];
51
+ };
34
52
  /**
35
- * The local file only affects hook runtime, never sync output — so the warnings here are about
53
+ * The local file only affects runtime behavior, never sync output — so the warnings here are about
36
54
  * the mistakes that would otherwise fail silently: a file the hooks can't parse, a key that
37
- * suggests someone expected sync-time overrides, or a hook name nothing matches.
55
+ * suggests someone expected sync-time overrides, a hook name nothing matches, or an SDK path that
56
+ * no longer exists (the skills reading it would just report the checkout as missing).
38
57
  */
39
58
  const collectLocalConfigWarnings = (root) => {
40
59
  const local = (0, config_1.readLocalConfig)(root);
@@ -45,8 +64,9 @@ const collectLocalConfigWarnings = (root) => {
45
64
  }
46
65
  const warnings = [];
47
66
  if (local.unknownKeys.length > 0) {
48
- warnings.push(`${config_1.LOCAL_CONFIG_FILE_NAME} contains unsupported key(s): ${local.unknownKeys.join(', ')} — the local file only supports "disableHooks"; it never changes what sync writes.`);
67
+ warnings.push(`${config_1.LOCAL_CONFIG_FILE_NAME} contains unsupported key(s): ${local.unknownKeys.join(', ')} — the local file supports "disableHooks" and "sdkSourcePath"; it never changes what sync writes.`);
49
68
  }
69
+ warnings.push(...describeSdkSourcePath({ root, value: local.config.sdkSourcePath }));
50
70
  const disable = local.config.disableHooks;
51
71
  if (disable !== undefined && typeof disable !== 'boolean' && !Array.isArray(disable)) {
52
72
  warnings.push(`${config_1.LOCAL_CONFIG_FILE_NAME} has an invalid "disableHooks" value — use true or an array of hook names; hooks stay enabled.`);
@@ -1 +1 @@
1
- {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/plan.ts"],"names":[],"mappings":";;;AAAA,2BAAuE;AACvE,+BAA4B;AAC5B,qCAA+E;AAC/E,qCAAsD;AACtD,iDAA0D;AAC1D,2DAA2D;AAC3D,yDAA+G;AAC/G,6CAA8C;AAC9C,2CAAwD;AACxD,+CAA8D;AAC9D,6CAA8C;AAY9C,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAElE,MAAM,iBAAiB,GAAG,CAAC,KAAoB,EAAE,aAA0B,EAAE,EAAE,CAC7E,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CACrB,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;KACxC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAW,CAAC;KAClC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KAC1C,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAC9D,CAAC;AAEJ,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,YAAoB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAA,WAAI,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAEtC,OAAO,IAAA,eAAU,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5D,CAAC,CAAC;AAEF,gGAAg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