Commit Graph
43 Commits
Author SHA1 Message Date
asepharyana 95c77c694f fix(hooks): restore Superpowers-style SessionStart command hook
Properly follow Superpowers 6.1.1 pattern:
- SessionStart command hook (type: command) runs run-hook.cmd session-start
- run-hook.cmd is a cross-platform polyglot wrapper (Unix/Windows)
- session-start script reads engineering-principles/SKILL.md and injects
  it as additionalContext wrapped in EXTREMELY_IMPORTANT tags
- The 29 engineering principles are active in context from turn 1

plugin.json: remove sessionStart.skill, keep skills: ./skills/
The command hook is the primary mechanism (just like Superpowers' using-superpowers).
2026-07-26 14:24:52 +07:00
asepharyana 530eb111a0 docs: update README, install scripts for sessionStart.skill approach 2026-07-26 14:22:46 +07:00
asepharyana bc9a88328d refactor(hooks): use sessionStart.skill instead of command hooks
- Replace SessionStart command hook with plugin.json's native
  sessionStart.skill field (like Superpowers' using-superpowers pattern)
- engineering-principles skill auto-loads at every session start
- Remove hooks/session-start, hooks/run-hook.cmd scripts
- Remove obsolete setup-hooks.sh (references deleted scripts)
- Empty hooks.json — hooks not needed, skill auto-load handles it
2026-07-26 14:21:54 +07:00
asepharyana 288939bb5a feat: update plugin version to 0.3.0, enhance hooks, and refine skill descriptions 2026-07-26 13:27:48 +07:00
asepharyana 8bcccfc022 refactor: rename hub-guide → code-guide, remove project-specific content
- Rename all references from hub-guide to code-guide
- Remove project-specific hub-guide skill (100% Asepharyana Hub specific)
- Genericize examples in monorepo, docker, ci-cd, engineering-principles skills
- Use generic service names (frontend, api, worker instead of hub, scraper)
- Use generic registry paths instead of ghcr.io/asepharyana/asepharyana-hub
- Remove project-specific deployment and infrastructure references
2026-07-26 12:28:25 +07:00
asepharyana fa2f1fe838 rename: hub-guide -> code-guide
Change plugin name from 'hub-guide' to 'code-guide' to avoid AI
interpreting it as Hub-specific. Skills now show as code-guide:skill-name.
Universal best-practice, not limited to any specific project.
2026-07-26 12:23:48 +07:00
asepharyana 7e76b2da44 fix(hooks): only fire ok:false when clearly violating principles
Previously returned ok:false every time because 'fully applied' all 8
skills is impossible in one response. Now ok:true by default (silent),
only fires ok:false when Claude is clearly guessing or violating rules.
2026-07-26 12:21:31 +07:00
asepharyana eba82a9b2f fix(hooks): use Stop event, not UserPromptSubmit
UserPromptSubmit dengan ok:false MEMBLOKIR prompt user.
Stop event dengan ok:false = inject instruksi ke Claude tanpa block.
Sama-sama inject context, tapi gak menghalangi user kerja.
2026-07-26 12:18:39 +07:00
asepharyana d66587ada1 fix(hooks): restore with UserPromptSubmit prompt hook
UserPromptSubmit fires before each user prompt. Returns ok:true (silent)
if skills are already applied, ok:false with reason only when not applied.
No more Stop hook error noise.
2026-07-26 12:16:36 +07:00
asepharyana 4c0285bf98 fix(hooks): remove Stop prompt hook causing error noise
Stop hook with ok:false fires on every response, causing 'Stop hook error'
display. Skills are auto-discovered via SKILL.md descriptions with
MANDATORY prefixes - hooks are not needed for activation.
2026-07-26 12:15:10 +07:00
asepharyana a527d0ee78 fix(hooks): use type prompt instead of command
Prompt-based hook returns ok:false with skill reminders as reason,
which gets fed back to Claude as active instructions.
2026-07-26 12:13:15 +07:00
asepharyana 0717000085 fix(hooks): inline context in hooks.json, no bash scripts
SessionStart hook directly echoes context text instead of
calling external script. Simple, maintainable, no dependencies.
2026-07-26 12:12:07 +07:00
asepharyana f40e925431 fix(hooks): remove hooks, rely on skill descriptions for activation
Hooks with command type not suitable for skills-dir plugins.
All 26 skills have MANDATORY — always active descriptions that
auto-trigger based on context, code, and project files.
2026-07-26 12:10:53 +07:00
asepharyana f149899ad5 fix(hooks): restore hooks.json in plugin dir, remove from settings.local
hooks.json in ~/.claude/skills/hub-guide/hooks/hooks.json IS auto-detected
by Claude Code for skills-dir plugins. Remove from settings.local.json
to avoid duplication.

- hooks.json restored with hooks wrapper + proper matchers
- install.sh simplified, no settings.json manipulation
2026-07-26 12:09:48 +07:00
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 a460599fc8 fix: convert engineering-principles #27-29 to English
Principles 27 (language-agnostic), 28 (never suppress lints),
and 29 (show evidence) were mixed Indonesian/English.
Now fully English. Examples also translated.
2026-07-26 11:47:34 +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 c8c84c35fc feat: add principle #28 — Never Suppress Lints, Fix the Code
- New engineering-principle: never #[allow], @ts-ignore, # noqa — fix instead
- Rust skill: add explicit #[allow(clippy::...)] anti-pattern with examples
- Also covers eslint-disable, ts-ignore, noqa, go vet
- Single exceptions: false positives, generated code, phased migration (<30d)
- CI enforcement commands for Rust/TS/Python/Go
2026-07-25 14:58:13 +07:00
asepharyana af202add20 fix: restore full clean-code and clean-architecture descriptions with MANDATORY prefix 2026-07-25 13:10:52 +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 1fa4a03b84 feat(engineering-principles): add principle #26 — use Workflow for complex tasks
- New principle: 'Use Multi-Agent Workflows for Complex Tasks — Dont Go Solo'
- Trigger phrases in description: complex, big, multi-step, comprehensive, audit, migrate, etc.
- Quality patterns: adversarial verify, multi-modal sweep, completeness critic, loop-until-dry
- Guidance on pipeline vs barrier selection
2026-07-25 12:56:00 +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 2d05b8a9e0 chore(hub-guide): remove stray symlink in repo 2026-07-25 11:56:44 +07:00
asepharyana 75cbe31bac fix(hub-guide): install as one unit ~/.claude/skills/hub-guide/
Not split per-skill directory. Single symlink/copy of the entire plugin. Skills are
auto-discovered from ~/.claude/skills/<name>/skills/<skill>/SKILL.md.
2026-07-25 11:56:26 +07:00
asepharyana 39f3f093fe fix(hub-guide): correct install target to ~/.claude/skills/
Skills go directly to ~/.claude/skills/<name>/ (not ~/.claude/plugins/).
Hooks configured via setup-hooks.sh -> settings.local.json.

Changes:
- install.sh: targets ~/.claude/skills/, no settings.json registration needed
- install.ps1: updated to match
- setup-hooks.sh: new script to add hooks to settings.local.json
- README: fix install instructions
- Remove nested .claude-plugin directory
- 26 skills symlinked to ~/.claude/skills/
2026-07-25 11:54:26 +07:00
asepharyana 42ef7e30f4 feat(hub-guide): add install scripts with settings.json registration
- install.sh: copies/symlinks plugin to ~/.claude/plugins/ + auto-register in settings.json
- install.ps1: PowerShell variant for Windows
- Fix .claude-plugin nesting issue in install_item
- Remove --project flag (unnecessary complexity)
- Add progress echo for manifest installation
2026-07-25 11:51:39 +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
asepharyana ecdce01387 feat: initial hub-guide Claude Code plugin
- plugin.json manifest with hub-guide skill
- Skill: monorepo guidance (submodules, infra, dev workflow, debugging)
2026-07-25 10:53:29 +07:00
asepharyanaandGitHub 6e5b2f848d Initial commit 2026-07-25 10:52:51 +07:00