You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+54-29Lines changed: 54 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,37 +4,38 @@
4
4
5
5
This repository contains the `@stackpress/idea` toolchain:
6
6
7
-
-`packages/idea-parser`: parses `.idea` schemas into AST/JSON output.
8
-
-`packages/idea-transformer`: runs transformers/plugins against parsed schemas.
9
-
-`packages/idea`: top-level CLI package that wires parser + transformer together.
10
-
-`example`: small workspace used to exercise the toolchain.
11
-
-`language`: VS Code language extension for `.idea` files.
7
+
-`packages/idea-parser`: parses `.idea` schemas into AST/JSON output
8
+
-`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
12
12
13
13
## Working Areas
14
14
15
-
Primary source files live under:
15
+
Primary source lives in:
16
16
17
17
-`packages/*/src`
18
18
-`packages/idea-parser/tests`
19
19
-`packages/idea-transformer/tests`
20
20
-`language/client/src`
21
21
-`language/server/src`
22
+
-`docs/`
22
23
23
-
Generated build output lives under package `cjs/` and `esm/` directories. Do not edit generated files by hand unless the task is explicitly about build artifacts or release packaging.
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
27
25
-
## Install And Tooling
28
+
## Tooling
26
29
27
-
Use Node.js `>=22` for work in this repository.
30
+
Use Node.js `>=22`.
28
31
29
-
Before running install, build, lint, or test commands, check the active Node version:
32
+
Before running install, build, lint, or test commands:
30
33
31
34
```bash
32
35
node -v
33
36
```
34
37
35
-
If the active version is below Node 22, try `nvm` first. Prefer resolving `nvm` from the current shell environment, then from the standard user install location.
36
-
37
-
Example flow:
38
+
If the active version is below Node 22, try `nvm` first:
38
39
39
40
```bash
40
41
command -v nvm
@@ -44,11 +45,12 @@ nvm use 22
44
45
node -v
45
46
```
46
47
47
-
If Node 22+ still cannot be resolved, stop and ask the user for the correct `nvm` location or the project’s required Node binary path before continuing.
48
+
If Node 22+ still cannot be resolved, stop and ask the user for the
49
+
correct `nvm` location or required Node binary path.
48
50
49
51
Root dependencies are managed with `yarn`.
50
52
51
-
Common commands from the repository root:
53
+
Common root commands:
52
54
53
55
```bash
54
56
yarn build
@@ -69,9 +71,8 @@ yarn --cwd packages/idea build
69
71
yarn --cwd example build
70
72
```
71
73
72
-
The `language/` extension is not part of the root Yarn workspace. Install its dependencies from inside `language/`, and expect it to maintain its own `node_modules`.
73
-
74
-
Language extension commands:
74
+
The `language/` extension is not part of the root Yarn workspace. Manage
75
+
it from inside `language/`:
75
76
76
77
```bash
77
78
cd language && npm install
@@ -82,21 +83,45 @@ cd language && npm test
82
83
83
84
## Editing Guidance
84
85
85
-
- Prefer changes in `src/` and tests first, then rebuild only the affected package if needed.
86
-
- Keep parser and transformer changes covered by tests in their respective `tests/` directories.
87
-
- When changing package exports or CLI behavior, verify the corresponding `package.json` entries still line up with emitted output.
88
-
- The root workspace lists `packages/*` and `example`; `language` is managed separately and does not share the root workspace `node_modules`.
89
-
- Do not proceed with package installs or validation on Node versions below 22.
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:
- 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
90
114
91
115
## Validation Expectations
92
116
93
-
- For parser changes, run `yarn test:parser`.
94
-
- For transformer changes, run `yarn test:transformer`.
95
-
- For cross-package runtime changes, run `yarn test` and any targeted build commands needed to confirm emitted `cjs/`/`esm/` output is still valid.
96
-
- For extension changes under `language`, make sure `npm install` has been run in `language/`, then run the relevant `compile`, `lint`, or `test` command there.
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
97
123
98
124
## Notes For Agents
99
125
100
126
- Use `rg` for code search.
101
-
- Keep changes scoped; this repo contains multiple related packages but most tasks should touch only one area.
102
-
- Check for existing docs in `README.md`, `docs/`, and package-level READMEs before adding new conventions.
127
+
- Keep changes scoped; most tasks should touch only one area.
0 commit comments