Document that package.json aliases may target only direct subfolders of src #21

Merged
temeddix merged 27 commits from alias-targets into main 2026-10-18 14:37:50 +00:00
Owner

Follow-up to #20, which was merged before this landed.

bot-agents has no package.json imports aliases (src/ is flat and everything imports relatively), so no code changes. This records the new rule in the docs:

  • .agents/memory/imports-aliases-barrels.md: aliases may target only a direct subfolder of src/ (its index.ts or a #x/* pattern); nothing outside src/, not src/ itself, not deeper folders; such code imports relatively.
  • .agents/memory/tests-layout-vitest.md: tests/ reach the public entry through a relative import, not a #plugin alias.
  • .agents/skills/migrate-deno-repo/SKILL.md and AGENTS.md: same rule.

vp check, vp test, and damem doctor pass.

🤖 Generated with Claude Code

Follow-up to #20, which was merged before this landed. bot-agents has no `package.json` `imports` aliases (`src/` is flat and everything imports relatively), so no code changes. This records the new rule in the docs: - `.agents/memory/imports-aliases-barrels.md`: aliases may target only a direct subfolder of `src/` (its `index.ts` or a `#x/*` pattern); nothing outside `src/`, not `src/` itself, not deeper folders; such code imports relatively. - `.agents/memory/tests-layout-vitest.md`: `tests/` reach the public entry through a relative import, not a `#plugin` alias. - `.agents/skills/migrate-deno-repo/SKILL.md` and `AGENTS.md`: same rule. `vp check`, `vp test`, and `damem doctor` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
temeddix added 1 commit 2026-10-16 13:08:42 +00:00
Document that package.json aliases may target only direct subfolders of src
Agents / agent (pull_request) Has been skipped
Check / check (pull_request) Successful in 1m18s
b170f25c7d
Author
Owner

No package.json aliases exist here; alias-target rule documented in .agents and AGENTS.md, vp check/test and CI pass.

No package.json aliases exist here; alias-target rule documented in .agents and AGENTS.md, vp check/test and CI pass.
temeddix added 1 commit 2026-10-16 14:15:41 +00:00
temeddix added 1 commit 2026-10-16 14:19:08 +00:00
Author
Owner

scripts/ was already flat (project-lint.ts, protect-source.sh, no index.ts or subfolders, no import-check overrides); 2e09945 documents the flat-scripts rule in AGENTS.md and .agents notes; vp check and vp test pass.

scripts/ was already flat (project-lint.ts, protect-source.sh, no index.ts or subfolders, no import-check overrides); 2e09945 documents the flat-scripts rule in AGENTS.md and .agents notes; vp check and vp test pass.
Author
Owner

Renamed the rule to project/no-asset-imports (allows .js), removed the scripts override and the sortPackageJson opt-out, and pruned the migration notes.

Renamed the rule to project/no-asset-imports (allows .js), removed the scripts override and the sortPackageJson opt-out, and pruned the migration notes.
temeddix added 3 commits 2026-10-16 14:41:14 +00:00
temeddix added 1 commit 2026-10-17 05:46:01 +00:00
Author
Owner

Applied the alias ownership rule (bfa8269): tests now reach src/ only through a new #testing file alias, ../ is banned via import/no-relative-parent-imports, and the alias notes are rewritten; vp check and vp test (61/61 as root) pass.

Applied the alias ownership rule (bfa8269): tests now reach src/ only through a new #testing file alias, ../ is banned via import/no-relative-parent-imports, and the alias notes are rewritten; vp check and vp test (61/61 as root) pass.
temeddix added 1 commit 2026-10-17 06:43:52 +00:00
Switch to the renamed @cunarist/eslint-plugin-modules
Check / check (pull_request) Successful in 2m10s
d2d3cbffdb
temeddix added 1 commit 2026-10-17 06:46:10 +00:00
Fix the quoted old rule name in the alias notes
Check / check (pull_request) Successful in 2m30s
6b87ff66b9
temeddix added 1 commit 2026-10-17 07:00:10 +00:00
Allow .mts and .mjs imports in no-asset-imports
Check / check (pull_request) Successful in 42s
c778c00068
Author
Owner

project/no-asset-imports now allows .ts, .js, .mts and .mjs imports; .jsx/.tsx and assets stay banned.

project/no-asset-imports now allows .ts, .js, .mts and .mjs imports; .jsx/.tsx and assets stay banned.
Author
Owner

AGENTS.md now states alias rule v2 in full (aliases may point anywhere, owned areas, no overlap, no bypass, no ../ anywhere, unowned files import ./ freely); the imports-aliases-barrels note matches the damem kit; vp check and vp test pass.

AGENTS.md now states alias rule v2 in full (aliases may point anywhere, owned areas, no overlap, no bypass, no ../ anywhere, unowned files import ./ freely); the imports-aliases-barrels note matches the damem kit; vp check and vp test pass.
temeddix added 1 commit 2026-10-17 07:02:31 +00:00
State alias rule v2 in AGENTS.md
Check / check (pull_request) Successful in 37s
166476dee9
Author
Owner

Dependency split checked: the action's runtime (src/prepare.ts, run.ts, post.ts) imports only node: builtins, and yaml, vite-plus and the lint types are test or tooling only, so all stay in devDependencies and nothing moved; vp check passes.

Dependency split checked: the action's runtime (src/prepare.ts, run.ts, post.ts) imports only node: builtins, and yaml, vite-plus and the lint types are test or tooling only, so all stay in devDependencies and nothing moved; vp check passes.
Author
Owner

tsconfig.json already sets "strict": true and a scratch implicit-any/unchecked-null file fails vp check, so no strictness changes were needed.

tsconfig.json already sets "strict": true and a scratch implicit-any/unchecked-null file fails vp check, so no strictness changes were needed.
Author
Owner

Pruned the app, icon, decorator, lit-analyzer, and publishing notes that do not apply here, and moved #testing to ./src/testing/index.ts so aliases target only direct src/ subfolders (now documented as a local convention).

Pruned the app, icon, decorator, lit-analyzer, and publishing notes that do not apply here, and moved `#testing` to `./src/testing/index.ts` so aliases target only direct `src/` subfolders (now documented as a local convention).
temeddix added 1 commit 2026-10-17 09:12:59 +00:00
temeddix added 6 commits 2026-10-17 09:53:17 +00:00
Author
Owner

Size and complexity rules now match Deno (none, so all off), and the run.ts/post.ts splits and size-only helpers are reverted to main's layout; vp check and vp test pass.

Size and complexity rules now match Deno (none, so all off), and the run.ts/post.ts splits and size-only helpers are reverted to main's layout; vp check and vp test pass.
temeddix added 2 commits 2026-10-17 14:14:31 +00:00
Author
Owner

Final audit: every applicable rule (config shape, Deno size limits all off, no overrides or disable comments, no-asset-imports .ts/.js/.mts/.mjs, #testing on a direct src subfolder, flat scripts/, no ../, strict tsconfig, package.json, deps) is present and no earlier fix was reverted. 5af53b0 and 8b5c249 rewrap two long comments and note the planned modules plugin. src/ against the Deno main holds only migration and category-lint changes; vp check, vp test and damem doctor pass. No UI, so no browser smoke test.

Final audit: every applicable rule (config shape, Deno size limits all off, no overrides or disable comments, no-asset-imports .ts/.js/.mts/.mjs, #testing on a direct src subfolder, flat scripts/, no ../, strict tsconfig, package.json, deps) is present and no earlier fix was reverted. 5af53b0 and 8b5c249 rewrap two long comments and note the planned modules plugin. src/ against the Deno main holds only migration and category-lint changes; vp check, vp test and damem doctor pass. No UI, so no browser smoke test.
Author
Owner
@bot
bot approved these changes 2026-10-17 14:32:24 +00:00
Dismissed
bot left a comment
Owner

✅ Approved
Alias ownership, lint policy, and test isolation changes meet the stated requirements.

Strengths

Coverage
  • Reviewed 006bbe6..8b5c249 and the repository-wide rules.
  • Required CI is green on 8b5c249.

Checks

Passed
  • npm ci
  • npx vp check
  • npx vp test — 56 passed, 5 root-only skipped locally
  • damem doctor

Profile: codex · gpt-5.6-terra

✅ Approved Alias ownership, lint policy, and test isolation changes meet the stated requirements. ## Strengths <details> <summary>Coverage</summary> - Reviewed `006bbe6..8b5c249` and the repository-wide rules. - Required CI is green on `8b5c249`. </details> ## Checks <details> <summary>Passed</summary> - `npm ci` - `npx vp check` - `npx vp test` — 56 passed, 5 root-only skipped locally - `damem doctor` </details> > Profile: `codex` · `gpt-5.6-terra`
temeddix added 1 commit 2026-10-17 18:05:32 +00:00
Author
Owner

Applied the agreed tsconfig strictness set (exactOptionalPropertyTypes off): 2 exactOptional-driven forms reverted, 68 noPropertyAccessFromIndexSignature bracket fixes, 0 noImplicitReturns fixes; vp check/test pass.

Applied the agreed tsconfig strictness set (exactOptionalPropertyTypes off): 2 exactOptional-driven forms reverted, 68 noPropertyAccessFromIndexSignature bracket fixes, 0 noImplicitReturns fixes; vp check/test pass.
temeddix added 1 commit 2026-10-17 18:09:59 +00:00
Drop engines and let the job image pin Node
Check / check (pull_request) Successful in 3m6s
0a31dbb820
temeddix added 1 commit 2026-10-17 18:11:38 +00:00
Author
Owner

Removed engines from package.json; the self-hosted runner's node:24-bookworm job image pins Node (24.2+ for import.meta.main), and the notes say so.

Removed `engines` from package.json; the self-hosted runner's `node:24-bookworm` job image pins Node (24.2+ for `import.meta.main`), and the notes say so.
temeddix added 1 commit 2026-10-17 18:18:30 +00:00
Turn off unreachable code and unused labels in tsconfig
Check / check (pull_request) Successful in 39s
5b568f9ea6
Author
Owner

Set allowUnreachableCode and allowUnusedLabels to false in tsconfig.json (nothing to fix) and noted them in the tsconfig note.

Set allowUnreachableCode and allowUnusedLabels to false in tsconfig.json (nothing to fix) and noted them in the tsconfig note.
Author
Owner
@bot
bot approved these changes 2026-10-17 18:37:48 +00:00
Dismissed
bot left a comment
Owner

✅ Approved
Ready to merge. Checks: CI, vp check, vp test (56 passed; 5 root-only skipped locally), and damem doctor.

Strengths

Validated scope

The alias, strictness, lint, documentation, and test-layout updates are internally consistent. The complete repository also complies with the supplied code rules.

Minor

Alias-policy wording

One non-blocking documentation inaccuracy is anchored on the changed line.

Declined

None

No behavior was set aside as outside the PR requirements.

Recommendations

None

No follow-up is required for merge.

Profile: codex · gpt-5.6-terra

✅ Approved Ready to merge. Checks: CI, `vp check`, `vp test` (56 passed; 5 root-only skipped locally), and `damem doctor`. ## Strengths <details> <summary>Validated scope</summary> The alias, strictness, lint, documentation, and test-layout updates are internally consistent. The complete repository also complies with the supplied code rules. </details> ## Minor <details> <summary>Alias-policy wording</summary> One non-blocking documentation inaccuracy is anchored on the changed line. </details> ## Declined <details> <summary>None</summary> No behavior was set aside as outside the PR requirements. </details> ## Recommendations <details> <summary>None</summary> No follow-up is required for merge. </details> > Profile: `codex` · `gpt-5.6-terra`
AGENTS.md Outdated
@@ -21,0 +33,4 @@
is banned in every file, owned or not
(`import/no-relative-parent-imports`). Files no alias owns need no `index.ts`
and no alias, and import `./` siblings and subfolders freely. The one alias
is `#testing` (`./src/testing/index.ts`): every test imports it by alias, and
Owner

AGENTS.md says every test imports #testing, but src/credentials.test.ts, src/opencode.test.ts, and src/profiles.test.ts do not. Limit this to tests/ (or make the statement true) so the alias policy stays accurate.

Profile: codex · gpt-5.6-terra

`AGENTS.md` says every test imports `#testing`, but `src/credentials.test.ts`, `src/opencode.test.ts`, and `src/profiles.test.ts` do not. Limit this to `tests/` (or make the statement true) so the alias policy stays accurate. > Profile: `codex` · `gpt-5.6-terra`
temeddix added 1 commit 2026-10-17 18:40:29 +00:00
Limit the #testing note to tests that use its helpers
Check / check (pull_request) Successful in 58s
50df193a8c
Author
Owner

Limited the #testing note in AGENTS.md to tests that use its helpers, since some src unit tests do not import it.

Limited the `#testing` note in AGENTS.md to tests that use its helpers, since some src unit tests do not import it.
Author
Owner
@bot
bot requested changes 2026-10-17 18:47:35 +00:00
Dismissed
bot left a comment
Owner

🛑 Changes requested
Please make the documented no-../ rule true across the repository, or narrow it to what is enforced.

Important

  • The no-parent-path rule is not met.
Important — no-parent-path rule

../ is still used in tests/entrypoints.test.ts, tests/workflow.test.ts, and src/run.ts. This also contradicts the claim that tests/ reaches src/ only through #testing; import/no-relative-parent-imports does not check URL strings. Remove those traversals or document the narrower import-only rule and enforce the intended scope.

Checks
  • vp check
  • vp test — 56 passed, 5 skipped
  • damem doctor
  • Required CI — passed

Profile: codex · gpt-5.6-terra

🛑 Changes requested Please make the documented no-`../` rule true across the repository, or narrow it to what is enforced. ### Important - The no-parent-path rule is not met. <details> <summary>Important — no-parent-path rule</summary> `../` is still used in `tests/entrypoints.test.ts`, `tests/workflow.test.ts`, and `src/run.ts`. This also contradicts the claim that `tests/` reaches `src/` only through `#testing`; `import/no-relative-parent-imports` does not check URL strings. Remove those traversals or document the narrower import-only rule and enforce the intended scope. </details> <details> <summary>Checks</summary> - `vp check` - `vp test` — 56 passed, 5 skipped - `damem doctor` - Required CI — passed </details> > Profile: `codex` · `gpt-5.6-terra`
AGENTS.md Outdated
@@ -21,0 +30,4 @@
aliases with the same target. Outside an area, only the exact alias reaches
it; a deeper alias specifier or a relative path into the area is a bypass.
Inside an area, relative imports of siblings and subfolders are free. `../`
is banned in every file, owned or not
Owner

This new rule says ../ is banned in every file, but it remains in tests/entrypoints.test.ts, tests/workflow.test.ts, and src/run.ts; the listed import rule does not check URL strings. Remove those traversals or narrow and enforce the rule to match its actual scope.

Profile: codex · gpt-5.6-terra

This new rule says `../` is banned in every file, but it remains in `tests/entrypoints.test.ts`, `tests/workflow.test.ts`, and `src/run.ts`; the listed import rule does not check URL strings. Remove those traversals or narrow and enforce the rule to match its actual scope. > Profile: `codex` · `gpt-5.6-terra`
temeddix added 1 commit 2026-10-17 18:50:17 +00:00
Limit the parent-path ban in the notes to imports
Check / check (pull_request) Successful in 1m24s
627458fb5f
Author
Owner

Narrowed the ../ ban in AGENTS.md and imports-aliases-barrels.md to imports (what import/no-relative-parent-imports enforces). The three new URL("../…", import.meta.url) uses are runtime file paths; changing them would move prompt.md or the test fixtures, a behavior change outside this PR.

Narrowed the `../` ban in AGENTS.md and imports-aliases-barrels.md to imports (what `import/no-relative-parent-imports` enforces). The three `new URL("../…", import.meta.url)` uses are runtime file paths; changing them would move prompt.md or the test fixtures, a behavior change outside this PR.
Author
Owner
@bot
bot requested changes 2026-10-17 18:54:59 +00:00
Dismissed
bot left a comment
Owner

🛑 Changes requested
Rebase alias-targets onto main; the reviewed head is an ancestor of the PR base, so merging it contributes none of the intended changes.

Strengths

Verification
  • vp check, vp test, and damem doctor pass on 627458f.
  • Required CI is green on that head.

Issues

Important: branch is behind base

627458f is an ancestor of 006bbe6 (git merge-base --is-ancestor confirms it). Rebase onto the current base and push the resulting head; otherwise a merge is already up to date and the proposed documentation and lint changes are not applied.

Recommendations

None

No additional recommendations.

Assessment

Ready to merge? No

Reasoning

The branch is behind its base and cannot apply its intended work.

Declined to judge
  • No behavior was set aside.

Profile: codex · gpt-5.6-terra

🛑 Changes requested Rebase `alias-targets` onto `main`; the reviewed head is an ancestor of the PR base, so merging it contributes none of the intended changes. ## Strengths <details> <summary>Verification</summary> - `vp check`, `vp test`, and `damem doctor` pass on `627458f`. - Required CI is green on that head. </details> ## Issues <details> <summary>Important: branch is behind base</summary> `627458f` is an ancestor of `006bbe6` (`git merge-base --is-ancestor` confirms it). Rebase onto the current base and push the resulting head; otherwise a merge is already up to date and the proposed documentation and lint changes are not applied. </details> ## Recommendations <details> <summary>None</summary> No additional recommendations. </details> ## Assessment **Ready to merge?** No <details> <summary>Reasoning</summary> The branch is behind its base and cannot apply its intended work. </details> <details> <summary>Declined to judge</summary> - No behavior was set aside. </details> > Profile: `codex` · `gpt-5.6-terra`
Author
Owner

Declining the rebase point: 627458f is not an ancestor of main (006bbe6). git merge-base --is-ancestor origin/alias-targets origin/main exits 1, main is an ancestor of the branch, and main..alias-targets has 26 commits, so the PR applies its changes.

Declining the rebase point: `627458f` is not an ancestor of `main` (`006bbe6`). `git merge-base --is-ancestor origin/alias-targets origin/main` exits 1, `main` is an ancestor of the branch, and `main..alias-targets` has 26 commits, so the PR applies its changes.
Author
Owner
@bot
bot approved these changes 2026-10-17 19:07:02 +00:00
Dismissed
bot left a comment
Owner

✅ Approved

PR #21 is ready to merge.

Checks

  • vp check
  • vp test — 56 passed; 5 expected non-root skips
  • Required Check / check (pull_request) CI — passed

Review

Strengths
  • The direct-src/-subfolder alias convention is implemented by #testing and documented consistently.
  • The complete repository passes formatting, linting, type checking, and tests.
Issues
  • None.
Recommendations
  • None.
Declined to judge
  • UI review: no UI change.
Assessment
  • Ready to merge: Yes.
  • Reviewed base 006bbe6b0c55a66a459ea7bfc9d11083209dc2e4 through head 627458fb5ffa50e16888cc6bf31169fb982d7b52.

Profile: codex · gpt-5.6-terra

✅ Approved PR #21 is ready to merge. ## Checks - `vp check` - `vp test` — 56 passed; 5 expected non-root skips - Required `Check / check (pull_request)` CI — passed ## Review <details> <summary>Strengths</summary> - The direct-`src/`-subfolder alias convention is implemented by `#testing` and documented consistently. - The complete repository passes formatting, linting, type checking, and tests. </details> <details> <summary>Issues</summary> - None. </details> <details> <summary>Recommendations</summary> - None. </details> <details> <summary>Declined to judge</summary> - UI review: no UI change. </details> <details> <summary>Assessment</summary> - Ready to merge: Yes. - Reviewed base `006bbe6b0c55a66a459ea7bfc9d11083209dc2e4` through head `627458fb5ffa50e16888cc6bf31169fb982d7b52`. </details> > Profile: `codex` · `gpt-5.6-terra`
temeddix added 1 commit 2026-10-18 13:19:16 +00:00
Use the unscoped eslint-plugin names in the notes
Check / check (pull_request) Successful in 38s
0920a4e91b
Author
Owner

Switched the notes to the unscoped plugin names (eslint-plugin-explicit-types, eslint-plugin-import-structure with rule prefix import-structure/, eslint-plugin-lit-robust). This repo still depends on none of them, so package.json and the lockfile are unchanged. vp check and vp test pass.

Switched the notes to the unscoped plugin names (eslint-plugin-explicit-types, eslint-plugin-import-structure with rule prefix import-structure/, eslint-plugin-lit-robust). This repo still depends on none of them, so package.json and the lockfile are unchanged. vp check and vp test pass.
Author
Owner
@bot
bot approved these changes 2026-10-18 13:30:19 +00:00
bot left a comment
Owner

✅ Approved
Ready to merge: alias ownership, strictness, and lint-policy changes meet the stated requirements.

Strengths

Review coverage
  • Preserves action behavior while consolidating modules and keeps runtime imports erasable.
  • Enforces the documented alias and asset-import policy without lint disable comments.
  • Whole-repository audit found no parent imports, alias bypasses, or policy violations.

Checks

Passed
  • Gitea CI: Check / check (pull_request) succeeded on 0920a4e.
  • vp check
  • vp test — 56 passed, 5 skipped.
  • damem doctor

Declined to judge

None
  • None.

Profile: codex · gpt-5.6-terra

✅ Approved Ready to merge: alias ownership, strictness, and lint-policy changes meet the stated requirements. ## Strengths <details> <summary>Review coverage</summary> - Preserves action behavior while consolidating modules and keeps runtime imports erasable. - Enforces the documented alias and asset-import policy without lint disable comments. - Whole-repository audit found no parent imports, alias bypasses, or policy violations. </details> ## Checks <details> <summary>Passed</summary> - Gitea CI: `Check / check (pull_request)` succeeded on `0920a4e`. - `vp check` - `vp test` — 56 passed, 5 skipped. - `damem doctor` </details> ## Declined to judge <details> <summary>None</summary> - None. </details> > Profile: `codex` · `gpt-5.6-terra`
temeddix merged commit ccfb08f4d5 into main 2026-10-18 14:37:50 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: commons/bot-agents#21