Commit Graph
19 Commits
Author SHA1 Message Date
asepharyana 6612cd9163 fix(hooks): configure via settings.local.json not plugin hooks.json
Skills-dir plugins (~/.claude/skills/) may not execute hooks from
hooks/hooks.json. Per documentation, hooks need to be in settings files.

- install.sh: add hook registration in ~/.claude/settings.local.json
- Hooks use absolute paths to hub-guide scripts
- SessionStart matcher: startup|resume|compact
- PreToolUse matcher: Write|Edit
- Remove hooks/hooks.json from plugin (redundant for skills-dir)
2026-07-26 12:06:29 +07:00
asepharyana 95a91d7bf5 fix(hooks): restore with proper SessionStart matchers
- Add matcher: startup|resume|compact for SessionStart (per docs)
- PreToolUse reads from stdin per documented hook input format
- Remove  arg, use stdin-based approach
- Scripts read event JSON from stdin as documented
- Plain text output, no special characters
2026-07-26 12:03:49 +07:00
asepharyana d324c1b3c0 fix: add MANDATORY prefix to all 8 core skill descriptions
- Add MANDATORY — always active to engineering-principles, testing,
  error-handling, security, git-workflow, api-design
- Update hook output with explicit EXTREMELY_IMPORTANT instruction
- Skills now explicitly state they apply to every session
2026-07-26 12:00:04 +07:00
asepharyana 6aaa593181 fix(hooks): plain text output only, no JSON injection
Skills-dir plugins might not process hookSpecificOutput JSON.
Revert to simple plain text echo - no emoji, no JSON, no Python.
Hook just prints detection results as clean text.
2026-07-26 11:57:43 +07:00
asepharyana a237759788 fix(hooks): match superpowers pattern exactly
- Add matcher: startup|clear|compact to SessionStart hook
- Inject only engineering-principles as foundational skill (19KB)
- Strip emoji, use plain text everywhere
- Remove 55KB of verbosity, keep focused primer
2026-07-26 11:56:55 +07:00
asepharyana 4c822c9b98 fix(hooks): remove emoji from output, use plain [hub-guide] label 2026-07-26 11:53:39 +07:00
asepharyana a167705769 fix(hooks): use Python JSON generation for reliable context injection
- Replace bash escape_json + printf with Python json.dump for
  reliable handling of Unicode and special characters in SKILL.md
- Output follows superpowers pattern: hookSpecificOutput.additionalContext
- 55KB context, 1230 lines, 8 mandatory skills injected at session start
- Tested: JSON valid, content complete
2026-07-26 11:51:35 +07:00
asepharyana 7827eb7f2d feat: add principle #29 — Never Assume, Show Evidence
- Every claim must have evidence from codebase, docs, or verified output
- No guessing on file structure, API signatures, errors, config, versions
- Must search before answering, ask when uncertain
- Updated hook to reinforce 'never assume' rule
2026-07-26 11:46:14 +07:00
asepharyana abd60c607d feat(hooks): skill injection with EXTREMELY_IMPORTANT framing
- Follow obra/superpowers pattern: <EXTREMELY_IMPORTANT> wrapper
- Clear instruction that these are loaded skills, not passive text
- 8 mandatory skill contents injected before any user interaction
- Detected skills listed for on-demand loading via Skill tool
- SessionStart hook now properly primes Claude with all rules
2026-07-25 17:51:51 +07:00
asepharyana 0604df8fe2 feat(hooks): inject skill content at session start (superpowers pattern)
- SessionStart hook now reads MANDATORY SKILL.md files and injects
  full content into conversation context before any user interaction
- Uses XML-like tags (<hub-guide-skills>, <skill>) to structure context
- Keeps project detection for active skills
- Follows obra/superpowers pattern: load skill content before explore
2026-07-25 17:49:12 +07:00
asepharyana 0aebde93ea feat: mark clean-code & clean-architecture as MANDATORY
- Add MANDATORY prefix to clean-code and clean-architecture descriptions
- Change 'core skills' to 'mandatory' in detect-project.sh output
- Both skills now always active, not just context-triggered
2026-07-25 13:07:10 +07:00
asepharyana a0f8796ebd fix(hooks): restore SessionStart + PreToolUse command hooks
Restore detect-project.sh, detect-file-type.sh, and hooks.json
from working version (80feaf2) with prompt-detection guidance lines.
2026-07-25 13:05:18 +07:00
asepharyana 082c8bc5b5 feat(hooks): detect from prompt not files
- Replace command-based SessionStart/PreToolUse hooks with prompt-based Stop hook
- Stop hook reads user's prompt and activates relevant skills concept-based
- Remove obsolete detect-project.sh, detect-file-type.sh, setup-hooks.sh
- Detection is concept-based regardless of spoken language
2026-07-25 13:03:38 +07:00
asepharyana 8af189167d fix(hub-guide): make hook output language-neutral
Remove English hardcoded sentences from detect-project.sh and detect-file-type.sh.
Output is now structured labels (emoji + key: value) without linguistic content.
2026-07-25 13:01:03 +07:00
asepharyana 5780d94ccf feat(hub-guide): language-agnostic auto-trigger across all skills
- Add principle 27: 'Language-Agnostic Auto-Trigger' to engineering-principles
- Remove hardcoded English-only keyword lists from all 26 skill descriptions
- Replace with concept-based detection: triggers from code context, project files,
  and file types regardless of spoken language
- Update detect-project.sh hook output with language-agnostic message
2026-07-25 12:59:43 +07:00
asepharyana 3a559a58f6 feat(hub-guide): add 'ask when ambiguous' principle across skills
- Add principle #25 to engineering-principles: 'Ask When Ambiguous'
- Add 'Ask When Ambiguous' section to design-patterns and clean-architecture
- Update detect-project.sh hook to reinforce ask-don't-assume behavior
2026-07-25 12:05:00 +07:00
asepharyana 80feaf2f16 fix(hub-guide): add nested hooks array in hooks.json entries
Each event entry needs hooks: [{ type, command, timeout }] inside it.
2026-07-25 11:59:34 +07:00
asepharyana 7435566498 fix(hub-guide): correct hooks.json format and remove redundant manifest field
- hooks.json needs 'hooks' wrapper key at top level
- Remove 'hooks' field from plugin.json (auto-discovered from hooks/hooks.json)
- Simplify hook entries (no nested hooks array)
2026-07-25 11:58:44 +07:00
asepharyana e513cddd68 feat(hub-guide): expand plugin with 26 best-practice skills, hooks, and references
Transform hub-guide from a single-skill Hub monorepo guide into a
comprehensive programming best-practice plugin covering all situations.

Skills (26):
- Core: engineering-principles, clean-code, clean-architecture,
  design-patterns, testing, error-handling, security, api-design,
  git-workflow, documentation, logging-observability, performance
- Languages: typescript, python, rust, go
- Frameworks: react-frontend, elysiajs, hono-backend, drizzle-database, nextjs
- Infrastructure: docker, ci-cd, monitoring
- Monorepo: monorepo, hub-guide (existing)

Hooks:
- SessionStart: auto-detect project type and activate relevant skills
- PreToolUse (Write|Edit): inject language-specific rules per file type

Reference files for deep dives:
- clean-architecture/references/solid.md (SOLID + component principles)
- design-patterns/references/catalog.md (full GoF catalog with examples)
- testing/references/mocks.md (test double taxonomy)

Restructure plugin to modern skills/ directory format.
2026-07-25 11:35:16 +07:00