Repository navigation
docs: add ast-grep-config documentation page - #50
Conversation
Deploying code-style with
|
| Latest commit: |
0883773
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://31b96f6c.code-style.pages.dev |
| Branch Preview URL: | https://amondnet-doc-ast.code-style.pages.dev |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive documentation for the @pleaseai/ast-grep-config package in both English and Korean, including updates to the main READMEs and documentation index pages. The review feedback suggests a medium-severity improvement to clarify the Nuxt 3 terminology in the English documentation, specifically changing 'root layouts' to 'root directories' or 'root structure' to avoid confusion.
…r tsx in Nuxt 3 workaround
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant BUN as bun CLI
participant AG as ast-grep CLI
participant CFG as ast-grep-config Package
participant RULES as Rule Files
participant DOCS as Docs Site
participant PKG as Package Manager
Note over Dev,DOCS: Documentation-Only PR - Describes Existing Runtime Flows
Note over Dev,PKG: Installation Flow (NEW: Documented)
Dev->>BUN: bun add -D @pleaseai/ast-grep-config @ast-grep/cli
BUN->>PKG: Install packages
BUN->>BUN: Check trustedDependencies
alt bun without trustedDependencies
BUN->>BUN: Skip @ast-grep/cli postinstall
BUN-->>Dev: Fallback warning on every scan
else bun with trustedDependencies
BUN->>PKG: Run @ast-grep/cli postinstall
PKG-->>BUN: ast-grep binary available
end
BUN-->>Dev: Packages installed
Note over Dev,AG: Usage Flow (NEW: Documented)
Dev->>AG: bunx ast-grep scan
AG->>CFG: Read sgconfig.yml
CFG-->>AG: ruleDirs: node_modules/@pleaseai/ast-grep-config/rules
AG->>RULES: Load 11 rules
RULES-->>AG: Rule definitions
alt direct scan with package config
Dev->>AG: bunx ast-grep scan -c node_modules/@pleaseai/ast-grep-config/sgconfig.yml
AG->>CFG: Load package's own sgconfig.yml
CFG-->>AG: Config with ruleDirs
end
AG->>AG: Run Layer 2 structural rules
Note over AG: TypeScript/Dart/Kotlin/Java/Rust<br/>No type info - name-based matching
AG-->>Dev: Scan report (all warnings)
Note over AG,CFG: Layer 3 (CHANGED: Documented)
AG->>AG: Ignore extract/ directory
Note over AG: extract/ not in ruleDirs<br/>Only used by please-style check
Note over Dev,CFG: Nuxt 3 Workaround (NEW: Documented)
alt Nuxt 3 root layouts (pages/ without app/)
Dev->>AG: ast-grep scan --off=ts-no-default-export --off=tsx-no-default-export
Dev->>AG: ast-grep scan --filter '^(ts|tsx)-no-default-export$' --globs '!pages/**' --globs '!layouts/**'
AG->>RULES: Apply framework ignores
RULES-->>AG: Excluded directories
end
Note over Dev,DOCS: Documentation Infrastructure
Dev->>DOCS: Access /en/ast-grep-config or /ko/ast-grep-config
DOCS-->>Dev: Render docs page
Note over DOCS: Docs site built from<br/>MDX content files
Note over AG,CFG: Message includes README path in node_modules
Note over AG: Warnings self-documenting for agents
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
|
/gemini review |
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/docs/src/content/docs/ko/ast-grep-config.mdx">
<violation number="1" location="apps/docs/src/content/docs/ko/ast-grep-config.mdx:173">
P2: This directs users to run the full `ast-grep scan` twice after migrating, duplicating the scan. Replace the two-step workaround with one plain scan.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive documentation for the new '@pleaseai/ast-grep-config' package, detailing its installation, usage, and core principles in both English and Korean across the READMEs and documentation pages. The review feedback points out a minor issue in the documentation examples where the invalid '--globs' option is used instead of '--glob' in the 'ast-grep scan' command.



Summary
Adds a documentation page for
@pleaseai/ast-grep-configto the docs site (English and Korean) and links it from both READMEs.apps/docs/src/content/docs/{en,ko}/ast-grep-config.mdx:trustedDependenciessgconfig.ymlusageplease-style check)index.mdx) in both locales.README.mdandREADME.ko.mdthat links to the new page.Documentation only. No code or package changes.
Related issue
None.
Checklist
bun run build) — produceddist/{en,ko}/ast-grep-config.htmlbun run lint) — not run;bun run typecheck(astro check) reports 0 errors/0 warnings andbun run lint:docspasses on 22 filesBREAKING CHANGE:note is includedSummary by cubic
Adds English and Korean documentation for
@pleaseai/ast-grep-config, plus README install/usage sections and home-page cards linking to it. Documentation only; no code or package changes.trustedDependencies),sgconfig.ymlusage, the five ADR-0022 principles, layer 2 versus layer 3 (please-style check), the 11-rule table with per-rule-group summaries, per-language error file locations and matching conditions, and compatibility.ast-grep scan, and the*.d.tsexemption shared with the error rules.README.mdandREADME.ko.mdgain an install/usage section pointing to the page, with headings made unique per package.Written for commit 0883773. Summary will update on new commits.