Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@
{
"type": "command",
"command": "bunx @pleaseai/code format --stdin",
"timeout": 30
"timeout": 10
},
{
"type": "command",
"command": "bunx @pleaseai/code lsp --stdin",
"timeout": 60
"timeout": 5
}
]
}
]
},
"enabledPlugins": {
"hookify@claude-plugins-official": false,
"hookify@claude-plugins-official": true,
"github@claude-plugins-official": true,
"asana@claude-plugins-official": true,
"typescript-lsp@claude-plugins-official": true,
"context7@claude-plugins-official": true
"context7@claude-plugins-official": true,
"plugin-dev@claude-plugins-official": true
}
}
2 changes: 1 addition & 1 deletion .please/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"code_workspace": {
"enabled": true
},
"lsp": {},
"lsp": false,
"ignore_patterns": [],
"language": "en",
"integrations": {
Expand Down
8 changes: 8 additions & 0 deletions .please/memory/progress.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Please:Dev Progress
Feature: Create documentation site at apps/docs
Session: 20251221-docs-site
Phase: 1/8 (Discovery)
Tasks: 0/0 completed
Last Task: None
Last Checkpoint: None
Updated: 2025-12-21T10:00:00Z
4 changes: 2 additions & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"dependencies": {
"better-sqlite3": "^12.2.0",
"docs-please": "^0.2.5",
"docs-please": "^0.2.6",
"nuxt": "^4.2.1",
"zod": "^4.2.1",
"zod": "^4.0.0",
"zod-to-json-schema": "^3.25.0"
},
"devDependencies": {
Expand Down
52 changes: 39 additions & 13 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bun $CLAUDE_PLUGIN_ROOT/hooks/scripts/ast-grep-context.ts",
"timeout": 5
}
]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "npx @pleaseai/code format --stdin",
"timeout": 30
"command": "bunx @pleaseai/code format --stdin",
"timeout": 10
},
{
"type": "command",
"command": "npx @pleaseai/code lsp --stdin",
"timeout": 30
"command": "bunx @pleaseai/code lsp --stdin",
"timeout": 10
}
]
}
Expand Down
55 changes: 55 additions & 0 deletions hooks/scripts/ast-grep-context.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* SessionStart hook script that provides ast-grep context
* Outputs JSON with additionalContext for Claude Code sessions
*/

import { $ } from 'bun'

export const INSTALLED_CONTEXT = `When searching or modifying code, use ast-grep instead of grep, ripgrep, ag, sed, or regex-only tools. ast-grep matches against the AST (Abstract Syntax Tree), enabling safe, language-aware queries and rewrites.

Always prefer ast-grep for code analysis, queries, or refactoring tasks.

For detailed patterns and examples, use the ast-grep skill.`

export const NOT_INSTALLED_CONTEXT = `Consider installing ast-grep for better code search (AST-based, language-aware):

npx @pleaseai/code setup ast-grep # Recommended (local cache)
brew install ast-grep # macOS
cargo install ast-grep # Rust

After installation, use ast-grep instead of grep/ripgrep/sed for code operations.`

export async function checkAstGrepInstalled(): Promise<boolean> {
return await $`which ast-grep`
.quiet()
.then(() => true)
.catch(() => false)
}

export function getAdditionalContext(isInstalled: boolean): string {
return isInstalled ? INSTALLED_CONTEXT : NOT_INSTALLED_CONTEXT
}

export interface HookOutput {
hookSpecificOutput: {
hookEventName: string
additionalContext: string
}
}

export function createHookOutput(additionalContext: string): HookOutput {
return {
hookSpecificOutput: {
hookEventName: 'SessionStart',
additionalContext,
},
}
}

// Only run when executed directly
if (import.meta.main) {
const isInstalled = await checkAstGrepInstalled()
const additionalContext = getAdditionalContext(isInstalled)
const output = createHookOutput(additionalContext)
console.log(JSON.stringify(output))
}
17 changes: 17 additions & 0 deletions hooks/scripts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@pleaseai/hooks-scripts",
"type": "module",
"version": "0.1.0",
"private": true,
"description": "Claude Code hook scripts",
"author": "Minsu Lee",
"license": "MIT",
"scripts": {
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "bun test ./test"
},
"devDependencies": {
"@types/bun": "latest",
"typescript": "^5.7.0"
}
}
Loading
Loading