cortexhawk 3.1.0
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/.cortexhawk-team.yml +65 -0
- package/CHANGELOG.md +268 -0
- package/CLAUDE.md +96 -0
- package/LICENSE +21 -0
- package/PACKS.md +14 -0
- package/README.md +418 -0
- package/REGISTRY.md +23 -0
- package/agents/architect.md +46 -0
- package/agents/brainstormer.md +57 -0
- package/agents/code-simplifier.md +56 -0
- package/agents/codebase-mapper.md +63 -0
- package/agents/copywriter.md +48 -0
- package/agents/debugger.md +44 -0
- package/agents/designer.md +53 -0
- package/agents/devops.md +49 -0
- package/agents/docs-manager.md +50 -0
- package/agents/fullstack-developer.md +55 -0
- package/agents/git-manager.md +63 -0
- package/agents/implementer.md +30 -0
- package/agents/journal-writer.md +53 -0
- package/agents/planner.md +52 -0
- package/agents/project-manager.md +50 -0
- package/agents/researcher.md +46 -0
- package/agents/reviewer.md +63 -0
- package/agents/security-auditor.md +92 -0
- package/agents/teacher.md +71 -0
- package/agents/tester.md +41 -0
- package/commands/api-gen.md +17 -0
- package/commands/backlog.md +26 -0
- package/commands/bootstrap.md +32 -0
- package/commands/brainstorm.md +18 -0
- package/commands/build.md +16 -0
- package/commands/chain.md +46 -0
- package/commands/changelog.md +16 -0
- package/commands/check.md +40 -0
- package/commands/ci.md +32 -0
- package/commands/context.md +35 -0
- package/commands/debug.md +16 -0
- package/commands/deploy.md +16 -0
- package/commands/doc.md +15 -0
- package/commands/export.md +17 -0
- package/commands/journal.md +18 -0
- package/commands/learn.md +16 -0
- package/commands/map.md +16 -0
- package/commands/migrate.md +17 -0
- package/commands/monitor.md +16 -0
- package/commands/optimize.md +17 -0
- package/commands/plan.md +17 -0
- package/commands/pulse.md +46 -0
- package/commands/refactor.md +16 -0
- package/commands/research.md +18 -0
- package/commands/review.md +16 -0
- package/commands/scan.md +19 -0
- package/commands/ship.md +17 -0
- package/commands/simplify.md +16 -0
- package/commands/task.md +32 -0
- package/commands/tdd.md +17 -0
- package/commands/test.md +16 -0
- package/commands/upgrade.md +27 -0
- package/cortexhawk +450 -0
- package/hooks/agent-analytics.sh +67 -0
- package/hooks/branch-guard.sh +56 -0
- package/hooks/codex-dispatcher.sh +84 -0
- package/hooks/commit-guard.sh +71 -0
- package/hooks/compose.yml +47 -0
- package/hooks/dependency-check.sh +56 -0
- package/hooks/file-guard.sh +69 -0
- package/hooks/hooks.json +46 -0
- package/hooks/self-review.sh +71 -0
- package/hooks/session-start.sh +132 -0
- package/hooks/session-telemetry.sh +60 -0
- package/hooks/test-reminder.sh +75 -0
- package/install.sh +3805 -0
- package/mcp/README.md +37 -0
- package/mcp/context7.json +8 -0
- package/mcp/puppeteer.json +8 -0
- package/mcp/sequential-thinking.json +8 -0
- package/modes/default.md +5 -0
- package/modes/fast.md +5 -0
- package/modes/learn.md +9 -0
- package/modes/orchestration.md +5 -0
- package/modes/pair.md +10 -0
- package/modes/research.md +5 -0
- package/modes/review.md +5 -0
- package/package.json +32 -0
- package/profiles/api.json +27 -0
- package/profiles/data.json +23 -0
- package/profiles/fullstack.json +27 -0
- package/scripts/autodetect-profile.sh +68 -0
- package/scripts/benchmark.sh +106 -0
- package/scripts/chain-post-save.sh +23 -0
- package/scripts/generate-plans-index.sh +50 -0
- package/scripts/git-workflow-init.sh +115 -0
- package/scripts/install-codex.sh +128 -0
- package/scripts/interactive-init.sh +264 -0
- package/scripts/post-install-audit.sh +130 -0
- package/scripts/validate.sh +214 -0
- package/settings.json +90 -0
- package/setup.sh +67 -0
- package/skills/databases/schema-designer/SKILL.md +54 -0
- package/skills/databases/sql-optimizer/SKILL.md +37 -0
- package/skills/devops/ci-cd/SKILL.md +59 -0
- package/skills/devops/deployment/SKILL.md +49 -0
- package/skills/devops/docker/SKILL.md +57 -0
- package/skills/frameworks/api-design/SKILL.md +103 -0
- package/skills/frameworks/fastapi/SKILL.md +68 -0
- package/skills/frameworks/nextjs/SKILL.md +74 -0
- package/skills/frameworks/python/SKILL.md +89 -0
- package/skills/frameworks/react/SKILL.md +83 -0
- package/skills/frameworks/sveltekit/SKILL.md +69 -0
- package/skills/frameworks/tailwindcss/SKILL.md +75 -0
- package/skills/frameworks/typescript/SKILL.md +94 -0
- package/skills/meta/mcp-builder/SKILL.md +54 -0
- package/skills/meta/skill-creator/SKILL.md +43 -0
- package/skills/optimization/performance/SKILL.md +70 -0
- package/skills/quality/complexity-analyzer/SKILL.md +52 -0
- package/skills/quality/error-handling/SKILL.md +123 -0
- package/skills/quality/log-analyzer/SKILL.md +31 -0
- package/skills/quality/pattern-detector/SKILL.md +50 -0
- package/skills/security/auth-analyzer/SKILL.md +96 -0
- package/skills/security/compliance-checker/SKILL.md +92 -0
- package/skills/security/container-security/SKILL.md +128 -0
- package/skills/security/dependency-auditor/SKILL.md +100 -0
- package/skills/security/encryption/SKILL.md +94 -0
- package/skills/security/incident-response/SKILL.md +127 -0
- package/skills/security/secrets/SKILL.md +93 -0
- package/skills/security/security-headers/SKILL.md +83 -0
- package/skills/security/security-logging/SKILL.md +107 -0
- package/skills/security/vulnerability-scanner/SKILL.md +114 -0
- package/skills/testing/e2e-testing/SKILL.md +119 -0
- package/skills/testing/tdd/SKILL.md +40 -0
- package/skills/testing/test-generator/SKILL.md +39 -0
- package/skills/workflow/commit/SKILL.md +61 -0
- package/skills/workflow/confidence-check/SKILL.md +90 -0
- package/skills/workflow/pr-review-comments/SKILL.md +81 -0
- package/skills/workflow/pr-review-comments/scripts/fetch_comments.py +237 -0
package/commands/plan.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan
|
|
3
|
+
description: Create an implementation plan for a feature or task.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /plan
|
|
7
|
+
|
|
8
|
+
Activate the **planner** agent. Analyze the codebase context and the user's request: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. Scan relevant files to understand current architecture
|
|
11
|
+
2. Break the work into 2-5 minute tasks
|
|
12
|
+
3. Output a structured plan with tasks, files, acceptance criteria, test strategy, and rollback steps
|
|
13
|
+
4. If scope is ambiguous, ask ONE question before proceeding
|
|
14
|
+
|
|
15
|
+
Keep the plan actionable — every task should be something `/build` can execute directly.
|
|
16
|
+
|
|
17
|
+
Save output to `docs/plans/YYYY-MM-DD-[feature].md`
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pulse
|
|
3
|
+
description: Project health dashboard — code quality metrics at a glance.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /pulse
|
|
7
|
+
|
|
8
|
+
Activate the **project-manager** agent in health-check mode. Scope: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
**Flags**: `--history Nd` = show metrics trends over N days (e.g., `--history 7d`, `--history 30d`)
|
|
11
|
+
|
|
12
|
+
## Standard mode (no flag)
|
|
13
|
+
|
|
14
|
+
1. **Git health** — branch, uncommitted changes, last commit age, unmerged branches
|
|
15
|
+
2. **Code quality** — count `TODO`, `FIXME`, `HACK` markers across source files
|
|
16
|
+
3. **Dependencies** — run `npm audit` / `pip-audit` / `cargo audit` if lock file exists; check `requires:` in installed skills and report unsatisfied dependencies
|
|
17
|
+
4. **Backlog** — read `docs/backlog.md` and summarize active/deferred/done counts
|
|
18
|
+
5. **Tests** — run test suite if configured, report pass/fail and coverage if available
|
|
19
|
+
6. **Agent analytics** — read `docs/.metrics/YYYY-MM-DD.jsonl` for today:
|
|
20
|
+
- Count agent invocations (lines without `"type":"session"`)
|
|
21
|
+
- List unique agents with invocation count per agent
|
|
22
|
+
- Sum `estimated_tokens` across all invocations
|
|
23
|
+
- If a `"type":"session"` entry exists, show duration and files modified
|
|
24
|
+
7. Output single dashboard table
|
|
25
|
+
|
|
26
|
+
## History mode (`--history Nd`)
|
|
27
|
+
|
|
28
|
+
Read all `docs/.metrics/*.jsonl` files within the requested period. For each day:
|
|
29
|
+
- Count agent invocations and sum `estimated_tokens` from non-session entries
|
|
30
|
+
- Extract `duration_seconds`, `files_modified` from `"type":"session"` entries
|
|
31
|
+
|
|
32
|
+
Output:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
# Metrics Trends — [N] days
|
|
36
|
+
|
|
37
|
+
| Day | Invocations | Tokens | Sessions | Avg Duration |
|
|
38
|
+
|------------|-------------|---------|----------|--------------|
|
|
39
|
+
| YYYY-MM-DD | [count] | [total] | [count] | [minutes] |
|
|
40
|
+
|
|
41
|
+
Top agents: [agent1] ×N, [agent2] ×N, ...
|
|
42
|
+
Total: [invocations] invocations, [tokens] tokens, [sessions] sessions
|
|
43
|
+
Avg: [tokens/day] tokens/day, [duration] min/session
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If scope is specified, limit checks to those files/directories.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor
|
|
3
|
+
description: Improve code structure without changing behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /refactor
|
|
7
|
+
|
|
8
|
+
Activate the **reviewer** agent for analysis, then the **implementer** agent for changes. Refactor: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. Analyze current code for: duplication, complexity, coupling, naming, dead code
|
|
11
|
+
2. Propose specific refactoring steps (extract function, rename, simplify conditional, etc.)
|
|
12
|
+
3. Confirm approach with user before applying
|
|
13
|
+
4. Apply changes incrementally — verify tests pass after each step
|
|
14
|
+
5. Never change behavior — only structure
|
|
15
|
+
|
|
16
|
+
If no tests exist for the target code, generate them FIRST as a safety net.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: Research technologies, libraries, or approaches with evidence-based comparison.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /research
|
|
7
|
+
|
|
8
|
+
Activate the **researcher** agent. Research: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. Define evaluation criteria relevant to the project
|
|
11
|
+
2. Identify 3-5 candidates (include at least one underdog)
|
|
12
|
+
3. Compare with evidence — benchmarks, docs, GitHub stats, real-world adoption
|
|
13
|
+
4. Present comparison matrix
|
|
14
|
+
5. Make a recommendation with reasoning, or state there's no clear winner
|
|
15
|
+
|
|
16
|
+
Output a structured research report with sources.
|
|
17
|
+
|
|
18
|
+
Save output to `docs/research/YYYY-MM-DD-[topic].md`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Multi-pass code review covering correctness, security, performance, and maintainability.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /review
|
|
7
|
+
|
|
8
|
+
Activate the **reviewer** agent. Review target: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. If target is specified, review those files
|
|
11
|
+
2. If no target, review files modified in current branch vs main
|
|
12
|
+
3. Run all 4 review passes (correctness, security, performance, maintainability)
|
|
13
|
+
4. Score each finding by confidence (0-100), only report ≥70
|
|
14
|
+
5. Output structured report with severity, location, issue, and fix
|
|
15
|
+
|
|
16
|
+
Max 10 findings per pass. Include positive observations too.
|
package/commands/scan.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scan
|
|
3
|
+
description: Full security audit of the project.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /scan
|
|
7
|
+
|
|
8
|
+
Activate the **security-auditor** agent. Scope: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. If scope specified, audit those files/components
|
|
11
|
+
2. If no scope, audit the entire project
|
|
12
|
+
3. Check all OWASP Top 10 categories systematically
|
|
13
|
+
4. Run dependency audit (npm audit / pip-audit / safety)
|
|
14
|
+
5. Review security headers, auth, input validation, secrets management
|
|
15
|
+
6. Generate full audit report with severity, impact, proof, and fix for each finding
|
|
16
|
+
|
|
17
|
+
Output a structured security audit report in markdown.
|
|
18
|
+
|
|
19
|
+
Save output to `docs/audits/YYYY-MM-DD-[scope].md`
|
package/commands/ship.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ship
|
|
3
|
+
description: Commit, create PR, and prepare for deployment.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /ship
|
|
7
|
+
|
|
8
|
+
Activate the **git-manager** agent, then the **reviewer** agent. Ship: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
0. Read `## Git Workflow` from CLAUDE.md if present — respect PR preference and auto-push settings
|
|
11
|
+
1. Stage changes and generate conventional commit message
|
|
12
|
+
2. Run quick review pass — reviewer runs Pass 1 (Correctness) and Pass 2 (Security) only, reporting Critical findings exclusively
|
|
13
|
+
3. If review passes, commit and push
|
|
14
|
+
4. Create PR with description, testing notes, and checklist
|
|
15
|
+
5. If review finds critical issues, report them and stop — don't ship broken code
|
|
16
|
+
|
|
17
|
+
Format: `feat(scope): description` or `fix(scope): description`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: simplify
|
|
3
|
+
description: Simplify complex code without changing behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /simplify
|
|
7
|
+
|
|
8
|
+
Activate the **code-simplifier** agent. Target: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. Measure current complexity (nesting depth, cyclomatic complexity, line count)
|
|
11
|
+
2. Identify accidental vs essential complexity
|
|
12
|
+
3. Apply simplification transforms (early returns, guard clauses, extract helpers)
|
|
13
|
+
4. Verify tests pass after each change
|
|
14
|
+
5. Report before/after complexity metrics
|
|
15
|
+
|
|
16
|
+
Behavior must be preserved — simplification is not refactoring.
|
package/commands/task.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task
|
|
3
|
+
description: Execute a backlog item end-to-end via chain orchestration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /task
|
|
7
|
+
|
|
8
|
+
Activate the **project-manager** agent as orchestrator. Execute backlog item `$ARGUMENTS` through the full development chain.
|
|
9
|
+
|
|
10
|
+
0. Read `docs/backlog.md` and extract the row matching the given `#N`
|
|
11
|
+
1. If item not found or already done, report and stop
|
|
12
|
+
2. Mark item as `active` in backlog
|
|
13
|
+
3. Display item summary (feature, impact, effort, source)
|
|
14
|
+
4. Determine save mode from effort level (see Save Rules below)
|
|
15
|
+
5. Execute chain (plan, build, test, review) with the feature description as topic
|
|
16
|
+
6. Update `CHANGELOG.md` with a one-line entry under the current version's `### Added` section
|
|
17
|
+
7. If chain completes without critical blockers, execute `/ship`
|
|
18
|
+
8. Mark item as `done` in backlog
|
|
19
|
+
|
|
20
|
+
## Save Rules
|
|
21
|
+
|
|
22
|
+
- **Effort L** — execute chain inline, no `docs/chains/` output (commit is the trace)
|
|
23
|
+
- **Effort M/H** — save each step to `docs/chains/YYYY-MM-DD-{slug}/` + `SUMMARY.md`, link to `docs/plans/` (symlink by default)
|
|
24
|
+
- **`--save` flag** — forces save to `docs/chains/` regardless of effort level
|
|
25
|
+
- **`--copy` flag** — use physical copy with provenance header instead of symlink
|
|
26
|
+
- **Effort H** — also use `--gate` mode (pause between chain steps for confirmation)
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
|
|
30
|
+
- Argument must be a backlog number (e.g., `/task #36` or `/task 36`)
|
|
31
|
+
- If the item has a linked brainstorm, read it for additional context before planning
|
|
32
|
+
- Do not auto-ship if review found critical issues — report and stop
|
package/commands/tdd.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd
|
|
3
|
+
description: Test-driven development workflow — red-green-refactor cycle.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /tdd
|
|
7
|
+
|
|
8
|
+
Activate the **tester** agent, then the **implementer** agent. TDD target: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. **Red** — Write a failing test for the desired behavior
|
|
11
|
+
2. Run the test — confirm it fails for the right reason
|
|
12
|
+
3. **Green** — Write the minimum code to make the test pass
|
|
13
|
+
4. Run the test — confirm it passes
|
|
14
|
+
5. **Refactor** — Clean up code while keeping tests green
|
|
15
|
+
6. Repeat for the next behavior
|
|
16
|
+
|
|
17
|
+
Never write production code without a failing test first.
|
package/commands/test.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test
|
|
3
|
+
description: Generate and run tests for a component or recent changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /test
|
|
7
|
+
|
|
8
|
+
Activate the **tester** agent. Test target: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
1. Detect the test framework in use
|
|
11
|
+
2. If target is specified, generate tests for it
|
|
12
|
+
3. If no target, generate tests for recently modified files
|
|
13
|
+
4. Run the tests and report results
|
|
14
|
+
5. Identify coverage gaps and suggest additional tests
|
|
15
|
+
|
|
16
|
+
Prioritize: happy path → error paths → edge cases → integration.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: upgrade
|
|
3
|
+
description: Check for CortexHawk updates and show what changed
|
|
4
|
+
agent: project-manager
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /upgrade
|
|
8
|
+
|
|
9
|
+
Check if a newer version of CortexHawk is available and propose updating.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. Run `./install.sh --check-update` to detect version delta
|
|
14
|
+
2. If update available, show the changelog diff
|
|
15
|
+
3. Ask the user if they want to update
|
|
16
|
+
4. If yes, run `./install.sh --update`
|
|
17
|
+
5. After update, run `./install.sh --stats` to confirm
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
|
|
21
|
+
Version comparison + changelog delta + update command.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Never auto-update without user confirmation
|
|
26
|
+
- Show `--dry-run` option for preview
|
|
27
|
+
- If already up to date, report and stop
|