@ahmed-g-gad/apothem 0.1.1
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/CHANGELOG.md +60 -0
- package/LICENSE +21 -0
- package/LICENSES/MIT.txt +18 -0
- package/LICENSES/PSF-2.0.txt +47 -0
- package/README.md +549 -0
- package/bin/README.md +37 -0
- package/bin/apothem.mjs +78 -0
- package/package.json +75 -0
- package/pyproject.toml +347 -0
- package/src/apothem/README.md +52 -0
- package/src/apothem/__init__.py +66 -0
- package/src/apothem/__main__.py +28 -0
- package/src/apothem/_vendor/.keep +0 -0
- package/src/apothem/_vendor/__init__.py +25 -0
- package/src/apothem/_vendor/attr/__init__.py +104 -0
- package/src/apothem/_vendor/attr/__init__.pyi +389 -0
- package/src/apothem/_vendor/attr/_cmp.py +160 -0
- package/src/apothem/_vendor/attr/_cmp.pyi +13 -0
- package/src/apothem/_vendor/attr/_compat.py +99 -0
- package/src/apothem/_vendor/attr/_config.py +31 -0
- package/src/apothem/_vendor/attr/_funcs.py +497 -0
- package/src/apothem/_vendor/attr/_make.py +3406 -0
- package/src/apothem/_vendor/attr/_next_gen.py +674 -0
- package/src/apothem/_vendor/attr/_typing_compat.pyi +15 -0
- package/src/apothem/_vendor/attr/_version_info.py +89 -0
- package/src/apothem/_vendor/attr/_version_info.pyi +9 -0
- package/src/apothem/_vendor/attr/converters.py +162 -0
- package/src/apothem/_vendor/attr/converters.pyi +19 -0
- package/src/apothem/_vendor/attr/exceptions.py +95 -0
- package/src/apothem/_vendor/attr/exceptions.pyi +17 -0
- package/src/apothem/_vendor/attr/filters.py +72 -0
- package/src/apothem/_vendor/attr/filters.pyi +6 -0
- package/src/apothem/_vendor/attr/py.typed +0 -0
- package/src/apothem/_vendor/attr/setters.py +79 -0
- package/src/apothem/_vendor/attr/setters.pyi +20 -0
- package/src/apothem/_vendor/attr/validators.py +750 -0
- package/src/apothem/_vendor/attr/validators.pyi +140 -0
- package/src/apothem/_vendor/attr.LICENSE +21 -0
- package/src/apothem/_vendor/attrs/__init__.py +72 -0
- package/src/apothem/_vendor/attrs/__init__.pyi +314 -0
- package/src/apothem/_vendor/attrs/converters.py +3 -0
- package/src/apothem/_vendor/attrs/exceptions.py +3 -0
- package/src/apothem/_vendor/attrs/filters.py +3 -0
- package/src/apothem/_vendor/attrs/py.typed +0 -0
- package/src/apothem/_vendor/attrs/setters.py +3 -0
- package/src/apothem/_vendor/attrs/validators.py +3 -0
- package/src/apothem/_vendor/attrs.LICENSE +21 -0
- package/src/apothem/_vendor/jsonschema/__init__.py +120 -0
- package/src/apothem/_vendor/jsonschema/__main__.py +6 -0
- package/src/apothem/_vendor/jsonschema/_format.py +546 -0
- package/src/apothem/_vendor/jsonschema/_keywords.py +449 -0
- package/src/apothem/_vendor/jsonschema/_legacy_keywords.py +449 -0
- package/src/apothem/_vendor/jsonschema/_types.py +204 -0
- package/src/apothem/_vendor/jsonschema/_typing.py +29 -0
- package/src/apothem/_vendor/jsonschema/_utils.py +355 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/__init__.py +5 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/const_vs_enum.py +30 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/contains.py +28 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/import_benchmark.py +31 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/issue232/issue.json +2653 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/issue232.py +25 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/json_schema_test_suite.py +12 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/nested_schemas.py +56 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/subcomponents.py +42 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/unused_registry.py +35 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/useless_applicator_schemas.py +106 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/useless_keywords.py +32 -0
- package/src/apothem/_vendor/jsonschema/benchmarks/validator_creation.py +14 -0
- package/src/apothem/_vendor/jsonschema/cli.py +292 -0
- package/src/apothem/_vendor/jsonschema/exceptions.py +490 -0
- package/src/apothem/_vendor/jsonschema/protocols.py +230 -0
- package/src/apothem/_vendor/jsonschema/validators.py +1410 -0
- package/src/apothem/_vendor/jsonschema.LICENSE +19 -0
- package/src/apothem/_vendor/jsonschema_specifications/__init__.py +12 -0
- package/src/apothem/_vendor/jsonschema_specifications/_core.py +38 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/metaschema.json +42 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +56 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/content +17 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/core +57 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/format +14 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +37 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/validation +98 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/metaschema.json +58 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +48 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/content +17 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/core +51 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +14 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +14 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +37 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +15 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/validation +98 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft3/metaschema.json +172 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft4/metaschema.json +149 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft6/metaschema.json +153 -0
- package/src/apothem/_vendor/jsonschema_specifications/schemas/draft7/metaschema.json +166 -0
- package/src/apothem/_vendor/jsonschema_specifications.LICENSE +19 -0
- package/src/apothem/_vendor/referencing/__init__.py +7 -0
- package/src/apothem/_vendor/referencing/_attrs.py +31 -0
- package/src/apothem/_vendor/referencing/_attrs.pyi +21 -0
- package/src/apothem/_vendor/referencing/_core.py +739 -0
- package/src/apothem/_vendor/referencing/exceptions.py +165 -0
- package/src/apothem/_vendor/referencing/jsonschema.py +642 -0
- package/src/apothem/_vendor/referencing/py.typed +0 -0
- package/src/apothem/_vendor/referencing/retrieval.py +94 -0
- package/src/apothem/_vendor/referencing/typing.py +61 -0
- package/src/apothem/_vendor/referencing.LICENSE +19 -0
- package/src/apothem/_vendor/rpds/__init__.py +251 -0
- package/src/apothem/_vendor/typing_extensions.LICENSE +279 -0
- package/src/apothem/_vendor/typing_extensions.py +4317 -0
- package/src/apothem/_vendor/vendor.txt +22 -0
- package/src/apothem/_vendor/yaml/__init__.py +389 -0
- package/src/apothem/_vendor/yaml/composer.py +138 -0
- package/src/apothem/_vendor/yaml/constructor.py +748 -0
- package/src/apothem/_vendor/yaml/cyaml.py +100 -0
- package/src/apothem/_vendor/yaml/dumper.py +61 -0
- package/src/apothem/_vendor/yaml/emitter.py +1137 -0
- package/src/apothem/_vendor/yaml/error.py +74 -0
- package/src/apothem/_vendor/yaml/events.py +85 -0
- package/src/apothem/_vendor/yaml/loader.py +63 -0
- package/src/apothem/_vendor/yaml/nodes.py +48 -0
- package/src/apothem/_vendor/yaml/parser.py +588 -0
- package/src/apothem/_vendor/yaml/reader.py +185 -0
- package/src/apothem/_vendor/yaml/representer.py +388 -0
- package/src/apothem/_vendor/yaml/resolver.py +226 -0
- package/src/apothem/_vendor/yaml/scanner.py +1435 -0
- package/src/apothem/_vendor/yaml/serializer.py +110 -0
- package/src/apothem/_vendor/yaml/tokens.py +103 -0
- package/src/apothem/_vendor/yaml.LICENSE +20 -0
- package/src/apothem/agents/README.md +60 -0
- package/src/apothem/agents/codebase-explorer.md +91 -0
- package/src/apothem/agents/convention-auditor.md +93 -0
- package/src/apothem/agents/dependency-auditor.md +97 -0
- package/src/apothem/agents/fact-checker.md +84 -0
- package/src/apothem/agents/mcp-builder.md +86 -0
- package/src/apothem/agents/memory-auditor.md +93 -0
- package/src/apothem/agents/prompt-evaluator.md +87 -0
- package/src/apothem/agents/quality-gate.md +103 -0
- package/src/apothem/agents/refactor-surgeon.md +74 -0
- package/src/apothem/agents/research-scout.md +73 -0
- package/src/apothem/agents/security-scanner.md +83 -0
- package/src/apothem/agents/test-runner.md +84 -0
- package/src/apothem/audit/README.md +73 -0
- package/src/apothem/audit/_scan_lib.py +182 -0
- package/src/apothem/audit/analyze_graph.py +260 -0
- package/src/apothem/audit/build_capability_graph.py +607 -0
- package/src/apothem/audit/build_inventory.py +657 -0
- package/src/apothem/audit/build_plans_provenance.py +997 -0
- package/src/apothem/audit/check_links.py +389 -0
- package/src/apothem/audit/classify_artifacts.py +381 -0
- package/src/apothem/audit/deprecated-tokens.txt +10 -0
- package/src/apothem/audit/execute_plans_migration.py +491 -0
- package/src/apothem/audit/known-projects.txt +15 -0
- package/src/apothem/audit/render_capability_index.py +467 -0
- package/src/apothem/audit/render_inventory.py +405 -0
- package/src/apothem/audit/scan_ai_surfaces.py +1125 -0
- package/src/apothem/audit/scan_ai_surfaces_coarse.py +261 -0
- package/src/apothem/audit/scan_drift_features.py +143 -0
- package/src/apothem/audit/scan_frontmatter.py +293 -0
- package/src/apothem/audit/scan_header_coverage.py +1134 -0
- package/src/apothem/audit/scan_plan_leakage.py +540 -0
- package/src/apothem/audit/scan_plans_discipline.py +188 -0
- package/src/apothem/audit/scan_secrets_pii.py +245 -0
- package/src/apothem/audit/scan_stale_tokens.py +296 -0
- package/src/apothem/audit/synthesize_drift.py +205 -0
- package/src/apothem/benchmarks/README.md +33 -0
- package/src/apothem/benchmarks/__init__.py +3 -0
- package/src/apothem/benchmarks/bench_agents.py +63 -0
- package/src/apothem/benchmarks/bench_hooks.py +93 -0
- package/src/apothem/benchmarks/bench_install.py +58 -0
- package/src/apothem/benchmarks/bench_tests.py +93 -0
- package/src/apothem/benchmarks/bench_validate_ecosystem.py +84 -0
- package/src/apothem/cli/README.md +33 -0
- package/src/apothem/cli/__init__.py +229 -0
- package/src/apothem/cli/_cmd_completion.py +88 -0
- package/src/apothem/cli/_cmd_diff.py +181 -0
- package/src/apothem/cli/_cmd_doctor.py +143 -0
- package/src/apothem/cli/_cmd_harnesses.py +167 -0
- package/src/apothem/cli/_cmd_install.py +327 -0
- package/src/apothem/cli/_cmd_migrate_workspace.py +143 -0
- package/src/apothem/cli/_cmd_profile.py +341 -0
- package/src/apothem/cli/_cmd_status.py +180 -0
- package/src/apothem/cli/_cmd_uninstall.py +215 -0
- package/src/apothem/cli/_cmd_update.py +397 -0
- package/src/apothem/cli/_cmd_verify.py +194 -0
- package/src/apothem/cli/_common_flags.py +90 -0
- package/src/apothem/cli/_epilogs.py +296 -0
- package/src/apothem/cli/_helpers.py +857 -0
- package/src/apothem/cli/_json_formatter.py +21 -0
- package/src/apothem/cli/_materialize.py +376 -0
- package/src/apothem/cli/completions/apothem.bash +30 -0
- package/src/apothem/cli/completions/apothem.fish +19 -0
- package/src/apothem/cli/completions/apothem.ps1 +27 -0
- package/src/apothem/cli/completions/apothem.zsh +42 -0
- package/src/apothem/cli/reference_export.py +126 -0
- package/src/apothem/commands/README.md +125 -0
- package/src/apothem/commands/a11y-audit.md +203 -0
- package/src/apothem/commands/architecture-review.md +194 -0
- package/src/apothem/commands/audit.md +165 -0
- package/src/apothem/commands/code-audit.md +218 -0
- package/src/apothem/commands/code-review.md +193 -0
- package/src/apothem/commands/dependency-audit.md +209 -0
- package/src/apothem/commands/docs-review.md +199 -0
- package/src/apothem/commands/elevate.md +285 -0
- package/src/apothem/commands/eval.md +149 -0
- package/src/apothem/commands/fortress.md +172 -0
- package/src/apothem/commands/freshify.md +168 -0
- package/src/apothem/commands/github-deploy-fresh.md +178 -0
- package/src/apothem/commands/github-deploy-next.md +167 -0
- package/src/apothem/commands/perf-audit.md +198 -0
- package/src/apothem/commands/plan-amend.md +104 -0
- package/src/apothem/commands/plan-audit.md +127 -0
- package/src/apothem/commands/plan-design.md +257 -0
- package/src/apothem/commands/plan-execute.md +495 -0
- package/src/apothem/commands/plan-generate.md +351 -0
- package/src/apothem/commands/plan-review.md +555 -0
- package/src/apothem/commands/plan-spec.md +359 -0
- package/src/apothem/commands/plan-status.md +222 -0
- package/src/apothem/commands/plan.md +173 -0
- package/src/apothem/commands/projectify.md +142 -0
- package/src/apothem/commands/release-readiness.md +142 -0
- package/src/apothem/commands/research-analysis.md +241 -0
- package/src/apothem/commands/research-design.md +231 -0
- package/src/apothem/commands/research-disseminate.md +225 -0
- package/src/apothem/commands/research-experiment.md +232 -0
- package/src/apothem/commands/research-ideate.md +213 -0
- package/src/apothem/commands/research-paper.md +252 -0
- package/src/apothem/commands/research-proposal.md +220 -0
- package/src/apothem/commands/research-publish.md +255 -0
- package/src/apothem/commands/research-review.md +251 -0
- package/src/apothem/commands/research-sources.md +266 -0
- package/src/apothem/commands/research-spec.md +255 -0
- package/src/apothem/commands/research-synthesis.md +233 -0
- package/src/apothem/commands/research-theory.md +218 -0
- package/src/apothem/commands/research.md +181 -0
- package/src/apothem/commands/security-audit.md +196 -0
- package/src/apothem/commands/supply-chain-audit.md +192 -0
- package/src/apothem/commands/test-suite.md +146 -0
- package/src/apothem/commands/threat-model-audit.md +199 -0
- package/src/apothem/commands/ux-review.md +202 -0
- package/src/apothem/commands/workflow.md +162 -0
- package/src/apothem/conformity/README.md +173 -0
- package/src/apothem/conformity/__init__.py +1 -0
- package/src/apothem/conformity/_grep_base.py +93 -0
- package/src/apothem/conformity/agent_capability_grep.py +306 -0
- package/src/apothem/conformity/agents_md_coverage_grep.py +382 -0
- package/src/apothem/conformity/agnosticism_grep.py +311 -0
- package/src/apothem/conformity/always_on_budget_grep.py +318 -0
- package/src/apothem/conformity/bare_except_grep.py +115 -0
- package/src/apothem/conformity/binding_reciprocity_grep.py +151 -0
- package/src/apothem/conformity/brand_mark_grep.py +272 -0
- package/src/apothem/conformity/commented_out_code_grep.py +176 -0
- package/src/apothem/conformity/completion_claim_grep.py +169 -0
- package/src/apothem/conformity/conventional_commit_grep.py +319 -0
- package/src/apothem/conformity/copilot_instructions_presence_grep.py +324 -0
- package/src/apothem/conformity/cross_platform_matrix_grep.py +297 -0
- package/src/apothem/conformity/determinism_grep.py +306 -0
- package/src/apothem/conformity/diagram_staleness_grep.py +154 -0
- package/src/apothem/conformity/dynamism_grep.py +284 -0
- package/src/apothem/conformity/editorconfig_presence_grep.py +281 -0
- package/src/apothem/conformity/file_header_grep.py +502 -0
- package/src/apothem/conformity/freshness_token_grep.py +233 -0
- package/src/apothem/conformity/frontmatter_grep.py +274 -0
- package/src/apothem/conformity/frontmatter_value_grep.py +386 -0
- package/src/apothem/conformity/gate.py +1386 -0
- package/src/apothem/conformity/gitattributes_presence_grep.py +238 -0
- package/src/apothem/conformity/harden_runner_grep.py +320 -0
- package/src/apothem/conformity/hedging_grep.py +129 -0
- package/src/apothem/conformity/license_author_consistency_grep.py +204 -0
- package/src/apothem/conformity/link_check.py +327 -0
- package/src/apothem/conformity/magic_number_grep.py +182 -0
- package/src/apothem/conformity/multi_surface_coherence_grep.py +620 -0
- package/src/apothem/conformity/naming_grep.py +224 -0
- package/src/apothem/conformity/no_global_plans_grep.py +339 -0
- package/src/apothem/conformity/no_toplevel_docs_grep.py +120 -0
- package/src/apothem/conformity/oidc_trusted_publishing_grep.py +291 -0
- package/src/apothem/conformity/option_annotation_grep.py +352 -0
- package/src/apothem/conformity/orphan_output_grep.py +206 -0
- package/src/apothem/conformity/permissions_minimum_scope_grep.py +299 -0
- package/src/apothem/conformity/plain_language_grep.py +559 -0
- package/src/apothem/conformity/plan_next_step_consistency_grep.py +450 -0
- package/src/apothem/conformity/plan_suite_structure_grep.py +534 -0
- package/src/apothem/conformity/plans_discipline_language_grep.py +245 -0
- package/src/apothem/conformity/production_ready_pr_grep.py +200 -0
- package/src/apothem/conformity/recommend_next_step_grep.py +250 -0
- package/src/apothem/conformity/redundancy_grep.py +401 -0
- package/src/apothem/conformity/reference_token_grep.py +230 -0
- package/src/apothem/conformity/registry_capability_consistency_grep.py +368 -0
- package/src/apothem/conformity/secret_leak_grep.py +193 -0
- package/src/apothem/conformity/semver_stability_grep.py +358 -0
- package/src/apothem/conformity/smoke_install_grep.py +194 -0
- package/src/apothem/conformity/static_version_grep.py +284 -0
- package/src/apothem/conformity/token_efficiency_grep.py +185 -0
- package/src/apothem/conformity/unpinned_action_grep.py +115 -0
- package/src/apothem/conformity/user_confirm_grep.py +74 -0
- package/src/apothem/conformity/workflow_concurrency_grep.py +283 -0
- package/src/apothem/harnesses/README.md +63 -0
- package/src/apothem/harnesses/__init__.py +16 -0
- package/src/apothem/harnesses/_shared/README.md +36 -0
- package/src/apothem/harnesses/_shared/__init__.py +12 -0
- package/src/apothem/harnesses/_shared/install_driver.py +281 -0
- package/src/apothem/harnesses/_shared/install_driver_apply.py +612 -0
- package/src/apothem/harnesses/_shared/install_driver_backup.py +535 -0
- package/src/apothem/harnesses/_shared/install_driver_converters.py +310 -0
- package/src/apothem/harnesses/_shared/install_driver_lifecycle.py +495 -0
- package/src/apothem/harnesses/_shared/install_driver_materialize.py +675 -0
- package/src/apothem/harnesses/_shared/install_driver_merge.py +656 -0
- package/src/apothem/harnesses/_shared/install_driver_pathsafety.py +137 -0
- package/src/apothem/harnesses/_shared/install_driver_planvalidation.py +240 -0
- package/src/apothem/harnesses/_shared/install_driver_removal.py +366 -0
- package/src/apothem/harnesses/_shared/install_driver_treeops.py +248 -0
- package/src/apothem/harnesses/_shared/install_driver_types.py +330 -0
- package/src/apothem/harnesses/_shared/wrapper_factories.py +448 -0
- package/src/apothem/harnesses/antigravity/STANDARD-CONVENTION-PIN.md +91 -0
- package/src/apothem/harnesses/antigravity/__init__.py +70 -0
- package/src/apothem/harnesses/antigravity/capabilities.yml +40 -0
- package/src/apothem/harnesses/antigravity/install.py +63 -0
- package/src/apothem/harnesses/antigravity/templates/GEMINI.md +40 -0
- package/src/apothem/harnesses/antigravity/templates/plugin.json +5 -0
- package/src/apothem/harnesses/antigravity/uninstall.py +22 -0
- package/src/apothem/harnesses/antigravity/update.py +10 -0
- package/src/apothem/harnesses/antigravity/verify.py +11 -0
- package/src/apothem/harnesses/claude_code/STANDARD-CONVENTION-PIN.md +65 -0
- package/src/apothem/harnesses/claude_code/__init__.py +107 -0
- package/src/apothem/harnesses/claude_code/capabilities.yml +42 -0
- package/src/apothem/harnesses/claude_code/install.py +147 -0
- package/src/apothem/harnesses/claude_code/templates/settings.json +351 -0
- package/src/apothem/harnesses/claude_code/uninstall.py +23 -0
- package/src/apothem/harnesses/claude_code/update.py +10 -0
- package/src/apothem/harnesses/claude_code/verify.py +11 -0
- package/src/apothem/harnesses/codebuddy/STANDARD-CONVENTION-PIN.md +74 -0
- package/src/apothem/harnesses/codebuddy/__init__.py +49 -0
- package/src/apothem/harnesses/codebuddy/capabilities.yml +34 -0
- package/src/apothem/harnesses/codebuddy/install.py +40 -0
- package/src/apothem/harnesses/codebuddy/templates/apothem-rules.md +37 -0
- package/src/apothem/harnesses/codebuddy/uninstall.py +25 -0
- package/src/apothem/harnesses/codebuddy/update.py +10 -0
- package/src/apothem/harnesses/codebuddy/verify.py +11 -0
- package/src/apothem/harnesses/codex/STANDARD-CONVENTION-PIN.md +79 -0
- package/src/apothem/harnesses/codex/__init__.py +72 -0
- package/src/apothem/harnesses/codex/capabilities.yml +40 -0
- package/src/apothem/harnesses/codex/install.py +69 -0
- package/src/apothem/harnesses/codex/templates/AGENTS.md +40 -0
- package/src/apothem/harnesses/codex/templates/hooks.json +127 -0
- package/src/apothem/harnesses/codex/uninstall.py +23 -0
- package/src/apothem/harnesses/codex/update.py +10 -0
- package/src/apothem/harnesses/codex/verify.py +11 -0
- package/src/apothem/harnesses/cursor/STANDARD-CONVENTION-PIN.md +79 -0
- package/src/apothem/harnesses/cursor/__init__.py +48 -0
- package/src/apothem/harnesses/cursor/capabilities.yml +42 -0
- package/src/apothem/harnesses/cursor/install.py +38 -0
- package/src/apothem/harnesses/cursor/templates/apothem-rules.mdc +40 -0
- package/src/apothem/harnesses/cursor/uninstall.py +25 -0
- package/src/apothem/harnesses/cursor/update.py +10 -0
- package/src/apothem/harnesses/cursor/verify.py +11 -0
- package/src/apothem/harnesses/gemini_cli/STANDARD-CONVENTION-PIN.md +102 -0
- package/src/apothem/harnesses/gemini_cli/__init__.py +52 -0
- package/src/apothem/harnesses/gemini_cli/capabilities.yml +43 -0
- package/src/apothem/harnesses/gemini_cli/install.py +43 -0
- package/src/apothem/harnesses/gemini_cli/templates/GEMINI.md +38 -0
- package/src/apothem/harnesses/gemini_cli/uninstall.py +25 -0
- package/src/apothem/harnesses/gemini_cli/update.py +10 -0
- package/src/apothem/harnesses/gemini_cli/verify.py +11 -0
- package/src/apothem/harnesses/github_copilot/STANDARD-CONVENTION-PIN.md +84 -0
- package/src/apothem/harnesses/github_copilot/__init__.py +47 -0
- package/src/apothem/harnesses/github_copilot/capabilities.yml +42 -0
- package/src/apothem/harnesses/github_copilot/install.py +40 -0
- package/src/apothem/harnesses/github_copilot/templates/copilot-instructions.md +33 -0
- package/src/apothem/harnesses/github_copilot/uninstall.py +25 -0
- package/src/apothem/harnesses/github_copilot/update.py +10 -0
- package/src/apothem/harnesses/github_copilot/verify.py +11 -0
- package/src/apothem/harnesses/glm/STANDARD-CONVENTION-PIN.md +77 -0
- package/src/apothem/harnesses/glm/__init__.py +56 -0
- package/src/apothem/harnesses/glm/capabilities.yml +33 -0
- package/src/apothem/harnesses/glm/install.py +45 -0
- package/src/apothem/harnesses/glm/templates/glm.toml +58 -0
- package/src/apothem/harnesses/glm/uninstall.py +25 -0
- package/src/apothem/harnesses/glm/update.py +10 -0
- package/src/apothem/harnesses/glm/verify.py +11 -0
- package/src/apothem/harnesses/hermes/STANDARD-CONVENTION-PIN.md +57 -0
- package/src/apothem/harnesses/hermes/__init__.py +33 -0
- package/src/apothem/harnesses/hermes/capabilities.yml +36 -0
- package/src/apothem/harnesses/hermes/install.py +17 -0
- package/src/apothem/harnesses/hermes/materializer.py +35 -0
- package/src/apothem/harnesses/hermes/uninstall.py +33 -0
- package/src/apothem/harnesses/hermes/update.py +10 -0
- package/src/apothem/harnesses/hermes/verify.py +11 -0
- package/src/apothem/harnesses/kimi_code/STANDARD-CONVENTION-PIN.md +128 -0
- package/src/apothem/harnesses/kimi_code/__init__.py +59 -0
- package/src/apothem/harnesses/kimi_code/capabilities.yml +40 -0
- package/src/apothem/harnesses/kimi_code/install.py +42 -0
- package/src/apothem/harnesses/kimi_code/templates/AGENTS.md +43 -0
- package/src/apothem/harnesses/kimi_code/uninstall.py +27 -0
- package/src/apothem/harnesses/kimi_code/update.py +10 -0
- package/src/apothem/harnesses/kimi_code/verify.py +11 -0
- package/src/apothem/harnesses/kiro/STANDARD-CONVENTION-PIN.md +77 -0
- package/src/apothem/harnesses/kiro/__init__.py +49 -0
- package/src/apothem/harnesses/kiro/capabilities.yml +36 -0
- package/src/apothem/harnesses/kiro/install.py +39 -0
- package/src/apothem/harnesses/kiro/templates/apothem-rules.md +36 -0
- package/src/apothem/harnesses/kiro/uninstall.py +25 -0
- package/src/apothem/harnesses/kiro/update.py +10 -0
- package/src/apothem/harnesses/kiro/verify.py +11 -0
- package/src/apothem/harnesses/open_claw/STANDARD-CONVENTION-PIN.md +62 -0
- package/src/apothem/harnesses/open_claw/__init__.py +35 -0
- package/src/apothem/harnesses/open_claw/capabilities.yml +35 -0
- package/src/apothem/harnesses/open_claw/install.py +17 -0
- package/src/apothem/harnesses/open_claw/materializer.py +36 -0
- package/src/apothem/harnesses/open_claw/uninstall.py +32 -0
- package/src/apothem/harnesses/open_claw/update.py +10 -0
- package/src/apothem/harnesses/open_claw/verify.py +11 -0
- package/src/apothem/harnesses/opencode/STANDARD-CONVENTION-PIN.md +76 -0
- package/src/apothem/harnesses/opencode/__init__.py +35 -0
- package/src/apothem/harnesses/opencode/capabilities.yml +43 -0
- package/src/apothem/harnesses/opencode/install.py +17 -0
- package/src/apothem/harnesses/opencode/materializer.py +31 -0
- package/src/apothem/harnesses/opencode/uninstall.py +34 -0
- package/src/apothem/harnesses/opencode/update.py +10 -0
- package/src/apothem/harnesses/opencode/verify.py +11 -0
- package/src/apothem/harnesses/qwen_code/STANDARD-CONVENTION-PIN.md +87 -0
- package/src/apothem/harnesses/qwen_code/__init__.py +37 -0
- package/src/apothem/harnesses/qwen_code/capabilities.yml +43 -0
- package/src/apothem/harnesses/qwen_code/install.py +19 -0
- package/src/apothem/harnesses/qwen_code/materializer.py +174 -0
- package/src/apothem/harnesses/qwen_code/templates/QWEN.md +30 -0
- package/src/apothem/harnesses/qwen_code/uninstall.py +34 -0
- package/src/apothem/harnesses/qwen_code/update.py +10 -0
- package/src/apothem/harnesses/qwen_code/verify.py +11 -0
- package/src/apothem/harnesses/trae/STANDARD-CONVENTION-PIN.md +70 -0
- package/src/apothem/harnesses/trae/__init__.py +49 -0
- package/src/apothem/harnesses/trae/capabilities.yml +34 -0
- package/src/apothem/harnesses/trae/install.py +38 -0
- package/src/apothem/harnesses/trae/templates/apothem-rules.md +37 -0
- package/src/apothem/harnesses/trae/uninstall.py +25 -0
- package/src/apothem/harnesses/trae/update.py +10 -0
- package/src/apothem/harnesses/trae/verify.py +11 -0
- package/src/apothem/harnesses/windsurf/STANDARD-CONVENTION-PIN.md +91 -0
- package/src/apothem/harnesses/windsurf/__init__.py +52 -0
- package/src/apothem/harnesses/windsurf/capabilities.yml +40 -0
- package/src/apothem/harnesses/windsurf/install.py +41 -0
- package/src/apothem/harnesses/windsurf/templates/apothem-rules.md +37 -0
- package/src/apothem/harnesses/windsurf/uninstall.py +25 -0
- package/src/apothem/harnesses/windsurf/update.py +10 -0
- package/src/apothem/harnesses/windsurf/verify.py +11 -0
- package/src/apothem/harnesses/zed/STANDARD-CONVENTION-PIN.md +92 -0
- package/src/apothem/harnesses/zed/__init__.py +57 -0
- package/src/apothem/harnesses/zed/capabilities.yml +38 -0
- package/src/apothem/harnesses/zed/install.py +41 -0
- package/src/apothem/harnesses/zed/templates/apothem-rules.md +32 -0
- package/src/apothem/harnesses/zed/uninstall.py +28 -0
- package/src/apothem/harnesses/zed/update.py +10 -0
- package/src/apothem/harnesses/zed/verify.py +11 -0
- package/src/apothem/hooks/README.md +81 -0
- package/src/apothem/hooks/__init__.py +24 -0
- package/src/apothem/hooks/askuserquestion_validator.py +380 -0
- package/src/apothem/hooks/dispatch.py +296 -0
- package/src/apothem/hooks/emit_hook_context.py +444 -0
- package/src/apothem/hooks/hooks.json +318 -0
- package/src/apothem/hooks/lib/README.md +39 -0
- package/src/apothem/hooks/lib/__init__.py +18 -0
- package/src/apothem/hooks/lib/bootstrap.ps1 +129 -0
- package/src/apothem/hooks/lib/bootstrap.sh +103 -0
- package/src/apothem/hooks/lib/events.py +51 -0
- package/src/apothem/hooks/lib/find-pwsh.ps1 +78 -0
- package/src/apothem/hooks/lib/find-pwsh.sh +76 -0
- package/src/apothem/hooks/lib/find-python.ps1 +63 -0
- package/src/apothem/hooks/lib/find-python.sh +97 -0
- package/src/apothem/hooks/lib/log.py +43 -0
- package/src/apothem/hooks/lib/resolve_root.py +264 -0
- package/src/apothem/hooks/messages/postcompact.md +14 -0
- package/src/apothem/hooks/messages/posttooluse-proactive-compaction.md +46 -0
- package/src/apothem/hooks/messages/precompact.md +14 -0
- package/src/apothem/hooks/messages/pretooluse-askuserquestion-recommended.md +65 -0
- package/src/apothem/hooks/messages/pretooluse-bash-plan-guard.md +97 -0
- package/src/apothem/hooks/messages/pretooluse-bash.md +39 -0
- package/src/apothem/hooks/messages/pretooluse-conformity.md +70 -0
- package/src/apothem/hooks/messages/pretooluse-dependency-guard.md +21 -0
- package/src/apothem/hooks/messages/pretooluse-edit-header-guard.md +61 -0
- package/src/apothem/hooks/messages/pretooluse-edit.md +21 -0
- package/src/apothem/hooks/messages/pretooluse-eval-guard.md +39 -0
- package/src/apothem/hooks/messages/pretooluse-notebookedit.md +11 -0
- package/src/apothem/hooks/messages/pretooluse-write-header-guard.md +45 -0
- package/src/apothem/hooks/messages/pretooluse-write-plan-guard.md +72 -0
- package/src/apothem/hooks/messages/pretooluse-write.md +21 -0
- package/src/apothem/hooks/messages/sessionstart.md +15 -0
- package/src/apothem/hooks/messages/stop.md +27 -0
- package/src/apothem/hooks/proactive_compaction_tracker.py +327 -0
- package/src/apothem/hooks/session_start_bootstrap.py +472 -0
- package/src/apothem/lib/README.md +42 -0
- package/src/apothem/lib/__init__.py +13 -0
- package/src/apothem/lib/atomic_io.py +189 -0
- package/src/apothem/lib/auditor.py +687 -0
- package/src/apothem/lib/clean_slate.py +396 -0
- package/src/apothem/lib/contexts.py +352 -0
- package/src/apothem/lib/data_home.py +255 -0
- package/src/apothem/lib/frontmatter.py +101 -0
- package/src/apothem/lib/harness_materializer.py +213 -0
- package/src/apothem/lib/harness_protocol.py +59 -0
- package/src/apothem/lib/harness_registry.py +282 -0
- package/src/apothem/lib/harness_registry_data.py +843 -0
- package/src/apothem/lib/install_ledger.py +347 -0
- package/src/apothem/lib/learning.py +540 -0
- package/src/apothem/lib/memory.py +347 -0
- package/src/apothem/lib/parallel_sweep.py +234 -0
- package/src/apothem/lib/plan_tiers.py +200 -0
- package/src/apothem/lib/plugin_bootstrap.py +132 -0
- package/src/apothem/lib/plugin_tree.py +599 -0
- package/src/apothem/lib/profile.py +755 -0
- package/src/apothem/lib/profile_projection.py +198 -0
- package/src/apothem/lib/propagation-manifest.yaml +878 -0
- package/src/apothem/lib/propagation.py +220 -0
- package/src/apothem/lib/python_resolver.py +189 -0
- package/src/apothem/lib/reporter.py +62 -0
- package/src/apothem/lib/workspace_migration.py +323 -0
- package/src/apothem/output-styles/README.md +41 -0
- package/src/apothem/output-styles/concise-engineer.md +49 -0
- package/src/apothem/output-styles/default-architect.md +52 -0
- package/src/apothem/output-styles/default.md +113 -0
- package/src/apothem/output-styles/forensic-auditor.md +63 -0
- package/src/apothem/py.typed +0 -0
- package/src/apothem/rules/README.md +121 -0
- package/src/apothem/rules/agent-capability-discipline-matrix.md +89 -0
- package/src/apothem/rules/agent-capability-discipline.md +78 -0
- package/src/apothem/rules/agent-orchestration-patterns.md +144 -0
- package/src/apothem/rules/agent-orchestration.md +65 -0
- package/src/apothem/rules/agents-md-convention.md +86 -0
- package/src/apothem/rules/agile-sprints-elements.md +135 -0
- package/src/apothem/rules/agile-sprints.md +64 -0
- package/src/apothem/rules/agnostic-posture-checklist.md +47 -0
- package/src/apothem/rules/agnostic-posture.md +48 -0
- package/src/apothem/rules/authoritative-referencing-quotation.md +50 -0
- package/src/apothem/rules/authoritative-referencing.md +66 -0
- package/src/apothem/rules/authority-inquiry-categories.md +58 -0
- package/src/apothem/rules/authority-inquiry.md +54 -0
- package/src/apothem/rules/auto-memory-topic-files.md +86 -0
- package/src/apothem/rules/auto-memory.md +67 -0
- package/src/apothem/rules/bidirectional-binding.md +123 -0
- package/src/apothem/rules/canonical-layout-reporting-tiers.md +212 -0
- package/src/apothem/rules/canonical-layout.md +60 -0
- package/src/apothem/rules/clean-architecture-layers.md +186 -0
- package/src/apothem/rules/clean-room-generation-protocols.md +124 -0
- package/src/apothem/rules/clean-room-generation.md +59 -0
- package/src/apothem/rules/code-craft-conventions.md +101 -0
- package/src/apothem/rules/code-craft-markdown.md +138 -0
- package/src/apothem/rules/code-craft-python.md +154 -0
- package/src/apothem/rules/code-craft-shell.md +192 -0
- package/src/apothem/rules/cognitive-identity-techniques.md +180 -0
- package/src/apothem/rules/cognitive-identity.md +81 -0
- package/src/apothem/rules/context-management-budget.md +46 -0
- package/src/apothem/rules/context-management-protocol.md +161 -0
- package/src/apothem/rules/context-management-scratch.md +128 -0
- package/src/apothem/rules/context-management.md +85 -0
- package/src/apothem/rules/definitiveness-virtues.md +67 -0
- package/src/apothem/rules/definitiveness.md +58 -0
- package/src/apothem/rules/determinism.md +81 -0
- package/src/apothem/rules/disclosure-ledger-markers.md +58 -0
- package/src/apothem/rules/disclosure-ledger.md +52 -0
- package/src/apothem/rules/dynamism.md +38 -0
- package/src/apothem/rules/etc-extension.md +57 -0
- package/src/apothem/rules/expertise-posture-elements.md +68 -0
- package/src/apothem/rules/expertise-posture.md +54 -0
- package/src/apothem/rules/freshness-facade.md +64 -0
- package/src/apothem/rules/harness-adapter-shape-schemas.md +162 -0
- package/src/apothem/rules/harness-adapter-shape.md +42 -0
- package/src/apothem/rules/host-discovery-manifests.md +50 -0
- package/src/apothem/rules/host-discovery.md +56 -0
- package/src/apothem/rules/i18n-discipline-locale-cohorts.md +120 -0
- package/src/apothem/rules/i18n-discipline.md +70 -0
- package/src/apothem/rules/interactive-questions-canonical-shapes.md +590 -0
- package/src/apothem/rules/interactive-questions-detail.md +41 -0
- package/src/apothem/rules/interactive-questions-sweep-matchers.md +184 -0
- package/src/apothem/rules/interactive-questions.md +89 -0
- package/src/apothem/rules/large-file-generation.md +112 -0
- package/src/apothem/rules/large-file-reading.md +59 -0
- package/src/apothem/rules/living-docs.md +85 -0
- package/src/apothem/rules/multi-agent-workflow.md +57 -0
- package/src/apothem/rules/operational-mandates-expanded.md +78 -0
- package/src/apothem/rules/operational-mandates.md +88 -0
- package/src/apothem/rules/option-annotation-form.md +60 -0
- package/src/apothem/rules/option-annotation.md +45 -0
- package/src/apothem/rules/own-voice-reimplementation.md +86 -0
- package/src/apothem/rules/performance-discipline.md +91 -0
- package/src/apothem/rules/persistent-conventions-vigilance-checklist.md +54 -0
- package/src/apothem/rules/persistent-conventions-vigilance.md +61 -0
- package/src/apothem/rules/plain-language.md +56 -0
- package/src/apothem/rules/planning-techniques.md +130 -0
- package/src/apothem/rules/pre-emission-gate-bars.md +86 -0
- package/src/apothem/rules/pre-emission-gate.md +54 -0
- package/src/apothem/rules/production-ready-prs-surfaces.md +162 -0
- package/src/apothem/rules/production-ready-prs.md +83 -0
- package/src/apothem/rules/propagation.md +63 -0
- package/src/apothem/rules/recommend-next-step.md +106 -0
- package/src/apothem/rules/refactoring-discipline.md +76 -0
- package/src/apothem/rules/session-closure.md +44 -0
- package/src/apothem/rules/sota-elevation-exemplars.md +76 -0
- package/src/apothem/rules/sota-elevation.md +52 -0
- package/src/apothem/rules/source-accessibility.md +58 -0
- package/src/apothem/rules/surgical-manipulation.md +48 -0
- package/src/apothem/rules/systemic-participation-relations.md +108 -0
- package/src/apothem/rules/systemic-participation.md +70 -0
- package/src/apothem/rules/ten-dimension-check-dimensions.md +52 -0
- package/src/apothem/rules/ten-dimension-check.md +59 -0
- package/src/apothem/rules/token-budget-discipline.md +81 -0
- package/src/apothem/rules/token-efficiency-rewrite-protocol.md +79 -0
- package/src/apothem/rules/token-efficiency-rewrite.md +77 -0
- package/src/apothem/rules/tool-use-discipline.md +48 -0
- package/src/apothem/rules/visual-leverage.md +102 -0
- package/src/apothem/schemas/NOTICE.md +9 -0
- package/src/apothem/schemas/README.md +104 -0
- package/src/apothem/schemas/__init__.py +176 -0
- package/src/apothem/schemas/advisory-finding.schema.json +111 -0
- package/src/apothem/schemas/agent.schema.json +106 -0
- package/src/apothem/schemas/authorship-header.txt +1 -0
- package/src/apothem/schemas/cohort-manifest.yaml +248 -0
- package/src/apothem/schemas/cohort-metadata-vocabulary.yaml +168 -0
- package/src/apothem/schemas/cohort.schema.json +113 -0
- package/src/apothem/schemas/command.schema.json +68 -0
- package/src/apothem/schemas/compatibility-matrix.yaml +432 -0
- package/src/apothem/schemas/context-fragment.schema.json +64 -0
- package/src/apothem/schemas/freshness-token-denylist.txt +51 -0
- package/src/apothem/schemas/handoff-manifest.yaml +353 -0
- package/src/apothem/schemas/header-exceptions.txt +141 -0
- package/src/apothem/schemas/header-visibility.yaml +39 -0
- package/src/apothem/schemas/learning-signal.schema.json +46 -0
- package/src/apothem/schemas/memory-record.schema.json +61 -0
- package/src/apothem/schemas/output-style.schema.json +40 -0
- package/src/apothem/schemas/plan.schema.json +51 -0
- package/src/apothem/schemas/plugin.schema.json +83 -0
- package/src/apothem/schemas/profile.example.yaml +70 -0
- package/src/apothem/schemas/profile.minimal.yaml +6 -0
- package/src/apothem/schemas/profile.schema.json +396 -0
- package/src/apothem/schemas/reference-token-denylist.txt +25 -0
- package/src/apothem/schemas/skill.schema.json +75 -0
- package/src/apothem/skills/README.md +93 -0
- package/src/apothem/skills/dependency-upgrade/SKILL.md +105 -0
- package/src/apothem/skills/dev-toolkit/SKILL.md +120 -0
- package/src/apothem/skills/diagram-authoring/SKILL.md +113 -0
- package/src/apothem/skills/document-authoring/SKILL.md +118 -0
- package/src/apothem/skills/ecosystem-audit/SKILL.md +108 -0
- package/src/apothem/skills/ecosystem-audit/references/audit-fortress.md +85 -0
- package/src/apothem/skills/ecosystem-audit/references/procedure.md +162 -0
- package/src/apothem/skills/eval-harness/SKILL.md +88 -0
- package/src/apothem/skills/incident-runbook/SKILL.md +92 -0
- package/src/apothem/skills/multi-source-research/SKILL.md +90 -0
- package/src/apothem/skills/plan-suite/SKILL.md +118 -0
- package/src/apothem/skills/plan-suite/master_template.md +1324 -0
- package/src/apothem/skills/projectify/SKILL.md +117 -0
- package/src/apothem/skills/prompt-engineering/SKILL.md +122 -0
- package/src/apothem/skills/refactor-extract/SKILL.md +85 -0
- package/src/apothem/skills/research-suite/SKILL.md +170 -0
- package/src/apothem/skills/research-suite/references/directory-structure.md +47 -0
- package/src/apothem/skills/research-suite/references/lifecycle.md +67 -0
- package/src/apothem/skills/research-suite/references/principal-investigator-framework.md +37 -0
- package/src/apothem/skills/research-suite/references/rigor-mandates.md +30 -0
- package/src/apothem/skills/research-suite/research_template.md +476 -0
- package/src/apothem/skills/secret-rotation/SKILL.md +87 -0
- package/src/apothem/skills/source-synthesis/SKILL.md +92 -0
- package/src/apothem/skills/surgical-guard/SKILL.md +118 -0
- package/src/apothem/skills/test-authoring/SKILL.md +85 -0
- package/src/apothem/skills/vuln-triage/SKILL.md +91 -0
- package/src/apothem/skills/workflow/SKILL.md +139 -0
- package/src/apothem/statuslines/README.md +26 -0
- package/src/apothem/statuslines/__init__.py +20 -0
- package/src/apothem/statuslines/conformity.json +5 -0
- package/src/apothem/statuslines/render.py +334 -0
- package/src/apothem/statuslines/statusline.md +50 -0
- package/src/apothem/templates/README.md +43 -0
- package/src/apothem/templates/agents-md-template.md +80 -0
- package/src/apothem/templates/consideration-log.md +39 -0
- package/src/apothem/templates/expertise-gap-log.md +56 -0
- package/src/apothem/templates/master-index-template.md +93 -0
- package/src/apothem/templates/potency-map.md +53 -0
- package/src/apothem/templates/preservation-audit.md +60 -0
- package/src/apothem/templates/question-resolution-audit.md +52 -0
- package/src/apothem/templates/trace-matrix-template.md +77 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "research-review"
|
|
3
|
+
version: "0.1.0"
|
|
4
|
+
updated: "2026-06-16"
|
|
5
|
+
description: "Subjects the finished paper to a peer-review-grade adversarial critique against venue standards — scores novelty, rigor, reproducibility, clarity, ethics, statistical review, and reporting-guideline conformance, then emits a severity-triaged required-revision list with a concrete-driver rationale per finding. Refute-by-default: every claim in the paper is treated as unsupported until the evidence in the manuscript forces otherwise. The peer-review stage of the /research pipeline. Triggered as 'review this paper like a hostile reviewer', 'run the peer-review critique against the venue bar', 'score the paper on novelty rigor reproducibility clarity ethics and statistics', 'what would Reviewer 2 reject this for', 'give me the required-revision list before submission', or the pipeline-chained hand-off from /research-paper. Consumes the paper deliverable emitted by the paper stage and emits _outputs/review-report.md carrying the seven-axis reviewer scorecard, the HIGH/MEDIUM/LOW required-revision list with per-finding concrete-driver rationale, the reproducibility-package and re-run verdict, the citation-integrity audit, and a recommend/major-revision/reject verdict. Every finding is adversarially verified refute-by-default by the fact-checker before it lands as a required revision."
|
|
6
|
+
argument-hint: "[--suite-name NAME] [--override] [--venue STANDARD] [--blind]"
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
portability: "universal"
|
|
9
|
+
allowed-tools: "*"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
13
|
+
|
|
14
|
+
# /research-review — Peer-Review-Grade Critique
|
|
15
|
+
|
|
16
|
+
## Role
|
|
17
|
+
|
|
18
|
+
You are the **Principal Investigator** acting as a hostile peer reviewer for the research mission, operating as **Technical Co-Founder** and **Cognitive Insurgent** per `rules/cognitive-identity.md`.
|
|
19
|
+
|
|
20
|
+
**Your mission in one sentence:** refute the paper — treat every claim as unsupported until the manuscript's own evidence forces otherwise, score it against the venue's standards on the seven axs (novelty · rigor · reproducibility · clarity · ethics · statistical review · reporting-guideline conformance), and emit the severity-triaged required-revision list an exacting reviewer demands before acceptance.
|
|
21
|
+
|
|
22
|
+
You are an **adversary of the manuscript, not an advocate**. Three non-negotiables fall out of that posture:
|
|
23
|
+
|
|
24
|
+
- **Confidence is not evidence** — every passed claim traces to the manuscript's own data or a cited source; a confidently-asserted claim earns no pass on assertion alone.
|
|
25
|
+
- **Every finding cites a real defect at a real locus** — a finding without a citable defect is dropped; a defect without a severity is unassigned; a bare opinion is not a finding.
|
|
26
|
+
- **An `accept` verdict is earned against the venue bar, never granted by default** — a paper with an unresolved HIGH finding earns `major-revision` or `reject`.
|
|
27
|
+
|
|
28
|
+
Apply the Five Cognitive Filters at full intensity: **Filter 1 (Obvious Purge)** discards the charitable first reading so the critique does not accept the paper's own framing of its contribution; **Filter 3 (Inversion Press)** demands the strongest case the paper is *wrong* before any claim earns a pass — at least one inverted assumption survives into the scorecard; **Filter 5 (Aesthetic Demand)** governs the precision of every finding's concrete-driver rationale.
|
|
29
|
+
|
|
30
|
+
The stage runs as one disciplined sprint: a single authoritative review report, one reviewer scorecard, and one Handoff Manifest update. Route every finding through `agents/fact-checker.md` adversarial verification before it lands as a required revision — an uncited or unreproduced finding never enters the revision list.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Pipeline Contract
|
|
35
|
+
|
|
36
|
+
**Pipeline position.** **Stage 11 of 13.** The canonical sequence is `/research-ideate → /research-spec → /research-theory → /research-sources → /research-synthesis → /research-proposal → /research-design → /research-experiment → /research-analysis → /research-paper → /research-review → /research-publish → /research-disseminate`. This stage consumes the paper deliverable the paper stage wrote and emits the peer-review critique the publish stage acts on before it assembles the submission package.
|
|
37
|
+
|
|
38
|
+
**Handoff Manifest.**
|
|
39
|
+
|
|
40
|
+
- **Consumed.** The paper deliverable at the host-natural location the paper stage recorded (`paper/`, resolved per `rules/host-discovery.md`) plus, for evidence cross-checking, `{suite}/_inputs/synthesis.md` (the SOTA map and gap statement the paper's novelty claim rests on), `{suite}/_inputs/study-design.md` and `{suite}/_inputs/preregistration.md` (the frozen plan the paper's method must match), and `{suite}/_outputs/analysis.md` (the confirmed results the paper reports). The Handoff Manifest at `{suite}/_inputs/handoff-manifest.yml` per `src/apothem/schemas/handoff-manifest.yaml` is read for the predecessor stage's attestation block.
|
|
41
|
+
- **Emitted.** `{suite}/_outputs/review-report.md` — the seven-axis reviewer scorecard (novelty · rigor · reproducibility · clarity · ethics · statistical review · reporting-guideline conformance), the severity-triaged required-revision list (HIGH / MEDIUM / LOW, each with a concrete-driver rationale), the reproducibility-package and re-run verdict, the citation-integrity audit, and the overall verdict (`accept` · `minor-revision` · `major-revision` · `reject`). The manifest's `invocation_sequence` increments, `downstream` names `/research-publish`, and the verification attestation records the per-finding refute-by-default outcomes and the HIGH-finding count.
|
|
42
|
+
|
|
43
|
+
**Pre-flight inquiry set.** Phase 1 (Ingest) emits the typed inquiry set per `rules/authority-inquiry.md` when the target venue and its standard are unstated and the paper does not name one (the novelty and rigor bars are venue-relative), when the paper's claimed contribution is ambiguous enough that the novelty axis cannot be scored without operator ratification, or when an ethics concern (undisclosed human-subjects handling, a conflict of interest the paper omits) requires the operator to confirm scope before the critique proceeds. Every ambiguity surfaces as a structured-inquiry invocation with the three-segment option annotation per `rules/interactive-questions.md` §3. Scope-direction and any ethics-blocking inquiry block emission until answered.
|
|
44
|
+
|
|
45
|
+
**Pre-emission gate.** Phase 5 (Validation Gate) runs the fifteen-bar pre-emission gate per `rules/pre-emission-gate.md` against the candidate `_outputs/review-report.md` before the manifest update. The gate attestation block is recorded inside the emitted report. Failure on any bar blocks promotion until resolved per the iterate-on-failure protocol at the gate rule's §3.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Foundational Stanzas
|
|
50
|
+
|
|
51
|
+
The four standing surfaces every operator inherits per the canonical project voice at `AGENTS.md` plus the active harness mirror. Spelled out inline here so this command honors them at the surface, not via cross-reference alone.
|
|
52
|
+
|
|
53
|
+
### Refusal & Escalation
|
|
54
|
+
|
|
55
|
+
REFUSE any task whose scope exceeds this command's stated mission (critiquing the paper against the venue bar, scoring the five axs, and emitting a severity-triaged required-revision list). Refusal is explicit: name what was refused, name the mission boundary the request crossed, and surface an escalation option through the structured-inquiry channel per `rules/interactive-questions.md`. REFUSE reviewing when the paper deliverable is absent or the predecessor Sequence Gate is unsatisfied — route back to `/research-paper` first. REFUSE rewriting the paper to fix a finding: this stage critiques and prescribes revisions; the author's revision pass is a separate action, and a reviewer who silently patches the manuscript has stopped reviewing it. REFUSE accepting a claim because the paper asserts it confidently — confidence is not evidence; every passed claim traces to the manuscript's own data or a cited source (refute-by-default).
|
|
56
|
+
|
|
57
|
+
### Output Surface
|
|
58
|
+
|
|
59
|
+
The review report lands at `{suite}/_outputs/review-report.md` per the suite-locality invariant at `rules/context-management.md` §2.6.1, never inside the paper deliverable and never inside `.apothem/plans/` outside the suite. Plan-internal files are banner-exempt per the `.plans/**` exception class enumerated at `src/apothem/schemas/header-exceptions.txt`; the injector at `scripts/inject-header.{sh,py}` is therefore NOT invoked on the review report's emission. NEVER write the review outside the suite folder; NEVER write to a global plans directory under any harness's config root from a downstream-project context; NEVER write to any other global-ecosystem location.
|
|
60
|
+
|
|
61
|
+
### File-Authoring Contract
|
|
62
|
+
|
|
63
|
+
The review report is banner-exempt per the `.plans/**` exception class; the command never invokes the authorship-header injector at `scripts/inject-header.{sh,py}` on its own `_outputs/` emission. This stage authors no code and no host-natural deliverable — it reads the paper and the suite's evidence artifacts and writes one report. Every finding traces to a reproducible locus: the report records the manuscript section, line, figure, or table the defect sits in, and the suite artifact whose evidence the finding cross-checks against, so the author re-finds each defect without re-reading the whole paper (R2, R4). Exemptions are enumerated at `src/apothem/schemas/header-exceptions.txt`.
|
|
64
|
+
|
|
65
|
+
### Structured Inquiry on Ambiguity
|
|
66
|
+
|
|
67
|
+
When uncertain about the target venue and its standard, whether a claimed contribution clears the novelty bar, whether an ethics concern blocks the critique, or whether a finding's severity is HIGH or MEDIUM at the margin, route the resolution through the structured-inquiry channel with the three-segment option annotation per `rules/interactive-questions.md` §3. Host-ratified conventions (the venue, the citation style, the reproducibility expectations) are discovered from the paper and the suite artifacts, not invented, per `rules/host-discovery.md`. Free-form prose questions as primary input are forbidden. NEVER fabricate a finding — every required revision cites the manuscript locus it targets and the standard it fails against, or it is not a finding (R4).
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Inputs
|
|
72
|
+
|
|
73
|
+
| Argument | Type | Required | Description |
|
|
74
|
+
| -------- | ---- | -------- | ----------- |
|
|
75
|
+
| `--suite-name <kebab-case>` | Flag + value | No | The research-suite folder name. If omitted, resolve from the active suite context; surface via the structured-inquiry channel when ambiguous. |
|
|
76
|
+
| `--override` | Flag | No | Bypass the Sequence Gate when the predecessor stage's outputs are present but its Handoff Manifest attestation is absent or stale. The override is audited: it records a `[Gate — override: predecessor /research-paper; rationale: <operator-supplied>]` entry in the review report's disclosure ledger. |
|
|
77
|
+
| `--venue <STANDARD>` | Flag + value | No | The target venue or review standard the critique scores against (e.g., a named conference, journal, or a generic top-tier bar). If omitted, resolve from the paper's stated target; when the paper is silent, Phase 1 ratifies the standard through the structured-inquiry channel before scoring the novelty and rigor axs, which are venue-relative. |
|
|
78
|
+
| `--blind` | Flag | No | Run a blind re-audit per `rules/planning-techniques.md` §6 — critique the paper without reading any prior review of it (a re-review cycle's earlier report, an author's response). The blind pass breaks anchoring bias and surfaces findings a prior-anchored review missed; its findings are reconciled against any prior review at Phase 4. |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Sequence Gate
|
|
83
|
+
|
|
84
|
+
**Predecessor.** `/research-paper` (Stage 10). This stage requires the finished paper deliverable and the suite evidence artifacts the paper rests on.
|
|
85
|
+
|
|
86
|
+
**Precondition.** The paper deliverable exists at the host-natural location (`paper/`, discovered per `rules/host-discovery.md`), `{suite}/_outputs/analysis.md` and `{suite}/_inputs/synthesis.md` exist and are non-empty, and the Handoff Manifest records `/research-paper` as the most recent stage with a clean attestation block.
|
|
87
|
+
|
|
88
|
+
**Gate-failure line.** When the precondition is unmet, halt and emit: `Blocked: run /research-paper first` — naming the missing artifact (absent paper, absent analysis, absent synthesis, or unsatisfied manifest attestation). Do not review a paper that does not exist or whose evidence base is incomplete.
|
|
89
|
+
|
|
90
|
+
**Override path.** `--override` proceeds when the predecessor outputs are present but the manifest attestation is stale; the override records its rationale in the review report's disclosure ledger per the `--override` input row above.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Workflow — Five Phases
|
|
95
|
+
|
|
96
|
+
### Phase 1 — Ingest the Paper & Its Evidence Base
|
|
97
|
+
|
|
98
|
+
Read the paper deliverable in full per the locate-before-read discipline at `rules/large-file-reading.md`, then read the suite evidence artifacts its claims rest on:
|
|
99
|
+
|
|
100
|
+
- `{suite}/_inputs/synthesis.md` — the SOTA map the novelty claim depends on.
|
|
101
|
+
- `{suite}/_inputs/study-design.md` + `{suite}/_inputs/preregistration.md` — the frozen plan the method section must match.
|
|
102
|
+
- `{suite}/_outputs/analysis.md` — the confirmed results the paper reports.
|
|
103
|
+
|
|
104
|
+
Resolve the target venue and its standard from the paper's stated target or `--venue`; when both are silent, ratify the standard through the structured-inquiry channel *before* scoring — the novelty and rigor bars are venue-relative. Build the **claim inventory**: every load-bearing assertion (each contribution claim, method step, reported result, and citation) paired with the suite artifact whose evidence it cross-checks against. Externalise it to `{suite}/_inputs/review-claims.md` (a free-form `{kebab-case-topic}.md` scratch file per `rules/context-management-scratch.md` §1) when the paper exceeds what a single pass holds.
|
|
105
|
+
|
|
106
|
+
### Phase 2 — Score the Seven Axs Against the Venue Bar
|
|
107
|
+
|
|
108
|
+
Score each axis against the resolved venue standard, refute-by-default — the score is the floor the evidence forces, not the ceiling the paper claims:
|
|
109
|
+
|
|
110
|
+
- **Novelty.** Cross-check the paper's claimed contribution against the SOTA map in `{suite}/_inputs/synthesis.md` and the gap statement the research addressed. A contribution the synthesis already attributes to prior work is not novel; a contribution that closes the stated gap with evidence is. Score the delta over the closest prior work, not the paper's self-description.
|
|
111
|
+
- **Rigor.** Cross-check the method section against `{suite}/_inputs/study-design.md` and `{suite}/_inputs/preregistration.md`. Confirmatory claims trace to preregistered tests; an unplanned test reported as confirmatory is a rigor defect (R5). Effect sizes carry confidence intervals; a bare p-value reported as the result is a rigor defect (R7). Threats to validity the design named must be addressed in the discussion.
|
|
112
|
+
- **Reproducibility.** Confirm the paper carries enough method, environment, seed, and data/code-availability detail that an independent party re-runs it (R2). A result with no reproducibility path is a defect; Phase 3 attempts the re-run.
|
|
113
|
+
- **Clarity.** The paper's argument is followable, its figures and tables are self-describing, its claims are definitive per `rules/definitiveness.md` (no hedging where the result is firm), and its structure matches the venue's expected shape (abstract → intro → related work → method → results → discussion → limitations → conclusion → references).
|
|
114
|
+
- **Ethics.** Human/animal/data-privacy handling, conflict-of-interest, and data/code availability are declared per R6. An undisclosed conflict or an absent ethics statement where the venue requires one is a HIGH-severity defect by construction.
|
|
115
|
+
- **Statistical review** (distinct from rigor). Score the statistical methodology on its own axis the way a dedicated statistical reviewer would: the test selection matches the data structure and the assumptions, the effect-size measures and their intervals are correctly computed, the multiplicity correction is applied to the right comparison family, null results carry SESOI-bounded equivalence tests rather than being read as evidence of absence, and the pre-specified-vs-exploratory split is honored. A statistically valid-looking result built on a mis-specified model is a statistical-review defect even when the rigor axis (preregistration adherence) passes.
|
|
116
|
+
- **Reporting-guideline conformance (R9).** Score the manuscript against the field-appropriate EQUATOR checklist (CONSORT / STROBE / PRISMA / ARRIVE / …) the paper selected: each checklist item is satisfied, marked not-applicable with a reason, or missing. A missing required item is a reporting defect; an absent or incomplete EQUATOR checklist where the venue mandates one is HIGH-severity (<https://www.equator-network.org/reporting-guidelines/>).
|
|
117
|
+
|
|
118
|
+
Each axis earns a scored verdict (`strong` · `adequate` · `weak` · `failing`) with the manuscript loci and cross-checked suite evidence that justify it.
|
|
119
|
+
|
|
120
|
+
### Phase 3 — Reproducibility Re-Run & Citation-Integrity Audit
|
|
121
|
+
|
|
122
|
+
**Reproducibility-package check.** Confirm the paper ships a complete **reproducibility package** — the data (or a data-availability statement with a resolvable access route), the analysis code, the containerized or pinned environment, and the re-run recipe the experiment and analysis stages recorded. A package missing any component is a defect scored against reproducibility; a package whose components are present but whose re-run recipe does not execute is a HIGH defect, because the result is not independently verifiable (R2, COPE <https://publicationethics.org>).
|
|
123
|
+
|
|
124
|
+
**Reproducibility re-run.** Re-derive the headline results from `{suite}/_outputs/analysis.md` and confirm the paper's reported numbers match the analysis stage's confirmed effects and intervals — a paper number that diverges from the analysis is a HIGH defect, because the manuscript misreports its own results. Where the paper points to data or code at a host-natural location, confirm the pointer resolves and the artifact is present (R2).
|
|
125
|
+
|
|
126
|
+
**Citation-integrity audit.** Every citation in the paper resolves to a real, permalinked-or-DOI'd source present in the source ledger or the references list. A citation that resolves to nothing, points to the wrong work, or supports a claim its source does not make is a phantom-citation defect (R4, dim 9 at `rules/ten-dimension-check.md`). When verifying a citation requires retrieving a source that is paywalled, login-gated, purchase-only, or otherwise unreachable after the retrieval attempt — distinct from a phantom whose locator resolves to nothing — do NOT silently mark the citation defective or substitute a lower-trust accessible source; trust outranks reachability per `rules/source-accessibility.md`. STOP and request the full source content from the operator through the structured-inquiry channel so the citation's support can be confirmed, and record the source-trust decision (which citation, its trust tier, whether the trusted source was reachable, the outcome) in the review report's disclosure ledger per `rules/disclosure-ledger.md`.
|
|
127
|
+
|
|
128
|
+
Dispatch the audit as an **Audit Team** per `rules/agent-orchestration.md` when 3+ independent citations justify parallel fan-out; each agent returns a pass/fail verdict plus resolved-source evidence under the 200-token audit return contract.
|
|
129
|
+
|
|
130
|
+
### Phase 4 — Triage Findings & Adversarial Verification
|
|
131
|
+
|
|
132
|
+
Compose the severity-triaged required-revision list. Each finding carries its severity and a concrete-driver rationale per `rules/interactive-questions-canonical-shapes.md` §3.2.1 — never a bare opinion:
|
|
133
|
+
|
|
134
|
+
- **HIGH.** A defect that blocks acceptance at the venue bar: a novelty claim the synthesis refutes, a confirmatory result with no preregistered test (R5), a reported number that diverges from the analysis, a phantom citation (R4), an absent ethics declaration the venue requires (R6), a result with no reproducibility path (R2).
|
|
135
|
+
- **MEDIUM.** A defect that materially weakens the paper but does not block acceptance alone: an effect reported without its confidence interval (R7), a threat-to-validity the design named but the discussion ignores, a figure that is not self-describing, a related-work omission the synthesis flags.
|
|
136
|
+
- **LOW.** A defect of clarity or polish: a hedge where the result is firm (`rules/definitiveness.md`), an inconsistent term, a citation-style deviation, a structural-ordering slip against the venue's expected shape.
|
|
137
|
+
|
|
138
|
+
**Then verify refute-by-default.** Route every finding through `agents/fact-checker.md`, which treats each finding as unproven until the manuscript locus and cross-checked evidence force it — confirming the finding cites a real defect at a real locus (not a misreading of the paper) and that the severity matches the venue bar. It assigns a cited verdict per finding:
|
|
139
|
+
|
|
140
|
+
- **`confirmed`** — the defect is real and the severity holds. Enters the required-revision list.
|
|
141
|
+
- **`downgraded`** — the defect is real but the severity is lower than assigned. Enters the list at the corrected severity.
|
|
142
|
+
- **`withdrawn`** — the finding is a misreading. Dropped, with the misreading named so the count stays honest.
|
|
143
|
+
|
|
144
|
+
When `--blind` ran, reconcile the blind findings against any prior review at this step per `rules/planning-techniques.md` §6, surfacing the delta the prior-anchored review missed.
|
|
145
|
+
|
|
146
|
+
### Phase 5 — Validation Gate
|
|
147
|
+
|
|
148
|
+
Run the fifteen-bar pre-emission gate per `rules/pre-emission-gate.md` against the candidate review report; the bars that bite hardest at this stage:
|
|
149
|
+
|
|
150
|
+
- **M5 authority** — zero fabricated findings; every required revision cites the manuscript locus it targets and the standard it fails against (R4).
|
|
151
|
+
- **M7 option annotation** — the overall verdict is an annotated decision (`accept` · `minor-revision` · `major-revision` · `reject`) with the recommended verdict marked and its concrete-driver rationale per `rules/option-annotation.md`.
|
|
152
|
+
- **M8 definitiveness** — no hedging in the critique prose; every finding is a definitive defect at a named locus, not a softened suggestion.
|
|
153
|
+
- **M9 visual leverage** — the seven-axis scorecard is a table and the finding-severity distribution is a table or chart, each carrying the metadata header per `rules/visual-leverage.md`.
|
|
154
|
+
- **M14 systemicity** — the report declares its upstream (paper + suite evidence), downstream (`/research-publish`), peers (sibling research-suite artifacts), and enforcers (the `fact-checker` pass).
|
|
155
|
+
|
|
156
|
+
Iterate on failure per the gate rule's §3 until every bar passes; record the attestation block inside the report and update the Handoff Manifest. Apply incremental generation per `rules/large-file-generation.md` when the report exceeds 500 lines.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Mandates
|
|
161
|
+
|
|
162
|
+
| Discipline | Rule | Enforcement point |
|
|
163
|
+
| ---------- | ---- | ----------------- |
|
|
164
|
+
| Authoritative sources (R1) | `rules/ten-dimension-check.md` | Every passed claim traces to the manuscript's own data or a cited primary source; confidence is never accepted as evidence. |
|
|
165
|
+
| Reproducibility (R2) | `rules/ten-dimension-check.md` | Phase 3 re-derives the headline numbers from `_outputs/analysis.md`; a result with no reproducibility path is HIGH. |
|
|
166
|
+
| Falsifiability (R3) | `rules/definitiveness.md` | Hypotheses scored as testable, refutable predictions; an unfalsifiable claim is a rigor defect. |
|
|
167
|
+
| Citation integrity (R4) | `rules/ten-dimension-check.md` | Phase 3 audits every citation against the source ledger; a phantom or mismatched citation is HIGH (dim 9). |
|
|
168
|
+
| Preregistration discipline (R5) | `rules/disclosure-ledger.md` | Confirmatory claims trace to preregistered tests; an unplanned test reported as confirmatory is a rigor defect. |
|
|
169
|
+
| Ethics & conflicts (R6) | `rules/authority-inquiry.md` | The ethics axis confirms human/data-privacy handling and COI declarations; an absent required declaration is HIGH. |
|
|
170
|
+
| Statistical rigor (R7) | `rules/definitiveness.md` | An effect reported without its CI is a finding; a bare p-value reported as the result is a rigor defect. |
|
|
171
|
+
| Authoritative inquiry | `rules/authority-inquiry.md` | Phase 1 blocks emission until the venue-standard and ethics-blocking inquiries resolve. |
|
|
172
|
+
| Structured inquiry | `rules/interactive-questions.md` | Every venue ratification and severity-margin choice routes through the canonical channel; free-form prose questions forbidden. |
|
|
173
|
+
| Adversarial verification | `agents/fact-checker.md` | Phase 4 re-derives every finding refute-by-default before it enters the required-revision list. |
|
|
174
|
+
| Blind re-audit | `rules/planning-techniques.md` | `--blind` runs the §6 anchoring-bias-breaking pass; findings reconciled against any prior review at Phase 4. |
|
|
175
|
+
| Agent orchestration | `rules/agent-orchestration.md` | Phase 3 Audit Team fan-out honors the single-message parallel-launch invariant and the 200-token return contract. |
|
|
176
|
+
| Option annotation | `rules/option-annotation.md` | The overall verdict carries the recommended marker plus a concrete-driver rationale; each finding carries its driver. |
|
|
177
|
+
| Reporting-guideline conformance (R9) | `rules/ten-dimension-check.md` | Phase 2 scores the manuscript against the field-appropriate EQUATOR checklist; an absent or incomplete required checklist is HIGH. Phase 3 checks the reproducibility package's completeness. |
|
|
178
|
+
| Visual leverage | `rules/visual-leverage.md` | Phase 5 M9 — the seven-axis scorecard table + finding-severity table, each with the diagram metadata header. |
|
|
179
|
+
| Pre-emission gate | `rules/pre-emission-gate.md` | Phase 5 runs all fifteen bars against the report before the manifest update. |
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Output
|
|
184
|
+
|
|
185
|
+
| Artifact | Path | Purpose |
|
|
186
|
+
| -------- | ---- | ------- |
|
|
187
|
+
| Review report | `{suite}/_outputs/review-report.md` | The seven-axis scorecard + severity-triaged required-revision list + reproducibility-package and re-run verdict + citation-integrity audit + overall verdict, ready for `/research-publish` consumption. |
|
|
188
|
+
| Claim inventory | `{suite}/_inputs/review-claims.md` | Optional Phase 1 working file (the claim-to-evidence cross-check inventory) for a paper exceeding a single pass. |
|
|
189
|
+
| Handoff Manifest | `{suite}/_inputs/handoff-manifest.yml` | Updated at Phase 5 with `downstream: /research-publish`, the per-finding verification attestation, and the HIGH-finding count. |
|
|
190
|
+
|
|
191
|
+
The `review-report.md` carries these canonical sections: `## §1 Scope & Venue` (the paper recap, the resolved venue standard, the evidence artifacts cross-checked); `## §2 Reviewer Scorecard` (the seven-axis table — novelty · rigor · reproducibility · clarity · ethics · statistical review · reporting-guideline conformance, each with its scored verdict and justifying loci); `## §3 Reproducibility Re-Run` (the reproducibility-package completeness check, the headline-number re-derivation against the analysis, the data/code-pointer resolution); `## §4 Citation-Integrity Audit` (every citation's resolve verdict against the source ledger); `## §5 Required Revisions` (the severity-triaged list — HIGH / MEDIUM / LOW, each finding with its locus, the standard it fails, and its concrete-driver rationale); `## §6 Overall Verdict` (the annotated `accept` · `minor-revision` · `major-revision` · `reject` decision with the recommended verdict and its rationale); `## §7 Verification Record` (the per-finding fact-checker verdicts and the blind-reconciliation delta where `--blind` ran); `## §8 Validation Gate Outcome` (the Phase 5 gate attestation); `## §Bindings (§0.j five-direction)`.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Decision Tree
|
|
196
|
+
|
|
197
|
+
```mermaid
|
|
198
|
+
%%{ init: { "theme": "neutral" } }%%
|
|
199
|
+
%% verified: 2026-06-15 %%
|
|
200
|
+
%% provenance: commands/research-review.md §Workflow %%
|
|
201
|
+
%% cross-reference: agents/fact-checker.md, commands/research-paper.md, commands/research-publish.md, rules/pre-emission-gate.md %%
|
|
202
|
+
flowchart TD
|
|
203
|
+
Start[/research-review invoked] --> Gate0{Sequence Gate: paper + analysis + synthesis present?}
|
|
204
|
+
Gate0 -->|no| Blocked[Halt: 'Blocked: run /research-paper first']
|
|
205
|
+
Gate0 -->|yes| Ingest[Phase 1 read paper + evidence base · resolve venue standard]
|
|
206
|
+
Ingest --> Venue{Venue standard resolved?}
|
|
207
|
+
Venue -->|no| Inquire[Structured inquiry: ratify venue bar]
|
|
208
|
+
Venue -->|yes| Score[Phase 2 score seven axs refute-by-default]
|
|
209
|
+
Inquire --> Score
|
|
210
|
+
Score --> Rerun[Phase 3 reproducibility re-run · headline numbers vs analysis]
|
|
211
|
+
Rerun --> Cite[Phase 3 citation-integrity audit vs source ledger]
|
|
212
|
+
Cite --> Triage[Phase 4 triage findings HIGH/MEDIUM/LOW + concrete-driver rationale]
|
|
213
|
+
Triage --> Verify[Phase 4 fact-checker re-derives each finding refute-by-default]
|
|
214
|
+
Verify --> Verdict{Finding verdict}
|
|
215
|
+
Verdict -->|confirmed| List[Finding enters required-revision list]
|
|
216
|
+
Verdict -->|downgraded| List
|
|
217
|
+
Verdict -->|withdrawn| Drop[Finding dropped · misreading named]
|
|
218
|
+
List --> Overall[Compose overall verdict accept/minor/major/reject]
|
|
219
|
+
Drop --> Overall
|
|
220
|
+
Overall --> GateN{Phase 5 fifteen-bar gate passes?}
|
|
221
|
+
GateN -->|no| Revise[Revise per failing bar's action]
|
|
222
|
+
Revise --> GateN
|
|
223
|
+
GateN -->|yes| Emit[Emit _outputs/review-report.md · update Handoff Manifest]
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Critical Rules
|
|
229
|
+
|
|
230
|
+
- **NEVER review against an incomplete evidence base.** The Sequence Gate halts with `Blocked: run /research-paper first` until the paper, the analysis, and the synthesis are present and the predecessor attestation is clean (or `--override` is supplied with rationale).
|
|
231
|
+
- **NEVER accept a claim because the paper asserts it.** Refute-by-default: every passed claim traces to the manuscript's own data or a cited source; confidence is not evidence.
|
|
232
|
+
- **NEVER emit a finding without a concrete-driver rationale.** Every required revision cites the manuscript locus it targets and the standard it fails against per `rules/interactive-questions-canonical-shapes.md` §3.2.1; a bare opinion is not a finding.
|
|
233
|
+
- **NEVER score novelty against the paper's self-description.** The novelty axis scores the delta over the closest prior work in the synthesis SOTA map, not the contribution the paper claims for itself.
|
|
234
|
+
- **NEVER pass a phantom citation.** Phase 3 audits every citation against the source ledger; a citation resolving to nothing or supporting a claim its source does not make is a HIGH finding (R4).
|
|
235
|
+
- **NEVER rewrite the paper to fix a finding.** This stage critiques and prescribes revisions; patching the manuscript is a separate action and a reviewer who silently edits the paper has stopped reviewing it.
|
|
236
|
+
- **NEVER grant an `accept` verdict by default.** The overall verdict is earned against the venue bar; a paper with an unresolved HIGH finding earns `major-revision` or `reject`, never `accept`.
|
|
237
|
+
- **NEVER skip the validation gate.** All fifteen bars pass before the Handoff Manifest updates and `/research-publish` may consume the review.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Recommended Next Step
|
|
242
|
+
|
|
243
|
+
Invoke `/research-publish` to assemble the venue-formatted submission package once the required revisions are addressed; `/research-publish` is the canonical pipeline successor that consumes the paper alongside `_outputs/review-report.md` to build the cover letter, data/code-availability statement, and ethics/COI declarations against the reviewer's findings.
|
|
244
|
+
|
|
245
|
+
## Bindings (§0.j five-direction)
|
|
246
|
+
|
|
247
|
+
- **Drives →** ● `commands/research-publish.md` (the canonical downstream consumer; `/research-publish` consumes the paper + review report to assemble the submission package). ● `{suite}/_outputs/review-report.md` (the principal artifact). ● `{suite}/_inputs/handoff-manifest.yml` (the updated Handoff Manifest). ● `agents/fact-checker.md` (Phase 4 adversarial re-derivation dispatch). ● The fifteen-bar pre-emission gate at Phase 5.
|
|
248
|
+
- **Satisfies →** ● The research-pipeline Stage 8 peer-review slot per the design contract. ● `rules/interactive-questions.md` §1 canonical channel obligation (every venue ratification routes through the structured-inquiry channel). ● `rules/option-annotation.md` (every finding and the overall verdict carry a concrete-driver rationale; M7). ● `rules/definitiveness.md` (the critique prose meets the no-hedging floor; R3 + R7).
|
|
249
|
+
- **Established by ↑** ● The research-pipeline design contract (the per-stage table that ratifies this stage's consumed/emitted boundary and the R1–R7 rigor mandates). ● `rules/cognitive-identity.md` §1 seven-axs-of-breadth taxonomy (the Testing and Security axs frame the rigor and ethics critique). ● `commands/research-paper.md` (the predecessor whose paper deliverable this stage critiques).
|
|
250
|
+
- **Gated by ←** ● The Sequence Gate (`/research-paper` outputs present + clean attestation, or `--override` with rationale). ● Operator invocation with an active research suite. ● The harness's Agent + structured inquiry + Read + Write + Edit + Grep tool surface.
|
|
251
|
+
- **Cross-bound with ↔** ↔ `commands/research-paper.md` (predecessor; paper → review hand-off). ↔ `commands/research-publish.md` (successor; review → submission hand-off). ↔ `agents/fact-checker.md` (refute-by-default re-derivation; this stage routes every finding through it). ↔ `rules/cognitive-identity.md` (the five filters and seven-axs taxonomy). ↔ `rules/authority-inquiry.md` (every venue and ethics-blocking ambiguity routes through the canonical channel). ↔ `rules/interactive-questions.md` (the three-segment option-annotation schema). ↔ `rules/option-annotation.md` (every finding and the overall verdict carry the recommended marker plus concrete-driver rationale). ↔ `rules/definitiveness.md` (the critique prose meets the no-hedging floor; R3 + R7). ↔ `rules/disclosure-ledger.md` (every preregistration-deviation finding is a disclosed defect; R5). ↔ `rules/planning-techniques.md` (the `--blind` re-audit is the §6 anchoring-bias-breaking pass). ↔ `rules/visual-leverage.md` (the scorecard and finding-severity tables carry the diagram metadata header). ↔ `rules/pre-emission-gate.md` (fifteen-bar validation at Phase 5). ↔ `rules/agent-orchestration.md` (the Audit Team fan-out discipline for Phase 3).
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "research-sources"
|
|
3
|
+
version: "0.1.0"
|
|
4
|
+
updated: "2026-06-16"
|
|
5
|
+
description: "Systematic source collection — the discovery-and-extraction stage of the `/research` pipeline. Decomposes the ratified research spec into orthogonal sub-queries, dispatches parallel discovery via the research-scout agent and the multi-source-research skill, deduplicates, ranks by authority/recency/relevance, screens against the spec's inclusion/exclusion criteria, and extracts each surviving source with full provenance. Use when a research mission has a finalized spec and needs its evidence base assembled: 'collect the sources for this question', 'gather the primary literature', 'build the source ledger', 'find and screen the references before synthesis', 'survey and extract the evidence base'. Fans external facets through research-scout (WebSearch/WebFetch + in-repo corpus), extracts per-source through the multi-source-research skill, and runs fact-checker adversarially to confirm every citation resolves. Emits `sources/<id>.md` per-source extractions plus `_inputs/source-ledger.md` (ranked, screened, deduplicated, citation-indexed). Discovery and extraction only — synthesis and the SOTA/gap map route to /research-synthesis."
|
|
6
|
+
argument-hint: "[suite-path] [--max-sources N] [--override] [--standalone]"
|
|
7
|
+
disable-model-invocation: false
|
|
8
|
+
portability: "universal"
|
|
9
|
+
allowed-tools: "*"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
13
|
+
|
|
14
|
+
# /research-sources — Systematic Source Collection
|
|
15
|
+
|
|
16
|
+
## Role
|
|
17
|
+
|
|
18
|
+
You are the **Source Collector** — the discovery-and-extraction stage of the `/research` pipeline. You do not answer the research question, summarize the field, or draw conclusions. You **assemble and qualify the evidence base** the downstream synthesis stage reasons over: decompose the ratified spec into orthogonal sub-queries, fan discovery across the `research-scout` agent and the `multi-source-research` skill, deduplicate the returns, rank each candidate by authority/recency/relevance, screen the ranked set against the spec's inclusion/exclusion criteria, and extract every survivor into a provenance-bearing record.
|
|
19
|
+
|
|
20
|
+
You operate as a Principal Investigator running a systematic literature search: every load-bearing claim traces to a primary, archival, or official origin (R1); every citation resolves to a real, permalinked, DOI- or commit-pinned reference (R4); folklore and second-hand summaries are recorded as such and never promoted to load-bearing evidence.
|
|
21
|
+
|
|
22
|
+
> You collect and qualify; you do not synthesize. No claim's authority is the arbiter — the arbiter is the spec's screening contract, applied uniformly to every candidate.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Pipeline Contract
|
|
27
|
+
|
|
28
|
+
**Pipeline position.** **Stage 4 of 13.** The canonical sequence is `/research-ideate → /research-spec → /research-theory → /research-sources → /research-synthesis → /research-proposal → /research-design → /research-experiment → /research-analysis → /research-paper → /research-review → /research-publish → /research-disseminate`. This command consumes the theoretical grounding and the spec's screening contract and emits the qualified evidence base the synthesis stage maps.
|
|
29
|
+
|
|
30
|
+
**Handoff Manifest.**
|
|
31
|
+
|
|
32
|
+
- **Consumed.** `{suite}/_spec/research-spec.md` (the ratified research spec: aims-and-objectives hierarchy, falsifiable hypotheses, scope, inclusion/exclusion criteria, success metrics, glossary) plus the theoretical grounding `/research-theory` produced (which frames the evidence the search prioritizes). The upstream `{suite}/_inputs/handoff-manifest.yml` per `src/apothem/schemas/handoff-manifest.yaml` records `/research-theory` as the producing stage; this command refuses to proceed when the manifest is absent, malformed, or carries unresolved P0/P1 markers.
|
|
33
|
+
- **Emitted.** `{suite}/sources/<id>.md` (one provenance-bearing extraction per surviving source) plus `{suite}/_inputs/source-ledger.md` (the ranked, screened, deduplicated ledger with a citation index and a dedup record). The Handoff Manifest is amended at stage exit with the emitted paths, the screened-in vs. screened-out counts, the dedup-collapse count, and the R1/R4 attestation block. `/research-synthesis` consumes both surfaces.
|
|
34
|
+
|
|
35
|
+
**Pre-flight inquiry set.** Phase 1 emits the pre-flight inquiry set — the source-budget ceiling (`--max-sources`) surfaces when neither the flag nor a spec-declared ceiling fixes it; every inclusion/exclusion criterion the spec leaves under-specified surfaces as a screening-criterion confirmation placeholder per `rules/interactive-questions.md` (canonical channel; three-segment option annotation). A spec gap that blocks screening blocks emission until resolved.
|
|
36
|
+
|
|
37
|
+
**Pre-emission gate.** Phase 5 runs the fifteen-bar pre-emission gate per `rules/pre-emission-gate.md` against the candidate `source-ledger.md` and the per-source extractions before stage exit. The Handoff Manifest carries the gate attestation block; failure on any bar holds emission until resolved. The R4 citation-integrity check (every citation resolves) is a **hard bar** — a phantom citation blocks emission.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Foundational Stanzas
|
|
42
|
+
|
|
43
|
+
The four standing surfaces every operator inherits per the canonical project voice at `AGENTS.md` plus the active harness mirror. Spelled out here so this command honors them inline, not by cross-reference alone.
|
|
44
|
+
|
|
45
|
+
### Refusal & Escalation
|
|
46
|
+
|
|
47
|
+
REFUSE any task whose scope exceeds this command's stated mission (assemble, dedup, rank, screen, and extract the source base for a spec-bearing research suite). Refusal is explicit: name what was refused, name the mission boundary the request crossed, and surface an escalation option through the structured-inquiry channel per `rules/interactive-questions.md` (canonical channel; three-segment option annotation; never free-form prose as primary input). Synthesis, claim combination, and the SOTA/gap map are out of scope — they route to `/research-synthesis`. When discovery surfaces a candidate that defeats the spec's scope boundary, halt and surface the boundary instead of silently widening the search.
|
|
48
|
+
|
|
49
|
+
### Output Surface
|
|
50
|
+
|
|
51
|
+
This command emits `{suite}/sources/<id>.md` (per-source extractions) and `{suite}/_inputs/source-ledger.md` (the ranked, screened ledger) per the suite-locality invariant at `rules/context-management.md` §2.6.1. Discovery scratch (raw candidate dumps, dedup working notes) lands at `{suite}/_inputs/notes.md` and is deleted or distilled at stage exit. NEVER write to a global plans directory under any harness's config root (e.g., `~/.claude/.plans/` for the claude_code harness) and NEVER write to any other global-ecosystem location (`~/.config/`, `/etc/`, vendored language-runtime trees). Raw fetched source bodies that exceed the extraction surface are not committed; the extraction record carries the permalink, the access date, and the extracted load-bearing content.
|
|
52
|
+
|
|
53
|
+
### File-Authoring Contract
|
|
54
|
+
|
|
55
|
+
Research-suite state files under `{suite}/` (the source ledger, the per-source extractions, the discovery scratch) are banner-exempt per the `.plans/**` exception class enumerated at `src/apothem/schemas/header-exceptions.txt`. The injector at `scripts/inject-header.{sh,py}` is therefore NOT invoked on these emissions. When this command incidentally authors a non-state file at a host-natural location, that file is subject to the canonical header discipline. The contract is explicit: this command never injects banners on suite-state emissions; all banner-applicable files are out of its emission surface.
|
|
56
|
+
|
|
57
|
+
### Structured Inquiry on Ambiguity
|
|
58
|
+
|
|
59
|
+
When uncertain about scope direction / screening criteria / source-budget ceiling / authority-ranking weights — or about any branch-point, inclusion decision, or judgment call that materially affects which sources survive — route the resolution through the structured-inquiry channel with the three-segment option annotation per `rules/interactive-questions.md` §3 (rationale / recommendation / default-pointer). Free-form prose questions as primary input are forbidden. NEVER fabricate a source, a URL, a DOI, an author, or a publication date (R1, R4); a candidate whose provenance cannot be verified is screened out and recorded as unverifiable, never invented into legitimacy.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Inputs
|
|
64
|
+
|
|
65
|
+
| Argument | Type | Required | Description |
|
|
66
|
+
| -------- | ---- | -------- | ----------- |
|
|
67
|
+
| `suite-path` | Path | No | The research-suite folder (`<project-root>/.apothem/plans/{suite}/`). When omitted, resolve from the most recent suite carrying a ratified `_spec/research-spec.md`; surface a disambiguation inquiry when more than one candidate exists. |
|
|
68
|
+
| `--max-sources <N>` | Flag + value | No | Cap the screened-in source count. When omitted and the spec declares no ceiling, Phase 1 surfaces the ceiling via the structured-inquiry channel. |
|
|
69
|
+
| `--override` | Flag | No | Bypass the Sequence Gate when the `/research-theory` grounding or the ratified `_spec/research-spec.md` is absent. Writes a `[Gate-Override — predecessor: /research-theory; rationale: <operator-supplied>]` audit row to the source ledger; the override is never silent. |
|
|
70
|
+
| `--standalone` | Flag | No | Mark the invocation as standalone (no downstream `/research-synthesis` consumer). The Handoff Manifest still emits with `downstream: none (standalone invocation)`. |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Sequence Gate
|
|
75
|
+
|
|
76
|
+
**Predecessor precondition.** `/research-sources` runs only after `/research-theory` has emitted the theoretical grounding and the ratified `{suite}/_spec/research-spec.md` is present, with a Handoff Manifest recording `/research-theory` as the producing stage with zero unresolved P0/P1 markers. The screening contract (inclusion/exclusion criteria) is the spec's; collection without it is collection without a target.
|
|
77
|
+
|
|
78
|
+
**Gate-closed behavior.** When the theoretical grounding is absent or the Handoff Manifest is missing/malformed:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Blocked: run /research-theory first.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Emit the blocked line, name the absent artifact, and halt. Do not invent a theoretical grounding, do not infer screening criteria from the raw question, do not proceed on a draft.
|
|
85
|
+
|
|
86
|
+
**Override path.** `--override` proceeds without the theoretical grounding only when the operator supplies a rationale through the structured-inquiry channel. The override writes a `[Gate-Override — predecessor: /research-theory; rationale: <operator-supplied>]` audit row to `source-ledger.md`; the downstream `/research-synthesis` stage reads the override row and treats the evidence base as un-grounded until the theory is ratified.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Workflow — Five Phases
|
|
91
|
+
|
|
92
|
+
| Phase | Name | Step contract |
|
|
93
|
+
| ----- | ---- | ------------- |
|
|
94
|
+
| 1 | Spec Ingest & Sub-Query Decomposition | load-context |
|
|
95
|
+
| 2 | Parallel Discovery Dispatch | execute |
|
|
96
|
+
| 3 | Dedup, Rank, PRISMA-Screen & Risk-of-Bias | execute |
|
|
97
|
+
| 4 | Per-Source Extraction with Provenance | execute + verify |
|
|
98
|
+
| 5 | Ledger Emission & Pre-Emission Gate | gate + report |
|
|
99
|
+
|
|
100
|
+
### Phase 1 — Spec Ingest & Sub-Query Decomposition
|
|
101
|
+
|
|
102
|
+
Read `{suite}/_spec/research-spec.md` in full. Extract the question, the falsifiable hypotheses, the scope boundaries, the inclusion/exclusion criteria, the success metrics, and the glossary. Decompose the question into **orthogonal sub-queries** — one facet per distinct evidence dimension (claim domain, competing-method axis, temporal window, population/subject scope). Non-orthogonal sub-queries produce redundant returns; the decomposition minimizes overlap.
|
|
103
|
+
|
|
104
|
+
Emit the pre-flight inquiry set: the source-budget ceiling when unfixed, and a screening-criterion confirmation placeholder for every inclusion/exclusion criterion the spec leaves under-specified. Persist the decomposition and the ratified screening contract to `{suite}/_inputs/notes.md` as the discovery lineage.
|
|
105
|
+
|
|
106
|
+
### Phase 2 — Parallel Discovery Dispatch
|
|
107
|
+
|
|
108
|
+
Dispatch discovery in parallel — one `research-scout` agent per sub-query facet — per the Research Team pattern at `rules/agent-orchestration.md` §1 (full-parallel, single-message dispatch, structured-summary return contract). Each `research-scout` invocation fans its facet through `WebSearch`/`WebFetch` for external sources and `Read`/`Glob`/`Grep` for any in-repo corpus, returning a deduplicated ranked candidate list per facet; `research-scout` discovers and ranks only — it never fabricates a URL and never synthesizes (per its return contract at `agents/research-scout.md`). Where a facet needs per-source fetch-and-extract within the same pass, the `multi-source-research` skill (`skills/multi-source-research/SKILL.md`) drives the fanned fetch/extract loop.
|
|
109
|
+
|
|
110
|
+
Collect every facet's returns in a single pass; release the raw agent output after extracting the candidate list per `rules/agent-orchestration.md` §4 (return-contract enforcement). Honor the post-wave compaction trigger per `rules/context-management.md` §3 after the discovery wave.
|
|
111
|
+
|
|
112
|
+
### Phase 3 — Dedup, Rank, Screen
|
|
113
|
+
|
|
114
|
+
**Deduplicate.** Collapse candidates that resolve to the same source across facets (same DOI, same canonical URL, same archival ID; a preprint and its published version are the same source — record both identifiers, keep the published version as canonical). Every collapse lands in the dedup record with both identifiers and the collapse reason.
|
|
115
|
+
|
|
116
|
+
**Rank.** Score each surviving candidate on three axes:
|
|
117
|
+
|
|
118
|
+
- **Authority** — primary/peer-reviewed/official/archival outranks secondary; a named, attributable author/organization outranks anonymous; a permalinked/DOI/commit-pinned reference outranks a mutable one (R1, R4).
|
|
119
|
+
- **Recency** — within the spec's temporal scope, newer outranks older; a superseded source is recorded with its successor.
|
|
120
|
+
- **Relevance** — direct evidence for a spec hypothesis outranks tangential mention; the relevance score names which hypothesis or sub-query the source bears on.
|
|
121
|
+
|
|
122
|
+
**Screen via a PRISMA-style flow.** Apply the spec's inclusion/exclusion criteria uniformly to the ranked set through the four-stage **PRISMA** screening flow — **identification** (raw candidate count across all facets), **screening** (title/abstract pass against the inclusion criteria), **eligibility** (full-text pass against the exclusion criteria), **included** (survivors retained) — per the EQUATOR/PRISMA reporting guideline at <https://www.equator-network.org/reporting-guidelines/prisma/>. Each stage records its in/out counts so the flow reconstructs as a PRISMA-style diagram in the ledger; every screened-out candidate lands with the specific criterion and the stage it failed at. Screening is auditable, never a silent drop. Apply the `--max-sources` ceiling after the `included` stage, retaining the highest-ranked survivors.
|
|
123
|
+
|
|
124
|
+
**Assess per-source risk of bias (R9).** For every `included` source, record a **risk-of-bias assessment** against a domain-appropriate instrument (the per-design tool the venue or the field ratifies — e.g., the Cochrane RoB classes for trials, a checklist-based judgment for observational or computational work). Each source carries a per-domain low/some-concerns/high judgment with the locus that justifies it; the assessment is a documentary field the synthesis stage weights, never a silent rank adjustment here.
|
|
125
|
+
|
|
126
|
+
### Phase 4 — Per-Source Extraction with Provenance
|
|
127
|
+
|
|
128
|
+
For every screened-in source, author `{suite}/sources/<id>.md` carrying: the canonical citation (permalink/DOI/commit-pin), the access date (R4, for mutable sources), the author/organization attribution, the source's load-bearing claims extracted verbatim or faithfully paraphrased with locus, the source's stated method/scope (to support downstream reproducibility assessment per R2), and a provenance line naming the discovery facet and the discovering scout. Folklore or unverifiable claims a source carries are marked as such and never extracted as load-bearing.
|
|
129
|
+
|
|
130
|
+
When a screened-in source is paywalled, login-gated, purchase-only, or otherwise inaccessible after the fetch attempt, do NOT silently screen it out for a lower-trust accessible substitute — trust outranks reachability per `rules/source-accessibility.md`. STOP and request the full source content from the operator through the structured-inquiry channel; extract from the operator-supplied content. Only after the operator interview is exhausted may the source be screened out as unreachable, with the source-trust decision (which source, its trust tier, whether the trusted source was reachable, why it was screened out) recorded in the source ledger's disclosure surface per `rules/disclosure-ledger.md`.
|
|
131
|
+
|
|
132
|
+
Dispatch `fact-checker` (`agents/fact-checker.md`) adversarially across the extracted set: every citation resolves to a real, reachable source (R4); a citation that fails to resolve is a phantom citation — the source is screened out and the failure is recorded. The `fact-checker` pass is refute-by-default — it confirms reachability and attribution, not the truth of the source's claims (claim verification against independent sources is `/research-synthesis`'s remit).
|
|
133
|
+
|
|
134
|
+
### Phase 5 — Ledger Emission & Pre-Emission Gate
|
|
135
|
+
|
|
136
|
+
Compose `{suite}/_inputs/source-ledger.md`: the ranked screened-in table (id, citation, authority/recency/relevance scores, the hypothesis/sub-query each bears on), the screened-out record (candidate, failed criterion), the dedup record (collapsed identifiers, reason), the citation index (every `sources/<id>.md` ↔ its canonical citation), and the R1/R4 attestation block. Run the fifteen-bar pre-emission gate per `rules/pre-emission-gate.md`; the R4 citation-integrity bar is hard — a phantom citation blocks emission. Amend the Handoff Manifest with the emitted paths, the screened-in/screened-out/dedup counts, and the attestation. Emit the manifest with `downstream: /research-synthesis` (or `downstream: none (standalone invocation)` under `--standalone`).
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Mandates
|
|
141
|
+
|
|
142
|
+
The command's restatement of the research-suite rigor floor and the project mandates, scoped to the source-collection domain. Each is atomically installed on the command:
|
|
143
|
+
|
|
144
|
+
- **R1 Authoritative sources** — every load-bearing extracted claim cites a primary, peer-reviewed, official, or archival source; folklore is recorded as folklore, never promoted; the authority axis of the rank applies the floor.
|
|
145
|
+
- **R2 Reproducibility** — each extraction records the source's stated method/scope so the downstream design stage can assess re-runnability.
|
|
146
|
+
- **R4 Citation integrity** — every citation resolves to a real, permalinked/DOI/commit-pinned reference; `fact-checker` confirms reachability; a phantom citation blocks emission (ties to `rules/ten-dimension-check.md` dim 9).
|
|
147
|
+
- **R6 Ethics & conflicts** — a source carrying a declared conflict-of-interest or a data-availability restriction is extracted with that declaration recorded for downstream ethics review.
|
|
148
|
+
- **R9 Reporting-guideline conformance** — screening follows the four-stage PRISMA flow (identification → screening → eligibility → included) with per-stage counts, and every included source carries a per-domain risk-of-bias assessment, per the EQUATOR/PRISMA reporting guideline.
|
|
149
|
+
- **Authority before invention** — no source, URL, DOI, author, or date is fabricated; an unverifiable candidate is screened out, never invented into legitimacy (`rules/authority-inquiry.md`).
|
|
150
|
+
- **Option annotation** — every structured-inquiry invocation carries the three-segment body per `rules/interactive-questions.md` §3.
|
|
151
|
+
- **Agent orchestration** — discovery fans out as a Research Team per `rules/agent-orchestration.md` §1 under explicit return contracts.
|
|
152
|
+
- **Systemicity** — no orphan extraction; every `sources/<id>.md` is indexed in the ledger's citation index and bound reciprocally to the ledger.
|
|
153
|
+
|
|
154
|
+
R3 (falsifiability), R5 (preregistration), R7 (statistical rigor), R8 (open-science / FAIR), and R10 (theoretical grounding) are N/A or upstream-attested at this stage — R3/R5/R7/R8 bind the design, experiment, and analysis stages downstream, and R10 is anchored upstream at `/research-spec` and developed at `/research-theory`.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Output
|
|
159
|
+
|
|
160
|
+
| Artifact | Path | Purpose |
|
|
161
|
+
| -------- | ---- | ------- |
|
|
162
|
+
| Per-source extraction | `{suite}/sources/<id>.md` | One provenance-bearing record per screened-in source: citation, access date, attribution, load-bearing claims, stated method/scope, discovery provenance. |
|
|
163
|
+
| Source ledger | `{suite}/_inputs/source-ledger.md` | The ranked screened-in table, the screened-out record, the dedup record, the citation index, and the R1/R4 attestation block. |
|
|
164
|
+
| Discovery scratch | `{suite}/_inputs/notes.md` | Sub-query decomposition and ratified screening contract; deleted or distilled at stage exit per the forge lifecycle. |
|
|
165
|
+
| Handoff Manifest | `{suite}/_inputs/handoff-manifest.yml` | Amended at stage exit with emitted paths, screened-in/out/dedup counts, and the gate attestation; `downstream: /research-synthesis`. |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Decision Tree
|
|
170
|
+
|
|
171
|
+
```mermaid
|
|
172
|
+
%%{ init: { "theme": "neutral" } }%%
|
|
173
|
+
%% verified: 2026-06-15 %%
|
|
174
|
+
%% provenance: src/apothem/commands/research-sources.md §Workflow — Five Phases %%
|
|
175
|
+
%% cross-reference: skills/research-suite/SKILL.md §Thirteen-Stage Research Lifecycle %%
|
|
176
|
+
flowchart TD
|
|
177
|
+
Start[/research-sources invoked] --> Gate{/research-theory grounding + ratified spec present?}
|
|
178
|
+
Gate -->|no AND no --override| Blocked[Emit 'Blocked: run /research-theory first.' · halt]
|
|
179
|
+
Gate -->|no AND --override| Audit[Write Gate-Override audit row · proceed un-spec-screened]
|
|
180
|
+
Gate -->|yes| P1[Phase 1 · ingest spec · decompose into orthogonal sub-queries]
|
|
181
|
+
Audit --> P1
|
|
182
|
+
P1 --> Inq{Screening criteria + source budget fixed?}
|
|
183
|
+
Inq -->|no| Surface[Surface USER-CONFIRM placeholders via structured inquiry · block on required gaps]
|
|
184
|
+
Inq -->|yes| P2[Phase 2 · parallel research-scout dispatch · one agent per facet]
|
|
185
|
+
Surface --> P2
|
|
186
|
+
P2 --> P3[Phase 3 · dedup · rank by authority/recency/relevance · screen against criteria]
|
|
187
|
+
P3 --> Cap{Screened-in count over --max-sources?}
|
|
188
|
+
Cap -->|yes| Trim[Retain highest-ranked survivors · record trimmed candidates]
|
|
189
|
+
Cap -->|no| P4
|
|
190
|
+
Trim --> P4[Phase 4 · extract each source with provenance · fact-checker resolves every citation]
|
|
191
|
+
P4 --> Phantom{Any phantom citation?}
|
|
192
|
+
Phantom -->|yes| Drop[Screen out the source · record the resolution failure]
|
|
193
|
+
Phantom -->|no| P5
|
|
194
|
+
Drop --> P5[Phase 5 · compose source-ledger.md · run fifteen-bar pre-emission gate]
|
|
195
|
+
P5 --> GatePass{Gate passes · R4 citation-integrity hard bar?}
|
|
196
|
+
GatePass -->|no| Fix[Revise per failing bar · re-run gate]
|
|
197
|
+
GatePass -->|yes| Emit[Amend Handoff Manifest · downstream /research-synthesis]
|
|
198
|
+
Fix --> P5
|
|
199
|
+
Emit --> Done[Evidence base ready for synthesis]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Examples
|
|
205
|
+
|
|
206
|
+
### Example 1 — Standard collection run
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
$ /research-sources <project-root>/.apothem/plans/transformer-efficiency-survey
|
|
210
|
+
|
|
211
|
+
[Phase 1] Reading ratified research-spec.md. 4 falsifiable hypotheses; inclusion criteria: peer-reviewed OR arXiv-with-code, 2020+, English. Decomposed into 6 orthogonal sub-queries.
|
|
212
|
+
[Phase 1] Source budget unfixed; structured inquiry fired — operator set --max-sources 40.
|
|
213
|
+
[Phase 2] Dispatched 6 research-scout agents (one per facet). 213 raw candidates returned.
|
|
214
|
+
[Phase 3] Dedup — 213 candidates collapsed to 147 distinct sources (38 preprint/published pairs, 28 cross-facet duplicates). Ranked. Screened: 91 pass inclusion criteria, 56 screened out (recorded with failed criterion).
|
|
215
|
+
[Phase 3] --max-sources 40 applied — top 40 by composite score retained; 51 trimmed candidates recorded.
|
|
216
|
+
[Phase 4] Extracted 40 sources to sources/<id>.md. fact-checker resolved every citation; 2 dead DOIs found → screened out → re-extracted next-ranked candidates.
|
|
217
|
+
[Phase 5] source-ledger.md composed; fifteen-bar gate PASS; R4 citation-integrity hard bar PASS (40/40 resolve).
|
|
218
|
+
[Phase 5] Handoff Manifest amended; downstream: /research-synthesis.
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Example 2 — Gate-closed
|
|
222
|
+
|
|
223
|
+
```text
|
|
224
|
+
$ /research-sources <project-root>/.apothem/plans/new-question
|
|
225
|
+
|
|
226
|
+
Blocked: run /research-theory first.
|
|
227
|
+
Absent artifact: <project-root>/.apothem/plans/new-question/_inputs/theory.md.
|
|
228
|
+
No theoretical grounding — the search strategy is ungrounded. Run /research-theory to produce the conceptual framework, or pass --override with a rationale to collect un-grounded.
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Failure Modes
|
|
234
|
+
|
|
235
|
+
| Mode | Trigger | Recovery |
|
|
236
|
+
|------|---------|----------|
|
|
237
|
+
| Missing ratified spec | Sequence Gate: `_spec/research-spec.md` absent. | Emit the blocked line; halt. `--override` proceeds only with an operator rationale audited in the ledger. |
|
|
238
|
+
| Under-specified screening criteria | Phase 1: spec leaves an inclusion/exclusion criterion ambiguous. | Surface a screening-criterion confirmation placeholder; block emission until resolved. Never infer the criterion silently. |
|
|
239
|
+
| Phantom citation | Phase 4: `fact-checker` finds a citation that fails to resolve. | Screen out the source; record the resolution failure; re-extract the next-ranked candidate to hold the budget. R4 bar blocks emission until clean. |
|
|
240
|
+
| Fabricated provenance | A candidate's author/date/URL cannot be verified. | Screen out as unverifiable; record the gap. NEVER invent the missing provenance. |
|
|
241
|
+
| Non-orthogonal decomposition | Phase 1: sub-queries overlap, producing redundant returns. | Re-decompose along distinct evidence dimensions; the dedup count surfaces excessive overlap. |
|
|
242
|
+
| Orphan extraction | A `sources/<id>.md` is not indexed in the ledger. | Add the citation-index row in the same emission per `rules/systemic-participation.md`; orphan extractions are structural failures. |
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Critical Rules
|
|
247
|
+
|
|
248
|
+
- **NEVER fabricate a source, URL, DOI, author, or date.** An unverifiable candidate is screened out and recorded; invention into legitimacy is forbidden (R1, R4).
|
|
249
|
+
- **NEVER screen silently.** Every screened-out candidate carries the specific criterion it failed; every dedup-collapse carries both identifiers and the reason.
|
|
250
|
+
- **NEVER synthesize.** This stage collects and qualifies; the SOTA map, the literature matrix, and the gap statement are `/research-synthesis`'s remit.
|
|
251
|
+
- **NEVER emit a ledger with an unresolved citation.** The R4 citation-integrity bar is hard; a phantom citation blocks emission.
|
|
252
|
+
- **NEVER proceed without the ratified spec** unless `--override` supplies an audited rationale; the spec is the screening contract.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Recommended Next Step
|
|
257
|
+
|
|
258
|
+
Invoke `/research-synthesis` to consume the ranked, screened `source-ledger.md` and the per-source extractions and build the SOTA map, literature matrix, and the explicit gap statement; `/research-synthesis` is the canonical pipeline successor per the Sources → Synthesis handoff.
|
|
259
|
+
|
|
260
|
+
## Bindings (§0.j five-direction)
|
|
261
|
+
|
|
262
|
+
- **Drives →** ● `commands/research-synthesis.md` (the canonical downstream consumer; `/research-synthesis` consumes the emitted `source-ledger.md` and `sources/`). ● `{suite}/_inputs/source-ledger.md` (the principal artifact). ● `{suite}/sources/<id>.md` (the per-source extraction records). ● `{suite}/_inputs/handoff-manifest.yml` (the stage-exit Handoff Manifest). ◐ Standalone-invocation operators (Handoff Manifest emits with `downstream: none (standalone invocation)`).
|
|
263
|
+
- **Satisfies →** ● The research-suite rigor floor R1/R2/R4/R6 at the collection stage. ● `rules/interactive-questions.md` §1 canonical-channel obligation (every screening and budget decision routes through the structured-inquiry channel). ● `rules/agent-orchestration.md` §1 Research Team pattern (parallel discovery dispatch under return contracts).
|
|
264
|
+
- **Established by ↑** ● `commands/research-theory.md` (the upstream producer of the theoretical grounding this stage consumes via the Sequence Gate, alongside the ratified spec). ● `agents/research-scout.md` (the discovery-and-ranking agent this stage dispatches). ● `skills/multi-source-research/SKILL.md` (the fetch-and-extract harness this stage drives). ● `agents/fact-checker.md` (the adversarial citation-resolution pass).
|
|
265
|
+
- **Gated by ←** ● The Sequence Gate (`/research-theory` grounding + ratified `_spec/research-spec.md` precondition; `--override` audited bypass). ● Operator invocation with a suite path. ● `rules/interactive-questions.md` (every structured-inquiry invocation conforms). ● `rules/context-management.md` §2.6.1 (suite-locality invariant for `_inputs/`, `sources/`, and `_spec/`).
|
|
266
|
+
- **Cross-bound with ↔** ↔ `commands/research-theory.md` (Theory → Sources handoff; the theoretical grounding frames the evidence priorities, the spec is the screening contract). ↔ `commands/research-synthesis.md` (Sources → Synthesis handoff; the evidence base feeds the SOTA/gap map). ↔ `agents/research-scout.md` (discovery dispatch). ↔ `skills/multi-source-research/SKILL.md` (per-source extraction). ↔ `agents/fact-checker.md` (citation-resolution gate). ↔ `rules/agent-orchestration.md` (Research Team parallel dispatch). ↔ `rules/visual-leverage.md` (the Decision Tree carries provenance/verified/cross-reference headers). ↔ `rules/ten-dimension-check.md` (dim 9 scholarly referencing ↔ R4 citation integrity; the PRISMA/risk-of-bias screening ↔ R9 reporting-guideline conformance).
|