fix(agents): route source work and check extensionless files

This commit is contained in:
4gray committed 2026-09-20 21:49:06 +02:00
1 parent f2f7a94857
commit 795946d2a0
4 files changed
+33 -3

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ contracts below before changing a subsystem; do not load every document.
| Angular conventions, docs and skills maintenance | [Agent workflow](docs/development/agent-workflow.md) |
| Electron debugging, CDP, trace flags | [Electron debugging](docs/development/electron-debugging.md) |
| SQLite, worker IPC, persistence migrations | [DB worker](docs/architecture/sqlite-db-worker.md), [database migrations](libs/shared/database/README.md) |
| M3U, XMLTV, startup, source health, OS playlist opening | [M3U contracts](docs/architecture/m3u-playlist-module.md) |
| M3U, XMLTV, startup, source health, OS playlist opening | [M3U contracts](docs/architecture/m3u-playlist-module.md), [adding sources across layers](docs/development/agent-workflow.md#adding-behavior-across-layers) |
| Xtream / Stalker | [Xtream compatibility](docs/architecture/xtream-portal-compatibility.md), [Stalker contracts](docs/architecture/stalker-portal.md) (affected provider only) |
| Player controls, diagnostics, radio, keep-awake | [Controls contract](docs/architecture/player-controls-contract.md) |
| Embedded MPV, native runtime and packaging | [Embedded MPV](docs/architecture/embedded-mpv-native.md) |
+5 -2
View File
@@ -37,8 +37,11 @@ Write generic filenames as prose; commands, templates, globs, URLs, package
aliases and dotted code symbols are excluded. Bare dotted names with conventional
file suffixes (such as .md, .json or .ts) are treated as filenames. Use a `./`
prefix or Markdown link for other ambiguous filenames that resemble code symbols.
Multi-part dotfiles are path candidates too. Link paths and fragments are decoded
separately so encoded filename delimiters stay in the filename. Fenced and indented examples
Multi-part dotfiles are path candidates too.
Conventional extensionless filenames such as Dockerfile, Makefile and LICENSE
are also path candidates; use an explicit `./` prefix for other extensionless files.
Link paths and fragments are decoded separately so encoded filename delimiters
stay in the filename. Fenced and indented examples
do not count as root guidance imports or satisfy the required Claude import.
The required Claude import must be an unformatted standalone line in a top-level
paragraph; headings, quotes and list items do not satisfy it.
+3
View File
@@ -176,6 +176,9 @@ function isLiteralRepositoryPath(token) {
return false;
return (
path.includes('/') ||
/^(?:Dockerfile|Containerfile|Makefile|GNUmakefile|Justfile|Procfile|Gemfile|Rakefile|Vagrantfile|LICENSE|LICENCE|NOTICE|COPYING|AUTHORS|CONTRIBUTORS|README|CHANGELOG)$/u.test(
path
) ||
/^(?:\.[\p{L}\p{N}_-][\p{L}\p{N}_.-]*|[\p{L}\p{N}_-][\p{L}\p{N}_.-]*\.[\p{L}][\p{L}\p{N}_-]*)$/u.test(
path
)
@@ -787,3 +787,27 @@ test('declared packages allow safe subpaths', async (t) => {
[]
);
});
for (const filename of [
'Dockerfile',
'Makefile',
'LICENSE',
'NOTICE',
'Procfile',
]) {
test(`conventional extensionless filename is validated: ${filename}`, async (t) => {
assert.match(
(await diagnostics(t, { 'AGENTS.md': '`' + filename + '`' })).join(
'\n'
),
/does not exist/
);
assert.deepEqual(
await diagnostics(t, {
'AGENTS.md': '`' + filename + '`',
[filename]: '',
}),
[]
);
});
}