@mrciphersmith/keryx 0.2.70 → 0.2.71
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/dist/cli.js +10357 -4676
- package/docs/README.md +54 -0
- package/docs/requirements/shared-agent-context/README.md +104 -0
- package/package.json +3 -2
- package/src/gdskills/bundled/rules/core/model-selection.mdc +184 -31
- package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +36 -0
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +78 -19
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +28 -3
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +28 -3
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +28 -3
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +28 -3
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +28 -3
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +20 -2
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +20 -2
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +21 -2
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +20 -2
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +20 -2
- package/src/gdskills/bundled/skills/planning/autodoc-analyst/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/autodoc-architect/SKILL.md +3 -1
- package/src/gdskills/bundled/skills/planning/autodoc-assembler/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/autodoc-scanner/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/autodoc-writer/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/docpack-review/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/planner/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/commit/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/metaproject-security/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/push/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/review/code-b091-review/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +2 -1
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +37 -10
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +48 -14
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +49 -12
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +34 -2
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +33 -2
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +70 -29
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +34 -3
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +49 -15
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +39 -11
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +590 -21
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +7 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/verification-claim.schema.json +78 -0
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +43 -13
- package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +8 -2
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +185 -0
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +44 -13
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +26 -6
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +35 -3
- package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +276 -0
- package/src/gdskills/contracts/review-finding.schema.json +119 -1
- package/src/gdskills/contracts/subagent-dispatch.schema.json +59 -3
- package/src/gdskills/bundled/skills/review/review-strict/SKILL.md +0 -328
package/docs/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
|
|
3
|
+
This directory separates documentation by purpose so current behavior, product
|
|
4
|
+
intent, implementation plans, and release evidence do not get mixed together.
|
|
5
|
+
|
|
6
|
+
## Current behavior
|
|
7
|
+
|
|
8
|
+
- [Developer documentation](docs/README.md) — entry point for setup,
|
|
9
|
+
architecture, modules, CLI behavior, and workspace lifecycle.
|
|
10
|
+
- [Complete setup and agent workflows](docs/complete-setup-and-agent-workflows.md)
|
|
11
|
+
— global installation, project configuration, command reference, scripts, and
|
|
12
|
+
copy-ready agent prompts.
|
|
13
|
+
- [Agent installation playbook](docs/agent-installation-playbook.md) — autonomous
|
|
14
|
+
Gherkin scenarios for complete setup, validation, repair, and handoff.
|
|
15
|
+
- [Documentation index](docs/index.md) — compact navigation for the generated
|
|
16
|
+
current-behavior reference.
|
|
17
|
+
|
|
18
|
+
## Product intent
|
|
19
|
+
|
|
20
|
+
- [Requirements roadmap](requirements/roadmap.md) — requirements packages and
|
|
21
|
+
their verified implementation state.
|
|
22
|
+
- [Managed Review Feedback Loop](requirements/managed-review-feedback-loop/README.md)
|
|
23
|
+
— requirements and contracts for managed review packages.
|
|
24
|
+
- [Keryx Memory Reliability](requirements/keryx-memory-reliability/README.md)
|
|
25
|
+
— corrective requirements and implementation tracking for side-effect-free
|
|
26
|
+
recall, accepted-only agent influence, durable lifecycle, and generated data.
|
|
27
|
+
|
|
28
|
+
## Plans and reports
|
|
29
|
+
|
|
30
|
+
- [Shared Agent Context Improvements Program](requirements/shared-agent-context-improvements-program/README.md)
|
|
31
|
+
— dependency-ordered implementation waves for twelve SAC improvement
|
|
32
|
+
packages, with copy-ready phase prompts, evidence gates, rollback, and a
|
|
33
|
+
live progress/statistics dashboard.
|
|
34
|
+
- [Keryx Improvements 1 — SAC, memory, and orchestration analysis](analysis/keryx-improvements-1/2026-08-14/report/en/report.md)
|
|
35
|
+
— integrated audit of Shared Agent Context and its Context Operations, Flow,
|
|
36
|
+
Harness/session, MCP, Security, knowledge-owner, worktree, and policy seams;
|
|
37
|
+
includes twelve independently deliverable future requirement packages.
|
|
38
|
+
- [Implementation plans](plans/) — bounded plans that may become cleanup
|
|
39
|
+
candidates after their acceptance criteria are implemented and verified.
|
|
40
|
+
- [Release readiness — 2026-07-10](report/release-readiness-2026-07-10/release-readiness.md)
|
|
41
|
+
— verification results, release blockers, and the prioritized cleanup plan.
|
|
42
|
+
- [Implementation spec](report/release-readiness-2026-07-10/implementation-spec.md)
|
|
43
|
+
— approved scope and acceptance criteria for this documentation pass.
|
|
44
|
+
|
|
45
|
+
## Documentation policy
|
|
46
|
+
|
|
47
|
+
- Repository documentation is English-only.
|
|
48
|
+
- `docs/docs/` describes current behavior and must be verified against source or
|
|
49
|
+
live CLI help.
|
|
50
|
+
- `docs/requirements/` describes intended behavior and must label implementation
|
|
51
|
+
status explicitly.
|
|
52
|
+
- Generated `.metaproject` artifacts are refreshed through the project CLI; raw
|
|
53
|
+
and reproducible outputs remain ignored according to the managed `.gitignore`
|
|
54
|
+
policy.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Keryx Shared Agent Context
|
|
2
|
+
Version: 1.5.0
|
|
3
|
+
|
|
4
|
+
## Назначение
|
|
5
|
+
|
|
6
|
+
Этот пакет описывает **текущий** local-first слой совместного контекста Keryx
|
|
7
|
+
(`src/sac/`, CLI `keryx workspace`, MCP `sac.*`, harness `workspace_*`).
|
|
8
|
+
Он даёт человеку и агенту воспроизводимый вход в работу от workspace, компонента
|
|
9
|
+
или flow: небольшой проверяемый обзор, адресное чтение деталей и безопасное
|
|
10
|
+
предложение нового знания по завершении работы.
|
|
11
|
+
|
|
12
|
+
## Статус
|
|
13
|
+
|
|
14
|
+
`implemented` (механизмы 0–5), плюс фаза 6, разбитая на две части: **6a** —
|
|
15
|
+
runtime-guard opt-in (`resolvePolicySelection`), реализована и проверена
|
|
16
|
+
(AC1–AC6, вся SAC-сюита 88/88 зелёная); **6b** — операторский процесс готовности
|
|
17
|
+
для реальных данных, частично (read-only `keryx workspace policy-readiness` и
|
|
18
|
+
playbook; runtime re-ingestion сырых receipts/outcomes остаётся). Фазы 0–5 и 6a
|
|
19
|
+
влиты в `main` и выпущены в `v0.2.32`; код lifecycle/CLI/MCP/harness с тех пор
|
|
20
|
+
расширен на `main` (в т.ч. `v0.2.35`). Точный статус и evidence приведены в
|
|
21
|
+
[Implementation plan](implementation-plan.md).
|
|
22
|
+
|
|
23
|
+
**Документационная правда (1.5.0):** более ранние versioned-заголовки этого
|
|
24
|
+
пакета помечали CLI/MCP/schema-enforcement как `future/planned` и прямо писали,
|
|
25
|
+
что runtime «не реализует SAC contracts». Это устарело относительно `src/sac/`
|
|
26
|
+
(~4.3k строк production + тесты: propose/review/accept, guarded owner-writers
|
|
27
|
+
wiki/memory/skill, receipt-integrity, access-receipt ledger; плюс
|
|
28
|
+
`src/commands/workspace.ts`, MCP `sac.*`, harness `workspace_*`). Норматив
|
|
29
|
+
этого пакета теперь —
|
|
30
|
+
как устроено **сейчас**. Спутниковые пакеты RP-01…RP-12 остаются future /
|
|
31
|
+
spec-ready и **не** отменяют этот runtime. Валидатор, который сверяется с
|
|
32
|
+
заголовками `future` в старых ревизиях или в RP-пакетах, получит ложный drift.
|
|
33
|
+
|
|
34
|
+
Важно: Phase 5 (policy experiment) сейчас подтверждает корректность механизма на
|
|
35
|
+
synthetic offline evidence и по умолчанию не включает production эффектов.
|
|
36
|
+
|
|
37
|
+
## Модель FWK
|
|
38
|
+
|
|
39
|
+
- **Facts** — evidence-linked, task-local и freshness-bound утверждения о
|
|
40
|
+
текущей работе. Fact не становится источником долгосрочного знания.
|
|
41
|
+
- **Work** — read-only проекция существующего Flow: выполненное, следующее,
|
|
42
|
+
блокировки и verification evidence. SAC никогда не создаёт второй tracker.
|
|
43
|
+
- **Know-how** — reviewed и reusable knowledge из memory, wiki и skills.
|
|
44
|
+
Необработанные транскрипты и скрытые рассуждения не являются Know-how.
|
|
45
|
+
|
|
46
|
+
## Документы
|
|
47
|
+
|
|
48
|
+
- [PRD](prd.md) — проблема, пользователи, требования, риски и результаты.
|
|
49
|
+
- [Specification](specification.md) — границы, функциональная surface,
|
|
50
|
+
интеграции и acceptance criteria.
|
|
51
|
+
- [Agent protocol](agent-protocol.md) — обязательное поведение агента при
|
|
52
|
+
read, wrap-up и proposal lifecycle.
|
|
53
|
+
- [Artifact lifecycle](artifact-lifecycle.md) — источники истины, freshness,
|
|
54
|
+
retention, supersession и deletion policy.
|
|
55
|
+
- [Metrics and validation](metrics-and-validation.md) — baseline, evals,
|
|
56
|
+
rollout/rollback и измеримые gates.
|
|
57
|
+
- [Implementation plan](implementation-plan.md) — delivery status фаз 0–6b
|
|
58
|
+
и исторические exit criteria.
|
|
59
|
+
- [Phase execution prompts](phase-execution-prompts.md) — утверждённые промты
|
|
60
|
+
для запуска и delivery-protocol каждой implementation phase.
|
|
61
|
+
- [Phase 4 usability report](phase-4-usability-report.md) — contract-only
|
|
62
|
+
walkthrough evidence.
|
|
63
|
+
- [Phase 5 policy experiment report](phase-5-policy-experiment-report.md) —
|
|
64
|
+
synthetic offline experiment evidence.
|
|
65
|
+
- [Phase 6 readiness](phase-6-real-opt-in-readiness.md) — 6a/6b split and
|
|
66
|
+
remaining real-data work.
|
|
67
|
+
- [Phase 6b operator playbook](phase-6b-operator-playbook.md) — operator
|
|
68
|
+
readiness process.
|
|
69
|
+
- [Design rationale](design-rationale.md) — решения и ограничения модели FWK.
|
|
70
|
+
- [Schemas](schemas/README.md) — JSON Schema, semantic-validation boundary и
|
|
71
|
+
полный positive/negative/replay fixture corpus.
|
|
72
|
+
|
|
73
|
+
## Scope
|
|
74
|
+
|
|
75
|
+
- Локальный workspace registry со ссылками на компоненты, repositories, flows,
|
|
76
|
+
evidence и approved knowledge; исходные артефакты не копируются.
|
|
77
|
+
- Bounded FWK overview и progressive retrieval через **существующие** CLI
|
|
78
|
+
(`keryx workspace overview|read`), MCP (`sac.overview`/`sac.read`, только
|
|
79
|
+
local stdio) и harness-tools (`workspace_overview`/`workspace_read`);
|
|
80
|
+
hash-chained access-receipt ledger.
|
|
81
|
+
- Evidence-linked session wrap-up, proposal queue, human review и guarded
|
|
82
|
+
promotion в существующие wiki/memory paths.
|
|
83
|
+
- Freshness, least disclosure, trusted ActorContext, local roles, redaction и
|
|
84
|
+
audit trail; proposal может быть принят только после проверяемого,
|
|
85
|
+
append-only review transition.
|
|
86
|
+
|
|
87
|
+
## Non-goals
|
|
88
|
+
|
|
89
|
+
- Новый task manager, дубликат Flow или новый primary store для wiki/memory.
|
|
90
|
+
- Хранение raw transcripts, secrets, PII, hidden reasoning или unrestricted
|
|
91
|
+
environment snapshots как knowledge.
|
|
92
|
+
- Обязательная облачная база, multi-tenant service, SSO или внешний catalog.
|
|
93
|
+
- UI/IDE/terminal shell как prerequisite первой поставки.
|
|
94
|
+
- Обучаемая или self-modifying access policy до воспроизводимых offline evals.
|
|
95
|
+
|
|
96
|
+
## Связанные модули
|
|
97
|
+
|
|
98
|
+
- [Keryx Context Operations](../keryx-context-operations/2026-07-12/README.md)
|
|
99
|
+
— владелец context assembly, retrieval trace и feedback lifecycle.
|
|
100
|
+
- [Keryx Project Agent Harness](../keryx-project-agent-harness/README.md) —
|
|
101
|
+
владелец сессий, approvals, worktrees и execution runtime.
|
|
102
|
+
- `src/flow`, `src/memory`, `src/wiki`, `src/gdgraph`, `src/mcp`,
|
|
103
|
+
`src/security`, `src/ctx`, `src/harness` — существующие интеграционные
|
|
104
|
+
границы; изменения в них требуют отдельных implementation flows.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrciphersmith/keryx",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.71",
|
|
4
4
|
"description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"test": "bun test",
|
|
42
42
|
"check": "tsc --noEmit && bun test",
|
|
43
43
|
"check:doc-links": "bun scripts/check-doc-links.ts",
|
|
44
|
+
"baseline:review-precision": "bun scripts/review-precision-baseline.ts",
|
|
44
45
|
"test:guards": "bun test src/lib/config-dir.ast.test.ts src/lib/config-dir.readers.test.ts src/lib/production-graph.test.ts src/harness/policy/profiles.test.ts src/lib/serve-server.test.ts"
|
|
45
46
|
},
|
|
46
47
|
"files": [
|
|
@@ -72,4 +73,4 @@
|
|
|
72
73
|
"protobufjs",
|
|
73
74
|
"sharp"
|
|
74
75
|
]
|
|
75
|
-
}
|
|
76
|
+
}
|
|
@@ -1,53 +1,206 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Adaptive model selection for sub-agent dispatches. Skills declare a tier; the tier is resolved against the models the active provider actually reports at runtime, without asking."
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Model Selection for Sub-Agents
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
|
-
When launching a sub-agent or skill, detect available models in the current environment and allow the user to choose.
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Match the model to the work. A reviewer scanning a twelve-line diff and a
|
|
11
|
+
regression reviewer reasoning across a forty-file blast radius should not run on
|
|
12
|
+
the same model: the cheap work pays flagship prices, and the hard work gets no
|
|
13
|
+
more capability than the trivial.
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## Tiers, not model names
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
A skill declares a **tier**. It never declares a model.
|
|
18
|
+
|
|
19
|
+
A model name in a skill is wrong the day the provider changes and unusable for
|
|
20
|
+
anyone on a different provider. There are three tiers:
|
|
21
|
+
|
|
22
|
+
| Tier | For |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `light` | mechanical, verifiable work — pre-filter, `class_scope` existence checks, comment collection, formatting a reply |
|
|
25
|
+
| `standard` | ordinary reviewing and implementation — the default |
|
|
26
|
+
| `deep` | genuinely hard reasoning — regression review across the blast radius, a strategy change after a failed loop, synthesis across many findings |
|
|
27
|
+
|
|
28
|
+
Declared in SKILL.md frontmatter:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
---
|
|
32
|
+
name: review-architecture
|
|
33
|
+
model_tier: deep
|
|
34
|
+
---
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
An undeclared skill runs at `standard`. A skill that writes a model name into
|
|
38
|
+
`model_tier` fails the guard in `src/gdskills/model-tier.test.ts`.
|
|
39
|
+
|
|
40
|
+
## Resolving a tier: discover, rank, fall back
|
|
41
|
+
|
|
42
|
+
There is **no table of models** anywhere in the resolution, and there must not
|
|
43
|
+
be. A fixed list of model ids is stale the day a provider ships anything, and it
|
|
44
|
+
is wrong for every operator whose environment differs from the one it was written
|
|
45
|
+
in. The candidate set is discovered at runtime.
|
|
46
|
+
|
|
47
|
+
`src/commands/select.ts` already detects providers and every `DetectedProvider`
|
|
48
|
+
carries `models: string[]`. That list — for the **session's own provider**, so a
|
|
49
|
+
child never resolves onto a provider the parent holds no grant for — is the whole
|
|
50
|
+
candidate set. `src/gdskills/model-tier.ts` then:
|
|
51
|
+
|
|
52
|
+
1. **discovers** the candidates (passed in, never looked up: the module reads no
|
|
53
|
+
network, no filesystem, no environment);
|
|
54
|
+
2. **ranks** them by size markers in their names — `MODEL_RANK_HINTS`;
|
|
55
|
+
3. **places the tiers relative to the session's own model**:
|
|
56
|
+
|
|
57
|
+
| Tier | Resolves to |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `standard` | the session's model, always |
|
|
60
|
+
| `deep` | the highest-ranked discovered model **strictly above** the session's, else the session's |
|
|
61
|
+
| `light` | the lowest-ranked discovered model **strictly below** the session's, else the session's |
|
|
62
|
+
|
|
63
|
+
Anchoring on the session model is what makes "never a downgrade" checkable
|
|
64
|
+
rather than hoped for: a tier can only move away from the session model in the
|
|
65
|
+
direction its own name points, and a candidate at the session's own rank is a
|
|
66
|
+
lateral move and never taken.
|
|
67
|
+
|
|
68
|
+
## What the hints are, and what they are not
|
|
69
|
+
|
|
70
|
+
Capability cannot be derived from a bare string — `haiku` is smaller than `opus`
|
|
71
|
+
and nothing about the two strings says so. `MODEL_RANK_HINTS` is that irreducible
|
|
72
|
+
residue, and it is kept in the smallest shape that works:
|
|
73
|
+
|
|
74
|
+
- it names **size words** (`mini`, `lite`, `flash`, `haiku`, `pro`, `opus`,
|
|
75
|
+
`max`, `ultra`, …), never models, so it claims nothing about what exists and
|
|
76
|
+
cannot go stale;
|
|
77
|
+
- it is applied to whatever detection reported, so an unfamiliar vendor is still
|
|
78
|
+
ranked if its names use those words;
|
|
79
|
+
- a model matching **no** hint is *unranked*, which is not the same as ranked
|
|
80
|
+
zero — it is simply not placed;
|
|
81
|
+
- it is one array, overridable per call.
|
|
82
|
+
|
|
83
|
+
A model whose name is a codename carrying no size is unrankable by design. That
|
|
84
|
+
is the honest outcome, not a gap to be patched with folklore.
|
|
85
|
+
|
|
86
|
+
## Falling back
|
|
87
|
+
|
|
88
|
+
Ranking is **refused**, and every tier keeps the session's provider and model,
|
|
89
|
+
when:
|
|
90
|
+
|
|
91
|
+
- nothing was discovered, or the session's provider is absent from the catalogue
|
|
92
|
+
(an external CLI runtime, or detection that has not run);
|
|
93
|
+
- the provider reported no models;
|
|
94
|
+
- the hints cannot place the **session's own** model — with no anchor, no
|
|
95
|
+
candidate can be called larger or smaller.
|
|
96
|
+
|
|
97
|
+
A refusal **never** fails a dispatch and **never** causes a silent downgrade.
|
|
98
|
+
Degrading capability because discovery failed is the worst of the three outcomes.
|
|
99
|
+
|
|
100
|
+
Do not "fix" a fallback by adding model ids to the code. Add a size word to the
|
|
101
|
+
hints if one genuinely applies, or leave it: running on the session's model is a
|
|
102
|
+
correct answer.
|
|
103
|
+
|
|
104
|
+
## Where this actually runs
|
|
105
|
+
|
|
106
|
+
Two places, and they are not the same shape:
|
|
107
|
+
|
|
108
|
+
- **`spawn_subagent`** (`src/harness/tool/builtin/spawn-subagent-tool.ts`) takes an
|
|
109
|
+
optional `model_tier` input and does the rest in code: it builds the tier map
|
|
110
|
+
with `buildTierMap` from its host's detection result, hands it to
|
|
111
|
+
`resolveChildModel`, and records the outcome on the dispatch's run trace.
|
|
112
|
+
Omitting `model_tier` inherits the parent's model, exactly as before the field
|
|
113
|
+
existed.
|
|
114
|
+
- **An orchestrator authoring a dispatch document** *runs a command*:
|
|
115
|
+
`keryx review tier`. It takes the signals below as flags and prints the `model`
|
|
116
|
+
block ready to paste — the tier, the ordered rule ids that produced it, the
|
|
117
|
+
resolved provider/model, `tier_resolution` and `model_discovery`. `--json`
|
|
118
|
+
prints the block alone.
|
|
119
|
+
|
|
120
|
+
That second bullet used to say the orchestrator "calls `decideDispatchModel`".
|
|
121
|
+
An orchestrator is an agent following prose and **cannot call a TypeScript
|
|
122
|
+
function**, so what actually happened was a model reading a table of signals and
|
|
123
|
+
doing the arithmetic in its head — the exact mechanical work this programme moves
|
|
124
|
+
out of skills and into the code that consumes them. `keryx review tier` is that
|
|
125
|
+
code's entry point; `decideDispatchModel` is what it calls.
|
|
126
|
+
|
|
127
|
+
Nothing reads a recorded resolution back and checks it. These fields explain a
|
|
128
|
+
finished run; they do not gate one.
|
|
129
|
+
|
|
130
|
+
## Choosing the tier
|
|
131
|
+
|
|
132
|
+
The tier is **computed, not judged**. Run:
|
|
17
133
|
|
|
18
134
|
```bash
|
|
19
|
-
|
|
135
|
+
keryx review tier --scope blast-radius --findings 12 --diff-lines 340 \
|
|
136
|
+
--verifier execution --fix-attempt 2 --security \
|
|
137
|
+
--forced-strategy-change --json
|
|
20
138
|
```
|
|
21
139
|
|
|
22
|
-
|
|
140
|
+
Every flag is a signal the orchestrator already holds before it dispatches: the
|
|
141
|
+
round's scope, its own attempt counter, the diff it computed, the findings it is
|
|
142
|
+
holding, the verification method it is about to ask for. None of them is a
|
|
143
|
+
model's self-report — no model is ever asked to rate its own difficulty.
|
|
144
|
+
|
|
145
|
+
The rules `assignTier` applies, in the order it applies them:
|
|
146
|
+
|
|
147
|
+
| Signal | Flag | Effect |
|
|
148
|
+
|---|---|---|
|
|
149
|
+
| scope is `blast-radius` | `--scope blast-radius` | at least `deep` |
|
|
150
|
+
| fix attempt >= 2 on the same finding | `--fix-attempt <n>` | raise one tier |
|
|
151
|
+
| forced strategy change after the loop cap | `--forced-strategy-change` | `deep` |
|
|
152
|
+
| finding count <= 3 **and** diff <= 50 lines | `--findings <n> --diff-lines <n>` | allow `light` |
|
|
153
|
+
| verification method is `execution` or `site-check` | `--verifier <method>` | `light` — the evidence comes from running something, not from reasoning |
|
|
154
|
+
| any security finding in scope | `--security` | never below `standard` |
|
|
155
|
+
|
|
156
|
+
Floors are applied after downgrades, so "at least `deep`" means at least: a
|
|
157
|
+
blast-radius round over a twelve-line diff is still a blast-radius round.
|
|
158
|
+
|
|
159
|
+
The session's provider/model come from the selection `keryx shell` persisted, and
|
|
160
|
+
the candidate set from live provider detection. A caller that already holds
|
|
161
|
+
either passes `--session-provider`/`--session-model` and `--catalog` instead of
|
|
162
|
+
paying for the lookup. **There is no `--tier` flag, and there will not be**:
|
|
163
|
+
accepting a hand-written tier would put the arithmetic straight back in the
|
|
164
|
+
caller's head.
|
|
23
165
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- `gpt-5.1-codex-mini` - Cheaper, faster, less capable
|
|
29
|
-
- `gpt-5.2` - Latest frontier model
|
|
166
|
+
When nothing can be worked out — no persisted session, an unrankable catalogue,
|
|
167
|
+
an unrankable session model — the block says `inherit: true` and the dispatch
|
|
168
|
+
runs on the **caller's own model**. Exit status is still 0: a fallback is an
|
|
169
|
+
answer, not a failure.
|
|
30
170
|
|
|
31
|
-
|
|
32
|
-
Uses OpenAI models (GPT-4, GPT-4o, etc.)
|
|
171
|
+
## Recording the decision
|
|
33
172
|
|
|
34
|
-
|
|
35
|
-
|
|
173
|
+
The dispatch carries the tier, the ordered rule ids that produced it, which of
|
|
174
|
+
the three outcomes occurred, and what was on the table when it did —
|
|
175
|
+
`model.tier`, `model.tier_reasons`, `model.tier_resolution` and
|
|
176
|
+
`model.model_discovery` in
|
|
177
|
+
`.metaproject/core/gdskills/contracts/subagent-dispatch.schema.json`.
|
|
36
178
|
|
|
37
|
-
|
|
38
|
-
Check configuration in `~/.config/opencode/`
|
|
179
|
+
`tier_resolution` distinguishes three facts that must not be flattened:
|
|
39
180
|
|
|
40
|
-
|
|
41
|
-
|
|
181
|
+
| Value | Means |
|
|
182
|
+
|---|---|
|
|
183
|
+
| `discovered` | a discovered model was assigned to this tier |
|
|
184
|
+
| `session-ranked` | ranking worked and placed the tier at the session's model |
|
|
185
|
+
| `session-fallback` | ranking was refused; the session's model is kept |
|
|
42
186
|
|
|
43
|
-
|
|
187
|
+
"Fell back to the session model" and "assigned the session model because it
|
|
188
|
+
ranked there" are different facts. A run that cannot be explained afterwards is
|
|
189
|
+
what these fields exist to prevent. Record them on every dispatch that resolves
|
|
190
|
+
a tier — `keryx review tier` prints all four together as one pasteable block, so
|
|
191
|
+
recording them is one copy rather than four decisions.
|
|
44
192
|
|
|
45
|
-
|
|
46
|
-
2. **Present options** - Show user available models with descriptions
|
|
47
|
-
3. **Get confirmation** - Ask user which model to use
|
|
48
|
-
4. **Launch sub-agent** - Use selected model for the sub-agent
|
|
193
|
+
## Mandatory behavior
|
|
49
194
|
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
195
|
+
- Declare a tier in the skill; resolve the model at dispatch time.
|
|
196
|
+
- **Run `keryx review tier` — do not work the tier out by hand.** Assigning it
|
|
197
|
+
from the table above by reading is the mechanical step this rule exists to
|
|
198
|
+
remove.
|
|
199
|
+
- **Do not ask the operator which model to use per dispatch.** Asking every time
|
|
200
|
+
is what made adaptive selection impossible.
|
|
201
|
+
- Never write a concrete model name into a skill, a rule, a dispatch template, or
|
|
202
|
+
the resolution code.
|
|
203
|
+
- Take the candidate set from runtime detection. Never from a literal list of
|
|
204
|
+
what exists.
|
|
205
|
+
- When the candidates cannot be ranked, keep the session model. Never substitute
|
|
206
|
+
a cheaper one.
|
|
@@ -29,6 +29,42 @@ Before creating or editing a skill, ask and confirm:
|
|
|
29
29
|
|
|
30
30
|
`SKILL.md` is always required. Platform variants are optional — if absent, `keryx update` installs `SKILL.md` as fallback.
|
|
31
31
|
|
|
32
|
+
## Frontmatter Fields (Agent Skills spec alignment)
|
|
33
|
+
|
|
34
|
+
`SKILL.md` frontmatter follows the published Agent Skills specification
|
|
35
|
+
(agentskills.io — the format Zed adopted when it dropped its own Rules
|
|
36
|
+
Library), with two deliberate additions. Flow 203 removed two accidental
|
|
37
|
+
divergences that had crept in; keep both fixes intact when authoring or
|
|
38
|
+
editing a skill:
|
|
39
|
+
|
|
40
|
+
- **`version` lives in `metadata.version` only.** The spec has no top-level
|
|
41
|
+
`version` field — its own example nests it under `metadata`. Do not
|
|
42
|
+
reintroduce a top-level `version:` key; nothing in this codebase reads one.
|
|
43
|
+
- **`compatibility` carries the spec's meaning, not ours.** The spec defines
|
|
44
|
+
`compatibility` as environment requirements written in prose (e.g. "Requires
|
|
45
|
+
git, docker, jq, and access to the internet"). Our machine-readable CSV of
|
|
46
|
+
supported harnesses (`cursor,codex,zed,opencode,claude`) lives instead at
|
|
47
|
+
`metadata.compatible_harnesses`. Do not put a harness CSV back into
|
|
48
|
+
`compatibility` — if a skill genuinely needs to declare environment
|
|
49
|
+
requirements, write them there as prose, per the spec.
|
|
50
|
+
|
|
51
|
+
Two divergences are deliberate and stay — a later pass must not "fix" them
|
|
52
|
+
back toward the spec:
|
|
53
|
+
|
|
54
|
+
- **`triggers`** — a list of trigger phrases. Not in the spec, and absent from
|
|
55
|
+
every skill collection surveyed while building this convention; the spec's
|
|
56
|
+
only discovery mechanism is semantic matching on `description`. `triggers`
|
|
57
|
+
gives the router a cheap, deterministic first-pass match before falling back
|
|
58
|
+
to semantic matching. It is additive and costs nothing as long as
|
|
59
|
+
`description` stays self-sufficient on its own — never let `triggers` carry
|
|
60
|
+
meaning `description` lacks.
|
|
61
|
+
- **Per-skill `input-contract.schema.json` / `output-contract.schema.json`**
|
|
62
|
+
(sibling files, not frontmatter keys) — genuinely unique to this codebase.
|
|
63
|
+
Nothing in the spec or any surveyed collection defines one, because the spec
|
|
64
|
+
assumes a single agent reading a single skill file. This project dispatches
|
|
65
|
+
typed payloads to subagent workers instead, which the spec does not attempt
|
|
66
|
+
to address.
|
|
67
|
+
|
|
32
68
|
## Global Sync Mapping
|
|
33
69
|
- `SKILL.cursor.md` (or `SKILL.md`) → `~/.cursor/skills/<skill-name>/SKILL.md`
|
|
34
70
|
- `SKILL.codex.md` (or `SKILL.md`) → `${CODEX_HOME:-~/.codex}/skills/<skill-name>/SKILL.md`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-verifier
|
|
3
|
+
model_tier: light
|
|
3
4
|
description: "Use when running a full quality gate after implementation — lint, type-check, tests, and import validation. Mandatory step in job-orchestrator after task-implementer and after fix iterations. Use standalone when you need a structured verification report."
|
|
4
5
|
triggers:
|
|
5
6
|
- "Run verification"
|
|
@@ -13,8 +14,8 @@ metadata:
|
|
|
13
14
|
version: "1.0.0"
|
|
14
15
|
category: "verification"
|
|
15
16
|
agent_worthy: true
|
|
17
|
+
compatible_harnesses: "cursor,codex,zed,opencode"
|
|
16
18
|
license: "MIT"
|
|
17
|
-
compatibility: "cursor,codex,zed,opencode"
|
|
18
19
|
---
|
|
19
20
|
|
|
20
21
|
# Code Verifier
|