26 Commits

Author SHA1 Message Date
uditgoenka 6c5abafad1 docs(release): make v2.2.2 claims match verified behavior
Align release metadata, capability-scoped support, installation guidance, hook boundaries, maintainer documentation, changelog ownership, and the PR-first release procedure with the stabilized distributions.

Constraint: Canonical and Claude surfaces use 2.2.2 while the Codex manifest retains 2.2.2-codex.0.

Rejected: Maintain two current changelogs | duplicate release authority drifts.

Rejected: Publish before the Windows matrix passes | violates the accepted release state machine.

Confidence: high

Scope-risk: moderate

Directive: Keep generated skill versions sourced from the canonical skill and preserve immutable release tags.

Tested: hooks 228/228; orchestrator 195/195; regression 65/65; maintenance 50/50; transform; shell syntax; link/path sweep; diff check

Not-tested: GitHub Windows runner remains blocked pending explicit approval for a fresh gate attempt
2026-08-13 03:41:37 +05:30
uditgoenka 0b543182d6 fix(release): make distributions and publication gates self-contained
Standalone installations now carry the deterministic runtimes they invoke, parse persisted state and regression evidence fail-closed, and prove clean execution outside the checkout. Release preparation owns every generated surface, verifies identity and all suites, and stops after opening the reviewable PR.

Constraint: Runtime helpers remain generated byte-identical package resources

Constraint: Release artifacts must be created by uditgoenka

Rejected: Preserve checkout-relative runtime lookup | standalone installs would remain incomplete

Rejected: Let release preparation merge and publish | human approval must remain a separate state transition

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Run scripts/transform.sh after canonical skill or runtime changes

Tested: hooks 228/228; orchestrator and clean installs 188/188; regression 65/65; maintenance 50/50; syntax, diff, and byte parity

Not-tested: Windows and Linux execution awaits the pull-request matrix

Co-authored-by: MiaoDX <miaodx@hotmail.com>
2026-08-13 02:29:43 +05:30
uditgoenka dbdb4b4160 fix(hooks): make guardrail failures visible and portable
Claude guardrails could silently disappear on native Windows, accept forgeable approval text, misclassify compound shell operands, or lose webhook delivery before process exit. Centralize bounded shell inspection, use the host permission contract, preserve operating-system temp roots, install the advertised hooks safely, and keep canonical and packaged hook trees identical.

Constraint: Hooks remain defense-in-depth and fail open with redacted diagnostics.

Constraint: Every Git and GitHub artifact is owned by uditgoenka.

Rejected: Keep the APPROVED path prefix | it is forgeable and not a host permission boundary.

Rejected: Maintain per-hook shell splitters | shared parsing prevents contract drift across guardrails.

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep .claude hooks canonical and regenerate claude-plugin/hooks with scripts/transform.sh.

Tested: hooks 228/228; orchestrator 154/154; regression 50/50; Node and shell syntax; transform byte parity; diff check.

