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
{{ message }}
Repository navigation
Commit 93e3967
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cli): work without package.json and copy rule guides into .agents/code-style (#70)
* feat(cli): work without package.json and copy rule guides into .agents/code-style
The CLI no longer requires package.json, so init, update, and doctor work in
Gradle, pubspec, and Cargo-only projects.
- copy the rule guides into .agents/code-style/ together with NOTICE.md and
LICENSE-Apache-2.0.txt
- link those copies from the AGENTS.md block for all projects
- keep reading legacy node_modules/@pleaseai/code-style/rules/ links and
migrate them in update
- make doctor check that the linked guides exist
- update both READMEs, rules.md, and the en/ko CLI docs
Refs #65
* test(cli): mirror guides.ts and cover legacy and multi-language runs
Move the guide sync tests into test/guides.test.ts, add e2e runs for update on a project
carrying the v0.1.1 block and init on a pubspec.yaml + Cargo.toml project, and move the
doctor --lang test out of the no-package.json group.
Refs #65
* fix(cli): refuse symlinked guide paths and check linked guides in doctor
- syncGuides validates .agents, .agents/code-style and every guide it
writes or removes before changing anything, and stops on a symlink
- doctor checks the guide paths the AGENTS.md block actually links,
legacy node_modules links included
- doctor skips the package-tool config files without a package.json
- AGENTS.md pointers reuse guidePath
- docs and usage say update refreshes the block and its guides
Refs #65
* fix(cli): check guide paths before init installs and unlink removed guide symlinks
- init checks the guide paths for symlinks before installing packages
whenever the AGENTS.md block is selected, so a symlinked .agents stops
it before anything is written
- removing a deselected guide only unlinks it, so the symlink check now
covers the written paths only, and dangling links are removed too
Refs #65
Copy file name to clipboardExpand all lines: apps/docs/src/content/docs/en/cli.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Inspired by [ultracite](https://github.com/haydenbleasel/ultracite) and NaverPay
10
10
11
11
## Quick Start
12
12
13
-
Run from the root of any project that has a `package.json`:
13
+
Run from the root of your project. A `package.json` is optional: without one (Gradle, pubspec or Cargo-only projects) `init` offers only the AGENTS.md block and its guides, and `update` and `doctor` work as usual:
Refresh **only**the `AGENTS.md` rules block without touching packages or other config files. Use this after bumping `@pleaseai/code-style` to pull in the latest rules.
51
+
Refresh the `AGENTS.md` rules block and the guides in `.agents/code-style/` without touching packages or other config files. Use this after bumping `@pleaseai/code-style` to pull in the latest rules.
52
52
53
53
```bash
54
54
pleaseai-code-style update
@@ -122,9 +122,9 @@ These rules are managed by `@pleaseai/code-style`. Run
122
122
My own content stays here untouched.
123
123
```
124
124
125
-
The CLI **only** owns the content between the two marker comments — everything else in `AGENTS.md` is preserved verbatim. Running `update` twice in a row is a no-op; the block never duplicates.
125
+
In `AGENTS.md`, the CLI **only** owns the content between the two marker comments — everything else is preserved verbatim. Running `update` twice in a row is a no-op; the block never duplicates.
126
126
127
-
The full canonical rules are shipped per language for AI assistants that prefer to read the long version: start with `node_modules/@pleaseai/code-style/rules/general.md` (every language), then the language guide listed in `node_modules/@pleaseai/code-style/rules.md` (for example, `node_modules/@pleaseai/code-style/rules/typescript.md` for TypeScript and JavaScript).
127
+
The full canonical rules are copied into your project per language for AI assistants that prefer to read the long version, so they resolve without `node_modules`: start with `.agents/code-style/general.md` (every language), then the guide of your language (for example, `.agents/code-style/typescript.md` for TypeScript and JavaScript). `NOTICE.md` and `LICENSE-Apache-2.0.txt` in the same directory carry the attribution for the adapted guides. Commit `.agents/code-style/`: `init` and `update` rewrite it, overwrite its files and remove the guide of a language that is no longer selected (other files there are never touched). `doctor` checks that every guide the block links exists.
CLI는 두 마커 주석 사이의 내용 **만** 관리하며 —`AGENTS.md`의 나머지 내용은 그대로 보존됩니다. `update`를 연속으로 두 번 실행해도 no-op이며, 블록이 중복되지 않습니다.
125
+
`AGENTS.md`에서 CLI는 두 마커 주석 사이의 내용 **만** 관리하며 — 나머지 내용은 그대로 보존됩니다. `update`를 연속으로 두 번 실행해도 no-op이며, 블록이 중복되지 않습니다.
126
126
127
-
전체 원본 규칙은 AI 어시스턴트가 긴 버전을 읽기 원할 때 참고할 수 있도록 언어별로 나뉘어 함께 배포됩니다.`node_modules/@pleaseai/code-style/rules/general.md`(모든 언어)를 먼저 읽고, `node_modules/@pleaseai/code-style/rules.md`에 나열된 언어별 가이드를 읽으세요(예: TypeScript·JavaScript는 `node_modules/@pleaseai/code-style/rules/typescript.md`).
127
+
전체 원본 규칙은 AI 어시스턴트가 긴 버전을 읽기 원할 때 참고할 수 있도록 언어별로 나뉘어 프로젝트에 복사되므로`node_modules` 없이도 읽을 수 있습니다. `.agents/code-style/general.md`(모든 언어)를 먼저 읽고, 사용하는 언어의 가이드를 읽으세요(예: TypeScript·JavaScript는 `.agents/code-style/typescript.md`). 같은 디렉터리의 `NOTICE.md`와 `LICENSE-Apache-2.0.txt`에 각색한 가이드의 출처 표기가 있습니다. `.agents/code-style/`은 커밋하세요. `init`과 `update`가 이 디렉터리를 다시 쓰며 파일을 덮어쓰고, 더 이상 선택하지 않은 언어의 가이드는 삭제합니다(디렉터리의 다른 파일은 건드리지 않습니다). `doctor`는 블록이 가리키는 가이드가 모두 있는지 확인합니다.
0 commit comments