minimal-vibe-coding-kit 0.4.1 → 0.5.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/.agents/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +28 -3
- package/.agents/skills/claim/SKILL.md +82 -0
- package/.agents/skills/prompt-sharpener/SKILL.md +54 -0
- package/.agents/skills/tutien/SKILL.md +74 -0
- package/.agents/skills/tutien/references/classification.md +64 -0
- package/.agents/skills/tutien/references/lore-sources.md +15 -0
- package/.agents/skills/tutien/references/privacy.md +33 -0
- package/.agents/skills/tutien/references/schema.md +75 -0
- package/.agents/skills/tutien/references/scoring-and-realms.md +37 -0
- package/.agents/skills/tutien/references/voice-and-mode.md +44 -0
- package/.agents/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
- package/.agents/skills/tutien/scripts/adapters/git.mjs +48 -0
- package/.agents/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
- package/.agents/skills/tutien/scripts/analyze-history.mjs +84 -0
- package/.agents/skills/tutien/scripts/catalog.mjs +130 -0
- package/.agents/skills/tutien/scripts/classify.mjs +311 -0
- package/.agents/skills/tutien/scripts/command.mjs +107 -0
- package/.agents/skills/tutien/scripts/compare.mjs +41 -0
- package/.agents/skills/tutien/scripts/metrics.mjs +306 -0
- package/.agents/skills/tutien/scripts/normalize-events.mjs +68 -0
- package/.agents/skills/tutien/scripts/redact.mjs +30 -0
- package/.agents/skills/tutien/scripts/render-report.mjs +423 -0
- package/.agents/skills/tutien/scripts/run-tutien.mjs +272 -0
- package/.agents/skills/tutien/scripts/score.mjs +97 -0
- package/.agents/skills/tutien/scripts/snapshot.mjs +76 -0
- package/.agents/skills/tutien/scripts/villains.mjs +196 -0
- package/.agents/skills/vibekit-init/SKILL.md +2 -2
- package/.claude/settings.json +10 -3
- package/.claude/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +28 -3
- package/.claude/skills/claim/SKILL.md +82 -0
- package/.claude/skills/prompt-sharpener/SKILL.md +54 -0
- package/.claude/skills/tutien/SKILL.md +74 -0
- package/.claude/skills/tutien/references/classification.md +64 -0
- package/.claude/skills/tutien/references/lore-sources.md +15 -0
- package/.claude/skills/tutien/references/privacy.md +33 -0
- package/.claude/skills/tutien/references/schema.md +75 -0
- package/.claude/skills/tutien/references/scoring-and-realms.md +37 -0
- package/.claude/skills/tutien/references/voice-and-mode.md +44 -0
- package/.claude/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
- package/.claude/skills/tutien/scripts/adapters/git.mjs +48 -0
- package/.claude/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
- package/.claude/skills/tutien/scripts/analyze-history.mjs +84 -0
- package/.claude/skills/tutien/scripts/catalog.mjs +130 -0
- package/.claude/skills/tutien/scripts/classify.mjs +311 -0
- package/.claude/skills/tutien/scripts/command.mjs +107 -0
- package/.claude/skills/tutien/scripts/compare.mjs +41 -0
- package/.claude/skills/tutien/scripts/metrics.mjs +306 -0
- package/.claude/skills/tutien/scripts/normalize-events.mjs +68 -0
- package/.claude/skills/tutien/scripts/redact.mjs +30 -0
- package/.claude/skills/tutien/scripts/render-report.mjs +423 -0
- package/.claude/skills/tutien/scripts/run-tutien.mjs +272 -0
- package/.claude/skills/tutien/scripts/score.mjs +97 -0
- package/.claude/skills/tutien/scripts/snapshot.mjs +76 -0
- package/.claude/skills/tutien/scripts/villains.mjs +196 -0
- package/.claude/skills/vibekit-init/SKILL.md +2 -2
- package/.codex/rules/vibekit.rules +77 -0
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor/cli.json +18 -0
- package/.cursor/settings.json +15 -8
- package/.cursor/skills/claim/SKILL.md +82 -0
- package/.cursor/skills/prompt-sharpener/SKILL.md +54 -0
- package/.cursor/skills/tutien/SKILL.md +74 -0
- package/.cursor/skills/tutien/references/classification.md +64 -0
- package/.cursor/skills/tutien/references/lore-sources.md +15 -0
- package/.cursor/skills/tutien/references/privacy.md +33 -0
- package/.cursor/skills/tutien/references/schema.md +75 -0
- package/.cursor/skills/tutien/references/scoring-and-realms.md +37 -0
- package/.cursor/skills/tutien/references/voice-and-mode.md +44 -0
- package/.cursor/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
- package/.cursor/skills/tutien/scripts/adapters/git.mjs +48 -0
- package/.cursor/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
- package/.cursor/skills/tutien/scripts/analyze-history.mjs +84 -0
- package/.cursor/skills/tutien/scripts/catalog.mjs +130 -0
- package/.cursor/skills/tutien/scripts/classify.mjs +311 -0
- package/.cursor/skills/tutien/scripts/command.mjs +107 -0
- package/.cursor/skills/tutien/scripts/compare.mjs +41 -0
- package/.cursor/skills/tutien/scripts/metrics.mjs +306 -0
- package/.cursor/skills/tutien/scripts/normalize-events.mjs +68 -0
- package/.cursor/skills/tutien/scripts/redact.mjs +30 -0
- package/.cursor/skills/tutien/scripts/render-report.mjs +423 -0
- package/.cursor/skills/tutien/scripts/run-tutien.mjs +272 -0
- package/.cursor/skills/tutien/scripts/score.mjs +97 -0
- package/.cursor/skills/tutien/scripts/snapshot.mjs +76 -0
- package/.cursor/skills/tutien/scripts/villains.mjs +196 -0
- package/.grok/README.md +13 -0
- package/.grok/config.example.toml +13 -0
- package/.grok/config.toml +29 -0
- package/.grok/rules/safe-delete.md +11 -0
- package/.grok/rules/security.md +5 -0
- package/.grok/rules/vibe-core.md +8 -0
- package/.grok/skills/agentshield-security-review/SKILL.md +75 -0
- package/.grok/skills/agentshield-security-review/agents/openai.yaml +5 -0
- package/.grok/skills/agentshield-security-review/references/native-install.md +97 -0
- package/.grok/skills/agentshield-security-review/references/report-template.md +54 -0
- package/.grok/skills/agentshield-security-review/references/review-checklist.md +45 -0
- package/.grok/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +135 -0
- package/.grok/skills/autoresearch-coding/README.md +15 -0
- package/.grok/skills/autoresearch-coding/SKILL.md +101 -0
- package/.grok/skills/autoresearch-coding/references/experiment-contract.md +13 -0
- package/.grok/skills/autoresearch-coding/references/metric-extraction.md +8 -0
- package/.grok/skills/autoresearch-coding/references/result-ledger.md +15 -0
- package/.grok/skills/autoresearch-coding/scripts/log_result.py +24 -0
- package/.grok/skills/autoresearch-coding/scripts/run_logged.py +30 -0
- package/.grok/skills/claim/SKILL.md +82 -0
- package/.grok/skills/clearthought/SKILL.md +100 -0
- package/.grok/skills/clearthought/examples/decision-framework.md +441 -0
- package/.grok/skills/clearthought/examples/metagame-examples.md +536 -0
- package/.grok/skills/clearthought/examples/sequential-thinking.md +380 -0
- package/.grok/skills/clearthought/references/output-schemas.md +494 -0
- package/.grok/skills/clearthought/references/parameter-reference.md +482 -0
- package/.grok/skills/coding-level/SKILL.md +34 -0
- package/.grok/skills/coding-level/references/level-0.md +131 -0
- package/.grok/skills/coding-level/references/level-1.md +118 -0
- package/.grok/skills/coding-level/references/level-2.md +140 -0
- package/.grok/skills/coding-level/references/level-3.md +142 -0
- package/.grok/skills/coding-level/references/level-4.md +152 -0
- package/.grok/skills/coding-level/references/level-5.md +84 -0
- package/.grok/skills/daily-workflow-curator/SKILL.md +52 -0
- package/.grok/skills/memento/SKILL.md +36 -0
- package/.grok/skills/parallel-analysis/SKILL.md +160 -0
- package/.grok/skills/path-sensitive-shell-safety/SKILL.md +69 -0
- package/.grok/skills/path-sensitive-shell-safety/references/workflow.md +127 -0
- package/.grok/skills/prompt-sharpener/SKILL.md +54 -0
- package/.grok/skills/reviewing-4p-priorities/SKILL.md +72 -0
- package/.grok/skills/reviewing-4p-priorities/examples.md +298 -0
- package/.grok/skills/sequential-thinking/SKILL.md +106 -0
- package/.grok/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
- package/.grok/skills/sequential-thinking/examples/branching-exploration.md +474 -0
- package/.grok/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
- package/.grok/skills/sequential-thinking/examples/revision-pattern.md +304 -0
- package/.grok/skills/sequential-thinking/references/output-schema.md +483 -0
- package/.grok/skills/sequential-thinking/references/parameters.md +463 -0
- package/.grok/skills/sequential-thinking/references/patterns.md +666 -0
- package/.grok/skills/tutien/SKILL.md +74 -0
- package/.grok/skills/tutien/references/classification.md +64 -0
- package/.grok/skills/tutien/references/lore-sources.md +15 -0
- package/.grok/skills/tutien/references/privacy.md +33 -0
- package/.grok/skills/tutien/references/schema.md +75 -0
- package/.grok/skills/tutien/references/scoring-and-realms.md +37 -0
- package/.grok/skills/tutien/references/voice-and-mode.md +44 -0
- package/.grok/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
- package/.grok/skills/tutien/scripts/adapters/git.mjs +48 -0
- package/.grok/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
- package/.grok/skills/tutien/scripts/analyze-history.mjs +84 -0
- package/.grok/skills/tutien/scripts/catalog.mjs +130 -0
- package/.grok/skills/tutien/scripts/classify.mjs +311 -0
- package/.grok/skills/tutien/scripts/command.mjs +107 -0
- package/.grok/skills/tutien/scripts/compare.mjs +41 -0
- package/.grok/skills/tutien/scripts/metrics.mjs +306 -0
- package/.grok/skills/tutien/scripts/normalize-events.mjs +68 -0
- package/.grok/skills/tutien/scripts/redact.mjs +30 -0
- package/.grok/skills/tutien/scripts/render-report.mjs +423 -0
- package/.grok/skills/tutien/scripts/run-tutien.mjs +272 -0
- package/.grok/skills/tutien/scripts/score.mjs +97 -0
- package/.grok/skills/tutien/scripts/snapshot.mjs +76 -0
- package/.grok/skills/tutien/scripts/villains.mjs +196 -0
- package/.grok/skills/vibekit-init/SKILL.md +52 -0
- package/.grok/skills/visual-design-loop/SKILL.md +103 -0
- package/.grok/skills/visual-design-loop/agents/openai.yaml +4 -0
- package/.vibekit/docs/BACKBONE_REFERENCE.md +3 -1
- package/.vibekit/docs/INSTALL.md +11 -7
- package/.vibekit/docs/SECURITY_MODEL.md +1 -1
- package/.vibekit/docs/TOOLING_GUIDE.md +5 -0
- package/.vibekit/docs/templates/CONTEXT_TEMPLATE.md +1 -1
- package/.vibekit/init/CLAUDE-template.md +3 -0
- package/.vibekit/init/FIRST_PROMPT.md +1 -1
- package/.vibekit/init/FIRST_TIME_INIT.md +2 -2
- package/.vibekit/scripts/doctor.mjs +11 -4
- package/.vibekit/scripts/mvck.mjs +27 -12
- package/.vibekit/scripts/pack-dry-run.mjs +38 -3
- package/.vibekit/scripts/test-install.mjs +8 -0
- package/.vibekit/scripts/validate-kit.mjs +116 -41
- package/.vibekit/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +28 -3
- package/.vibekit/skills/claim/SKILL.md +82 -0
- package/.vibekit/skills/prompt-sharpener/SKILL.md +54 -0
- package/.vibekit/skills/skills-manifest.json +27 -0
- package/.vibekit/skills/tutien/SKILL.md +74 -0
- package/.vibekit/skills/tutien/references/classification.md +64 -0
- package/.vibekit/skills/tutien/references/lore-sources.md +15 -0
- package/.vibekit/skills/tutien/references/privacy.md +33 -0
- package/.vibekit/skills/tutien/references/schema.md +75 -0
- package/.vibekit/skills/tutien/references/scoring-and-realms.md +37 -0
- package/.vibekit/skills/tutien/references/voice-and-mode.md +44 -0
- package/.vibekit/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
- package/.vibekit/skills/tutien/scripts/adapters/git.mjs +48 -0
- package/.vibekit/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
- package/.vibekit/skills/tutien/scripts/analyze-history.mjs +84 -0
- package/.vibekit/skills/tutien/scripts/catalog.mjs +130 -0
- package/.vibekit/skills/tutien/scripts/classify.mjs +311 -0
- package/.vibekit/skills/tutien/scripts/command.mjs +107 -0
- package/.vibekit/skills/tutien/scripts/compare.mjs +41 -0
- package/.vibekit/skills/tutien/scripts/metrics.mjs +306 -0
- package/.vibekit/skills/tutien/scripts/normalize-events.mjs +68 -0
- package/.vibekit/skills/tutien/scripts/redact.mjs +30 -0
- package/.vibekit/skills/tutien/scripts/render-report.mjs +423 -0
- package/.vibekit/skills/tutien/scripts/run-tutien.mjs +272 -0
- package/.vibekit/skills/tutien/scripts/score.mjs +97 -0
- package/.vibekit/skills/tutien/scripts/snapshot.mjs +76 -0
- package/.vibekit/skills/tutien/scripts/villains.mjs +196 -0
- package/.vibekit/skills/vibekit-init/SKILL.md +2 -2
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +40 -0
- package/README.md +60 -51
- package/backbone.yml +2 -1
- package/docs/README.vi.md +61 -52
- package/docs/README.zh-CN.md +277 -0
- package/package.json +15 -4
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Managed by Minimal Vibe Coding Kit. Project-scoped Grok Build settings.
|
|
2
|
+
# Project configs support MCP servers, plugins, and permission rules; other
|
|
3
|
+
# settings (such as [ui] permission_mode) are user-scoped and belong in
|
|
4
|
+
# ~/.grok/config.toml. Reference: https://docs.x.ai/build/settings
|
|
5
|
+
|
|
6
|
+
[permission]
|
|
7
|
+
deny = [
|
|
8
|
+
"Bash(rm -rf *)",
|
|
9
|
+
"Bash(rm *)",
|
|
10
|
+
"Bash(git push)",
|
|
11
|
+
"Bash(git push *)",
|
|
12
|
+
"Bash(git reset --hard)",
|
|
13
|
+
"Bash(git reset --hard *)",
|
|
14
|
+
"Bash(sh)",
|
|
15
|
+
"Bash(sh -)",
|
|
16
|
+
"Bash(bash)",
|
|
17
|
+
"Bash(bash -)",
|
|
18
|
+
"Bash(zsh)",
|
|
19
|
+
"Bash(zsh -)",
|
|
20
|
+
"Bash(npx --yes *)",
|
|
21
|
+
"Bash(npx -y *)",
|
|
22
|
+
"Bash(npx * --yes *)",
|
|
23
|
+
"Bash(npx * -y *)",
|
|
24
|
+
"Bash(npm publish)",
|
|
25
|
+
"Bash(npm publish *)",
|
|
26
|
+
"Bash(migrate *)",
|
|
27
|
+
"Bash(docker compose up*)",
|
|
28
|
+
"Bash(docker-compose up*)"
|
|
29
|
+
]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Safe delete rules
|
|
2
|
+
|
|
3
|
+
- Never delete permanently by default. Prefer `trash` over `rm`, `rm -rf`, `rmdir`, and `find -delete` so deletions stay recoverable.
|
|
4
|
+
- Before deleting, check availability with `command -v trash`. If available, use `trash <path>`.
|
|
5
|
+
- If `trash` is missing, recommend installing it instead of falling back to `rm`:
|
|
6
|
+
- macOS 14 or newer: built in at `/usr/bin/trash`, nothing to install.
|
|
7
|
+
- Older macOS: `brew install trash` (https://formulae.brew.sh/formula/trash).
|
|
8
|
+
- Linux: `sudo apt install trash-cli` or `pip install trash-cli` (https://github.com/andreafrancia/trash-cli).
|
|
9
|
+
- Any OS with Node.js: `npm install --global trash-cli` (https://github.com/sindresorhus/trash-cli).
|
|
10
|
+
- Permanent deletion requires the user's explicit approval of the exact paths, and the `path-sensitive-shell-safety` skill first when paths come from variables.
|
|
11
|
+
- Honor the deletion preference recorded in `backbone.yml` `conventions.custom_rules` during first-time init.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Security rules
|
|
2
|
+
|
|
3
|
+
Use the `agentshield-security-review` skill (invocable as `/agentshield-security-review`) for changes to agent surfaces, commands, hooks, MCP, skills, or installer scripts. Do not run untrusted hooks, MCP servers, deploys, migrations, or remote installers during review.
|
|
4
|
+
|
|
5
|
+
Use the `path-sensitive-shell-safety` skill before changing shell/deploy/installer/repair logic that builds paths from variables or can delete, move, copy, replace, clean, or reset files.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Vibe core rules
|
|
2
|
+
|
|
3
|
+
- Read `backbone.yml` first.
|
|
4
|
+
- Follow `backbone.yml` `conventions` after init.
|
|
5
|
+
- Keep plans short and diffs small.
|
|
6
|
+
- Use skills for repeatable procedures.
|
|
7
|
+
- Validate with the command in `backbone.yml` after relevant edits.
|
|
8
|
+
- Do not overwrite user instructions; use managed blocks.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentshield-security-review
|
|
3
|
+
description: repository-native security review workflow for Claude Code and Codex projects using the AgentShield concept. Use when auditing or hardening agent configuration, skills, prompts, hooks, MCP servers, permissions, slash commands, Codex plugin files, Claude plugin files, AGENTS.md, CLAUDE.md, or repository-level AI coding-agent surfaces. Prefer this skill before merging changes to .claude, .codex, .codex-plugin, .claude-plugin, .agents, .vibekit/skills, .vibekit/commands, .vibekit/scripts, hooks, mcp configs, or generated code that touches agent execution.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AgentShield Security Review
|
|
7
|
+
|
|
8
|
+
Use this skill to run an AgentShield-style review that is native to both Claude Code and Codex repositories. Treat the repo root as the source of truth, then inspect agent surfaces before normal code review.
|
|
9
|
+
|
|
10
|
+
## Core rule
|
|
11
|
+
|
|
12
|
+
Do not invent findings. Prefer deterministic scanner output when available, then add reviewer judgment separately. Clearly label each finding as `scanner-backed`, `manual-confirmed`, or `manual-suspected`.
|
|
13
|
+
|
|
14
|
+
## Standard workflow
|
|
15
|
+
|
|
16
|
+
1. Identify the repo root and active harness surfaces.
|
|
17
|
+
2. Run `node .vibekit/scripts/agentshield-probe.mjs .` to inventory Claude, Codex, shared skills, hooks, MCP, commands, and repo instruction files.
|
|
18
|
+
3. If Node/npm is available, run AgentShield from the repo root:
|
|
19
|
+
```bash
|
|
20
|
+
npx ecc-agentshield scan --path . --format text
|
|
21
|
+
```
|
|
22
|
+
4. If JSON is needed for CI or automation, run:
|
|
23
|
+
```bash
|
|
24
|
+
npx ecc-agentshield scan --path . --format json
|
|
25
|
+
```
|
|
26
|
+
5. If safe auto-fixes are requested, first summarize the proposed edits, then run:
|
|
27
|
+
```bash
|
|
28
|
+
npx ecc-agentshield scan --path . --fix
|
|
29
|
+
```
|
|
30
|
+
6. Re-run the scan after fixes and report before/after score, severity counts, and changed files.
|
|
31
|
+
7. If AgentShield is unavailable, perform the fallback manual review in `references/review-checklist.md`.
|
|
32
|
+
|
|
33
|
+
## Harness-native layout
|
|
34
|
+
|
|
35
|
+
Use a shared root skill where possible:
|
|
36
|
+
|
|
37
|
+
- `.vibekit/skills/agentshield-security-review/SKILL.md` is the canonical workflow.
|
|
38
|
+
- Claude Code may add a slash-command shim in `.vibekit/commands/security-scan.md` or `.claude/commands/security-scan.md`.
|
|
39
|
+
- Codex should consume the same root `.vibekit/skills/` directory through `.codex-plugin/plugin.json` or the repo's native skill/plugin mechanism.
|
|
40
|
+
- Do not duplicate divergent Claude and Codex skill bodies. Duplication causes drift.
|
|
41
|
+
|
|
42
|
+
See `references/native-install.md` for copy-ready Claude and Codex snippets.
|
|
43
|
+
|
|
44
|
+
## What to inspect
|
|
45
|
+
|
|
46
|
+
Prioritize runtime-active files over examples and docs:
|
|
47
|
+
|
|
48
|
+
1. `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`
|
|
49
|
+
2. `.claude/settings.json`, `.claude/settings.local.json`, `.claude/agents/*.md`, `.claude/commands/*.md`
|
|
50
|
+
3. `.codex/config.toml`, `.codex/`, `.codex-plugin/plugin.json`
|
|
51
|
+
4. `.agents/`, `agents/`, `.vibekit/skills/`, `.vibekit/commands/`, `.vibekit/scripts/`, `hooks/`
|
|
52
|
+
5. `.mcp.json`, `mcp.json`, `mcp-configs/*.json`
|
|
53
|
+
6. installer scripts, CI workflows, package scripts, and generated plugin manifests
|
|
54
|
+
|
|
55
|
+
## Output contract
|
|
56
|
+
|
|
57
|
+
Return a concise report with:
|
|
58
|
+
|
|
59
|
+
- Security grade/score if AgentShield provides one.
|
|
60
|
+
- Commands run and whether the scan was `npx`, local, CI, or fallback-manual.
|
|
61
|
+
- Active harness surfaces found.
|
|
62
|
+
- Critical/high findings with exact paths, severity, confidence, exploit impact, and fix.
|
|
63
|
+
- Medium/low findings grouped separately.
|
|
64
|
+
- Safe auto-fix candidates versus manual-only changes.
|
|
65
|
+
- Claude-native and Codex-native installation notes when the repo lacks one of them.
|
|
66
|
+
- Final remediation order.
|
|
67
|
+
|
|
68
|
+
Use `references/report-template.md` for the preferred report format.
|
|
69
|
+
|
|
70
|
+
## Safety constraints
|
|
71
|
+
|
|
72
|
+
- Never print full secrets. Show only the file path and key name or a redacted prefix/suffix.
|
|
73
|
+
- Do not run untrusted hook scripts, MCP server commands, package scripts, or installer scripts just to inspect them.
|
|
74
|
+
- Do not apply `--fix` without first stating the planned edit types.
|
|
75
|
+
- Treat wildcard shell permissions, unpinned `npx`, shell-running MCP servers, prompt-injection instructions, and silent hook failures as high-risk until proven otherwise.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Native Claude Code and Codex Install Pattern
|
|
2
|
+
|
|
3
|
+
Keep one canonical skill and add thin harness adapters.
|
|
4
|
+
|
|
5
|
+
## Shared skill location
|
|
6
|
+
|
|
7
|
+
Recommended repo layout:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
.vibekit/skills/agentshield-security-review/SKILL.md
|
|
11
|
+
.vibekit/skills/agentshield-security-review/references/review-checklist.md
|
|
12
|
+
.vibekit/skills/agentshield-security-review/references/report-template.md
|
|
13
|
+
.vibekit/skills/agentshield-security-review/scripts/agentshield_repo_probe.py
|
|
14
|
+
.vibekit/commands/security-scan.md
|
|
15
|
+
.codex-plugin/plugin.json
|
|
16
|
+
.claude-plugin/plugin.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Claude Code command shim
|
|
20
|
+
|
|
21
|
+
Create `.vibekit/commands/security-scan.md` or `.claude/commands/security-scan.md`:
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
---
|
|
25
|
+
description: Run an AgentShield-style security scan against agent, hook, MCP, permission, skill, command, Claude, and Codex surfaces.
|
|
26
|
+
agent: security-reviewer
|
|
27
|
+
subtask: true
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# Security Scan
|
|
31
|
+
|
|
32
|
+
Run the shared `agentshield-security-review` skill against the current repo or the target path.
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
`/security-scan [path] [--format text|json|markdown|html] [--min-severity low|medium|high|critical] [--fix]`
|
|
37
|
+
|
|
38
|
+
Prefer the deterministic scanner:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx ecc-agentshield scan --path "${TARGET_PATH:-.}" --format text
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If `--fix` is requested, summarize planned safe fixes first, apply only scanner-marked safe fixes, then re-run the scan.
|
|
45
|
+
|
|
46
|
+
Return grade, score, severity counts, active paths, critical/high findings, and remediation order.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Codex plugin pointer
|
|
50
|
+
|
|
51
|
+
Use the repo-level Codex plugin manifest to point Codex at the same `.vibekit/skills/` directory. Exact schema may vary by Codex plugin version, so preserve the existing repo schema and ensure it references the canonical `.vibekit/skills/` directory rather than a copied skill body.
|
|
52
|
+
|
|
53
|
+
Example intent:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"name": "your-repo",
|
|
58
|
+
"version": "0.1.0",
|
|
59
|
+
"skills": "./.vibekit/skills",
|
|
60
|
+
"mcp": "./.mcp.json"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## CI gate
|
|
65
|
+
|
|
66
|
+
Add a GitHub Actions job when you want agent config changes to fail builds:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
name: agent-security
|
|
70
|
+
on:
|
|
71
|
+
pull_request:
|
|
72
|
+
paths:
|
|
73
|
+
- "CLAUDE.md"
|
|
74
|
+
- "AGENTS.md"
|
|
75
|
+
- ".claude/**"
|
|
76
|
+
- ".codex/**"
|
|
77
|
+
- ".codex-plugin/**"
|
|
78
|
+
- ".claude-plugin/**"
|
|
79
|
+
- ".agents/**"
|
|
80
|
+
- "agents/**"
|
|
81
|
+
- ".vibekit/skills/**"
|
|
82
|
+
- ".vibekit/commands/**"
|
|
83
|
+
- "hooks/**"
|
|
84
|
+
- ".mcp.json"
|
|
85
|
+
- "mcp-configs/**"
|
|
86
|
+
|
|
87
|
+
jobs:
|
|
88
|
+
agentshield:
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
- uses: actions/setup-node@v4
|
|
93
|
+
with:
|
|
94
|
+
node-version: "20"
|
|
95
|
+
- name: Run AgentShield
|
|
96
|
+
run: npx ecc-agentshield scan --path . --format text --min-severity medium
|
|
97
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Security Review Report Template
|
|
2
|
+
|
|
3
|
+
Use this structure for final reports.
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
- Scan mode:
|
|
8
|
+
- Grade/score:
|
|
9
|
+
- Repo root:
|
|
10
|
+
- Harnesses found:
|
|
11
|
+
- Overall risk:
|
|
12
|
+
|
|
13
|
+
## Commands run
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# commands here
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Active surfaces found
|
|
20
|
+
|
|
21
|
+
| Surface | Paths | Runtime confidence |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Claude | | |
|
|
24
|
+
| Codex | | |
|
|
25
|
+
| Shared skills | | |
|
|
26
|
+
| Hooks | | |
|
|
27
|
+
| MCP | | |
|
|
28
|
+
| CI/plugin | | |
|
|
29
|
+
|
|
30
|
+
## Critical/high findings
|
|
31
|
+
|
|
32
|
+
| Severity | Confidence | Path | Issue | Why it matters | Fix | Auto-fix safe? |
|
|
33
|
+
|---|---|---|---|---|---|---|
|
|
34
|
+
|
|
35
|
+
## Medium/low findings
|
|
36
|
+
|
|
37
|
+
Group by theme: permissions, hooks, MCP, prompts, skills, .vibekit/docs/examples.
|
|
38
|
+
|
|
39
|
+
## Remediation order
|
|
40
|
+
|
|
41
|
+
1. Remove or rotate exposed secrets.
|
|
42
|
+
2. Restrict shell/tool permissions.
|
|
43
|
+
3. Pin or sandbox MCP/package execution.
|
|
44
|
+
4. Harden hooks and quote/sanitize variables.
|
|
45
|
+
5. Add CI gate.
|
|
46
|
+
6. Remove duplicate divergent Claude/Codex skill copies.
|
|
47
|
+
7. Re-run scan and confirm grade improvement.
|
|
48
|
+
|
|
49
|
+
## Native integration status
|
|
50
|
+
|
|
51
|
+
- Claude Code:
|
|
52
|
+
- Codex:
|
|
53
|
+
- Shared skill source:
|
|
54
|
+
- Drift risks:
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# AgentShield Manual Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when `ecc-agentshield` is unavailable or when reviewing scanner output.
|
|
4
|
+
|
|
5
|
+
## Critical findings
|
|
6
|
+
|
|
7
|
+
Flag as critical when a runtime-active agent surface contains any of these:
|
|
8
|
+
|
|
9
|
+
- Hardcoded API keys, tokens, private keys, passwords, or webhook secrets.
|
|
10
|
+
- Unrestricted shell permissions such as `Bash` wildcard permissions, `bash -c` passthroughs, or unrestricted command execution in hooks.
|
|
11
|
+
- Hook command injection risk from unsanitized variables such as file paths, branch names, issue titles, PR text, or model-provided arguments.
|
|
12
|
+
- MCP server definitions that execute shell commands, pull remote code dynamically, or expose broad filesystem/network access without pinning or sandboxing.
|
|
13
|
+
- Instructions that tell the agent to ignore system/developer safety boundaries or auto-run commands from untrusted content.
|
|
14
|
+
|
|
15
|
+
## High findings
|
|
16
|
+
|
|
17
|
+
Flag as high when active config contains:
|
|
18
|
+
|
|
19
|
+
- Missing deny lists for destructive commands.
|
|
20
|
+
- Broad tool permissions for agents that only need read/review access.
|
|
21
|
+
- `npx` auto-yes flags, curl-piped-to-shell, or remote install during runtime without pinning/checksum.
|
|
22
|
+
- Agents that ingest untrusted web/issues/PRs without prompt-injection boundaries.
|
|
23
|
+
- Hooks that send repository content to remote endpoints without explicit disclosure.
|
|
24
|
+
|
|
25
|
+
## Medium findings
|
|
26
|
+
|
|
27
|
+
Flag as medium when active config contains:
|
|
28
|
+
|
|
29
|
+
- Silent failure suppression such as always-success shell fallbacks, stderr suppression, or broad `try/catch` around security checks.
|
|
30
|
+
- Missing descriptions for MCP servers or agent purposes.
|
|
31
|
+
- Duplicate Claude/Codex skill copies likely to drift.
|
|
32
|
+
- Lack of CI security scan for agent config changes.
|
|
33
|
+
|
|
34
|
+
## Low/info findings
|
|
35
|
+
|
|
36
|
+
Flag as low/info for documentation gaps, inactive examples, or optional templates that do not affect runtime.
|
|
37
|
+
|
|
38
|
+
## Review confidence
|
|
39
|
+
|
|
40
|
+
Use these labels:
|
|
41
|
+
|
|
42
|
+
- `active-runtime`: loaded by current harness or plugin manifest.
|
|
43
|
+
- `repo-template`: checked-in template that users may copy.
|
|
44
|
+
- `documentation-example`: not active unless copied.
|
|
45
|
+
- `unknown`: unable to determine loading path.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Inventory AgentShield-relevant AI coding-agent surfaces in a repository.
|
|
3
|
+
|
|
4
|
+
This script is intentionally read-only. It does not execute hooks, package scripts,
|
|
5
|
+
MCP servers, or installer commands.
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import json
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from typing import Iterable
|
|
13
|
+
|
|
14
|
+
PATTERNS = {
|
|
15
|
+
"repo_instructions": ["CLAUDE.md", "AGENTS.md", ".github/copilot-instructions.md"],
|
|
16
|
+
"claude": [".claude", ".claude-plugin", "agents"],
|
|
17
|
+
"codex": [".codex", ".codex-plugin"],
|
|
18
|
+
"grok": [".grok"],
|
|
19
|
+
"shared_skills": [".vibekit/skills", ".claude/skills", ".cursor/skills", ".agents/skills", ".grok/skills", "skills"],
|
|
20
|
+
"shared_commands": [".vibekit/commands"],
|
|
21
|
+
"kit_scripts": [".vibekit/scripts"],
|
|
22
|
+
"hooks": ["hooks", ".claude/hooks", ".agents/hooks", ".grok/hooks"],
|
|
23
|
+
"mcp": [".mcp.json", "mcp.json", "mcp-configs"],
|
|
24
|
+
"ci": [".github/workflows"],
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
SUSPICIOUS_TEXT = [
|
|
28
|
+
"Bash" + "(*)",
|
|
29
|
+
"npx" + " -y",
|
|
30
|
+
"curl" + " | sh",
|
|
31
|
+
"wget" + " | sh",
|
|
32
|
+
"||" + " true",
|
|
33
|
+
"2>" + "/dev/null",
|
|
34
|
+
"ignore previous" + " instructions",
|
|
35
|
+
"ignore all previous" + " instructions",
|
|
36
|
+
"ANTHROPIC" + "_API_KEY=",
|
|
37
|
+
"OPENAI" + "_API_KEY=",
|
|
38
|
+
"GITHUB" + "_TOKEN=",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def iter_files(path: Path) -> Iterable[Path]:
|
|
43
|
+
if path.is_file():
|
|
44
|
+
yield path
|
|
45
|
+
elif path.is_dir():
|
|
46
|
+
for child in path.rglob("*"):
|
|
47
|
+
if child.is_file() and ".git" not in child.parts:
|
|
48
|
+
yield child
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def safe_read(path: Path, limit: int = 200_000) -> str:
|
|
52
|
+
try:
|
|
53
|
+
data = path.read_bytes()[:limit]
|
|
54
|
+
return data.decode("utf-8", errors="ignore")
|
|
55
|
+
except OSError:
|
|
56
|
+
return ""
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def deny_block_lines(text: str) -> set[int]:
|
|
60
|
+
"""Line indexes inside a permissions deny array (JSON `"deny": [` or TOML `deny = [`).
|
|
61
|
+
|
|
62
|
+
Deny rules quote dangerous patterns in order to block them, so a marker on
|
|
63
|
+
those lines is defensive, not suspicious. Allow/ask blocks are still scanned.
|
|
64
|
+
"""
|
|
65
|
+
covered: set[int] = set()
|
|
66
|
+
inside = False
|
|
67
|
+
for idx, line in enumerate(text.splitlines()):
|
|
68
|
+
stripped = line.strip()
|
|
69
|
+
if not inside and "[" in stripped and ('"deny"' in stripped or stripped.startswith("deny =") or stripped.startswith("deny=")):
|
|
70
|
+
covered.add(idx)
|
|
71
|
+
inside = "]" not in stripped.split("[", 1)[1]
|
|
72
|
+
continue
|
|
73
|
+
if inside:
|
|
74
|
+
covered.add(idx)
|
|
75
|
+
if "]" in stripped:
|
|
76
|
+
inside = False
|
|
77
|
+
return covered
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def main() -> int:
|
|
81
|
+
parser = argparse.ArgumentParser(description="Inventory Claude/Codex AgentShield surfaces")
|
|
82
|
+
parser.add_argument("path", nargs="?", default=".", help="Repository root")
|
|
83
|
+
parser.add_argument("--json", action="store_true", help="Emit JSON")
|
|
84
|
+
args = parser.parse_args()
|
|
85
|
+
|
|
86
|
+
root = Path(args.path).resolve()
|
|
87
|
+
result: dict[str, object] = {"repo_root": str(root), "surfaces": {}, "suspicious_markers": []}
|
|
88
|
+
|
|
89
|
+
surfaces: dict[str, list[str]] = {}
|
|
90
|
+
suspicious: list[dict[str, str]] = []
|
|
91
|
+
|
|
92
|
+
for category, patterns in PATTERNS.items():
|
|
93
|
+
found: list[str] = []
|
|
94
|
+
for pattern in patterns:
|
|
95
|
+
candidate = root / pattern
|
|
96
|
+
if candidate.exists():
|
|
97
|
+
found.append(str(candidate.relative_to(root)))
|
|
98
|
+
for file_path in iter_files(candidate):
|
|
99
|
+
if file_path.suffix.lower() not in {".md", ".json", ".toml", ".yaml", ".yml", ".sh", ".js", ".ts"}:
|
|
100
|
+
continue
|
|
101
|
+
text = safe_read(file_path)
|
|
102
|
+
skip_lines = deny_block_lines(text)
|
|
103
|
+
lines = text.splitlines()
|
|
104
|
+
for marker in SUSPICIOUS_TEXT:
|
|
105
|
+
hits = [idx for idx, line in enumerate(lines) if marker in line]
|
|
106
|
+
if any(idx not in skip_lines for idx in hits):
|
|
107
|
+
suspicious.append({
|
|
108
|
+
"path": str(file_path.relative_to(root)),
|
|
109
|
+
"marker": marker,
|
|
110
|
+
"category": category,
|
|
111
|
+
})
|
|
112
|
+
surfaces[category] = found
|
|
113
|
+
|
|
114
|
+
result["surfaces"] = surfaces
|
|
115
|
+
result["suspicious_markers"] = suspicious
|
|
116
|
+
|
|
117
|
+
if args.json:
|
|
118
|
+
print(json.dumps(result, indent=2, sort_keys=True))
|
|
119
|
+
else:
|
|
120
|
+
print(f"Repo root: {root}")
|
|
121
|
+
print("\nActive-looking surfaces:")
|
|
122
|
+
for category, paths in surfaces.items():
|
|
123
|
+
if paths:
|
|
124
|
+
print(f"- {category}: {', '.join(paths)}")
|
|
125
|
+
if suspicious:
|
|
126
|
+
print("\nSuspicious markers needing review:")
|
|
127
|
+
for item in suspicious:
|
|
128
|
+
print(f"- {item['path']} [{item['category']}]: {item['marker']}")
|
|
129
|
+
else:
|
|
130
|
+
print("\nNo built-in suspicious markers found by probe. Run AgentShield for full analysis.")
|
|
131
|
+
return 0
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
if __name__ == "__main__":
|
|
135
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Autoresearch Coding
|
|
2
|
+
|
|
3
|
+
Metric-driven improvement loop for AI coding agents.
|
|
4
|
+
|
|
5
|
+
Example:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
/autoresearch-coding goal: improve API latency; metric command: npm run bench; direction: lower; editable paths: src/api src/lib; protected paths: .env* migrations; budget: 5
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
For this kit:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
/autoresearch-coding goal: improve the kit; metric command: node .vibekit/scripts/validate-kit.mjs .; direction: higher; editable paths: .vibekit/docs .vibekit/scripts .vibekit/skills .vibekit/commands .claude .cursor .agents .codex-plugin; budget: 3
|
|
15
|
+
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autoresearch-coding
|
|
3
|
+
description: Run a metric-driven coding experiment loop. Use when improving a repo through repeated hypotheses, benchmark-guided changes, validation, keep/discard decisions, or safe workflow enhancement. Requires a goal, metric command, direction, editable paths, protected paths, and budget.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: goal; metric command; direction; editable paths; protected paths; budget; timeout
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Autoresearch Coding Loop
|
|
9
|
+
|
|
10
|
+
Run a controlled experiment loop. Do not perform open-ended destructive work.
|
|
11
|
+
|
|
12
|
+
## Contract
|
|
13
|
+
|
|
14
|
+
Extract or infer:
|
|
15
|
+
|
|
16
|
+
- Goal.
|
|
17
|
+
- Metric command.
|
|
18
|
+
- Direction: `lower` or `higher` is better.
|
|
19
|
+
- Editable paths.
|
|
20
|
+
- Protected paths.
|
|
21
|
+
- Budget, default 3.
|
|
22
|
+
- Timeout, default 10 minutes.
|
|
23
|
+
|
|
24
|
+
If the metric command or editable scope is missing, infer conservative defaults and show the contract before editing. If no safe metric exists, ask for one.
|
|
25
|
+
Always print the resolved contract before the baseline run, and label inferred fields.
|
|
26
|
+
|
|
27
|
+
For this kit itself, use:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
goal: improve Minimal Vibe Coding Kit quality
|
|
31
|
+
metric command: node .vibekit/scripts/validate-kit.mjs .
|
|
32
|
+
direction: higher
|
|
33
|
+
editable paths: .vibekit/docs .vibekit/scripts .vibekit/skills .vibekit/commands .claude .cursor .agents .codex-plugin .github README.md AGENTS.md .vibekit/init/CLAUDE-template.md .vibekit/init/FIRST_TIME_INIT.md .vibekit/init/FIRST_PROMPT.md backbone.yml package.json install.sh install.ps1
|
|
34
|
+
protected paths: .git .env* node_modules vendor secrets lockfiles
|
|
35
|
+
budget: 3
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Setup
|
|
39
|
+
|
|
40
|
+
1. Read `backbone.yml`. If `meta.template_status` is `uninitialized`, follow `.vibekit/init/FIRST_TIME_INIT.md` and wait for explicit approval before experiment edits.
|
|
41
|
+
2. Inspect `git status --short`.
|
|
42
|
+
3. If user changes exist, stop unless the user permits dirty-state experimentation.
|
|
43
|
+
4. Create or switch to an experiment branch named `autoresearch/<date>-<slug>` when a git repo is available. If branch creation is blocked by permissions, ask for approval once and record any approved fallback.
|
|
44
|
+
5. Create local-only paths if missing:
|
|
45
|
+
- `.autoresearch/logs/`
|
|
46
|
+
- `.autoresearch/notes/`
|
|
47
|
+
- `results.tsv`
|
|
48
|
+
6. Initialize `results.tsv` with:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
commit metric_value direction status seconds log_path description
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Do not commit `.autoresearch/` or `results.tsv` unless the user asks.
|
|
55
|
+
|
|
56
|
+
## Baseline
|
|
57
|
+
|
|
58
|
+
Before edits:
|
|
59
|
+
|
|
60
|
+
1. Run the metric command once.
|
|
61
|
+
2. Save output to `.autoresearch/logs/baseline.log`.
|
|
62
|
+
3. Extract a metric value using `references/metric-extraction.md`. If ambiguous, use pass/fail plus warning count and explain.
|
|
63
|
+
4. Append a baseline row with status `keep`.
|
|
64
|
+
|
|
65
|
+
## Experiment loop
|
|
66
|
+
|
|
67
|
+
For each experiment:
|
|
68
|
+
|
|
69
|
+
1. Read the best kept result from `results.tsv`.
|
|
70
|
+
2. Form one small hypothesis.
|
|
71
|
+
3. Modify only editable paths.
|
|
72
|
+
4. Run the metric command with timeout and log output.
|
|
73
|
+
5. Decide:
|
|
74
|
+
- `keep`: metric improves, or equal metric with simpler safer code.
|
|
75
|
+
- `discard`: worse or equal without simplification.
|
|
76
|
+
- `crash`: command fails, times out, or no usable metric.
|
|
77
|
+
6. Append a row to `results.tsv`.
|
|
78
|
+
7. Keep good changes; revert discarded or crashed changes.
|
|
79
|
+
8. If a crash is from a trivial patch mistake, fix once and rerun.
|
|
80
|
+
|
|
81
|
+
If a kept change touches agent surfaces such as `AGENTS.md`, `CLAUDE.md`, `.claude/**`, `.cursor/**`, `.agents/**`, `.codex-plugin/**`, `.vibekit/skills/**`, `.vibekit/commands/**`, `.vibekit/scripts/**`, hooks, or MCP config, run the AgentShield probe before final reporting.
|
|
82
|
+
|
|
83
|
+
## Delegation
|
|
84
|
+
|
|
85
|
+
Use subagents when available:
|
|
86
|
+
|
|
87
|
+
- `hypothesis-planner`: next experiment idea.
|
|
88
|
+
- `implementation-hacker`: apply scoped patch.
|
|
89
|
+
- `test-runner`: run noisy commands and return metrics.
|
|
90
|
+
- `debug-fixer`: fix trivial crash bugs.
|
|
91
|
+
- `code-reviewer`: review kept changes.
|
|
92
|
+
- `results-analyst`: summarize ledger.
|
|
93
|
+
- `security-reviewer`: review agent-surface changes.
|
|
94
|
+
|
|
95
|
+
## Stop
|
|
96
|
+
|
|
97
|
+
Stop when budget is reached, metric is missing, protected paths are needed, three unrelated crashes happen, or the user changes the goal.
|
|
98
|
+
|
|
99
|
+
## Final report
|
|
100
|
+
|
|
101
|
+
Report baseline, best metric, kept/discarded/crashed counts, changed files, validation output, security probe result when relevant, risks, and log locations.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Experiment contract
|
|
2
|
+
|
|
3
|
+
Required fields:
|
|
4
|
+
|
|
5
|
+
- Goal
|
|
6
|
+
- Metric command
|
|
7
|
+
- Direction: lower or higher
|
|
8
|
+
- Editable paths
|
|
9
|
+
- Protected paths
|
|
10
|
+
- Budget
|
|
11
|
+
- Timeout
|
|
12
|
+
|
|
13
|
+
The agent must print the contract before editing. If any field is inferred, label it `inferred`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Result ledger
|
|
2
|
+
|
|
3
|
+
Use `results.tsv` with this header:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
commit metric_value direction status seconds log_path description
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Status values:
|
|
10
|
+
|
|
11
|
+
- `keep`
|
|
12
|
+
- `discard`
|
|
13
|
+
- `crash`
|
|
14
|
+
|
|
15
|
+
Keep verbose command output in `.autoresearch/logs/`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import argparse
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
HEADER = "commit\tmetric_value\tdirection\tstatus\tseconds\tlog_path\tdescription\n"
|
|
6
|
+
|
|
7
|
+
parser = argparse.ArgumentParser(description="Append an autoresearch result row")
|
|
8
|
+
parser.add_argument("--file", default="results.tsv")
|
|
9
|
+
parser.add_argument("--commit", required=True)
|
|
10
|
+
parser.add_argument("--metric", required=True)
|
|
11
|
+
parser.add_argument("--direction", required=True, choices=["lower", "higher"])
|
|
12
|
+
parser.add_argument("--status", required=True, choices=["keep", "discard", "crash"])
|
|
13
|
+
parser.add_argument("--seconds", required=True)
|
|
14
|
+
parser.add_argument("--log", required=True)
|
|
15
|
+
parser.add_argument("--description", required=True)
|
|
16
|
+
args = parser.parse_args()
|
|
17
|
+
|
|
18
|
+
path = Path(args.file)
|
|
19
|
+
if not path.exists():
|
|
20
|
+
path.write_text(HEADER, encoding="utf-8")
|
|
21
|
+
row = "\t".join([args.commit, args.metric, args.direction, args.status, args.seconds, args.log, args.description.replace("\t", " ")]) + "\n"
|
|
22
|
+
with path.open("a", encoding="utf-8") as f:
|
|
23
|
+
f.write(row)
|
|
24
|
+
print(f"logged {args.status} -> {path}")
|