Not-tested: Native Windows execution awaits the exact-head Windows release matrix in the distribution PR.
2026-08-13 01:37:53 +05:30
Udit Goenka 4f43dcedaf feat(orchestrator): v2.2.1 seam hardening + global hook logs (#108)
Harden the deterministic orchestrator seam (scripts/orchestrate.sh) and relocate hook runtime logs out of project repos.

Orchestrator: screen-cmd destructive-command coverage (netcat exfil, raw block-device writes incl. mmcblk/md/dm-, mkfs, find -delete, shred, zero-truncate, recursive zero-mode chmod, curl|xargs-into-interpreter, path-qualified binaries); new validate-state and screen-state-predicate subcommands (escaped-quote-safe extraction); next-hop independent verify hop before DONE/ship. Seam now exposes eight subcommands. Predicate pinned verbatim into the ledger.

Hooks: log() now writes to a global, per-project-keyed path under ~/.claude/hooks/.logs/ instead of a process.cwd()-relative dir, so hooks no longer pollute (or risk being committed into) end-user project repos.

Version 2.2.0 -> 2.2.1 across manifests + SKILL.md mirrors (command count unchanged at 14). Tests: orchestrator 154, hooks 107, regression 50 — all green.

Closes #107
2026-06-23 12:55:44 +05:30
Udit Goenka 9f51f726e5 feat(autoresearch): autonomous goal-directed orchestrator (v2.2.0) (#105)
* feat(autoresearch): add autonomous goal-directed orchestrator (v2.2.0)

Overload bare `/autoresearch` so a plain-language goal drives the whole
subcommand suite autonomously, the way `/ck:cook` does for implementation.
The user states a goal; the orchestrator classifies it, derives a concrete
success predicate, and loops the right subcommands until the predicate holds.

Dispatch (bare invocation):
- `Metric:`/`Verify:` present  -> Classic metric loop (unchanged)
- free-form natural-language goal -> Orchestrator
- nothing                       -> setup wizard
- `--classic` / `--auto` force the respective mode; mode printed in banner.

Two orchestrator modes by goal archetype:
- Orchestration loop for predicate-bearing archetypes (ship-ready,
  optimize-metric, fix-broken, harden, build-feature, explore) — loops until
  the mechanical predicate is met.
- Single-pass dispatch for subjective/terminal archetypes (document,
  what-to-build, decide-design) — routes once to learn/improve/reason.

All routing logic lives in one deterministic seam, scripts/orchestrate.sh,
mirroring the existing scripts/score-regression.sh <-> tests/test-regression.sh
pattern. Subcommands: classify, next-hop, units, plateau, screen-cmd, verdict.

Safety invariants:
- Never auto-approves ship/deploy/push; deploy always needs user approval.
- Bounded by plateau detection (5 cycles no net progress) and a hard ceiling
  (50, override --max-cycles); repeated unknown-units cycles route to BLOCKED.
- Every derived command is safety-screened (rm recursive+force in any flag
  arrangement, curl|sh, credential patterns, fork bombs) and re-screened when
  read from persisted state on resume.
- Data-migration stays behind the anchored DB-URL allowlist (host must be
  localhost/127.0.0.1/single-label container, or dbname carries _test/_ci
  suffix); bare substring does not qualify.

Distribution parity: spec mirrored across .claude, claude-plugin, .agents
(codex), .opencode, and plugins/autoresearch; manifests bumped to 2.2.0;
scripts/transform.sh propagates the new reference and also fixes a latent
:regression colon-drift in the codex/opencode adapters.

Tests: tests/test-orchestrator.sh (85 assertions) green; existing
test-regression.sh (50) and test-hooks.sh (105) still green.

* fix(autoresearch): harden screen-cmd against path-qualified rm and alt-shell curl pipes

The screen-cmd safety gate anchored its rm matcher on the bare command name,
so a path-qualified invocation (/bin/rm, ./rm, /usr/local/bin/rm) bypassed the
recursive+force refusal. Likewise the curl/wget pipe matcher only caught sh and
bash, missing zsh/dash/fish/ksh/python/perl/ruby/node/php and path-qualified
shells. Both are autonomous-loop command-screening bypasses.

- rm: allow an optional path prefix ending in /rm on the command-name anchor.
- curl/wget pipe: match an optional path prefix plus an enumerated interpreter
  set. Enumerated rather than "refuse any curl pipe" so a legitimate derived
  predicate that pipes curl output to a parser (jq/grep/awk) is not refused.

Added 12 assertions: path-qualified rm (4 forms) refuse; non-rm words
(confirm/perform) stay ok; alt-shell/path-qualified curl pipes refuse;
curl piped to a parser stays ok. test-orchestrator.sh now 97/97.

---------

Co-authored-by: uditgoenka <udit@firstsales.io>
2026-06-20 13:09:10 +05:30
Udit Goenka 3c0be51710 feat(regression): add autoresearch:regression stability gate (14th command) (#102)
Adds the 14th family command — a layered regression stability gate (orchestrator + git-worktree differential core + debug-style hunter) across 8 dimensions with a tiered HARD/SCORE verdict and the green-to-red classification invariant. Ships scripts/score-regression.sh, tests/test-regression.sh (50 assertions, 10 golden fixtures), 5-surface mirror parity, and 3 plugin manifests. Released as v2.1.4.
2026-06-19 13:07:39 +05:30
Udit Goenka a6e39a4a75 feat: add /autoresearch:improve — product improvement research + PRD generation
New subcommand for product companies. Researches ICP challenges via deep
multi-source web research across 5 categories, scores and ranks improvements
using tiered ranking (Must-have/Nice-to-have/Moonshot), and generates
per-feature PRDs with evidence chains.

Key design decisions (11 locked via adversarial reasoning):
- Opportunistic product context with conditional auto-discover
- Structured insight schema with canonical normalization for dedup
- 5 research categories with coverage guarantee (was 7, merged after analysis)
- WebSearch as hypothesis generation with triangulation safeguards
- Tiered ranking over numeric scores (ICP binary gate + 3-tier bucketing)
- Terminal emitter — outputs PRDs for external tools, not autoresearch re-entry
- 2 AskUserQuestion rounds (setup + feature selection)
- Single-pass PRD with 5 guardrails (DECISION NEEDED markers, evidence tiers)

Subcommand count: 12 → 13. Version: v2.1.2.

Files: 4 new (.claude/commands/autoresearch/improve.md, CONTEXT.md,
guide/autoresearch-improve.md, + 3 platform distributions), 17 modified.
2026-05-23 10:42:30 +05:30
Udit Goenka 94cc09e3df feat: v2.1.1 — 9-hook safety and context injection system
Ship the hook system as a Claude Code plugin feature:

Safety gates (PreToolUse):
- scout-block: blocks vendor dirs, .git, __pycache__, dist, build
- privacy-block: blocks .env/SSH/credentials with APPROVED: prefix override
- dangerous-cmd-block: blocks force-push, rm -rf, reset --hard

Context injection (UserPromptSubmit, SubagentStart):
- iteration-context: injects recent TSV data every 5th prompt
- subagent-context: ~150 tokens of loop awareness per subagent
- dev-rules-reminder: re-injects plan path and code standards
- simplify-gate: warns 400 LOC, blocks 800 LOC on shipping verbs

Session lifecycle (SessionStart, SessionEnd):
- session-init: computes project root, branch, paths; persists state
- stop-notify: terminal notification + optional webhook

Infrastructure:
- lib/ar-hook-utils.cjs: shared state, TSV reading, logging
- lib/ignore.cjs: vendored gitignore-spec matcher (zero deps)
- node-hook-runner.sh: clean env wrapper for JSON output
- hooks.json: auto-registers all hooks on plugin install
- .ckignore: baseline blocked patterns (customizable per project)
- transform.sh: copies hooks to claude-plugin/hooks/ distribution
- 105-test suite covering all 9 hooks
2026-05-22 11:42:38 +05:30
Udit Goenka 55c4754eb6 docs: rewrite all documentation from scratch for v2.1.0
Complete rewrite of README.md, docs/ (7 files), guide/ (18 files),
CONTRIBUTING.md, and COMPARISON.md for the v2.1.0 modular architecture.

- 12 commands with bounded defaults (was 11; evals is new)
- Thin SKILL.md routing table + self-contained command files
- 3 focused reference files replacing 13 old workflow files
- scripts/transform.sh replaces sync-opencode.sh + sync-codex.sh
- Removed autoresearch-command-spec.json, Python CLI wrapper
- Updated marketplace.json and claude-plugin distribution
- Added __pycache__ to .gitignore, removed tracked .pyc files
- Cleaned up 13 stale reference files from claude-plugin/
2026-05-22 02:57:09 +05:30
Udit Goenka 1020457e7c feat!: v2.1.0 — monolith → modular architecture rebuild
Replace 813-line monolith SKILL.md (~100K tokens/invocation) with thin
41-line routing table + 12 self-contained command files (≤120 lines each,
~5-8K tokens/invocation). 95% token reduction per invocation.

Architecture changes:
- SKILL.md: routing table + safety invariants only
- 12 command files: core, plan, debug, fix, security, ship, scenario,
  predict, learn, reason, probe, evals (new)
- 3 reference files: security-checklist, predict-personas, reason-judge-protocol
- Old 13 reference workflow files deleted (26K+ lines removed)
- Codex command-spec.json replaced by per-command .md files

New evals subcommand:
- Analyze iteration results (trends, plateaus, regressions)
- Adaptive checkpoint protocol: floor(max_iterations/3), min 1
- Backward compatible with v2.0.03 TSV format

Multi-platform sync:
- Claude Code: .claude/commands/ + .claude/skills/
- OpenCode: .opencode/commands/ (underscore naming)
- Codex: plugins/ + .agents/ (command files merged into skills)
- transform.sh handles all platform transforms

Both plugin.json files bumped to v2.1.0.
2026-05-22 02:29:08 +05:30
Udit Goenka 6db2874294 fix(codex): make autoresearch invocations reliable
Codex skill discovery now installs into the current ~/.codex skill root, and the wrapper accepts embedded $autoresearch invocations plus debug --chain.

Constraint: Current Codex/OMX loads workflow skills from ${CODEX_HOME:-~/.codex}/skills

Constraint: Release target requested as v2.0.03

Rejected: Keep installing Codex skills only under ~/.agents | current Codex treats that as a legacy root and sessions can miss the skill

Confidence: high

Scope-risk: moderate

Directive: Keep the wrapper spec and installed skill bundle in sync when adding subcommand flags

Tested: python3 -m unittest tests/test_autoresearch_codex.py

Tested: wrapper no-exec for embedded $autoresearch reason --iterations 20

Tested: wrapper no-exec for autoresearch debug --chain fix

Tested: bash -n scripts/install.sh

Tested: install_local_plugin.py temporary Codex home install

Not-tested: Live Codex interactive skill reload after global install
2026-05-02 14:34:30 +05:30
Udit Goenka 6e8a28a13e feat: release v2.0.0 — multi-platform GA with security hardening
Multi-platform GA release promoting v2.0.0-beta to stable.
Claude Code + OpenCode + Codex all fully supported.

Fixed:
- SKILL.md YAML frontmatter uses folded block scalars for strict
  parser compatibility (Codex CLI, PyYAML) — closes #69, #71
- Sync scripts pass paths via sys.argv instead of shell string
  interpolation — eliminates injection risk (#77)
- install.sh sync_dir() validates path depth before rm -rf (#78)

Added:
- name field to OpenCode docs-manager agent (#74)
- name field to all 11 OpenCode commands (#75)
- allowed-tools to all Claude/plugin command files (#76)
- /autoresearch:probe subcommand (adversarial requirement interrogation)
- Codex plugin marketplace metadata

Changed:
- All version references unified to 2.0.0
- Sync script regex updated for multiline YAML descriptions
- README updated for GA (removed beta references)

Contributors: @xiaolai @georgelichen @ch0udry @rexplx @haosenwang1018
2026-04-28 15:12:26 +05:30
Udit Goenka bd978ff66b feat: add OpenAI Codex support with full skill port, sync tooling, and installer
- Create .agents/skills/autoresearch/ with adapted SKILL.md + 12 reference files
- Create agents/openai.yaml for Codex UI metadata
- Create scripts/sync-codex.sh for .claude/ → .agents/ transformation
- Update install.sh with --codex flag and Codex path support
- Update README, CONTRIBUTING, getting-started.md with Codex docs
- Codex uses $autoresearch mention syntax instead of slash commands
2026-04-06 18:47:08 +05:30
Udit Goenka 7b399bd15d feat: add OpenCode support with full skill port, commands, installer, and sync tooling
- Port all 12 reference files from .claude/ to .opencode/ with OpenCode adaptations
  (question tool, underscore command names, @mention subagent syntax)
- Add all 10 commands including /autoresearch_reason (missing from PR #58)
- Add docs-manager subagent for learn workflow
- Add scripts/install.sh — interactive/non-interactive installer for both Claude Code and OpenCode
- Add scripts/sync-opencode.sh — automated sync from .claude/ source with adaptations
- Fix SKILL.md version to match v1.9.11 release
- All files based on current v1.9.11 (crash recovery, metric-valued guards, plateau detection)

Closes: rejected PR #58 (stale v1.8.2 base, missing /reason, broken install script)
2026-04-06 18:30:04 +05:30
Udit Goenka 69b86aab4e release: v1.8.1 — /autoresearch:learn improvements and stability fixes 2026-03-21 13:41:31 +05:30
Udit Goenka 90bfd1b0e8 fix: resolve ENAMETOOLONG recursive plugin caching (closes #43)
Plugin installation failed on macOS due to recursive self-nesting in cache.
When marketplace.json had source: "./" the entire repo (including marketplace.json
itself) was cached, triggering infinite re-caching that hit the 1024-char path limit.

Changes:
- Move plugin distribution to isolated claude-plugin/ directory
- Update marketplace.json source from "./" to "./claude-plugin"
- Add .gitignore (repo had none)
- Remove duplicate root commands/ and skills/ directories
- Update release.sh to sync to claude-plugin/ instead of root
- Update all docs with new paths (README, CONTRIBUTING, guide, release.md)
- Bump version to 1.7.4
2026-03-19 12:15:44 +05:30
Udit Goenka 265248ddbf chore: prepare release v1.7.3 — further stability fixes and improvements
Scenario-driven audit discovered 30 edge cases across all 8 subcommands.
This release fixes the actionable ones found via /autoresearch:scenario
and /autoresearch:fix workflows.

Fixes:
- predict: add missing --iterations flag support (was silently ignored)
- scenario: add --format and --focus to argument-hint (were parsed but unrecognized by Claude Code)
- security: standardize depth naming from "quick" to "shallow" (consistent with predict/scenario)
- predict-workflow: rename interactive "Quick scan" option to "Shallow" (matches flag name)
- predict-workflow: add no-space rule for --chain, unknown target error, --iterations scope clarification
- security-workflow: --fix chain now hands off to /autoresearch:fix with findings context
- autonomous-loop-protocol: remove last remaining git add -A reference in Phase 0
- release.sh: add preflight check for existing git tag (prevents tag collision)

Version bump: 1.7.2 → 1.7.3
Distribution synced from .claude/ source of truth
2026-03-18 17:56:35 +05:30
Udit Goenka b9fcfbd4db chore: prepare release v1.7.2 — stability fixes across all commands
Fix 25+ bugs found via deep debug audit across command files, workflow
references, and protocol documents. Key improvements:

- Ship command: add --target flag for explicit ship target
- Debug --fix chain: now passes --from-debug to fix command
- Security CI template: add missing commands/ copy alongside skills/
- Predict budget: resolve unit collision (dollars → findings count)
- Git safety: eliminate all remaining git add -A references
- Predict workflow: fix --rounds range, depth preset naming
- Release script: fix step numbering consistency
- Remove stale /ug:autoresearch alias from SKILL.md
- Sync all distribution files with .claude/ source of truth
- Bump all versions 1.7.1 → 1.7.2
2026-03-18 15:28:31 +05:30
Udit Goenka 76f90d443e fix: address 8 stability bugs from debug audit
1. SKILL.md version bump (1.7.0→1.7.1) + add to release.sh auto-bump
2. Predict depth "quick"→"shallow" standardized across all files
3. Base /autoresearch: add --iterations and --scope to argument-hint
4. Remove stale per-subcommand version tags (v1.0.3, v1.1.0, v1.6.0, v1.0.0)
5. Ship command: add --iterations support for bounded preparation
6. experiment: commit prefix → conventional commit format experiment(<scope>):
7. git add -A → git add <specific-files> for safer staging
8. Root distribution synced
2026-03-18 15:07:15 +05:30
Udit Goenka 772b163fae chore: prepare release v1.7.1
- Bump plugin.json, marketplace.json to 1.7.1
- Update version badges in README.md and guide/README.md
- Fix step numbering in scripts/release.md (was [1/6]...[7/7], now [1/7]...[7/7])
2026-03-18 14:43:23 +05:30
Udit Goenka 43174bc571 chore: sync root distribution files with .claude/ and add release sync step
- Copy predict.md, scenario.md to commands/autoresearch/
- Copy predict-workflow.md, scenario-workflow.md to skills/autoresearch/references/
- Sync all stale skill files (SKILL.md, all workflow references)
- Add [3/7] sync step to release.sh ensuring root stays in sync
- Update release.md with distribution sync documentation
2026-03-18 12:22:32 +05:30
Udit Goenka 279484dfb5 docs: restructure guides into individual command files
Replace monolithic GUIDE.md (1791 lines) and EXAMPLES.md (2228 lines)
with 13 focused guide files in guide/ folder (6183 lines total):

- guide/README.md — index with quick decision guide
- guide/getting-started.md — installation, core concepts, FAQ
- guide/autoresearch.md — the autonomous loop
- guide/autoresearch-plan.md — setup wizard
- guide/autoresearch-debug.md — bug hunter
- guide/autoresearch-fix.md — error crusher
- guide/autoresearch-security.md — security auditor
- guide/autoresearch-ship.md — shipping workflow
- guide/autoresearch-scenario.md — scenario explorer
- guide/autoresearch-predict.md — multi-persona swarm prediction (778 lines)
- guide/chains-and-combinations.md — multi-command pipelines
- guide/examples-by-domain.md — real-world examples by domain
- guide/advanced-patterns.md — guards, MCP, CI/CD, FAQ

Update README.md, CONTRIBUTING.md, and release.sh references.
2026-03-18 12:12:56 +05:30
Udit Goenka a54bb6a160 fix: bump marketplace.json to 1.6.2 and add to release workflow
- Bump marketplace.json versions from 1.6.1 to 1.6.2 (both top-level
  and plugins array)
- release.sh now bumps all version fields in marketplace.json alongside
  plugin.json during releases
- release.md updated to document marketplace.json in version bump step
- PR checklist now includes marketplace.json verification

Prevents marketplace.json version drift (same issue as #32/#35).
2026-03-18 00:00:58 +05:30
Udit Goenka 52849e18b0 chore: add GUIDE.md and CONTRIBUTING.md to release workflow
- Fix GUIDE.md version badge (1.6.1 → 1.6.2)
- release.sh now bumps version badge in both README.md and GUIDE.md
- Doc review prompt lists all 4 docs (README, GUIDE, EXAMPLES, CONTRIBUTING)
- PR checklist includes GUIDE.md and CONTRIBUTING.md review items
- release.md doc review guide covers all 4 files
2026-03-17 23:04:32 +05:30
Udit Goenka a3b93e7f0f feat: release workflow with PR-first flow and doc review gate
Rewrites release.sh to:
- Create a release branch instead of pushing directly to master
- Bump plugin.json + README version badge automatically
- Pause for README.md and EXAMPLES.md review before committing
- Create a detailed PR with changelog and checklist
- Wait for explicit "merge" confirmation before merging
- Tag and create GitHub release only after merge

Adds release.md documenting the full process, versioning scheme
(patch v1.6.X, minor v1.X.0), and pre-release checklist.
2026-03-17 22:40:16 +05:30
Udit Goenka c6d1635651 chore: add release script to auto-bump plugin.json version
Prevents plugin.json version drift by handling version bump, commit,
tag, and GitHub release creation in a single command.

Usage: ./scripts/release.sh 1.7.0
2026-03-17 22:34:51 +05:30