cortexhawk 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,16 +2,28 @@
2
2
 
3
3
  [![GitHub stars](https://img.shields.io/github/stars/Spechawk94/CortexHawk?style=flat-square)](https://github.com/Spechawk94/CortexHawk/stargazers)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
5
- [![Version](https://img.shields.io/badge/version-3.2.0-green.svg?style=flat-square)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-3.3.1-green.svg?style=flat-square)](CHANGELOG.md)
6
6
  [![npm](https://img.shields.io/npm/v/cortexhawk?style=flat-square&color=red)](https://www.npmjs.com/package/cortexhawk)
7
7
  [![Skills](https://img.shields.io/badge/skills-36%20built--in%20%7C%2087k%2B%20via%20SkillsMP-orange.svg?style=flat-square)](https://skillsmp.com)
8
- [![Components](https://img.shields.io/badge/20%20agents%20%7C%2033%20commands%20%7C%209%20hooks%20%7C%207%20modes-purple.svg?style=flat-square)](#whats-inside)
8
+ [![Components](https://img.shields.io/badge/20%20agents%20%7C%2035%20commands%20%7C%2011%20hooks%20%7C%207%20modes-purple.svg?style=flat-square)](#whats-inside)
9
9
 
10
10
  An open-source, community-driven development toolkit for Claude Code.
11
11
 
12
12
  CortexHawk provides a modular collection of optimized agents, skills, commands, hooks, and behavioral modes that transform Claude Code into a full-stack development team. Every prompt has been written for maximum efficiency — less token bloat, sharper instructions, better agent coordination.
13
13
 
14
- ### What's New in v3.2
14
+ ### What's New in v3.3
15
+
16
+ - **Gitflow strategy** — full gitflow support in `/cleanup`: dual-target merge detection (feat→develop, release/hotfix→main), conditional branch protection, auto-resync `develop ← main`
17
+ - **`/cleanup` command** — unified post-merge cleanup with 4 strategies (direct-main, feature-branches, dev-branch, gitflow), `--dry-run` preview, native `post-merge` hook opt-in
18
+ - **`/review-pr` command** — fetch, triage, and fix PR review comments in batch (one commit, one notification)
19
+ - **`lint-guard` hook** — auto-detects formatters/linters on staged files; auto-fix for prettier/black/gofmt/rustfmt, check-only for eslint/flake8/mypy; parallel execution, pre-commit delegation
20
+ - **`install.sh` modularized** — extracted 5 modules into `scripts/` (4114 → 3168 lines, -23%)
21
+ - **MCP configs hardened** — all packages pinned to exact versions, puppeteer package name fixed
22
+ - **Security fixes** — path traversal guards in codex-dispatcher and restore, python3 availability guards
23
+ - **10+ bug fixes** — see [CHANGELOG.md](CHANGELOG.md) for full details
24
+
25
+ <details>
26
+ <summary>v3.2 changes</summary>
15
27
 
16
28
  - **`/commit` command** — lightweight conventional commit + push without review or PR (use `/ship` for full workflow)
17
29
  - **`--version` flag** — standard CLI version display
@@ -21,6 +33,8 @@ CortexHawk provides a modular collection of optimized agents, skills, commands,
21
33
  - **`--init` wizard** — "Auto-detect" target option, improved multi-target support
22
34
  - **15+ bug fixes** — see [CHANGELOG.md](CHANGELOG.md) for full details
23
35
 
36
+ </details>
37
+
24
38
  <details>
25
39
  <summary>v3.1 changes</summary>
26
40
 
@@ -116,7 +130,7 @@ Specialized AI agents that coordinate together instead of working in silos.
116
130
  | `fullstack-developer` | Full-stack orchestration front+back |
117
131
  | `teacher` | Teaches concepts with 3 pedagogical levels (guided, mentor, professor) |
118
132
 
119
- ### Commands (33)
133
+ ### Commands (35)
120
134
 
121
135
  Slash commands for common workflows.
122
136
 
@@ -126,8 +140,10 @@ Slash commands for common workflows.
126
140
  | `/build` | Implement code from plan or description |
127
141
  | `/test` | Generate and run tests |
128
142
  | `/review` | Multi-agent code review |
143
+ | `/review-pr` | Fetch, triage, and fix PR review comments in batch |
129
144
  | `/ship` | Commit + PR pipeline |
130
145
  | `/commit` | Lightweight commit + push (no review, no PR) |
146
+ | `/cleanup` | Post-merge branch cleanup (auto-detects strategy) |
131
147
  | `/debug` | Debug and fix issues |
132
148
  | `/scan` | Full security audit |
133
149
  | `/check` | Pre-commit quality gate (lint + test + scan + review → GO/NO-GO) |
@@ -270,7 +286,7 @@ Create custom agents that inherit from base agents with rule/style overrides:
270
286
 
271
287
  Personas use `extends:` frontmatter and are auto-copied to `.claude/agents/` on install/update.
272
288
 
273
- ### Hooks (9)
289
+ ### Hooks (11)
274
290
 
275
291
  Automatic lifecycle hooks that run during Claude Code sessions.
276
292
 
@@ -279,12 +295,14 @@ Automatic lifecycle hooks that run during Claude Code sessions.
279
295
  | `file-guard` | PreToolUse | Blocks access to .env, secrets, credentials |
280
296
  | `branch-guard` | PreToolUse | Prevents direct push to protected branches |
281
297
  | `commit-guard` | PreToolUse | Validates conventional commits, checks staged secrets |
298
+ | `lint-guard` | PreToolUse | Auto-detects formatters/linters on staged files; auto-fix or check-only |
282
299
  | `self-review` | PostToolUse | Checks for TODO/FIXME, secrets, debug artifacts |
283
300
  | `dependency-check` | PostToolUse | Alerts when dependency files are modified |
284
301
  | `test-reminder` | PostToolUse | Reminds to update tests for modified source files |
285
302
  | `agent-analytics` | PostToolUse | Tracks agent invocations, tokens, timestamps to `docs/.metrics/` |
286
303
  | `session-telemetry` | SessionEnd | Generates session summary (agents, tokens, duration, files) |
287
304
  | `session-start` | SessionStart | Project context injection, daily stats display |
305
+ | `post-merge` | git post-merge | Auto-runs cleanup after `git merge` (opt-in native git hook) |
288
306
 
289
307
  Hook pipelines are configured in `hooks/compose.yml`. Manage individual hooks:
290
308
 
@@ -327,9 +345,9 @@ Each target adapts components to the CLI's native format:
327
345
  | Component | Claude Code | Kimi CLI | Codex CLI |
328
346
  |---|---|---|---|
329
347
  | Agents (20) | `.claude/agents/*.md` | Skills (`/skill:agent-*`) + `AGENTS.md` | `AGENTS.md` |
330
- | Commands (33) | `.claude/commands/*.md` → `/plan` | Skills (`/skill:cmd-*`) | Skills (`$cmd-*`) |
348
+ | Commands (35) | `.claude/commands/*.md` → `/plan` | Skills (`/skill:cmd-*`) | Skills (`$cmd-*`) |
331
349
  | Skills (36) | `.claude/skills/` | `.kimi/skills/` (auto-discovered) | `.agents/skills/` |
332
- | Hooks (9) | `settings.json` (automatic) | Skills (`/skill:hook-*`, manual) | Dispatcher (partial) |
350
+ | Hooks (11) | `settings.json` (automatic) | Skills (`/skill:hook-*`, manual) | Dispatcher (partial) |
333
351
  | Modes (7) | `.claude/modes/` (native) | Skills (`/skill:modes/*`) | Skills (`$mode-*`) |
334
352
  | MCP | `settings.json` | Optional (`MCP-SETUP.md`) | `config.toml` |
335
353
 
package/install.sh CHANGED
@@ -740,9 +740,11 @@ setup_templates() {
740
740
  if [ -n "$pr_template" ]; then
741
741
  green " PR template found: $pr_template"
742
742
  else
743
- mkdir -p "$project_root/.github"
744
- cp "$SCRIPT_DIR/templates/github/PULL_REQUEST_TEMPLATE.md" "$project_root/.github/PULL_REQUEST_TEMPLATE.md"
745
- green " PR template created: .github/PULL_REQUEST_TEMPLATE.md"
743
+ if [ -f "$SCRIPT_DIR/templates/github/PULL_REQUEST_TEMPLATE.md" ]; then
744
+ mkdir -p "$project_root/.github"
745
+ cp "$SCRIPT_DIR/templates/github/PULL_REQUEST_TEMPLATE.md" "$project_root/.github/PULL_REQUEST_TEMPLATE.md"
746
+ green " PR template created: .github/PULL_REQUEST_TEMPLATE.md"
747
+ fi
746
748
  fi
747
749
 
748
750
  # Commit template
@@ -757,8 +759,10 @@ setup_templates() {
757
759
  if [ -n "$commit_template" ]; then
758
760
  green " Commit template found: $commit_template"
759
761
  else
760
- cp "$SCRIPT_DIR/templates/github/gitmessage" "$project_root/.gitmessage"
761
- green " Commit template created: .gitmessage"
762
+ if [ -f "$SCRIPT_DIR/templates/github/gitmessage" ]; then
763
+ cp "$SCRIPT_DIR/templates/github/gitmessage" "$project_root/.gitmessage"
764
+ green " Commit template created: .gitmessage"
765
+ fi
762
766
  fi
763
767
  }
764
768
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortexhawk",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "Open-source development toolkit for Claude Code — optimized agents, skills, commands, hooks, and modes",
5
5
  "bin": {
6
6
  "cortexhawk": "./cortexhawk"
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: [agent-name]
3
+ description: [One sentence — what this agent does and when to activate it]
4
+ ---
5
+
6
+ # [Agent Name] Agent
7
+
8
+ You are a [role description].
9
+
10
+ ## Process
11
+ 1. [Step 1]
12
+ 2. [Step 2]
13
+ 3. [Step 3]
14
+
15
+ ## Output Format
16
+ [What the agent should produce]
17
+
18
+ ## Rules
19
+ [Constraints and guidelines — 5-7 items max]
@@ -0,0 +1,41 @@
1
+ # [Project Name]
2
+
3
+ [One-line description of what the project does]
4
+
5
+ ## Tech Stack
6
+ - **Language**: [e.g., TypeScript, Python]
7
+ - **Framework**: [e.g., Next.js, FastAPI]
8
+ - **Database**: [e.g., PostgreSQL, MongoDB]
9
+ - **Testing**: [e.g., vitest, pytest]
10
+
11
+ ## Structure
12
+ ```
13
+ src/
14
+ ├── [main directories]
15
+ tests/
16
+ ```
17
+
18
+ ## Conventions
19
+ - **Naming**: [files: kebab-case, functions: camelCase, classes: PascalCase]
20
+ - **Commits**: `type(scope): description` (feat, fix, docs, refactor, test, chore)
21
+ - **Branches**: `feature/description`, `fix/description`, `hotfix/description`
22
+
23
+ ## Commands
24
+ - `[dev command]` — Start dev server
25
+ - `[test command]` — Run tests
26
+ - `[build command]` — Build for production
27
+ - `[lint command]` — Run linter
28
+
29
+ ## Architecture Decisions
30
+ - [Key decision 1 and why]
31
+ - [Key decision 2 and why]
32
+
33
+ ## Security
34
+ - No hardcoded secrets — use environment variables
35
+ - Input validation on all endpoints
36
+ - Auth required on all protected routes
37
+
38
+ ## Testing
39
+ - Unit tests for business logic
40
+ - Integration tests for API endpoints
41
+ - Coverage target: [80%]
@@ -0,0 +1,14 @@
1
+ # /[command-name]
2
+
3
+ ## Purpose
4
+ [One sentence — what this command does]
5
+
6
+ ---
7
+
8
+ Activate the **[agent-name]** agent. Target: `$ARGUMENTS`
9
+
10
+ 1. [Step 1]
11
+ 2. [Step 2]
12
+ 3. [Step 3]
13
+
14
+ [Any additional constraints or output format requirements]
@@ -0,0 +1,79 @@
1
+ # Agent Orchestration Patterns
2
+
3
+ ## Sequential Pipeline
4
+
5
+ Run agents one after another, each receiving the previous output.
6
+
7
+ ```
8
+ /plan → planner → plan.md
9
+ /build → implementer → code changes (follows plan.md)
10
+ /test → tester → test results
11
+ /review → reviewer → review report
12
+ /ship → git-manager + reviewer → commit + PR
13
+ ```
14
+
15
+ **Use when**: Feature development from scratch.
16
+
17
+ ## Parallel Execution
18
+
19
+ Run independent agents simultaneously to save time.
20
+
21
+ ```
22
+ ┌─ tester (unit tests)
23
+ plan → implementer ─┤
24
+ └─ tester (integration tests)
25
+ ```
26
+
27
+ **Use when**: Test generation can happen in parallel for different scopes.
28
+
29
+ ## Gate Pattern
30
+
31
+ Agent B only runs if Agent A passes.
32
+
33
+ ```
34
+ reviewer → [pass?] → git-manager → [commit]
35
+ → [fail?] → STOP, report issues
36
+ ```
37
+
38
+ **Use when**: `/ship` — don't commit if review finds critical issues.
39
+
40
+ ## Loop Pattern
41
+
42
+ Repeat until quality gate passes.
43
+
44
+ ```
45
+ implementer → tester → [tests pass?] → done
46
+ → [tests fail?] → implementer (fix) → tester → ...
47
+ ```
48
+
49
+ **Use when**: `/tdd` — red-green-refactor cycle.
50
+
51
+ ## Escalation Pattern
52
+
53
+ Start simple, bring in specialists when needed.
54
+
55
+ ```
56
+ debugger → [found root cause?] → fix
57
+ → [needs architecture change?] → architect → planner → implementer
58
+ ```
59
+
60
+ **Use when**: `/debug` — simple bugs stay with debugger, complex ones escalate.
61
+
62
+ ## Multi-Agent Review
63
+
64
+ Multiple agents review the same code from different angles.
65
+
66
+ ```
67
+ ┌─ reviewer (correctness)
68
+ code ──┼─ security-auditor (security)
69
+ └─ code-simplifier (complexity)
70
+ ```
71
+
72
+ **Use when**: Pre-release quality gate or critical code paths.
73
+
74
+ ## Rules
75
+ - Each agent receives clear input and produces structured output
76
+ - Gate pattern prevents broken code from progressing
77
+ - Parallel agents must not modify the same files
78
+ - Always define a failure path — what happens when an agent flags issues
79
+ - Keep pipelines ≤5 steps — longer pipelines are harder to debug
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: [persona-name]
3
+ extends: [base-agent-name]
4
+ description: [One sentence — how this persona differs from the base agent]
5
+ ---
6
+
7
+ # [Persona Name]
8
+
9
+ Custom agent persona extending **[base-agent-name]**.
10
+
11
+ ## Overrides
12
+
13
+ [Rules, style, or behavior that override or extend the base agent]
14
+
15
+ ## Rules
16
+
17
+ [Additional rules specific to this persona — these are ADDED to the base agent's rules]
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: [skill-name]
3
+ description: [One sentence — when should Claude use this skill?]
4
+ detect: [base | <file> | <file>:<pattern> | dir:<path> — omit if not auto-detectable]
5
+ requires: [category/skill-name — space-separated list of required skills, omit if none]
6
+ ---
7
+
8
+ # [Skill Name]
9
+
10
+ ## [Core Instructions]
11
+ [What Claude should do when this skill is active]
12
+
13
+ ## Examples
14
+ [Concrete code/usage examples]
15
+
16
+ ## Rules
17
+ [Do's and don'ts — keep it to 5-7 items max]
@@ -0,0 +1,26 @@
1
+ ## Summary
2
+ <!-- What does this PR do and why? -->
3
+
4
+ ## Type
5
+ <!-- Check one -->
6
+ - [ ] Feature
7
+ - [ ] Bug fix
8
+ - [ ] Refactor
9
+ - [ ] Docs
10
+ - [ ] Chore
11
+
12
+ ## Changes
13
+ -
14
+
15
+ ## Test Plan
16
+ - [ ]
17
+
18
+ ## Checklist
19
+ - [ ] Tests pass
20
+ - [ ] No secrets or .env committed
21
+ - [ ] Docs updated (if applicable)
22
+ - [ ] No breaking changes (or documented below)
23
+
24
+ ## Related
25
+ <!-- Link issues, backlog items, or conversations -->
26
+ <!-- Examples: Closes #123 | Backlog #119 | N/A -->
@@ -0,0 +1,10 @@
1
+
2
+ # type(scope): subject
3
+ #
4
+ # Types: feat, fix, docs, style, refactor, test, chore, perf, security
5
+ # Scope: optional module/component name
6
+ # Subject: imperative mood, lowercase, no period, max 72 chars
7
+ #
8
+ # Body: explain WHY, not WHAT (the diff shows the what)
9
+ #
10
+ # Footer: BREAKING CHANGE: description | Closes #123 | Backlog #N