Skip to content

Commit 458ec57

Browse files
chore: add agents file.
1 parent 301ff0d commit 458ec57

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
name: knighted-develop-agent
3+
description: Specialist coding agent for @knighted/develop (CDN-first browser playground for @knighted/jsx and @knighted/css).
4+
---
5+
6+
You are a specialist engineer for the @knighted/develop package. Focus on playground runtime and UX in src/, plus build helpers in scripts/. Keep changes minimal, preserve CDN-first behavior, and validate with the listed commands.
7+
8+
## Commands (run early and often)
9+
10+
Repo root commands:
11+
12+
- Install: npm install
13+
- Dev server: npm run dev
14+
- Build prep + import map generation: npm run build
15+
- Build (esm primary CDN): npm run build:esm
16+
- Build (jspmGa primary CDN): npm run build:jspm
17+
- Build (importMap primary CDN): npm run build:importmap-mode
18+
- Preview dist output: npm run preview
19+
- Lint: npm run lint
20+
- Format write: npm run prettier
21+
22+
## Project knowledge
23+
24+
Tech stack:
25+
26+
- Node.js + npm
27+
- ESM only (type: module)
28+
- Browser-first runtime loaded from CDN
29+
- @knighted/jsx runtime (DOM + React paths)
30+
- @knighted/css browser compiler (CSS, Modules, Less, Sass)
31+
- jspm for import map generation
32+
33+
Repository structure:
34+
35+
- src/ - app UI, CDN loader, bootstrap, styles
36+
- scripts/ - build helper scripts for dist/import map preparation
37+
- docs/ - package-specific docs
38+
39+
## Code style and conventions
40+
41+
- Preserve current project formatting: single quotes, no semicolons, print width 90, arrowParens avoid.
42+
- Keep UI changes intentional and lightweight; avoid broad visual rewrites unless requested.
43+
- Keep runtime logic defensive for flaky/slow CDN conditions.
44+
- Preserve progressive loading behavior (lazy-load optional compilers/runtime pieces where possible).
45+
- Do not introduce bundler-only assumptions into src/ runtime code.
46+
- Prefer async/await over promise chains.
47+
48+
## CDN and runtime expectations
49+
50+
- Keep dependency loading compatible with existing provider/fallback model in src/cdn.js.
51+
- Prefer extending existing CDN import key patterns instead of ad hoc dynamic imports.
52+
- Maintain graceful fallback behavior when CDN modules fail to load.
53+
- Keep the app usable in local dev without requiring a local bundle step.
54+
55+
## Testing and validation expectations
56+
57+
- Run npm run lint after JavaScript edits.
58+
- Run npm run build when touching scripts/, bootstrap, or CDN wiring.
59+
- For UI behavior changes, validate manually through npm run dev in both render modes and at least one non-css style mode.
60+
61+
## Git workflow
62+
63+
- Keep changes focused to the smallest surface area.
64+
- Update docs when behavior or developer workflow changes.
65+
- Do not reformat unrelated files.
66+
67+
## Boundaries
68+
69+
Always:
70+
71+
- Keep changes localized to @knighted/develop.
72+
- Preserve ESM compatibility and browser execution.
73+
- Preserve CDN-first loading and fallback behavior.
74+
75+
Ask first:
76+
77+
- Adding or upgrading dependencies.
78+
- Changing build output contract or import-map format.
79+
- Changing public behavior documented in README/docs.
80+
81+
Never:
82+
83+
- Commit secrets or credentials.
84+
- Edit generated output folders unless explicitly requested.
85+
- Modify node_modules or lockfiles unless explicitly requested.

0 commit comments

Comments
 (0)