Skip to content

Commit d8c5b85

Browse files
committed
updating agents
1 parent d169a85 commit d8c5b85

2 files changed

Lines changed: 52 additions & 77 deletions

File tree

AGENTS.md

Lines changed: 51 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,64 @@
11
# AGENTS.md
22

3-
## Purpose
3+
## Scope
44

5-
This repository contains the `@stackpress/idea` toolchain:
5+
This repo contains the `@stackpress/idea` toolchain:
66

7-
- `packages/idea-parser`: parses `.idea` schemas into AST/JSON output
7+
- `packages/idea-parser`: parses `.idea` files into AST/schema output
88
- `packages/idea-transformer`: loads schemas and runs plugins
9-
- `packages/idea`: top-level CLI package
10-
- `example`: small workspace used to exercise the toolchain
11-
- `language`: VS Code extension for `.idea` files
9+
- `packages/idea`: CLI package
10+
- `example`: sample workspace
11+
- `language`: VS Code extension
1212

13-
## Working Areas
13+
## Source Of Truth
1414

15-
Primary source lives in:
15+
Edit source, not generated output:
1616

17-
- `packages/*/src`
18-
- `packages/idea-parser/tests`
19-
- `packages/idea-transformer/tests`
20-
- `language/client/src`
21-
- `language/server/src`
22-
- `docs/`
17+
- runtime/package source: `packages/*/src`
18+
- parser tests: `packages/idea-parser/tests`
19+
- transformer tests: `packages/idea-transformer/tests`
20+
- extension source: `language/client/src`, `language/server/src`
21+
- docs source: `specs/`
22+
- docs site templates: `scripts/templates/`
2323

24-
Generated build output lives in package `cjs/` and `esm/` directories.
25-
Do not edit generated files by hand unless the task is explicitly about
26-
build artifacts or release packaging.
24+
Generated output to avoid editing by hand:
2725

28-
## Tooling
26+
- package builds: `packages/*/cjs`, `packages/*/esm`
27+
- published docs site: `docs/`
2928

30-
Use Node.js `>=22`.
29+
The docs site is published at [stackpress.io/idea](https://www.stackpress.io/idea/).
3130

32-
Before running install, build, lint, or test commands:
31+
## Tooling
3332

34-
```bash
35-
node -v
36-
```
33+
Use Node.js `>=22` for work in this package.
3734

38-
If the active version is below Node 22, try `nvm` first:
35+
Before running Node-based commands, verify that the selected `node` binary is version `22` or higher.
3936

40-
```bash
41-
command -v nvm
42-
export NVM_DIR="$HOME/.nvm"
43-
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
44-
nvm use 22
45-
node -v
46-
```
37+
Use this lookup order:
38+
39+
1. Check whether `nvm` is installed.
40+
2. If `nvm` is installed, try to locate the NVM versions directory and prefer a Node `22+` binary from there.
41+
3. If the NVM directory cannot be located directly, try to use `nvm` itself to select or inspect a Node `22+` install.
42+
4. If `nvm` cannot be used, look for `node` in common OS-specific install paths.
43+
5. If common install paths do not contain Node `22+`, inspect environment variables such as `PATH`, `NVM_DIR`, and other Node-related environment variables.
44+
6. If Node `22+` still cannot be found, stop and ask the user for the Node binary location before proceeding.
4745

48-
If Node 22+ still cannot be resolved, stop and ask the user for the
49-
correct `nvm` location or required Node binary path.
46+
Do not assume that the default `node` on `PATH` satisfies this requirement.
5047

51-
Root dependencies are managed with `yarn`.
48+
Root dependencies use `yarn`.
5249

53-
Common root commands:
50+
Common commands:
5451

5552
```bash
5653
yarn build
5754
yarn test
5855
yarn test:parser
5956
yarn test:transformer
6057
yarn transform
58+
yarn build:docs
6159
```
6260

63-
Package-specific commands:
61+
Package-specific:
6462

6563
```bash
6664
yarn --cwd packages/idea-parser build
@@ -71,8 +69,7 @@ yarn --cwd packages/idea build
7169
yarn --cwd example build
7270
```
7371

74-
The `language/` extension is not part of the root Yarn workspace. Manage
75-
it from inside `language/`:
72+
The `language/` extension is not part of the root workspace:
7673

7774
```bash
7875
cd language && npm install
@@ -81,47 +78,26 @@ cd language && npm run lint
8178
cd language && npm test
8279
```
8380

84-
## Editing Guidance
85-
86-
- Prefer changes in `src/` and tests first, then rebuild only the
87-
affected package if needed.
88-
- Keep parser and transformer changes covered by tests in their
89-
respective `tests/` directories.
90-
- When changing package exports or CLI behavior, verify the relevant
91-
`package.json` entries still match emitted output.
92-
- The root workspace includes `packages/*` and `example`; `language` is
93-
separate and does not share the root workspace `node_modules`.
94-
- Do not run installs or validation on Node versions below 22.
95-
96-
## Documentation Guidance
97-
98-
Check existing docs before adding new conventions:
81+
## Docs Workflow
9982

100-
- `README.md`: landing page
101-
- `docs/getting-started.md`: tutorial
102-
- `docs/concepts/`: explanation
103-
- `docs/how-to/`: task guides
104-
- `docs/reference/`: lookup docs
105-
- `docs/examples/`: longer example tutorials
106-
- package-level `README.md` files: package-specific entry docs
83+
Docs authoring and publishing are separate:
10784

108-
When updating docs:
85+
- author Markdown in `specs/`
86+
- edit page/layout styles in `scripts/templates/`
87+
- regenerate the static site into `docs/` with `yarn build:docs`
10988

110-
- keep the README lightweight
111-
- put step-by-step workflow in `docs/getting-started.md`
112-
- keep concept, how-to, and reference content separate
113-
- prefer repo-backed examples over invented ecosystem claims
89+
Keep `README.md` lightweight. Put long-form docs in `specs/`.
11490

115-
## Validation Expectations
91+
## Validation
11692

117-
- Parser changes: run `yarn test:parser`
118-
- Transformer changes: run `yarn test:transformer`
119-
- Cross-package runtime changes: run `yarn test` and targeted builds as
120-
needed
121-
- Extension changes under `language`: ensure `npm install` has been run
122-
there, then run the relevant `compile`, `lint`, or `test` command
93+
- parser changes: `yarn test:parser`
94+
- transformer changes: `yarn test:transformer`
95+
- cross-package runtime changes: `yarn test`
96+
- docs generator/templates: `yarn build:docs`
97+
- extension changes: run the relevant `language` compile/lint/test command
12398

124-
## Notes For Agents
99+
## Agent Notes
125100

126-
- Use `rg` for code search.
127-
- Keep changes scoped; most tasks should touch only one area.
101+
- Use `rg` for search.
102+
- Keep changes scoped.
103+
- Prefer changing one area end-to-end instead of mixing unrelated edits.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
"example"
66
],
77
"scripts": {
8-
"build": "yarn build:parser && yarn build:transformer && yarn build:idea && yarn build:example",
8+
"build": "yarn build:parser && yarn build:transformer && yarn build:idea",
99
"build:docs": "node ./scripts/build-docs.mjs",
1010
"build:parser": "yarn --cwd packages/idea-parser build",
11-
"build:language": "yarn --cwd packages/idea-language build",
1211
"build:transformer": "yarn --cwd packages/idea-transformer build",
1312
"build:idea": "yarn --cwd packages/idea build",
1413
"build:example": "yarn --cwd example build",

0 commit comments

Comments
 (0)