178 Commits

Author SHA1 Message Date
Luong NGUYEN cf92e8e2c1 chore(release): v2.1.112
Sync all English tutorials with Claude Code v2.1.112 and the new Opus 4.7
model (claude-opus-4-7). Introduces the xhigh effort level (new default on
Opus 4.7), two new built-in slash commands (/ultrareview,
/less-permission-prompts), auto mode without --enable-auto-mode for Max
subscribers on Opus 4.7, PowerShell tool on Windows, Auto-match-terminal
theme, and plan files named after prompts. All 18 EN doc footers bumped to
Claude Code v2.1.112.

Version callouts in README.md, zh/README.md, and uk/README.md updated to
v2.1.112. Changelog entry prepended.

Repo version now tracks Claude Code version (2.3.0 → 2.1.112 is intentional
per new convention).
v2.1.112
2026-04-16 23:13:34 +02:00
Luong NGUYEN 15f00855e8 docs: sync to Claude Code v2.1.110 (TUI, push notifications, session recap) (#80)
* docs: sync to Claude Code v2.1.110 with TUI, push notifications, session recap, and new commands

- 01-slash-commands: add /tui, /focus, /recap, /undo, /proactive to command table and recent changes
- 07-plugins: document monitors manifest key for background monitor support (v2.1.105)
- 09-advanced-features: add TUI mode, push notifications, session recap, ENABLE_PROMPT_CACHING_1H
- 10-cli: add --exclude-dynamic-system-prompt-sections flag and CLAUDE_CODE_PERFORCE_MODE env var
- CATALOG.md: update command counts (55+→60+, 63+→68+), add 5 new command rows
- All 12 files: bump footer to April 16, 2026 / Claude Code Version 2.1.110

* fix(catalog): correct version tags for /proactive, /recap, /undo commands

/proactive was added in v2.1.105, /recap and /undo in v2.1.108 — not v2.1.110.
Only /tui and /focus were introduced in v2.1.110.
2026-04-16 09:05:49 +02:00
Luong NGUYEN 9c224ff249 docs(readme): add Ukrainian language link to language switcher 2026-04-11 22:51:55 +02:00
Luong NGUYEN 039dde2c5c i18n(uk): Add complete Ukrainian localization
Merges full Ukrainian (uk) localization — 10 modules, root docs, claude_concepts_guide, plugins, and supporting files. Closes #63.
2026-04-11 22:50:27 +02:00
yarlinghe bce7cf8cb4 fix(hooks): correct pre-tool-check.sh hook protocol bugs (#72)
The pre-tool-check.sh example had three bugs rooted in the same
misunderstanding of the Claude Code PreToolUse hook protocol
(stdin/stdout/stderr + exit code contract):

1. Substring matching on `rm -rf /`
   The pattern was unanchored, so grep treated it as a substring and
   falsely blocked any command containing `rm -rf /` — including benign
   calls like `rm -rf /tmp/build` or `rm -rf /var/cache/foo`. Fixed by
   anchoring the slash to a whitespace-or-end-of-line boundary.

2. WARN tier was dead code
   The warning layer printed to stderr and then `exit 0`. Claude Code
   silently discards stderr on exit 0, so the warnings were never seen
   by Claude, the user, or any log. Fixed by adding an audit log file
   at `$CLAUDE_PROJECT_DIR/.claude/hooks/audit.log` that records every
   invocation with its decision (BLOCK/WARN/ALLOW). The audit log is
   now the reliable observability mechanism for the WARN tier.

3. BLOCK reasons printed to stdout instead of stderr
   On `exit 2`, Claude Code reads stderr to surface the block reason
   to Claude. The echoes before `exit 2` defaulted to stdout, so
   Claude Code reported `"No stderr output"` and Claude had to read
   the hook source file to infer why a command was blocked. Fixed by
   explicitly redirecting the block-reason echoes to stderr with `>&2`.

Also escaped the regex metacharacters in the fork-bomb pattern
`:(){:|:&};:` so it matches literally under `grep -E`, and updated the
header docstring to document the stdout/stderr/exit-code convention so
future readers don't make the same mistakes.

Verified with 6 smoke tests covering: benign command (ALLOW), warn-tier
relative path, substring edge case (`rm -rf /tmp/...` no longer falsely
blocked), exact root match (`rm -rf /`, `rm -rf / ; echo` still blocked),
fork-bomb literal, and `git push --force` (WARN only). stdout is empty
in all cases; all reasons correctly routed to stderr or the audit log.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:48:05 +02:00
Luong NGUYEN 2deba3ac2f docs: sync to Claude Code v2.1.101 with /team-onboarding, /ultraplan, Monitor tool (#73)
* docs: sync to Claude Code v2.1.101 with new feature coverage

Bumps all English docs from v2.1.97 to v2.1.101, adds mandatory Sources
footer block (previously missing), and documents three new features
shipped between v2.1.98 and v2.1.101:

- /team-onboarding (v2.1.101) — new built-in command for generating
  teammate ramp-up guides. Added to 01-slash-commands and CATALOG.
- /ultraplan (v2.1.91+, cloud-env auto-creation in v2.1.101) — full
  section in 09-advanced-features covering launch methods, status
  indicators, and execution options. Replaces prior 3-line stub.
- Monitor tool (v2.1.98) — full section in 09-advanced-features with
  stream-filter and poll-emit patterns and the grep --line-buffered
  warning. Added to resources.md feature table.

Vietnamese and Chinese translations are not touched in this sync.

* fix(docs): address review feedback on v2.1.101 sync

- Correct /team-onboarding availability date (April 10 → April 11, 2026)
- Fix uninitialized \$last variable in Monitor poll-and-emit example
- Update CATALOG.md New Features heading to April 2026 and add Monitor
  Tool, /team-onboarding, and Ultraplan auto-create entries
2026-04-11 22:30:46 +02:00
Evgenij I b8a7b1f491 fix: change bad mermaid example to text block to pass CI 2026-04-10 13:43:14 +03:00
Evgenij I d970cc6b2d fix(uk): fix CP1251 encoding in claude_concepts_guide.md ToC 2026-04-10 08:57:34 +03:00
Evgenij I f6d73e2659 fix(uk): replace stub README with full translation, fix broken anchors
- Replace 3KB stub README with full 31KB translation matching original structure
- Fix apostrophe anchor mismatch in 04-subagents (U+02BC vs U+0027)
- Fix duplicate heading in 06-hooks (Prompt-хуки → Хуки на основі промптів)

Ref: luongnv89/claude-howto#63
2026-04-10 08:54:06 +03:00
Evgenij I 1dcd8d370c i18n(uk): complete translation of claude_concepts_guide.md
Full Ukrainian translation of the comprehensive concepts guide (87KB, 3135 lines).
All code blocks, Mermaid diagrams, and JSON configs preserved as-is.

Ref: luongnv89/claude-howto#63
2026-04-10 02:18:15 +03:00
Evgenij I 09c2fa24b1 i18n(uk): add resources/, scripts/, docs/, prompts/ translations
- Translate resources/ (README, QUICK-START, DESIGN-SYSTEM)
- Translate scripts/README.md (EPUB builder docs)
- Copy docs/ and prompts/ as-is (internal planning + functional prompts)
- Copy claude_concepts_guide.md (base for in-place translation)

Ref: luongnv89/claude-howto#63
2026-04-10 00:55:04 +03:00
Evgenij I 3f11521fcc i18n(uk): add missing root files (CLAUDE.md, clean-code-rules, resources, etc.)
- Translate CLAUDE.md, clean-code-rules.md, resources.md
- Translate pr-review plugin (README, commands, agents)
- Translate documentation templates (ADR, api-endpoint, function-docs)
- Copy RELEASE_NOTES.md, LICENSE, claude-howto-logo.png as-is
- Update TRANSLATION_QUEUE.md to 100%

Ref: luongnv89/claude-howto#63
2026-04-10 00:34:08 +03:00
Evgenij I 8438a0378a i18n(uk): complete P3 examples + P4 root docs translation
- Translate 07-plugins: devops-automation, documentation, pr-review
  (READMEs, commands, agents, templates)
- Update TRANSLATION_QUEUE.md — all priorities complete (100%)

Ref: luongnv89/claude-howto#63
2026-04-10 00:16:09 +03:00
Evgenij I f5659be047 i18n(uk): translate 07-plugins devops-automation & documentation
- Translate READMEs, commands, agents for both plugins
- Code/config/hooks files unchanged (no translation needed)

Ref: luongnv89/claude-howto#63
2026-04-10 00:13:13 +03:00
Evgenij I 1a567be793 i18n(uk): add missing files, translate P4 root docs
- Copy code/image/config files across all modules
- Translate brand-voice and code-review templates
- Translate CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, STYLE_GUIDE
- Copy CHANGELOG as-is (technical log)

Ref: luongnv89/claude-howto#63
2026-04-09 23:59:59 +03:00
Evgenij I c0d400b21b feat(uk): translate refactor references (code-smells + catalog)
03-skills/refactor/references/code-smells.md (669 lines)
03-skills/refactor/references/refactoring-catalog.md (1023 lines)

P3 complete. Remaining: P4 root docs (5 files).

Ref: luongnv89/claude-howto#63
2026-04-09 23:08:46 +03:00
Evgenij I b56f1e111a feat(uk): translate P3 examples for skills/refactor, subagents, checkpoints, advanced
03-skills/refactor: SKILL.md + templates/refactoring-plan.md
04-subagents: 8 agent definitions
08-checkpoints: checkpoint-examples.md
09-advanced: planning-mode-examples.md

Remaining: refactor references (1692 lines), P4 root docs

Ref: luongnv89/claude-howto#63
2026-04-09 22:57:13 +03:00
Evgenij I cea0a7d4ef feat(uk): translate P3 examples for module 03-skills
6 SKILL.md files + 3 templates translated.
Remaining: references/code-smells.md and references/refactoring-catalog.md

Ref: luongnv89/claude-howto#63
2026-04-09 22:46:03 +03:00
Evgenij I 6172aacfd5 feat(uk): translate P3 examples for modules 01, 02
01-slash-commands: 7 slash command examples
02-memory: 3 CLAUDE.md examples

Progress: 25/67 files

Ref: luongnv89/claude-howto#63
2026-04-09 22:31:43 +03:00
Evgenij I 2a27614770 fix(uk): complete translations for modules 06, 07, 09, 10
Modules 06-hooks, 07-plugins, 09-advanced-features, 10-cli had
truncated translations (18-58% content loss). Retranslated from
scratch using original English sources.

All files now match expected ~40% size increase for Cyrillic.

Ref: luongnv89/claude-howto#63
2026-04-09 19:55:57 +03:00
Evgenij I 8684be223d feat(uk): translate Module 01 and Module 08 READMEs
Module 01: Slash Commands (565 lines)
Module 08: Checkpoints and Rewind (320 lines)
Update TRANSLATION_QUEUE.md with P1 completion.

Progress: 7/67 files (P1: 5/5 DONE, P2: 2/10)

Ref: luongnv89/claude-howto#63
2026-04-09 13:45:06 +03:00
Evgenij I 9efa5dd9b8 feat(uk): translate LEARNING-ROADMAP.md to Ukrainian
Complete Ukrainian translation of LEARNING-ROADMAP.md - the guided
learning path for Claude Code features.

- Self-assessment quiz for level determination
- Three learning levels: Beginner, Intermediate, Advanced
- All milestones (1A, 1B, 2A, 2B, 3A, 3B) with exercises
- Mermaid diagram preserved unchanged
- Progress tracking checklists
- Quick start paths (15 min, 1 hour, weekend)
- Learning tips and common challenges

Progress: 5/67 files (P1: 5/5 core documents COMPLETE)

Ref: luongnv89/claude-howto#63
2026-04-09 13:34:22 +03:00
Evgenij I 118fd40183 feat(uk): translate QUICK_REFERENCE.md to Ukrainian
Complete Ukrainian translation of QUICK_REFERENCE.md - the quick
reference card for all Claude Code features.

- Installation quick commands for all features
- Feature cheat sheet with paths and usage
- Common use cases (code review, docs, DevOps, CI/CD)
- File locations reference diagram
- Learning path (Day 1 through Week 3+)
- New features (March 2026) section
- Tips, FAQ, and getting started checklist

Progress: 4/67 files (P1: 4/5 core documents)

Ref: luongnv89/claude-howto#63
2026-04-09 13:28:06 +03:00
Evgenij I c343be62f5 feat(uk): translate CATALOG.md to Ukrainian
Complete Ukrainian translation of CATALOG.md - the quick reference
guide to all Claude Code features.

- 55+ built-in commands reference with Ukrainian descriptions
- Permission modes, subagents, skills, plugins sections
- MCP servers, hooks (25 events), memory types
- New features (March 2026) - 20+ features
- Quick reference matrix and installation priority
- i18n-source-sha frontmatter for version tracking

Progress: 3/67 files (P1: 3/5 core documents)

Ref: luongnv89/claude-howto#63
2026-04-09 13:21:40 +03:00
Evgenij I a80b980bb6 feat(uk): translate INDEX.md to Ukrainian
Complete Ukrainian translation of INDEX.md - the comprehensive
index of all example files in the repository.

Translation follows uk/TRANSLATION_NOTES.md guidelines:
- Technical terms per glossary
- File paths and code blocks preserved in English
- Table structure and formatting maintained
- All 883 lines translated
- i18n-source-sha frontmatter added for version tracking

Progress: 2/67 files (P1: 2/5 core documents)

Ref: luongnv89/claude-howto#63
2026-04-09 13:16:35 +03:00
Evgenij I 06caeaa8d9 feat(i18n): add Ukrainian localization infrastructure
- uk/README.md: Ukrainian landing page with module index
- uk/TRANSLATION_NOTES.md: glossary and style guide
- uk/TRANSLATION_QUEUE.md: progress tracker (0/67 files)
- Directory structure for all 10 modules

Ref: luongnv89/claude-howto#63
2026-04-09 13:12:52 +03:00
Luong NGUYEN 63a1416884 fix(docs): correct Claude Code version to 2.1.97 across all footers
The latest Claude Code release is 2.1.97, not 2.3.0 (which is this
guide's own version). Update all 20 "Claude Code Version" footer lines
to accurately reflect the documented Claude Code version.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-09 06:42:51 +02:00
Luong NGUYEN 7f2e77337e docs: update Last Updated date and Claude Code version across all files
Update all documentation footers from generic "April 2026 / 2.1+" to
the specific sync date (April 9, 2026) and documented version (2.3.0).
Also add version/date footers to zh/CATALOG.md and
zh/01-slash-commands/README.md which were missing them.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-09 06:41:16 +02:00
Luong NGUYEN e015f39c68 fix: apply 2026-04-09 documentation accuracy updates
P0 Critical:
- Remove /vim (removed in v2.1.92) from CATALOG.md, zh/CATALOG.md active tables
- Move /vim to deprecated section in zh/01-slash-commands/README.md
- Fix fake hook events (PreCommit/PrePush/PostPush) in config-examples.json
- Replace with real PreToolUse hook pattern
- Update deprecated model IDs: claude-sonnet-4-5 → claude-sonnet-4-6 (x4)
- Fix notify-team.sh comment: PostPush → PostToolUse with explanation
- Mark # memory shortcut as discontinued in 02-memory/README.md

P2 Conflicts resolved:
- effort:max confirmed valid in current CLI; no changes needed
- Remove WebSocket MCP transport (not supported; only stdio/sse/http valid)
  from 05-mcp/README.md, CATALOG.md, QUICK_REFERENCE.md

P4 Cosmetic:
- Update hook count 25 → 26 in QUICK_REFERENCE.md

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-09 06:32:26 +02:00
Thiên Toán 561c6cbaa3 docs(vi): sync Vietnamese documentation with English source (#60)
- Fix untranslated terms in CODE_OF_CONDUCT (witness, criticism, feedback, stalking)
- Remove Arabic text accidentally left in Retaliation section
- Add missing Scope content to CODE_OF_CONDUCT
- Add Vietnamese footers to all module READMEs
- Translate footers: Last Updated → Cập Nhật Lần Cuối, Compatible Models → Các Mô Hình Tương Thích
- Add missing Vietnamese files: CLAUDE.md, LICENSE, RELEASE_NOTES.md, clean-code-rules.md, resources.md
- Add missing images: pr-slash-command.png, memory-*.png, claude-howto-logo.png
- Fix CODE_OF_CONDUCT closing message to Vietnamese
2026-04-08 15:58:16 +02:00
Luong NGUYEN f07313d71f docs: remove contributors section 2026-04-07 11:12:17 +02:00
Luong NGUYEN 4f5537430d docs: update GitHub metrics to 21,800+ stars, 2,585+ forks 2026-04-07 10:40:05 +02:00
Luong NGUYEN 8b42603bb7 chore(release): v2.3.0 v2.3.0 2026-04-07 10:27:21 +02:00
Luong NGUYEN 72d3b016e6 docs: sync all tutorials with latest Claude Code docs (April 2026) (#56)
* docs: sync all tutorials with latest Claude Code official docs (April 2026)

Update 44 documentation files to reflect the latest Claude Code features
from code.claude.com. Key content changes include new slash commands
(/ultraplan, /powerup, /sandbox), deprecated command removals (/pr-comments,
/vim), corrected skill description budget (1%/8K), new hook events
(PermissionDenied, InstructionsLoaded, ConfigChange), expanded Agent Teams
section, new plugin components (LSP, bin/, settings.json), and new CLI
flags (--bare, --tmux, --effort, --channels). Added "Last Updated: April
2026" metadata footer to all documentation files.

* fix(docs): correct env var values and alphabetical ordering

- CLAUDE_CODE_NEW_INIT=true → =1 in 02-memory and 09-advanced-features
- CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=true → =1 in 09-advanced-features
- Fix /powerup vs /plugin alphabetical order in slash commands table

* fix(docs): correct env var values in locale files (vi, zh)

Propagate CLAUDE_CODE_NEW_INIT=true → =1 and
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=true → =1 corrections
to Vietnamese and Chinese translations.
2026-04-07 10:20:53 +02:00
Thiên Toán 90e9c30e93 feat(release): build and publish EPUB artifacts per language (#54)
Extend the release workflow to build separate EPUB artifacts for en, vi,
and zh in parallel via a matrix job, then publish all built files under
a single GitHub Release. Using fail-fast: false so a failure in one
language does not block releasing the others.

Also refactor build_epub.py to drive language-specific paths, filenames,
and titles from a mapping, and add zh support (title/subtitle + choice).
2026-04-07 09:14:06 +02:00
Luong NGUYEN 2cbb10c959 fix(hooks): Windows Git Bash compatibility + stdin JSON protocol (#55)
* fix(hooks): make hook scripts compatible with Windows Git Bash and use stdin JSON protocol

- Replace `grep -P` (Perl regex) with `sed` for JSON field extraction,
  as Windows Git Bash does not support `grep -P`
- Replace positional arg (`$1`) with stdin JSON parsing to match the
  actual Claude Code hook protocol (hooks receive data via stdin, not args)
- Fix JSON double-quote escaping in grep patterns that silently fails
  on Windows Git Bash
- Remove python3 dependency for JSON parsing, making scripts portable
- Add Windows Git Bash to compatibility notes in script headers

Affected scripts: security-scan.sh, validate-prompt.sh, log-bash.sh, format-code.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(hooks): address review issues in Windows Git Bash compatibility scripts

- security-scan.sh: wrap output in hookSpecificOutput format required by
  PostToolUse protocol; restore secret/token detection pattern that was
  dropped; escape file path and issues for safe JSON construction
- validate-prompt.sh: extract "user_prompt" field first (Claude Code
  UserPromptSubmit protocol), falling back to "prompt"
- log-bash.sh: document sed truncation limitation for commands with
  double-quoted strings
- format-code.sh: fix misleading comment about updatedInput output

* fix(hooks): produce valid JSON from security-scan.sh

- Use \\n (JSON newline escape) when building ISSUES, not real newlines,
  so the value passes safely through printf into the JSON string
- Remove the real-newline-to-\\n sed pass (no longer needed)
- Output is now verifiably valid JSON per python3 json.loads

* fix(hooks): fix grep -E POSIX compat and semgrep/trufflehog stdout mixing

- Replace \s with [[:space:]] in grep -E patterns (security-scan.sh lines
  34,44): \s is a Perl extension, silently fails on macOS BSD grep and
  BusyBox — password/secret detection was a no-op on macOS
- Suppress stdout of semgrep/trufflehog (>/dev/null) to prevent their
  output mixing with hookSpecificOutput JSON, which would produce invalid
  JSON and cause the additionalContext to fail parsing
- Fix format-code.sh hook comment: PreToolUse → PostToolUse (matches
  README example and actual hook behavior)

---------

Co-authored-by: Bruce <binyuli1993@foxmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 08:53:32 +02:00
qk f53d08098e Add performance-optimizer subagent and dependency-check hook (#36)
* feat: add performance-optimizer subagent and dependency-check hook

Agent-Logs-Url: https://github.com/khanhnkq/claude-howto/sessions/ef3fb01c-a9c0-466e-9ad2-f255f306add2

Co-authored-by: khanhnkq <180888435+khanhnkq@users.noreply.github.com>

* fix(hooks): use basename for manifest matching in dependency-check.sh

FILE=$1 receives an absolute path (e.g. /home/user/project/package.json).
The case statement and all [[ "$FILE" == ... ]] guards matched bare filenames,
so every invocation would hit the *) exit 0 branch and skip all vuln scans.

Extract BASENAME=$(basename "$FILE") and use it for all pattern matching.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Luong NGUYEN <luongnv89@gmail.com>
2026-04-07 08:07:20 +02:00
JiayuWang(王嘉宇) 749c79f633 fix: correct autoCheckpoint config documentation in 08-checkpoints (#39)
The autoCheckpoint setting does not exist in Claude Code's settings
schema. Checkpointing is automatic and built-in — every user prompt
creates a checkpoint. Replace the incorrect config example with the
actual cleanupPeriodDays setting, which controls retention period.

Fixes #18
2026-04-07 01:18:46 +02:00
JiayuWang(王嘉宇) b511ed1997 feat: add missing pre-tool-check.sh hook to 06-hooks (#40)
* feat: add missing pre-tool-check.sh hook to 06-hooks

The LEARNING-ROADMAP.md (Milestone 2A) referenced this file in an
exercise that copies it to ~/.claude/hooks/, but the file did not exist.
This caused confusion for learners following the guide.

The new pre-tool-check.sh is a PreToolUse hook for the Bash matcher that:
- Blocks unconditionally destructive commands (rm -rf /, dd, fork bomb, etc.)
- Warns on high-risk commands (rm -rf, git push --force, DROP TABLE, etc.)
- Reads tool input JSON from stdin (matching Claude Code hook protocol)
- Requires no external dependencies (pure bash + grep)

Fixes #32

* fix(hooks): correct exit code, remove set -e, use portable sed in pre-tool-check.sh

- Change `exit 1` to `exit 2` so Claude Code actually blocks the command
  (exit 1 is treated as a non-blocking error; exit 2 is required to block)
- Remove `set -euo pipefail`: `set -e` caused the script to exit on the
  first non-matching grep result, skipping all remaining pattern checks
- Replace non-portable `grep -o '"command"\s*:\s*"[^"]*"'` with
  `sed -n 's/.*"command"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p'`
  which works on both macOS (BSD) and Linux without GNU grep extensions

Closes #32

---------

Co-authored-by: Luong NGUYEN <luongnv89@gmail.com>
2026-04-07 01:18:12 +02:00
Luong NGUYEN 699fb39a46 ci: shift-left quality gates — add mypy to pre-commit, fix CI failures (#53)
* ci: shift-left quality gates — add mypy to pre-commit, fix CI failures

- Add mypy pre-commit hook (mirrors-mypy v1.13.0) so type checks run locally
- Add [tool.mypy] config to scripts/pyproject.toml with overrides for untyped libs (ebooklib, sync_translations)
- Add mypy>=1.8.0 to requirements-dev.txt
- Fix CI test.yml: remove continue-on-error: true from lint/security/type-check jobs (was silently swallowing failures)
- Fix CI bandit -c path: pyproject.toml → scripts/pyproject.toml
- Fix CI mypy command: use --config-file scripts/pyproject.toml
- Fix CI build-epub: add type-check to needs, fix if: success() → !failure() && !cancelled()
- Fix ruff errors in sync_translations.py (RUF013 implicit Optional, SIM102 nested if)
- Fix mypy errors: add list[str] annotations to errors vars in check_cross_references.py and check_links.py

* fix(ci): install mmdc in build-epub job and correct return type annotation

- Add npm install step for @mermaid-js/mermaid-cli before Build EPUB
  to fix CI failure (mmdc not found error)
- Fix check_translation_status() return type from list[dict] to
  tuple[list[dict], list[dict]] to match the actual return value

* fix(ci): pass --no-sandbox to Puppeteer in build-epub CI job

mmdc (Mermaid CLI) uses Puppeteer/Chromium which requires --no-sandbox
in the GitHub Actions sandboxed environment. Add --puppeteer-config flag
to build_epub.py that passes a Puppeteer JSON config file to mmdc via -p,
and use it in the CI workflow to inject the no-sandbox args.
2026-04-07 00:51:44 +02:00
Luong NGUYEN e76bbe40f2 refactor(epub): replace Kroki HTTP dependency with local mmdc rendering (#10) (#52)
* refactor(epub): replace Kroki HTTP dependency with local mmdc rendering (#10)

Remove httpx/tenacity dependencies and Kroki.io API calls from the EPUB
build pipeline. MermaidRenderer now invokes mmdc (mermaid-cli) as a local
subprocess, eliminating intermittent CI failures caused by network
unavailability. CI workflow installs @mermaid-js/mermaid-cli before build.

* fix(epub): add subprocess timeout and fix deduplication log count

- Add 60s timeout to mmdc subprocess.run to prevent hanging builds
  when Chromium/Puppeteer stalls in headless CI environments
- Fix misleading log that printed unique/total as equal counts;
  now logs "N unique diagrams (M total blocks)" explicitly
- Add test_render_all_timeout and strengthen deduplication assertion
2026-04-06 23:44:59 +02:00
Luong NGUYEN 6cbaa4dd52 docs(readme): add Chinese language link to language switcher 2026-04-06 23:17:18 +02:00
Luong NGUYEN 89e89d4aa3 feat(zh): add Chinese translations in zh/ directory
Add Chinese (Simplified) translations for all documentation, organized
under a dedicated zh/ directory that mirrors the English folder structure.

Co-authored-by: tanqingkuang <tanqingkuang@users.noreply.github.com>

Translations originally contributed by @tanqingkuang in #45.
Restructured from *-CN.md suffix pattern into zh/ directory to prevent
the EPUB builder (scripts/build_epub.py collect_folder_files) from
picking up Chinese files via glob("*.md") inside module folders.
2026-04-06 23:08:54 +02:00
Luong NGUYEN 100c45eef2 docs(readme): add language switcher between English and Vietnamese 2026-04-06 22:19:50 +02:00
Thiên Toán 1b1670909d fix(epub): embed SVG images instead of replacing with placeholders (#46)
The Foliate EPUB reader blocks <object> elements (not <img>), so SVG
images can be served via <img> tags. Embed SVG files as EPUB resources,
unwrap <picture>/<source> wrappers, and skip external badge URLs.

Closes #44
2026-04-06 22:04:44 +02:00
Zhaoshan "Joshua" Duan ce24423320 fix: nested code fence rendering in memory README (#48)
* fix: nested code fence rendering in memory README Example 2

* fix: nested code fence rendering in skills README Example 2
2026-04-06 22:04:18 +02:00
Luong NGUYEN 34259caf7c fix(hooks): apply review fixes dropped by squash merge
The squash merge of PR #49 discarded two review fix commits. Re-applying:

- security-scan.sh: wrap output in hookSpecificOutput (PostToolUse protocol);
  restore secret/token detection; fix JSON newline escaping; escape file path
- validate-prompt.sh: try "user_prompt" field first, fall back to "prompt"
- log-bash.sh: document sed truncation limitation for quoted commands
- format-code.sh: fix misleading comment about updatedInput output
2026-04-06 21:48:55 +02:00
binyu, li 107153d5d7 fix(hooks): make hook scripts compatible with Windows Git Bash and use stdin JSON protocol (#49)
- Replace `grep -P` (Perl regex) with `sed` for JSON field extraction,
  as Windows Git Bash does not support `grep -P`
- Replace positional arg (`$1`) with stdin JSON parsing to match the
  actual Claude Code hook protocol (hooks receive data via stdin, not args)
- Fix JSON double-quote escaping in grep patterns that silently fails
  on Windows Git Bash
- Remove python3 dependency for JSON parsing, making scripts portable
- Add Windows Git Bash to compatibility notes in script headers

Affected scripts: security-scan.sh, validate-prompt.sh, log-bash.sh, format-code.sh

Co-authored-by: Bruce <binyuli1993@foxmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 21:47:41 +02:00
Thiên Toán a70777e9bc Add Vietnamese (Tiếng Việt) Localization (#42)
* feat(i18n): add Vietnamese localization infrastructure

Add comprehensive infrastructure for Vietnamese translation of the
claude-howto documentation:

Features:
- Parallel vi/ directory structure for Vietnamese content
- Modified build_epub.py with --lang flag for Vietnamese EPUB
- Vietnamese-specific pre-commit hooks for quality checks
- Translation support files (glossary, style guide, queue tracker)
- sync_translations.py script to detect outdated translations

Infrastructure:
- vi/ directory with all 10 module subdirectories
- TRANSLATION_NOTES.md: comprehensive glossary and style guide
- TRANSLATION_QUEUE.md: progress tracking for 66+ files
- vi/README.md: Vietnamese landing page

EPUB Build:
- Added --lang CLI flag (en/vi) to build_epub.py
- Language-specific metadata (title, subtitle)
- Automatic root path adjustment for vi/ directory
- Dynamic output filename (claude-howto-guide-vi.epub)

Quality Assurance:
- Vietnamese markdown linting
- Vietnamese cross-reference checking
- Vietnamese Mermaid syntax validation
- Vietnamese link checking
- Vietnamese EPUB build validation

Ready for translation work to begin.

* feat(vi): translate INDEX.md to Vietnamese

Complete Vietnamese translation of INDEX.md - the comprehensive
index of all example files in the repository.

Translation follows vi/TRANSLATION_NOTES.md guidelines:
- Technical terms kept per glossary (slash command → "lệnh slash")
- File paths and code blocks preserved in English
- Table structure and formatting maintained
- All 882 lines translated

Content includes:
- Complete file tree (10 modules, 100+ files)
- Feature coverage matrix
- Quick start guides by use case
- Learning path progression
- Search by keyword sections

Progress: 1/5 core documents completed

* feat(vi): translate CATALOG.md to Vietnamese

Complete Vietnamese translation of CATALOG.md - the quick reference
guide to all Claude Code features.

Translation follows vi/TRANSLATION_NOTES.md guidelines:
- Technical terms kept per glossary (slash command → "lệnh slash")
- All command names preserved (/help, /optimize, etc.)
- Code blocks, JSON examples, and bash commands unchanged
- All tables and formatting maintained
- 517 lines translated with complete feature coverage

Content includes:
- Summary statistics (99 built-in + 43 examples = 117 total)
- Complete built-in commands reference (55+ commands)
- Custom commands examples (8 commands)
- Permission modes (6 modes)
- Subagents (6 built-in + 10 custom)
- Skills (5 bundled + 4 custom)
- Plugins (3 complete plugins)
- MCP servers (1 built-in + 8 common servers)
- Hooks (25 events + 7 example hooks)
- Memory files (7 types)
- New features (March 2026) - 17 new features
- Installation priority guide
- Complete one-command installation

Progress: 2/5 core documents completed

* docs(vi): translate learning roadmap to Vietnamese

- Add complete Vietnamese translation of LEARNING-ROADMAP.md (747 lines)
- Include self-assessment quiz for level determination
- Translate three learning levels: Beginner, Intermediate, Advanced
- Translate all milestones (1A, 1B, 2A, 2B, 3A, 3B) with hands-on exercises
- Preserve Mermaid diagram for learning path visualization
- Maintain progress tracking checklists and learning tips

* docs(vi): translate quick reference guide to Vietnamese

- Add complete Vietnamese translation of QUICK_REFERENCE.md (507 lines)
- Include installation quick commands for all features
- Translate feature cheat sheet with usage examples
- Translate common use cases (code review, documentation, DevOps, etc.)
- Preserve all code snippets, commands, and file paths in English
- Maintain file locations reference diagram
- Include learning path and new features (March 2026) sections
- Keep tips & tricks, feature matrix, and checklist intact

* docs(vi): translate module 01 - slash commands to Vietnamese

- Add complete Vietnamese translation of 01-slash-commands/README.md (553 lines)
- Translate slash commands overview and architecture
- Include 55+ built-in commands reference table with Vietnamese descriptions
- Translate bundled skills section (5 skills)
- Document custom commands (now skills) migration path
- Include frontmatter reference, arguments, and dynamic context sections
- Preserve all command names, code examples, and Mermaid diagrams
- Translate 8 available commands in folder with usage examples
- Include installation, troubleshooting, and best practices sections

* docs(vi): update translation queue progress - Module 01 README done

- Mark 01-slash-commands/README.md as completed (2026-04-02)
- Update Module 01 progress: 1/9 files (11%)
- Update overall progress: 6/66 files (9%)
- Update Priority 2 progress: 1/31 files (3%)
- Add recent completion note to queue header

* docs(vi): translate slash command - commit to Vietnamese

- Translate commit.md slash command to Vietnamese
- Keep all git commands and technical syntax intact
- Translate instructions and descriptions
- Maintain conventional commits format documentation

* docs(vi): translate slash command - doc-refactor to Vietnamese

- Translate doc-refactor.md slash command to Vietnamese
- Keep all technical terms and file paths intact
- Translate documentation refactoring instructions
- Maintain structure and numbering

* docs(vi): translate slash command - generate-api-docs to Vietnamese

- Translate generate-api-docs.md slash command to Vietnamese
- Keep all technical terms and file paths intact
- Translate API documentation generation instructions
- Maintain output format specifications

* docs(vi): translate slash command - optimize to Vietnamese

- Translate optimize.md slash command to Vietnamese
- Keep all technical terms and code concepts intact
- Translate code optimization instructions
- Maintain issue priority and response format

* docs(vi): translate slash command - pr to Vietnamese

- Translate pr.md slash command to Vietnamese
- Keep all commands and technical syntax intact
- Translate PR preparation checklist instructions
- Maintain conventional commits format documentation

* docs(vi): translate slash command - push-all to Vietnamese

- Translate push-all.md slash command to Vietnamese (153 lines)
- Keep all git commands and technical syntax intact
- Translate comprehensive workflow with safety checks
- Maintain API key validation patterns and error handling
- Preserve when to use/avoid sections and alternatives

* docs(vi): translate slash command - setup-ci-cd to Vietnamese

- Translate setup-ci-cd.md slash command to Vietnamese
- Keep all tool names and technical terms intact
- Translate CI/CD pipeline implementation instructions
- Maintain pre-commit hooks and GitHub Actions sections

* docs(vi): translate slash command - unit-test-expand to Vietnamese

- Translate unit-test-expand.md slash command to Vietnamese
- Keep all framework names and technical terms intact
- Translate test coverage expansion instructions
- Maintain testing frameworks and scenario sections

* docs(vi): update translation queue - Module 01 complete (100%)

- Mark all 9 Module 01 files as completed (2026-04-02)
- Update Module 01 progress: 9/9 files (100%) 
- Update overall progress: 14/66 files (21%)
- Update Priority 2 progress: 9/31 files (29%)
- Update header with Module 01 completion milestone

Module 01: Slash Commands - All files translated:
 README.md (overview, built-in commands, skills)
 commit.md (git commit with context)
 doc-refactor.md (documentation restructuring)
 generate-api-docs.md (API documentation generator)
 optimize.md (code optimization analysis)
 pr.md (pull request preparation)
 push-all.md (stage, commit, push with safety)
 setup-ci-cd.md (CI/CD pipeline implementation)
 unit-test-expand.md (test coverage expansion)

* docs(vi): translate module 02 - memory guide to Vietnamese

- Add complete Vietnamese translation of 02-memory/README.md (1162 lines)
- Translate memory system overview and architecture
- Include quick reference for memory commands (/init, /memory, #)
- Document complete memory hierarchy (8 levels with precedence)
- Translate auto memory section with architecture diagrams
- Include practical examples (project, directory-specific, personal memory)
- Add best practices, installation instructions, and troubleshooting
- Preserve all code examples, file paths, and technical terms
- Maintain Mermaid diagrams and tables

* docs(vi): translate example project CLAUDE.md to Vietnamese

- Translate project-CLAUDE.md example memory file
- Keep all technical terms, commands, and code style intact
- Translate descriptions and explanations
- Maintain project configuration structure

* docs(vi): translate example personal CLAUDE.md to Vietnamese

- Translate personal-CLAUDE.md example memory file
- Keep all technical terms, tools, and preferences intact
- Translate descriptions and explanations
- Maintain personal preferences structure

* docs(vi): translate example directory-specific CLAUDE.md to Vietnamese

- Translate directory-api-CLAUDE.md example memory file
- Keep all technical terms, API standards, and code examples intact
- Translate descriptions and explanations
- Maintain API module standards structure

* docs(vi): update translation queue - Module 02 complete (100%)

- Mark all 4 Module 02 files as completed (2026-04-02)
- Update Module 02 progress: 4/4 files (100%) 
- Update overall progress: 18/66 files (27%)
- Update Priority 2 progress: 13/31 files (42%)
- Update header with Module 02 completion milestone

Module 02: Memory - All files translated:
 README.md (1162 lines - comprehensive memory guide)
 project-CLAUDE.md (example project memory)
 personal-CLAUDE.md (example personal preferences)
 directory-api-CLAUDE.md (example directory-specific rules)

* docs(vi): translate module 03 - skills guide to Vietnamese

- Add complete Vietnamese translation of 03-skills/README.md (805 lines)
- Translate Agent Skills overview and architecture
- Include progressive disclosure loading mechanism (3 levels)
- Document skill types, locations, and automatic discovery
- Translate skill creation process and SKILL.md format
- Include required and optional frontmatter fields
- Document skill content types (reference vs task)
- Translate controlling skill invocation and string substitutions
- Include dynamic context injection with shell commands
- Document running skills in subagents with context: fork
- Translate 6 practical examples with directory structures
- Add supporting files, management, and best practices sections
- Preserve all code examples, YAML frontmatter, and Mermaid diagrams
- Maintain tables, troubleshooting guides, and security considerations

* docs(vi): translate skill - blog-draft to Vietnamese

- Translate blog-draft/SKILL.md to Vietnamese (275 lines)
- Keep all workflow steps and technical structure intact
- Translate instructions and descriptions
- Maintain version tracking and file structure
- Preserve all markdown formatting and code examples

* docs(vi): translate skill - brand-voice to Vietnamese

- Translate brand-voice/SKILL.md to Vietnamese (73 lines)
- Keep brand identity, tone, and vocabulary intact
- Translate writing guidelines and examples
- Maintain preferred/avoided terms sections
- Preserve good/bad examples with explanations

* docs(vi): translate skill - claude-md to Vietnamese

- Translate claude-md/SKILL.md to Vietnamese (213 lines)
- Keep all golden rules and core principles intact
- Translate execution flow and content strategy
- Maintain WHAT/WHY/HOW structure
- Preserve quality constraints and validation checklist
- Keep anti-patterns and output format sections

* docs(vi): translate skill - code-review to Vietnamese

- Translate code-review/SKILL.md to Vietnamese (71 lines)
- Keep all review categories and template intact
- Translate security, performance, quality, maintainability sections
- Maintain review template structure
- Preserve version history

* docs(vi): translate skill - refactor to Vietnamese

- Translate refactor/SKILL.md to Vietnamese (427 lines)
- Keep all Martin Fowler refactoring methodology intact
- Translate 6-phase workflow with detailed steps
- Maintain core principles and safety rules
- Preserve code smell catalog and refactoring techniques
- Keep quick start example with before/after code
- Maintain version history and references sections

* docs(vi): update translation queue - Module 03 complete (100%)

- Mark all 6 Module 03 files as completed (2026-04-02)
- Update Module 03 progress: 6/6 files (100%) 
- Update overall progress: 24/66 files (36%)
- Update Priority 2 progress: 19/31 files (61%)
- Update header with Module 03 completion milestone

Module 03: Skills - All files translated:
 README.md (805 lines - comprehensive skills guide)
 blog-draft/SKILL.md (275 lines - blog post creation workflow)
 brand-voice/SKILL.md (73 lines - brand voice consistency)
 claude-md/SKILL.md (213 lines - CLAUDE.md best practices)
 code-review/SKILL.md (71 lines - comprehensive code review)
 refactor/SKILL.md (427 lines - Fowler refactoring methodology)

* docs(vi): translate Module 04 Subagents README

Complete Vietnamese translation of subagents reference guide:
- Configuration and built-in subagents (general-purpose, Plan, Explore, Bash, statusline-setup, Claude Code Guide)
- Agent management with /agents command
- Automatic delegation vs explicit invocation
- Resumable agents and chaining
- Persistent memory across agent sessions
- Background subagents for parallel work
- Worktree isolation for safe experimentation
- Agent Teams (experimental feature)
- Best practices and usage patterns

* docs(vi): complete Module 04 Subagents translation

Translate all 6 subagent example definitions:
- code-reviewer.md: Expert code review specialist
- debugger.md: Root cause analysis and debugging
- documentation-writer.md: Technical documentation creation
- implementation-agent.md: Full-stack feature implementation
- secure-reviewer.md: Security-focused code review
- test-engineer.md: Comprehensive test coverage

Update translation queue progress:
- Module 04: 7/7 files (100%) 
- Overall: 31/66 files (47%)
- Next: Module 05 (MCP)

* docs(vi): complete Module 05 MCP translation

Translate comprehensive MCP (Model Context Protocol) guide:
- Overview and architecture diagrams
- Installation methods (HTTP, Stdio, SSE, WebSocket)
- OAuth 2.0 authentication support
- MCP tool search and dynamic updates
- Elicitation and prompt slash commands
- Configuration management (local, project, user scopes)
- Practical examples (GitHub, Database, Filesystem, Slack MCPs)
- MCP vs Memory decision matrix
- Code execution approach for solving context bloat
- MCPorter runtime reference
- Security best practices and troubleshooting

Translate 4 MCP configuration JSON examples:
- filesystem-mcp.json: File operations
- github-mcp.json: GitHub integration
- database-mcp.json: SQL queries
- multi-mcp.json: Multiple servers configuration

Update translation queue progress:
- Module 05: 5/5 files (100%) 
- Overall: 36/66 files (55%)
- Next: Module 06 (Hooks)

* docs(vi): complete Module 06 Hooks translation

Translate comprehensive Hooks guide:
- Overview and architecture
- Configuration structure (user, project, local scopes)
- Four hook types: command, HTTP, prompt, agent
- 25 hook events with matcher patterns
- Component-scoped hooks and subagent frontmatter
- JSON input/output format and exit codes
- Environment variables and best practices
- Security considerations and debugging
- Installation instructions

Copy 9 hook example files (code, no translation needed):
- format-code.sh: Auto-format code after write/edit
- log-bash.sh: Bash command logging
- notify-team.sh: Team notifications
- pre-commit.sh: Pre-commit validation
- security-scan.sh: Security scanning
- validate-prompt.sh: Prompt validation
- context-tracker.py: Token usage tracking
- context-tracker-tiktoken.py: Accurate token counting

Update translation queue progress:
- Module 06: 9/9 files (100%) 
- Overall: 45/67 files (67%)
- Next: Module 07 (Plugins)

* docs(vi): complete Module 07 Plugins translation

Translate comprehensive Plugins guide:
- Overview and architecture diagrams
- Plugin loading process and lifecycle
- Plugin types (Official, Community, Organization, Personal)
- Plugin definition structure and manifest
- Plugin structure example with all directories
- LSP server configuration and examples
- Plugin options (v2.1.83+) with userConfig
- Persistent plugin data via CLAUDE_PLUGIN_DATA
- Inline plugins via settings (v2.1.80+)
- Standalone vs Plugin approach comparison
- Practical examples (PR Review, DevOps, Documentation plugins)
- Plugin marketplace and distribution
- Marketplace configuration and definition schema
- Plugin source types and distribution methods
- Plugin CLI commands and installation methods
- Plugin features comparison table
- Testing, hot-reload, and managed settings
- Plugin security restrictions
- Publishing workflow and best practices
- Complete troubleshooting guide

Copy all plugin subdirectories (code, no translation needed):
- devops-automation/: Deployment workflows, incident management
- documentation/: API docs, README generation, templates
- pr-review/: Pull request review automation

Update translation queue progress:
- Module 07: 10+/10+ files (100%) 
- Overall: 55+/67 files (82%)
- Next: Module 08-10 (Checkpoints, Advanced Features, CLI)

* docs(vi): complete Modules 08-10 translation

Module 08: Checkpoints and Rewind (2 files)
- Overview and architecture
- Access methods (keyboard shortcut, slash command)
- Five rewind options (restore code+conversation, conversation, code, summarize, cancel)
- Automatic checkpoints and retention policies
- Use cases and practical examples
- Integration with git and best practices

Module 09: Advanced Features (3 files)
- Planning Mode: Two-phase implementation approach
- Extended Thinking: Deep reasoning for complex problems
- Auto Mode: Background safety classifier
- Background Tasks, Scheduled Tasks
- Permission Modes (default, acceptEdits, plan, auto, dontAsk, bypassPermissions)
- Print Mode, Session Management
- Voice Dictation, Channels, Remote Control
- Web Sessions, Desktop App, Task List
- Git Worktrees, Sandboxing, Managed Settings

Module 10: CLI Reference (1 file)
- CLI commands reference
- Core flags and options
- Interactive vs Print Mode
- Model selection and configuration
- System prompt customization
- Tool & permission management
- Output formats and scripting

Update translation queue progress:
- Modules 08-10: 6/6 files (100%) 
- All Modules 01-10: 61+/61+ files (100%) 
- Overall: 61+/67 files (91%)
- Remaining: Supporting docs (6 files)

* docs(vi): complete supporting documentation translation

Translate all 5 supporting documents:
- CONTRIBUTING.md: Contribution guidelines
- SECURITY.md: Security policy and vulnerability reporting
- CODE_OF_CONDUCT.md: Community standards and harassment policy
- STYLE_GUIDE.md: Documentation formatting conventions
- CHANGELOG.md: Version history (v2.2.0, v2.1.1, v2.1.0, v2.0.0)

Update translation queue to 100% completion:
- All Modules 01-10: 61+ files (100%) 
- Supporting Docs: 5/5 files (100%) 
- Overall: 67+/67 files (100%) 
- Status: HOÀN THÀNH 

* fix(vi): fix mermaid syntax and broken cross-references in Vietnamese translation

Fix invalid `#` comment in mermaid block (use `%%` instead) and update
cross-reference script to support Unicode/Vietnamese diacritics in anchor
generation. Fix broken anchor links across vi/ documentation files.

* fix(vi): remove inline mermaid comment causing parse error

Inline %% comments on node definition lines are not supported by the
mermaid parser. The surrounding HTML comment already explains this is
an incorrect example.
2026-04-06 21:34:18 +02:00
Luong NGUYEN 6d1e0ae4af refactor(ci): shift quality checks to pre-commit, CI as 2nd pass (#34)
* refactor(ci): shift quality checks to pre-commit, CI as 2nd pass

- Remove ci.yml (lint, security, pytest were only for EPUB scripts)
- Move EPUB build to pre-commit local hook (runs on .md changes)
- Add check_cross_references.py, check_mermaid.py, check_links.py scripts
- Add markdown-lint, cross-references, mermaid-syntax, link-check as
  pre-commit hooks — mirrors all 4 CI doc-check jobs locally
- Remove spell check job from docs-check.yml (breaks on translations)
- Refactor docs-check.yml to reuse scripts/ instead of inline Python
- Add .markdownlint.json config shared by pre-commit and CI
- Update CONTRIBUTING.md with required dependencies and hook table

* fix(ci): resolve all CI check failures in docs-check workflow

- fix(check_cross_references): skip code blocks and inline code spans
  to avoid false positives from documentation examples; fix emoji
  heading anchor generation (rstrip not strip); add blog-posts,
  openspec, prompts, .agents to IGNORE_DIRS; ignore README.backup.md
- fix(check_links): strip trailing Markdown punctuation from captured
  URLs; add wikipedia, api.github.com to SKIP_DOMAINS; add placeholder
  URL patterns to SKIP_URL_PATTERNS; add .agents/.claude to IGNORE_DIRS
- fix(check_mermaid): add --no-sandbox puppeteer config support via
  MERMAID_PUPPETEER_NO_SANDBOX env var for GitHub Actions Linux runners
- fix(docs-check.yml): pass MERMAID_PUPPETEER_NO_SANDBOX=true to mermaid job
- fix(content): repair broken anchors in README.md, 09-advanced-features;
  fix #plugins -> #claude-code-plugins in claude_concepts_guide.md;
  remove non-existent ./docs/performance.md placeholder links; fix
  dependabot alerts URL in SECURITY_REPORTING.md; update auto-mode URL
  in resources.md; use placeholder pattern for 07-plugins example URL
- remove README.backup.md (stale file)

* fix(check-scripts): fix strip_code_blocks regex and URL fragment handling

- fix regex in strip_code_blocks to avoid conflicting MULTILINE+DOTALL
  flags that could fail to strip indented code fences; use DOTALL only
- strip URL fragments (#section) before dispatching link checks to avoid
  false-positive 404s on valid URLs with anchor fragments

* fix(check-scripts): fix anchor stripping, cross-ref enforcement, and mermaid temp file cleanup

- heading_to_anchor: use .strip("-") instead of .rstrip("-") to also strip leading hyphens
  produced by emoji-prefixed headings, preventing false-positive anchor errors
- check_cross_references: always exit with main()'s return code — filesystem checks
  should block pre-commit unconditionally, not silently pass on errors
- check_mermaid: wrap file-processing loop in try/finally so the puppeteer config
  temp file is cleaned up even if an unexpected exception (e.g. UnicodeDecodeError) occurs
- docs-check.yml: remove now-unused CROSS_REF_STRICT env var

* fix(scripts): fix anchor stripping and mermaid output path

- Replace .strip('-') with .rstrip('-') in heading_to_anchor() so leading
  hyphens from emoji-prefixed headings are preserved, matching GitHub's
  anchor generation behaviour.
- Use Path.with_suffix('.svg') in check_mermaid.py instead of
  str.replace('.mmd', '.svg') to avoid replacing all occurrences of .mmd
  in the full temp path.
2026-04-02 02:20:45 +02:00