gstack/scripts/resolvers
Abhijeet Mahagaonkar f7bde4391d feat: add stakeholder lens layer V0.5 (opt-in via --lens)
Ships an opt-in stakeholder-lens layer on /review that runs after the
technical Review Army completes. Zero --lens = zero behavior change.

Core framing: a lens is a loss function, an evidence model, a
materiality threshold, and an escalation policy applied to a bounded
evidence set. Not stakeholder impersonation.

Two lenses in this release:
- insider-abuse (READY) — legitimate authority converted to unauthorized
  outcome without attribution, detection, or approval
- enterprise-readiness (DRAFT) — deployability under CISO / procurement /
  operations governance; ships as DRAFT pending its own Go/No-Go eval

Four additional lens specifications ship in DRAFT / DEFERRED status for
future evaluation: incentive-abuse, regulatory-defensibility,
investor-diligence, competitive-durability.

Design guarantees:
- Preserves Review Army unchanged (P1); no touching of review-army.ts,
  review/specialists/, or review/checklist.md
- Independent lens dispatch (Stage A, no tech findings) followed by
  deterministic reconciliation (Stage B) — clean incremental-value
  measurement
- CTO synthesis as a third stage (not another lens): identifies shared
  technical primitives across independently derived lens findings
  without collapsing distinct perspectives
- Evidence clustering (SHARED_EVIDENCE / MULTI_LENS / EVIDENCE_CLUSTER)
  replaces cross-lens 'confirmation'; production exact-match misses are
  not marked NOVEL
- Read-only tool boundary; lens subagents receive a bounded evidence
  bundle, never repository browse tools
- All stakeholder findings default to ASK / INVESTIGATE; autofix_policy
  ask_always on every lens (no stakeholder auto-fix)
- Append-only event log at ~/.gstack/projects/<slug>/lens-events.jsonl
  with stable finding IDs; sensitive-data controls (local-only,
  owner-only permissions, secret-scanned, GBrain opt-in only)
- Per-lens regression harness (9 fixture types per lens) and per-lens
  Go/No-Go criteria for lens graduation to READY

Insider-abuse ships as the Phase 1 validation lens. Enterprise-readiness
remains DRAFT until its own evaluation gate runs. No Phase 1 lens is
claimed as empirically validated in this PR — validation happens
post-merge per REVIEW_LENSES_V0.md Go/No-Go criteria.

Includes:
- review/lenses/{shared-behavior, registry, insider-abuse, enterprise-readiness,
  incentive-abuse, regulatory-defensibility, investor-diligence,
  competitive-durability}.md
- scripts/lenses/{bundle, events, parser, reconcile, registry, routing,
  synthesis, types, yaml-subset, index}.ts
- scripts/resolvers/lens-layer.ts + gen-skill-docs wiring in
  scripts/gen-skill-docs.ts and scripts/resolvers/index.ts
- bin/gstack-lens-{bundle, event, parse, reconcile, registry, route,
  stats, synthesis-validate}
- hosts/claude/agents/{gstack-cto-synthesizer, gstack-lens-output-validator,
  gstack-lens-reviewer}.md
- test/fixtures/lens-regression/{insider-abuse, enterprise-readiness}/cases.json
- test/lens-{registry, bundle, events, layer-resolver, regression-fixtures}.test.ts
- docs/designs/REVIEW_LENSES_V0.md + docs/{product-context, lens-policy}.yaml.example
- setup and bin/gstack-uninstall wired for lens artifacts
2026-07-31 03:17:44 -07:00
..
preamble v1.58.5.0 feat: first-run activation scaffold + gstack router front door (#2078) 2026-06-25 09:42:45 -07:00
browse.ts fix: avoid tilde-in-assignment to silence Claude Code permission prompts (#993) 2026-04-16 14:49:56 -07:00
codex-helpers.ts feat: Factory Droid compatibility — works across Claude Code, Codex, and Factory (v0.13.5.0) (#621) 2026-03-29 08:57:34 -07:00
composition.ts v1.57.4.0 refactor(ethos): rename Boil the Lake principle to Boil the Ocean (#1912) 2026-06-08 05:41:07 -07:00
confidence.ts v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
constants.ts v1.57.10.0 feat: Codex review default-on across review/ship/plan/docs (#1966) 2026-06-10 21:14:58 -07:00
design.ts v1.45.0.0 feat(design): persistent board daemon — 24h boards, one tab, board history (#1710) 2026-05-25 20:45:12 -07:00
dx.ts feat: /plan-devex-review + /devex-review — DX review skills (v0.15.3.0) (#784) 2026-04-03 16:22:57 -07:00
gbrain.ts v1.52.1.0 feat: brain-aware planning — 5 skills read structured gbrain context before asking (#1742) 2026-05-29 08:35:00 -07:00
index.ts feat: add stakeholder lens layer V0.5 (opt-in via --lens) 2026-07-31 03:17:44 -07:00
learnings.ts v1.33.1.0 fix(learnings): token-OR query + task-shaped retrieval in 3 long skills (#1442) 2026-05-11 19:34:33 -07:00
lens-layer.ts feat: add stakeholder lens layer V0.5 (opt-in via --lens) 2026-07-31 03:17:44 -07:00
make-pdf.ts feat(v1.4.0.0): /make-pdf — markdown to publication-quality PDFs (#1086) 2026-04-20 13:20:30 +08:00
model-overlay.ts feat(v1.10.1.0): overlay efficacy harness + Opus 4.7 fanout nudge removal (#1166) 2026-04-23 18:42:58 -07:00
preamble.ts v1.58.5.0 feat: first-run activation scaffold + gstack router front door (#2078) 2026-06-25 09:42:45 -07:00
question-tuning.ts v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
redact-doc.ts v1.53.0.0 feat: smarter redaction — PII/secrets/legal guard across /spec, /ship, /cso, /document-* (#1797) 2026-05-30 08:54:46 -07:00
review-army.ts v1.42.0.0 Daegu wave: 23 community-filed bugs + PTY classifier enforcement (24 bisect commits) (#1594) 2026-05-20 07:35:01 -07:00
review.ts v1.57.10.0 feat: Codex review default-on across review/ship/plan/docs (#1966) 2026-06-10 21:14:58 -07:00
sections.ts v1.54.0.0 feat: carve /ship into skeleton + on-demand sections (-59% always-loaded) (#1806) 2026-05-30 12:09:10 -07:00
tasks-section.ts v1.38.1.0 fix wave: surrogate-safe page captures (#1440), Implementation Tasks across review skills (#1454), root-level artifact patterns (#1452) (#1504) 2026-05-14 21:46:50 -07:00
testing.ts feat(v1.3.0.0): open agents learnings + cross-model benchmark skill (#1040) 2026-04-19 17:50:31 +08:00
types.ts v1.46.0.0 feat: gstack v2 foundation — catalog tokens drop 56%, eval-first floor covers all 51 skills (#1712) 2026-05-26 16:50:03 -07:00
utility.ts feat(v1.5.2.0): Opus 4.7 migration — model overlay, voice, routing (#1117) 2026-04-22 01:06:22 -07:00