@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,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "production-ready-prs"
|
|
3
|
+
description: "Every change the agent makes in a host project is delivered in production-ready form — tests + docs + CHANGELOG entry + conformant commit message + CI green in the same change-set. The seven visibility surfaces (what-is-this / how-to-install / is-it-alive / is-it-safe / how-to-contribute / can-I-trust / what-changed) are honored; gaps surface as findings rather than silently entrenched."
|
|
4
|
+
pathFilter: ""
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: Production-Ready Discipline on Host-Project Artifacts
|
|
11
|
+
|
|
12
|
+
## What this rule enforces
|
|
13
|
+
|
|
14
|
+
This rule binds **M15 — Production-Ready Discipline on Host-Project Artifacts**. Every change the agent makes in a host project **MUST** ship in **production-ready form** in one change-set: tests, docs, CHANGELOG entry, conformant commit message, CI green, supply-chain posture preserved, release-engineering invariants preserved. Where the host is not yet production-ready (missing LICENSE / CONTRIBUTING / CHANGELOG / CI / tests / examples), the agent **MUST NOT** silently entrench the gap — it surfaces the gap as an inquiry per §5 and proceeds under the user's choice.
|
|
15
|
+
|
|
16
|
+
## Pre-conditions
|
|
17
|
+
|
|
18
|
+
Applies to software-project work (a versioned project with a build / package / release surface) whenever a change affects a user-facing surface (public API, CLI, configuration, documentation, behavior, build / package / release); a non-software session — plain chat, cowork, research, or writing with no code, build, or release artifact — is outside its scope. Trivial-scope edits per the trivial-vs-non-trivial threshold are exempt from the full discipline; the commit-message-conformity and CI-green sub-clauses still bind.
|
|
19
|
+
|
|
20
|
+
## Required behavior
|
|
21
|
+
|
|
22
|
+
### 1. The Same-Change-Set Discipline
|
|
23
|
+
|
|
24
|
+
A code change **MUST** ship **all** of the following in **one** change-set:
|
|
25
|
+
|
|
26
|
+
| Element | Ships when |
|
|
27
|
+
|---|---|
|
|
28
|
+
| **Tests** | Code touched or new public surface introduced |
|
|
29
|
+
| **Documentation** | Any user-facing surface touched |
|
|
30
|
+
| **CHANGELOG entry** | User-facing change, per host format (Keep-a-Changelog `[Unreleased]` baseline) |
|
|
31
|
+
| **Conformant commit message** | Every commit, per the host's ratified convention |
|
|
32
|
+
| **CI green** | Change-set passes the host's full CI gate |
|
|
33
|
+
| **CODEOWNERS reviewers** | Host has CODEOWNERS and the change touches owned paths |
|
|
34
|
+
| **License header** | Host policy requires headers on new source files |
|
|
35
|
+
| **Migration guide** | The change is breaking |
|
|
36
|
+
| **Deprecation notice** | The change deprecates surface |
|
|
37
|
+
| **Example** | A new feature is introduced — runnable and CI-tested |
|
|
38
|
+
|
|
39
|
+
Deferred follow-ups ("I'll add tests / docs / CHANGELOG later") are forbidden: they never land, and production-readiness is violated at the merge boundary.
|
|
40
|
+
|
|
41
|
+
### 2. The Seven Visibility Surfaces (Companion Sub-Rule Anchor)
|
|
42
|
+
|
|
43
|
+
The seven visibility surfaces — what-is-this, how-to-install, is-it-alive, is-it-safe, how-to-contribute, can-I-trust, what-changed-and-when — are kept current on every change; gaps route to §5. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §1.
|
|
44
|
+
|
|
45
|
+
### 3. Supply-Chain Posture Preservation (Companion Sub-Rule Anchor)
|
|
46
|
+
|
|
47
|
+
Every change preserves supply-chain posture: no unpinned dependency, no secret literal, no permission escalation, no unpinned GitHub Actions, no unsigned release artifact where signing is ratified. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §2.
|
|
48
|
+
|
|
49
|
+
### 4. Release-Engineering Invariants (Companion Sub-Rule Anchor)
|
|
50
|
+
|
|
51
|
+
Versioning honored, tag-to-version consistency, tag signing where ratified. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §3.
|
|
52
|
+
|
|
53
|
+
### 5. Gap-Surfacing Discipline
|
|
54
|
+
|
|
55
|
+
When the host is missing a production-ready surface (LICENSE, CONTRIBUTING, CHANGELOG, CI, tests, examples), the agent **MUST NOT** silently install it — it surfaces the gap as an inquiry per `rules/authority-inquiry.md` with options annotated per `rules/option-annotation.md`. Silent installation of long-lived ratifications is forbidden per the required-category inquiries at `rules/authority-inquiry.md` §10.
|
|
56
|
+
|
|
57
|
+
### 6. Commit-Message Discipline (Companion Sub-Rule Anchor)
|
|
58
|
+
|
|
59
|
+
Every commit message honors the host's ratified convention discovered per `rules/host-discovery.md`, and the **human-only authorship** invariant binds every git surface — the agent never attributes itself or the underlying model / harness / vendor to any commit, trailer, branch, tag, or PR field. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §4.
|
|
60
|
+
|
|
61
|
+
### 7. CI-Green Discipline (Companion Sub-Rule Anchor)
|
|
62
|
+
|
|
63
|
+
The change-set is CI-green before the change is considered complete: lint / format / type-check / test pass, coverage holds, security scans clean, build succeeds, docs build clean. CI failures are diagnosed and fixed in the same change-set, never deferred or marked flaky without root-cause. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §5.
|
|
64
|
+
|
|
65
|
+
### 8. Modern Project Surface (Companion Sub-Rule Anchor)
|
|
66
|
+
|
|
67
|
+
Every host project — and apothem itself, by self-application — ships a modern project surface: paired multi-OS install scripts (`scripts/installer/install.sh` + `install.ps1`), an update / auto-update path (read-only by default), paired uninstall scripts (timestamped-backup default, unsafe-target refusal), a logo asset at `assets/logo.svg`, a modern centered README header, and an `## Install` section with one-shot / manual / verify sub-paths. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §6 for the full §6.1–§6.7 specification.
|
|
68
|
+
|
|
69
|
+
## Disclosure surface
|
|
70
|
+
|
|
71
|
+
Outcomes are recorded in the disclosure ledger per `rules/disclosure-ledger.md` using the canonical `[Production-Ready — …]` / `[Visibility-Gap — …]` / `[Supply-Chain — …]` / `[Release-Engineering — …]` / `[Modern-Surface — …]` marker shapes. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §1–§6.
|
|
72
|
+
|
|
73
|
+
## Failure tells
|
|
74
|
+
|
|
75
|
+
Same-change-set violations: "I'll add tests in a follow-up"; a breaking change with no migration guide; an `[Unreleased]` CHANGELOG lagging the codebase; a CI failure marked flaky without diagnosis; lint findings persisting into the merge. The visibility / supply-chain / release-engineering / modern-surface failure tells are enumerated alongside the moved sections. (Companion Sub-Rule Anchor) See `rules/production-ready-prs-surfaces.md` §1–§6.
|
|
76
|
+
|
|
77
|
+
## Bindings (§0.j five-direction)
|
|
78
|
+
|
|
79
|
+
- **Drives →** ● Every change the agent makes in a host project (the same-change-set discipline is the production-readiness floor). ● Every CHANGELOG entry, every commit message, every CI invocation across the host. ● The seven visibility surfaces' continuous maintenance across the host's lifecycle. ● The `production-ready-pr-grep` mechanical matcher at `conformity/production_ready_pr_grep.py` — operationalizes the §1 same-change-set discipline. ● The `secret-leak-grep` and `unpinned-action-grep` mechanical matchers at `conformity/` — operationalize the §3 supply-chain posture preservation.
|
|
80
|
+
- **Satisfies →** ● the fifteen-mandate registry row **M15 — Production-Ready**. ● the Pre-Emission Gate row 15 (M15 production-ready check).
|
|
81
|
+
- **Established by ↑** ● the fifteen-mandate registry (ratifies M15). ● the Pre-Emission Gate row 15. ● Keep-a-Changelog convention (the upstream changelog standard this rule projects). ● Conventional Commits specification (the upstream commit-message convention this rule honors per host-discovery).
|
|
82
|
+
- **Gated by ←** ● The trivial-vs-non-trivial threshold (trivial-scope edits run an abbreviated check covering commit-conformity and CI-green only). ● `CLAUDE.md` always-loaded preamble.
|
|
83
|
+
- **Cross-bound with ↔** ↔ `rules/production-ready-prs-surfaces.md` (path-filtered companion sub-rule carrying the §2 visibility surfaces, §3 supply-chain catalog, §4 release-engineering invariants, §6 commit-message discipline detail, §7 CI-green catalog, and §8 modern-project-surface specification). ↔ `rules/agile-sprints.md` (M11 — the DoD's `production-ready` criterion delegates here; the same-change-set discipline IS the DoD's production-ready clause materialized). ↔ `rules/disclosure-ledger.md` (M2 — production-ready outcomes recorded in the ledger). ↔ `rules/authority-inquiry.md` (M5 — visibility-gap inquiries route through the canonical channel; long-lived ratifications like LICENSE / CHANGELOG-format / CI-platform never silently installed). ↔ `rules/option-annotation.md` (M7 — every visibility-gap inquiry's option set carries the Recommended marker plus concrete-driver rationale). ↔ `rules/code-craft-python.md` + `rules/code-craft-shell.md` + `rules/code-craft-markdown.md` (M13 — code-craft sub-elements feed into the same-change-set tests / docs requirements). ↔ `rules/systemic-participation.md` (M14 — new components introduced via change-sets honor both the four-relations declaration and the production-ready discipline). ↔ `rules/host-discovery.md` (M1 — commit-message convention, action-pinning policy, release-signing requirement all discovered). ↔ `rules/sota-elevation.md` (production-ready is the floor; SOTA lifts the ceiling). ↔ `rules/i18n-discipline.md` (M15 — ≥80% review completion gate). ↔ `rules/freshness-facade.md` (M15 — the current-version-only release facade this rule's release-engineering discipline upholds). ↔ `rules/living-docs.md` (M15 — the production-ready same-change-set discipline this documentation analogue projects onto the docs surface).
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "propagation"
|
|
3
|
+
description: "Every mutation of any artifact propagates, in the SAME change-set, to every dependent reference across the whole repository's reference graph — code, tests, docs, root files, `.github`, CHANGELOG, harness-rendered templates, the harness registry, plugin manifests, and cross-rule bindings. A mutation (add / edit / remove / rename / move / split / merge / deprecate) that lands without its reference updates is an orphan / half-edge finding. Unifies the docs-tier (living-docs) and component-tier (systemic-participation) propagation disciplines to the full reference graph; the existing drift gates are its mechanical arm."
|
|
4
|
+
pathFilter: "**/*.py, **/*.md, **/*.mdx, **/*.json, **/*.yaml, **/*.yml, **/*.toml, **/*.sh, **/*.ps1, **/*.ts, **/*.js, **/*.mjs, **/*.css, **/*.mdc, **/*.txt"
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: Propagation — Same-Change-Set Sync to the Full Reference Graph
|
|
11
|
+
|
|
12
|
+
## What this rule enforces
|
|
13
|
+
|
|
14
|
+
Every mutation of any artifact MUST propagate, **in the same change-set**, to **every reference** across the repository's reference graph. A mutation is not done when the artifact changes — it is done when every dependent surface that references it is updated alongside it. This rule is the unifying generalization of the two existing propagation disciplines — `rules/living-docs.md` (docs tier) and `rules/systemic-participation.md` (component tier) — extended to the **full** reference graph, with the existing drift gates as its mechanical arm.
|
|
15
|
+
|
|
16
|
+
## Pre-conditions
|
|
17
|
+
|
|
18
|
+
Applies whenever an artifact other surfaces reference is mutated. Trivial-scope single-line edits with no downstream reference are exempt; the obligation applies the moment a mutation changes a name, path, signature, count, public surface, or any value another surface depends on.
|
|
19
|
+
|
|
20
|
+
## Required behavior
|
|
21
|
+
|
|
22
|
+
### 1. Every mutation class triggers propagation
|
|
23
|
+
|
|
24
|
+
The triggering mutation classes are the closed set **{add, create, edit, modify, remove, delete, rename, move, split, merge, deprecate}**. Each, applied to a referenced artifact, triggers the same-change-set propagation obligation: a rename propagates to every citation of the old name; a removal propagates to (and removes) every reference to the removed artifact; an addition propagates to every index / registry / catalog that should list it.
|
|
25
|
+
|
|
26
|
+
### 2. The full reference graph
|
|
27
|
+
|
|
28
|
+
Every mutation propagates to the union below. The **component tier** (Code, Tests, Examples, READMEs, `.github`) is owned by `rules/systemic-participation.md` and the **docs tier** (documentation + source-generated reference pages) by `rules/living-docs.md` — this rule cites those owners for their per-surface obligations rather than restating them, and adds the surfaces neither sibling covers (AI-memory canon, CHANGELOG, harness-rendered templates / registry / plugin manifests, website catalog, cross-rule bindings):
|
|
29
|
+
|
|
30
|
+
- **Code** — dependent imports, call-sites, type references.
|
|
31
|
+
- **Tests** — tests exercising or snapshotting the mutated surface (incl. behavior-diff golden fixtures).
|
|
32
|
+
- **Docs** — documentation pages; source-generated reference pages regenerated per `rules/living-docs.md`.
|
|
33
|
+
- **Examples · READMEs · root files** — example scaffolds, per-folder READMEs, root-level singletons.
|
|
34
|
+
- **`.github`** — workflows, issue / PR templates that reference the surface.
|
|
35
|
+
- **AI-memory surfaces** — `CLAUDE.md` / `AGENTS.md` / `.github/copilot-instructions.md` canon + memory indexes.
|
|
36
|
+
- **CHANGELOG** — a user-facing change records an entry.
|
|
37
|
+
- **Harness-rendered templates · harness registry · plugin manifests** — the per-harness templates, `harness_registry.py`, and `.claude-plugin/plugin.json` (regenerated from its generator when commands / agents change).
|
|
38
|
+
- **Website catalog** — the docs-site catalog entry for the surface.
|
|
39
|
+
- **Cross-rule bindings** — reciprocal `## Bindings` back-pointers per `rules/bidirectional-binding.md`.
|
|
40
|
+
|
|
41
|
+
### 3. Mechanically attestable — the drift-gate arm
|
|
42
|
+
|
|
43
|
+
A mutation landing without its reference updates is an orphan / half-edge finding. The mechanical arm is the existing gate set; this rule binds, not duplicates, them:
|
|
44
|
+
|
|
45
|
+
- `conformity/orphan_output_grep.py` — orphan outputs (no consumer / no index / no provenance).
|
|
46
|
+
- `conformity/binding_reciprocity_grep.py` — half-edge cross-rule bindings.
|
|
47
|
+
- `.github/workflows/docs-drift.yml` + source-generated reference-page regeneration (`site/scripts/update-reference-inventory.mjs`) — docs drift.
|
|
48
|
+
- The plugin-manifest generator consistency test (`build_plugin_manifest` vs. the committed manifest) — manifest drift.
|
|
49
|
+
- The behavior-diff regression wall — install-output drift.
|
|
50
|
+
|
|
51
|
+
A new propagation surface the existing gates do not cover surfaces as a gap per `rules/persistent-conventions-vigilance.md` §4 (a candidate new matcher) — never a silent omission.
|
|
52
|
+
|
|
53
|
+
## Failure tells
|
|
54
|
+
|
|
55
|
+
A renamed symbol whose old name still appears at a call-site. A new command added without regenerating `.claude-plugin/plugin.json`. A removed artifact whose docs page / catalog entry / registry row survives. A user-facing change with no CHANGELOG entry. A new public surface absent from the reference pages. A cross-rule citation with no reciprocal back-pointer. A mutated surface whose behavior-diff golden fixture was not regenerated.
|
|
56
|
+
|
|
57
|
+
## Bindings (§0.j five-direction)
|
|
58
|
+
|
|
59
|
+
- **Drives →** Every mutation's same-change-set reference-graph update across the repo. The regeneration of generated artifacts (plugin manifest, reference pages, behavior-diff fixtures) when their source mutates. The CHANGELOG entry on every user-facing change.
|
|
60
|
+
- **Driven by ←** The WS-C propagation/sync mandate; the operator directive that every amendment propagate to every reference across the whole repo/project.
|
|
61
|
+
- **Satisfies →** The MAXIMAL reference-graph integrity end-state (no orphan, no half-edge, no stale reference); the CM-8 keystone (once propagation is mechanically attestable, every workstream's same-change-set obligation is enforced rather than manual).
|
|
62
|
+
- **Established by ↑** `rules/living-docs.md` (the docs-tier propagation this rule generalizes); `rules/systemic-participation.md` (the component-tier propagation this rule generalizes); `rules/bidirectional-binding.md` (the reciprocity surface).
|
|
63
|
+
- **Cross-bound with ↔** `rules/living-docs.md` (docs tier) · `rules/systemic-participation.md` (component tier) · `rules/bidirectional-binding.md` (binding reciprocity) · `rules/canonical-layout.md` (orphan prevention) · `rules/dynamism.md` (version/badge propagation) · `conformity/orphan_output_grep.py` + `conformity/binding_reciprocity_grep.py` + `.github/workflows/docs-drift.yml` (the mechanical drift-gate arm).
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "recommend-next-step"
|
|
3
|
+
description: "Every command, skill, and phase artifact closes with a Recommended Next Step block — canonical heading, named action, optional rationale — so terminal output never leaves the operator without a definitive forward move. Hedged or absent next-step blocks are structural failures; the mechanical matcher operationalises the check at the pre-emission gate."
|
|
4
|
+
pathFilter: "**/commands/**/*.md, **/skills/**/SKILL.md, **/phases/**/PHASE.md"
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: Recommended Next Step — Definitive Forward Move on Every Terminal Surface
|
|
11
|
+
|
|
12
|
+
## What this rule enforces
|
|
13
|
+
|
|
14
|
+
Every command file, skill entry-point, and phase artifact MUST close its terminal section with a **Recommended Next Step** block naming a definitive forward move the operator can take next — not a hedged suggestion, not a list of possibilities without a recommendation, not a silent end-of-document. Terminal sections that omit the block or carry it in a non-conformant shape are structural failures.
|
|
15
|
+
|
|
16
|
+
## Pre-conditions
|
|
17
|
+
|
|
18
|
+
Applies to every artifact under the path-filter — `commands/**/*.md`, `skills/**/SKILL.md`, `phases/**/PHASE.md`. The block lives at the artifact's **tail** (the final section before any closing `## Bindings`, appendix, or metadata footer). Trivial-scope edits that do not modify the terminal section are exempt from re-authoring the block but inherit the existing block's conformance.
|
|
19
|
+
|
|
20
|
+
## Required behaviour
|
|
21
|
+
|
|
22
|
+
### 1. Canonical Heading
|
|
23
|
+
|
|
24
|
+
The block opens with one of two ratified headings:
|
|
25
|
+
|
|
26
|
+
- `## Recommended Next Step` — **preferred**; single-action terminal surfaces (one canonical forward move).
|
|
27
|
+
- `## Next Steps` — acceptable when the surface genuinely admits a small ordered set of forward moves (two or three; **never more than four** — beyond four routes through the option-annotation surface per `rules/option-annotation.md`).
|
|
28
|
+
|
|
29
|
+
Heading-level drift (`###` / `####`), alternate phrasings (`## What's Next`, `## Follow-Up`, `## Suggested Actions`), and missing headings are non-conformant.
|
|
30
|
+
|
|
31
|
+
### 2. Named Action
|
|
32
|
+
|
|
33
|
+
The block body MUST name a **definitive action** that is:
|
|
34
|
+
|
|
35
|
+
- **Imperative-verb-led.** "Run `apothem verify`", "Author the suite specification", "Invoke `/plan-execute` to advance the next phase". Never a hedged participle ("you might consider running …") nor a question ("should you run X?").
|
|
36
|
+
- **Referenced by identifier.** Commands cite their slash-name (`/plan-spec`); scripts cite their path (`scripts/dev/audit.py`); files cite their canonical location.
|
|
37
|
+
- **Definitive per `rules/definitiveness.md`.** Hedging vocabulary (maybe, might, could, should probably, usually, typically) is forbidden in the action statement. The block is a binding next-move declaration, not a probabilistic forecast.
|
|
38
|
+
|
|
39
|
+
### 3. Optional Rationale Clause
|
|
40
|
+
|
|
41
|
+
The block MAY carry a one-sentence rationale clause naming why this action is the canonical next step. The rationale cites a concrete driver per `rules/option-annotation.md` §2 — observed state of the artifact set, a rule citation, a named prerequisite gate. A rationale clause without a concrete driver is non-conformant; omit the rationale rather than fill it with platitude.
|
|
42
|
+
|
|
43
|
+
### 4. Multi-Action Form (`## Next Steps`)
|
|
44
|
+
|
|
45
|
+
When the surface admits multiple forward moves, the block uses an ordered list and marks exactly one entry as **Recommended** per `rules/option-annotation.md`:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## Next Steps
|
|
49
|
+
|
|
50
|
+
1. **Run `apothem verify`** — **Recommended**. Confirms the install reached the canonical end state before further changes land.
|
|
51
|
+
2. Inspect `apothem doctor` output — when verify fails, doctor surfaces the failing precondition.
|
|
52
|
+
3. Re-run the install with `--force` — only when the verify failure traces to a partial install.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
A multi-action block without a Recommended marker falls back to the option-annotation rule's zero-recommended fallback (the rationale section names the underdetermined dimensions and routes the choice via inquiry per `rules/authority-inquiry.md`).
|
|
56
|
+
|
|
57
|
+
### 5. Terminal Placement
|
|
58
|
+
|
|
59
|
+
The block MUST be the **last substantive section** of the artifact. It precedes only:
|
|
60
|
+
|
|
61
|
+
- `## Bindings (§0.j five-direction)` (when present per `rules/bidirectional-binding.md`);
|
|
62
|
+
- closing metadata / appendix / disclosure footers.
|
|
63
|
+
|
|
64
|
+
It MUST NOT precede further substantive sections. A `## Recommended Next Step` followed by `## Implementation Details` is a placement violation — the block has been displaced from its terminal role.
|
|
65
|
+
|
|
66
|
+
### 6. Per-Surface Materialisation
|
|
67
|
+
|
|
68
|
+
| Surface | Block role |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `commands/**/*.md` | Names the next command to invoke, the next file to read, or the next operator decision after the command completes. Ties the command into the pipeline shape declared by `rules/canonical-layout.md` M12. |
|
|
71
|
+
| `skills/**/SKILL.md` | Names the canonical follow-up after the skill's procedure completes — the verification step, the index-update step, or the next skill in the chain. |
|
|
72
|
+
| `phases/**/PHASE.md` | Names the next phase per the suite's progress tracker (`PROGRESS.md` Resumption Contract). Phase rollup REPORTs follow the same discipline at their tail. |
|
|
73
|
+
|
|
74
|
+
## Mechanical enforcement
|
|
75
|
+
|
|
76
|
+
The matcher `conformity/recommend_next_step_grep.py` operationalises the check. For every artifact under the path-filter it verifies:
|
|
77
|
+
|
|
78
|
+
- presence of `## Recommended Next Step` or `## Next Steps`;
|
|
79
|
+
- heading placement at the artifact's terminal section per §5;
|
|
80
|
+
- absence of hedging vocabulary inside the block body per `rules/definitiveness.md`;
|
|
81
|
+
- multi-action form carries exactly one `**Recommended**` marker per §4.
|
|
82
|
+
|
|
83
|
+
Findings surface at the pre-emission gate per `rules/pre-emission-gate.md` — HIGH-severity on a missing block, MEDIUM-severity on shape drift.
|
|
84
|
+
|
|
85
|
+
## Disclosure surface
|
|
86
|
+
|
|
87
|
+
Block emission is recorded in the disclosure ledger per `rules/disclosure-ledger.md`:
|
|
88
|
+
|
|
89
|
+
- `[Next-Step — emitted: <artifact-path>; heading: <Recommended Next Step | Next Steps>; action: <imperative-summary>]` for new blocks.
|
|
90
|
+
- `[Next-Step — refreshed: <artifact-path>; reason: <pipeline-shape-change | action-target-renamed | downstream-surface-retired>]` for updates.
|
|
91
|
+
|
|
92
|
+
## Failure tells
|
|
93
|
+
|
|
94
|
+
An artifact ending mid-section with no block. A block headed `## Conclusion` / `## Wrap-Up` / `## What's Next` (heading drift). A block body opening with "You might want to …" / "Consider …" / "It's usually a good idea to …" (hedging — M8 violation). A `## Next Steps` list of seven items with no Recommended marker (cardinality drift; route through `rules/option-annotation.md` instead). A block placed mid-artifact with substantive sections following it (placement violation). A `## Recommended Next Step` whose action names no identifier — "run the next thing" (action under-specified). A rationale clause that says "this is generally the safer path" with no concrete driver (vague-rationale forbid list per `rules/option-annotation.md`).
|
|
95
|
+
|
|
96
|
+
## Bindings (§0.j five-direction)
|
|
97
|
+
|
|
98
|
+
- **Drives →** ● Every terminal section of every `commands/**/*.md`, `skills/**/SKILL.md`, and `phases/**/PHASE.md` under the path-filter. ● The mechanical matcher at `conformity/recommend_next_step_grep.py`. ● Every pipeline-transition surface where one command's terminal block names the next command's invocation. ◐ The Resumption Contract's "next action" field at `PROGRESS.md` for phase artifacts.
|
|
99
|
+
- **Satisfies →** ● `CLAUDE.md` operating principle "every terminal surface emits a definitive next move". ● `rules/canonical-layout.md` M12 reporting-surface discipline (the terminal block IS the reporting surface's forward-move declaration). ● `rules/definitiveness.md` M8 (the next-move declaration meets the definitiveness floor).
|
|
100
|
+
- **Established by ↑** ● The pre-emission gate at `rules/pre-emission-gate.md` (the M3 ten-dimension check's dimension 6 structurality enforces terminal-section completeness). ● `rules/canonical-layout.md` (phase / sub-phase reporting tier where the block lives).
|
|
101
|
+
- **Gated by ←** ● The path-filter (the three glob patterns) — this rule activates only on terminal-emission-surface touches. ● The trivial-scope threshold (edits not touching the terminal section inherit the existing block's conformance).
|
|
102
|
+
- **Cross-bound with ↔** ↔ `rules/definitiveness.md` (M8 — the named action carries no hedging vocabulary; the next-move declaration is binding, not probabilistic). ↔ `rules/canonical-layout.md` (M12 — the block is the reporting tier's forward-move surface). ↔ `rules/option-annotation.md` (M7 — multi-action `## Next Steps` blocks carry the Recommended marker plus concrete-driver rationale). ↔ `conformity/recommend_next_step_grep.py` (the mechanical matcher operationalising the check at the pre-emission gate). ↔ `rules/pre-emission-gate.md` (M4 — block presence is a gated bar at terminal-surface emission). ↔ `rules/disclosure-ledger.md` (M2 — block emissions and refreshes recorded in the ledger). ↔ `rules/determinism.md` (the terminal next-move block is rendered deterministically — same artifact state yields the same forward-move declaration). ↔ `rules/own-voice-reimplementation.md` (the terminal forward-move discipline this rule defines is the tail discipline own-voice reimplementations honor). ↔ `rules/session-closure.md` (the terminal Recommended Next Step this rule owns is element (a) of the three-element session close; session-closure binds it as one of three closure elements for every session, not only path-filtered terminal artifacts). ↔ `rules/living-docs.md` (the living-docs tail honours the terminal forward-move discipline).
|
|
103
|
+
|
|
104
|
+
## Recommended Next Step
|
|
105
|
+
|
|
106
|
+
**Run `python scripts/inject-header.py --mode fix-in-place src/apothem/rules/recommend-next-step.md`** to install the canonical single-line SPDX license header per the project's File Headers discipline before the artifact lands at its emission gate.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "refactoring-discipline"
|
|
3
|
+
description: "Agent-driven refactoring is test-gated, one-at-a-time, plan-first, and continuous: a behavior-preserving refactor holds a GREEN test baseline before the first edit and after (the before-and-after contract); addresses exactly one concern in an isolated workspace; proceeds only from a reviewed plan after maximal context-gathering; and runs continuously as the codebase drifts rather than deferred to a crisis. Demand-loaded on refactor-class source edits; the detection signals and full procedure live in the body."
|
|
4
|
+
pathFilter: "**/*.py, **/*.ts, **/*.tsx, **/*.js, **/*.jsx, **/*.mjs, **/*.go, **/*.rs, **/*.java, **/*.kt, **/*.rb, **/*.c, **/*.cpp, **/*.h, **/*.swift, **/*.sh, **/*.ps1"
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: Refactoring Discipline — Test-Gated, One-at-a-Time, Plan-First, Continuous
|
|
11
|
+
|
|
12
|
+
## What this rule enforces
|
|
13
|
+
|
|
14
|
+
Agent-driven refactoring MUST be **behavior-preserving, test-gated, isolated to one concern, planned before executed, and continuous**. Five obligations bind: a refactor MUST NOT begin without a **green test baseline** and MUST NOT complete until that same baseline is green again (the before-and-after behavior-preservation contract); it addresses **exactly one concern at a time** in an isolated workspace; execution proceeds only from a **reviewed plan** produced after gathering maximal context; the re-derivation is **clean-room and quality-elevating**, never cosmetic; and refactoring is a **continuous** response to drift, not a deferred crisis. This rule governs refactoring's *workflow and cadence*; the *generation method* (behavioral extraction → clean-room re-derivation → quality elevation → regression gate) is owned by `rules/clean-room-generation.md` §3, and *single-symbol extraction* by the `refactor-extract` skill.
|
|
15
|
+
|
|
16
|
+
## Pre-conditions
|
|
17
|
+
|
|
18
|
+
Applies whenever a refactor — a behavior-preserving structural change to existing code — is undertaken in a host project. It does NOT apply to feature work that changes observable behavior (a feature change under its own contracts), nor to pure-formatting normalization (a carve-out auto-decision per `rules/authority-inquiry.md`). The moment a change is framed as "refactor", "clean up", "restructure", "extract", "split", or "consolidate" while preserving behavior, the rule applies.
|
|
19
|
+
|
|
20
|
+
## Required behavior
|
|
21
|
+
|
|
22
|
+
### 1. Detection — when to refactor
|
|
23
|
+
|
|
24
|
+
Refactoring is triggered by observable drift signals, not a fixed schedule. Any one signal is sufficient:
|
|
25
|
+
|
|
26
|
+
- The agent has become **slower** at implementing changes in the surface.
|
|
27
|
+
- The agent **introduces more defects** per change than when the surface was clean.
|
|
28
|
+
- Bugs appear in **code the change did not touch** — hidden coupling the structure no longer expresses.
|
|
29
|
+
- The agent **can no longer follow instructions precisely** in the surface — the structure obscures intent.
|
|
30
|
+
- The surface has **drifted from its clean state** — accreted responsibilities, leaked abstractions, primitive obsession, duplicated logic.
|
|
31
|
+
|
|
32
|
+
Each signal is **falsifiable** — an observable the agent confirms before committing. Refactor **early**, at the first sustained signal, not after the surface is unworkable.
|
|
33
|
+
|
|
34
|
+
### 2. One refactor at a time — isolation
|
|
35
|
+
|
|
36
|
+
Each refactor addresses **exactly one concern** in an **isolated workspace** (a dedicated git worktree per `rules/agent-orchestration.md` §5.1, or an equivalent isolated branch). Two refactors MUST NOT run concurrently against the same surface — entangled diffs make regression attribution impossible (when behavior breaks, neither refactor reverts or blames cleanly). Refactoring alongside feature work is permitted; two simultaneous *refactors* are not. A multi-concern restructure is decomposed into a sequence of single-concern refactors, each independently test-gated.
|
|
37
|
+
|
|
38
|
+
### 3. Plan-first — context, then plan, then execute
|
|
39
|
+
|
|
40
|
+
Before the first edit the agent MUST: (a) **traverse the relevant surface** for a full picture; (b) gather **maximal context** — what to refactor, **why**, and reference exemplars of the target structure where its optimal shape is uncertain; (c) produce a **reviewed refactoring plan** naming the concern, affected files, target structure, and behavior-preservation strategy. Execution proceeds only once the plan is accepted. Editing first and structuring as you go is non-conformant — the plan is the contract the regression gate verifies against.
|
|
41
|
+
|
|
42
|
+
### 4. Test safety net — green before AND green after
|
|
43
|
+
|
|
44
|
+
A behavior-preserving refactor carries a test baseline green before the first edit and green again after the last:
|
|
45
|
+
|
|
46
|
+
- **Before.** Establish a passing test (or behavioral-assertion) baseline capturing the surface's observable contracts. Where none exists, author the assertions per the `test-authoring` skill *before* the refactor begins. A refactor that cannot demonstrate green-before is not ready to start — the baseline is the only proof behavior was preserved.
|
|
47
|
+
- **After.** The **same** baseline passes on completion, with no new defects. A contract that no longer holds blocks the refactor until repaired — the formal behavior-preservation gate per `rules/clean-room-generation.md` §3.5.
|
|
48
|
+
|
|
49
|
+
The before-and-after gate is non-negotiable: it distinguishes a refactor (behavior preserved, proven) from an undisciplined rewrite (behavior changed, unproven).
|
|
50
|
+
|
|
51
|
+
### 5. Clean-room, quality-elevating execution
|
|
52
|
+
|
|
53
|
+
The refactor re-derives the affected unit **clean-room** from its extracted behavioral specification per `rules/clean-room-generation.md` §3 — never a cosmetic edit of the original text — and **elevates quality against a named deficiency** (the leaky abstraction, god function, primitive obsession, or duplication it exists to remove). A change that rephrases without elevating a named deficiency is not a refactor; it is churn.
|
|
54
|
+
|
|
55
|
+
### 6. Continuous cadence
|
|
56
|
+
|
|
57
|
+
Refactoring is **continuous maintenance**, a natural part of a codebase's evolution — not a one-time event to eliminate. The agent periodically checks the surfaces it works in for the §1 drift signals and refactors at the first sustained one. Deferring until the surface is unworkable converts cheap continuous maintenance into an expensive crisis rewrite.
|
|
58
|
+
|
|
59
|
+
## Disclosure surface
|
|
60
|
+
|
|
61
|
+
Every refactor is recorded in the disclosure ledger per `rules/disclosure-ledger.md`:
|
|
62
|
+
|
|
63
|
+
- `[Refactor — concern: <single concern>; trigger: <§1 signal>; baseline: green-before/green-after; deficiency-elevated: <named>]` for every completed refactor.
|
|
64
|
+
- `[Refactor — deferred: <concern>; reason: <out-of-scope | sequenced-after-current>; tracking: <where>]` when a surfaced refactor concern is sequenced for later, not executed now (one-at-a-time isolation).
|
|
65
|
+
|
|
66
|
+
## Failure tells
|
|
67
|
+
|
|
68
|
+
Two refactors running concurrently against the same surface. A refactor begun with no green test baseline (no proof of the starting contract). A refactor presented as complete without re-running the baseline green (behavior preservation unproven). A "refactor" that rephrases the original without elevating a named deficiency (churn, not refactor). Editing first and planning as you go (no reviewed plan). A refactor deferred until the surface is unworkable, then attempted as one large rewrite (crisis refactoring — the cadence failure). A behavior-changing edit presented as a refactor (a feature change in disguise — routes back to the user as a finding).
|
|
69
|
+
|
|
70
|
+
## Bindings (§0.j five-direction)
|
|
71
|
+
|
|
72
|
+
- **Drives →** Every behavior-preserving refactor's before-and-after test gate; the one-concern-at-a-time isolation invariant on every refactoring workspace; the plan-first sequence on every refactor; the continuous-cadence drift check on every surface the agent works in.
|
|
73
|
+
- **Driven by ←** The §1 drift detection signals (agent slowdown, defect rate, untouched-code bugs, instruction-following degradation, structural drift) that trigger a refactor.
|
|
74
|
+
- **Satisfies →** The behavior-preservation contract for agent-driven refactoring (green-before / green-after); the one-at-a-time isolation floor; the continuous-maintenance cadence.
|
|
75
|
+
- **Established by ↑** `rules/clean-room-generation.md` §3 (the re-writing protocol this discipline gates); the host's ratified test command (the safety net's mechanism).
|
|
76
|
+
- **Cross-bound with ↔** `rules/clean-room-generation.md` (§3 Re-Writing Protocol — behavioral extraction, clean-room barrier, quality elevation, regression gate; this rule gates *when and how* that protocol runs for a refactor). `rules/surgical-manipulation.md` (minimal, anchor-bounded mutation — a refactor's edits are surgical). `rules/agent-orchestration.md` (§5.1 worktree isolation — the isolated workspace for one-at-a-time refactoring). `rules/code-craft-python.md` + sibling per-language code-craft rules (the quality bar the §5 deficiency-elevation targets). `skills/refactor-extract/SKILL.md` (the single-symbol extraction operationalization of this discipline). `skills/test-authoring/SKILL.md` (the §4 safety-net author when no tests exist).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "session-closure"
|
|
3
|
+
description: "Every session — ad-hoc conversational sessions included, not only plan phases — ends with a formal, verifiable close: a terminal Recommended Next Step, a done/deferred ledger, and a verification attestation. A session that trails off mid-thread, claims done without a checked outcome, or buries deferred work silently is a structural failure. Harness-agnostic; the close is rules text every harness honors."
|
|
4
|
+
pathFilter: ""
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: Session Closure — Every Session Ends With a Formal, Verifiable Close
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
A session is not finished when the last edit lands; it is finished when it is **closed**. Every session — an ad-hoc conversational exchange as much as a plan phase or a multi-step mission — MUST end with a formal, verifiable close. The operator never inherits a trailing-off thread, an unstated "done", or work that was silently dropped. The close is the session's airtight terminal contract.
|
|
15
|
+
|
|
16
|
+
## Obligations
|
|
17
|
+
|
|
18
|
+
### 1. The Three Closure Elements
|
|
19
|
+
|
|
20
|
+
Every closing turn MUST carry all three, in order:
|
|
21
|
+
|
|
22
|
+
- **(a) Recommended Next Step.** A terminal, imperative-verb-led, identifier-referenced forward move per `rules/recommend-next-step.md` — the single best action for the session's end state, never a hedge, a question, or a silent stop. On commands / skills / phase artifacts this is the canonical `## Recommended Next Step` block; in conversational prose it is one definitive named action.
|
|
23
|
+
- **(b) Done / Deferred ledger.** An explicit two-column account: what was **completed** this session, and what was **deferred** — each deferral naming a tracking location per the `[Deferral — …]` marker at `rules/disclosure-ledger.md`. Adjacent work touched-but-not-finished is deferred-with-tracking, never elided. Silent over-completion ("said done, left a gap") and silent over-reach are both non-conformant.
|
|
24
|
+
- **(c) Verification attestation.** A statement of **what machine-checkable condition was checked and its outcome** — a gate, test, build, or read a third party reproduces, with pass / fail / n-a-with-reason. Self-assessment ("looks correct") is not a verdict; the attestation cites the objective check behind the completed column. A "done" resting on self-assessment, or on nothing checked, is non-conformant.
|
|
25
|
+
|
|
26
|
+
### 2. Universality and Scaling
|
|
27
|
+
|
|
28
|
+
The close binds **every** session, not only plan-suite work. The phase-exit and Stop-hook externalization at `rules/context-management.md` §2.5 / §3 is the plan-suite materialization; this rule extends it to ad-hoc sessions the hook does not reach. Closure **depth** scales to session weight — a trivial exchange emits one line per element, a multi-step mission a full ledger and multi-gate attestation. Depth flexes; **presence does not**. A session emitting zero elements has not closed — it has trailed off.
|
|
29
|
+
|
|
30
|
+
### 3. Single Canonical Close — No Repetition
|
|
31
|
+
|
|
32
|
+
The three elements are emitted **once**, as one close — never duplicated in the turn, never re-printed unchanged across turns; on a Stop-condition / goal / loop re-engagement, report only the **delta**. Element (a) IS the terminal `## Recommended Next Step` block, not a second copy; the Stop-hook externalization is file-side, not re-narrated.
|
|
33
|
+
|
|
34
|
+
## Failure tells
|
|
35
|
+
|
|
36
|
+
A reply ending mid-thought with no forward move. A "done" resting on self-assessment or no check at all. Deferred work mentioned in passing with no tracking location, or not mentioned. A completed-claim an unchecked gate contradicts. A plan phase that runs the Stop-hook externalization while an ad-hoc session beside it closes on none of the three elements. A close listing next steps but no done/deferred ledger, or a ledger but no attestation. The same close re-printed unchanged across turns.
|
|
37
|
+
|
|
38
|
+
## Bindings (§0.j five-direction)
|
|
39
|
+
|
|
40
|
+
- **Drives →** ● Every session's terminal turn (the three-element close is the closing-turn floor). ● Every ad-hoc conversational exchange's formal close, extending the plan-suite Stop-hook externalization to sessions the hook does not reach. ● The done/deferred ledger every close emits. ● The verification attestation every "done" claim carries.
|
|
41
|
+
- **Satisfies →** ● The airtight-session-close end state (no trailing-off thread, no unverified "done", no silently-dropped work). ● The advisory-posture invariant that every interaction closes with the single best next action.
|
|
42
|
+
- **Established by ↑** ● The operator mandate that any session — ad-hoc included — ends with a formal, verifiable close. ● `rules/recommend-next-step.md` (the terminal forward-move element). ● `rules/context-management.md` §2.5 (the phase-exit externalization this rule generalizes to ad-hoc sessions).
|
|
43
|
+
- **Gated by ←** ● `CLAUDE.md` always-loaded preamble. ● The §3 scaling clause (a trivial session scales the close down, never away).
|
|
44
|
+
- **Cross-bound with ↔** ↔ `rules/recommend-next-step.md` (element (a) — the terminal Recommended Next Step the close opens with; this rule binds it as one of three closure elements for every session, not only path-filtered terminal artifacts). ↔ `rules/context-management.md` (element (b)+(c) — the Stop-hook / §2.5 phase-exit externalization is the plan-suite materialization of this close; this rule extends it to ad-hoc sessions). ↔ `rules/disclosure-ledger.md` (M2 — the done/deferred ledger's deferral entries use the `[Deferral — …]` marker; the completed column is the change's disclosure surface). ↔ `rules/pre-emission-gate.md` (M4 — the verification attestation element mirrors the gate's per-bar attestation at the session scale; a close's "checked" column is the session-level analog of the gate's bar attestation).
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "sota-elevation-exemplars"
|
|
3
|
+
description: "Path-filtered companion to `sota-elevation.md` carrying the eight-surface SOTA evaluation lens, the named-exemplar catalogue (cpython / shadcn-ui / Bun / Fumadocs / vite / vitest), per-surface exemplar walks, the upper-bound calibration binding, the Filter-5 aesthetic-demand binding, the gap-surfacing protocol, the disclosure markers, and the failure tells; demand-loaded on README / docs / `.github/` / `site/` touches."
|
|
4
|
+
pathFilter: "**/README.md, **/docs/**, **/.github/**, **/site/**"
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: SOTA Elevation — Exemplar Catalogue & Eight-Surface Walks (Companion Sub-Rule)
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Carry the operational detail the parent rule `rules/sota-elevation.md` anchors: the eight SOTA evaluation surfaces, the named-exemplar catalogue, the per-surface exemplar walks, the upper-bound calibration, the Filter-5 binding, the gap-surfacing protocol, the disclosure markers, and the failure tells. Path-filtered to OSS-distribution user-facing surfaces (README, docs site, CI workflows, site/ scaffold); the parent's always-on payload stays lean while this companion preserves full exemplar fidelity at the demand-load surface.
|
|
15
|
+
|
|
16
|
+
## Obligations
|
|
17
|
+
|
|
18
|
+
### 1. The Eight SOTA Evaluation Surfaces
|
|
19
|
+
|
|
20
|
+
Every user-facing change MUST be audited across all eight surfaces. A change that lands one surface while leaving the others below SOTA is partial-SOTA, not SOTA:
|
|
21
|
+
|
|
22
|
+
| # | Surface | What "SOTA" means here |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| 1 | **README modernization** | Centered logo + tagline + badge row + nav strip + Quick-start; depth matching cpython / shadcn-ui / Bun headers. Cites `rules/production-ready-prs-surfaces.md` §6.5. |
|
|
25
|
+
| 2 | **Visibility surfaces** | All seven per `rules/production-ready-prs-surfaces.md` §1 present, current, badge-rendered. |
|
|
26
|
+
| 3 | **Supply-chain producer-pipeline** | Actions pinned to commit-SHA, minimum permissions, ratified release signing, SBOM where applicable, OIDC trust where the registry supports it. |
|
|
27
|
+
| 4 | **CI/CD modernization** | Generic SOTA workflow naming (cpython / django / react / vue pattern); matrix-tested; cache-keyed; concurrency-grouped; reusable workflow composition. |
|
|
28
|
+
| 5 | **Test rigor** | Coverage gate; parametrized; behavior-named; AAA-shaped; cross-platform matrix where the product targets cross-platform. |
|
|
29
|
+
| 6 | **Packaging / type-safety** | Modern manifest schema; `py.typed` marker or equivalent; strict type-check on public API; dynamic version rendering. |
|
|
30
|
+
| 7 | **Observability** | Structured logging (`logging.getLogger(__name__)` / structlog / pino equivalents); deliberate log levels; no `print()` for operational output. |
|
|
31
|
+
| 8 | **Docs SOTA** | Documentation tooling at current SOTA (Fumadocs / VitePress / Docusaurus); folded sidebar; landing distinct from docs; OG cards; mobile-first responsive. |
|
|
32
|
+
|
|
33
|
+
### 2. Named-Exemplar Catalogue
|
|
34
|
+
|
|
35
|
+
Every SOTA citation names a **currently-shipping** exemplar as concrete-driver class 6 per `rules/interactive-questions-canonical-shapes.md` §3.2.1. Vague "industry standard" / "best practice" appeals without a named source are non-conformant per `rules/interactive-questions-canonical-shapes.md` §3.2.2.
|
|
36
|
+
|
|
37
|
+
| Exemplar | Anchors surface(s) | What to copy |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| **cpython** | 1, 4 | CONTRIBUTING shape; release-engineering rigor; workflow naming (`tests.yml`, `build.yml`); dev-guide depth |
|
|
40
|
+
| **shadcn-ui** | 1, 8 | README header centered pattern; dark-mode-first aesthetic; copy-paste-component documentation; landing-page polish |
|
|
41
|
+
| **Bun** | 1, 8 | performance-first landing; folded sidebar; marketing-quality OG cards; bold typography |
|
|
42
|
+
| **Fumadocs** | 8 | Docs-site IA; MDX-rich pages; Next.js App Router; dedicated landing distinct from docs root; localized routing |
|
|
43
|
+
| **vite** | 8 | VitePress sibling-class clean IA; minimal nav; fast TTFB |
|
|
44
|
+
| **vitest** | 5, 8 | Behavior-named tests; clean docs/test parity; fast-feedback CLI surface |
|
|
45
|
+
|
|
46
|
+
### 3. Upper-Bound Calibration
|
|
47
|
+
|
|
48
|
+
When the operator's directive carries `MAXIMAL` (or "best possible", "world-class", "no expense spared", "ALL diversified dimensions"), the calibration ladder at `rules/expertise-posture-elements.md` §2 escalates to the **architectural-rework** rung. Every surface in §1 is inspected; no surface is skipped under time pressure. Mid-tier "production-ready" is the floor `rules/production-ready-prs.md` enforces; SOTA-elevation lifts the ceiling.
|
|
49
|
+
|
|
50
|
+
### 4. Filter-5 Aesthetic-Demand Binding
|
|
51
|
+
|
|
52
|
+
SOTA elevation is the outward projection of cognitive-identity Filter 5 (aesthetic demand) per `rules/cognitive-identity-techniques.md` §1. A surface that passes every mechanical bar but lacks conceptual elegance, texture, soul — the "feels inevitable once seen" property — has not yet reached SOTA. Filter 5 is the gate beyond mechanical conformity.
|
|
53
|
+
|
|
54
|
+
### 5. Gap-Surfacing Protocol
|
|
55
|
+
|
|
56
|
+
When the host's current state falls short of SOTA on any of the eight surfaces, the gap MUST be surfaced as a finding per `rules/authority-inquiry.md` with options annotated per `rules/option-annotation.md` — never silently entrenched, never deferred without a tracking record. The recommended-option rationale MUST cite a concrete exemplar from §2.
|
|
57
|
+
|
|
58
|
+
### 6. Disclosure Markers
|
|
59
|
+
|
|
60
|
+
Outcomes recorded in the disclosure ledger per `rules/disclosure-ledger.md`:
|
|
61
|
+
|
|
62
|
+
- `[SOTA — elevated: <surface>; exemplar: <project>; from: <prior-state>; to: <new-state>]` for every SOTA-lift.
|
|
63
|
+
- `[SOTA — gap-surfaced: <surface>; current-state: <description>; exemplar-target: <project>; tracking: <inquiry-id | task>]` for every gap.
|
|
64
|
+
- `[SOTA — floor-honored: <surface>]` for surfaces already at SOTA where the change preserves the elevation.
|
|
65
|
+
|
|
66
|
+
### 7. Failure Tells
|
|
67
|
+
|
|
68
|
+
A README rewrite that adopts a single SOTA element (e.g., a logo) without the surrounding header pattern (partial-SOTA). A "SOTA" citation that names no exemplar. A workflow renamed to a generic name without the surrounding security-and-permissions polish (surface 4 partial). Docs migrated to a SOTA framework but left at the default theme (surface 8 partial). `MAXIMAL` directive answered with mid-tier "production-ready" output (calibration miss). A gap on any of the eight surfaces entrenched silently instead of surfaced. Aesthetic dismissal ("it's fine") on a surface where Filter 5 has not yet been applied.
|
|
69
|
+
|
|
70
|
+
## Bindings (§0.j five-direction)
|
|
71
|
+
|
|
72
|
+
- **Drives →** Every OSS-distribution user-facing surface emission under the path-filter; the eight-surface audit at every README / docs / `.github/` / `site/` touch; the named-exemplar citation requirement at every `[SOTA — …]` marker; the architectural-rework rung escalation on `MAXIMAL` directives.
|
|
73
|
+
- **Satisfies →** `rules/sota-elevation.md` companion anchors (the parent rule's pointers to this companion's eight-surface table, exemplar catalogue, calibration binding, Filter-5 binding, gap-surfacing protocol, disclosure markers, and failure tells).
|
|
74
|
+
- **Established by ↑** `rules/sota-elevation.md` (parent-rule anchor). Exemplar attestation, SOTA-elevation meta-mandate, and README + workflow SOTA directives.
|
|
75
|
+
- **Gated by ←** The path-filter (`**/README.md`, `**/docs/**`, `**/.github/**`, `**/site/**`) — this rule demand-loads only on OSS-distribution user-facing surface touches. `rules/sota-elevation.md` always-on baseline (parent rule must be live for this companion's anchors to surface coherently).
|
|
76
|
+
- **Cross-bound with ↔** `rules/sota-elevation.md` (parent rule; companion anchors bind here). `rules/production-ready-prs-surfaces.md` (§6.5 modern-README escalation cites the parent; this companion's surface 1 + surface 2 materialise the SOTA tier above the production-ready floor). `rules/cognitive-identity-techniques.md` §1 (Filter 5 aesthetic-demand binding at §4). `rules/expertise-posture-elements.md` §2 (calibration ladder at §3). `rules/interactive-questions-canonical-shapes.md` §3.2.1 (concrete-driver class 6 citation requirement) + §3.2.2 (vague-rationale forbid list). `rules/persistent-conventions-vigilance.md` §4 (gap-detection surface). `rules/disclosure-ledger.md` (M2 — disclosure markers at §6).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "sota-elevation"
|
|
3
|
+
description: "SOTA elevation as default posture for OSS distribution projects — every user-facing surface targets the upper bound of contemporary best-practice, calibrated against named exemplar projects (cpython, shadcn-ui, Bun, Fumadocs, vite, vitest) and audited across the eight SOTA evaluation surfaces."
|
|
4
|
+
pathFilter: ""
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: SOTA Elevation — Default Posture for OSS Distribution Projects
|
|
11
|
+
|
|
12
|
+
## What this rule enforces
|
|
13
|
+
|
|
14
|
+
For every OSS distribution project apothem touches, the default posture is **State-Of-The-Art elevation**: every user-facing surface targets the **upper bound** of contemporary best-practice, not the median. "Good enough" is non-conformant when MAXIMAL is reachable. The operator's `MAXIMAL` descriptor in a directive signals escalation to the upper-bound interpretation; absent it, SOTA remains the floor, not a ceiling-on-request. The discipline calibrates against **named, currently-shipping OSS exemplars** — never folklore or "industry standard" appeals without a concrete source.
|
|
15
|
+
|
|
16
|
+
## Pre-conditions
|
|
17
|
+
|
|
18
|
+
Applies whenever the artifact under change belongs to an **OSS distribution project** — one that publishes to a public registry (PyPI, npm, crates.io, Maven Central) or maintains a public documentation site, README, or release surface. It does not apply to internal dev-tool harnesses or private artifacts; the CM-7 codebase-vs-process-tooling distinction governs that split. Trivial-scope edits per the trivial-vs-non-trivial threshold still honor the SOTA floor on the surfaces they touch.
|
|
19
|
+
|
|
20
|
+
## Required behaviour
|
|
21
|
+
|
|
22
|
+
### 1. Eight SOTA Evaluation Surfaces (Companion Sub-Rule Anchor)
|
|
23
|
+
|
|
24
|
+
Every user-facing change MUST be audited across eight surfaces: (1) README modernization, (2) visibility surfaces, (3) supply-chain producer-pipeline, (4) CI/CD modernization, (5) test rigor, (6) packaging / type-safety, (7) observability, (8) docs SOTA. A change landing one surface without the others is partial-SOTA, not SOTA. Full per-surface specification at `rules/sota-elevation-exemplars.md` §1.
|
|
25
|
+
|
|
26
|
+
### 2. Named-Exemplar Discipline (Companion Sub-Rule Anchor)
|
|
27
|
+
|
|
28
|
+
Every SOTA citation MUST name a **currently-shipping** exemplar project as concrete-driver class 6 per `rules/interactive-questions-canonical-shapes.md` §3.2.1. Canonical exemplars: **cpython** (workflow naming, release rigor), **shadcn-ui** (README header, dark-mode aesthetic), **Bun** (performance-first landing, OG cards), **Fumadocs** (docs IA, dedicated landing), **vite** (clean IA), **vitest** (behavior-named tests). Citations like "industry standard" without naming a specific project are non-conformant per `rules/interactive-questions-canonical-shapes.md` §3.2.2. Full per-exemplar walks at `rules/sota-elevation-exemplars.md` §2.
|
|
29
|
+
|
|
30
|
+
### 3. Upper-Bound Calibration & Filter-5 Binding (Companion Sub-Rule Anchor)
|
|
31
|
+
|
|
32
|
+
A `MAXIMAL` directive (or synonyms) escalates the calibration ladder at `rules/expertise-posture-elements.md` §2 to the architectural-rework rung. Production-ready is the floor `rules/production-ready-prs.md` enforces; SOTA-elevation lifts the ceiling. SOTA is the outward projection of cognitive-identity Filter 5 (aesthetic demand) per `rules/cognitive-identity-techniques.md` §1 — passing every mechanical bar without conceptual elegance is not yet SOTA. Full bindings at `rules/sota-elevation-exemplars.md` §§3–4.
|
|
33
|
+
|
|
34
|
+
### 4. Gap-Surfacing
|
|
35
|
+
|
|
36
|
+
When the host's current state falls short of SOTA on any of the eight surfaces, the gap MUST be surfaced as a finding per `rules/authority-inquiry.md` with options annotated per `rules/option-annotation.md` — never silently entrenched. The recommended-option rationale cites a concrete exemplar from §2.
|
|
37
|
+
|
|
38
|
+
## Disclosure surface (Companion Sub-Rule Anchor)
|
|
39
|
+
|
|
40
|
+
Outcomes recorded per `rules/disclosure-ledger.md` using `[SOTA — elevated: …]`, `[SOTA — gap-surfaced: …]`, `[SOTA — floor-honored: …]` markers. Full schemas at `rules/sota-elevation-exemplars.md` §6.
|
|
41
|
+
|
|
42
|
+
## Failure tells (Companion Sub-Rule Anchor)
|
|
43
|
+
|
|
44
|
+
Partial-SOTA emissions, exemplar-less citations, `MAXIMAL` directives answered with mid-tier output, silently-entrenched gaps, aesthetic dismissal where Filter 5 has not been applied. Full enumeration at `rules/sota-elevation-exemplars.md` §7.
|
|
45
|
+
|
|
46
|
+
## Bindings (§0.j five-direction)
|
|
47
|
+
|
|
48
|
+
- **Drives →** Every OSS-distribution-project change's pre-emission SOTA audit across the eight surfaces. The README-modernization escalation cited at `rules/production-ready-prs-surfaces.md` §6.5. Every `MAXIMAL` directive's calibration-ladder escalation to the architectural-rework rung. Every concrete-exemplar citation in `[SOTA — …]` ledger markers.
|
|
49
|
+
- **Satisfies →** The rule inventory, SOTA-elevation meta-mandate, comprehensive SOTA polish mandate, and the operator's MAXIMAL-standard directive.
|
|
50
|
+
- **Established by ↑** The operator's README MAXIMAL SOTA and workflow generic-SOTA naming directives. The adjacent-domain axis citing cpython / shadcn / Bun / Fumadocs / vite / vitest exemplars. The scholarly-technical-literature axis and SOTA gap declaration.
|
|
51
|
+
- **Gated by ←** the trivial-vs-non-trivial threshold (trivial-scope edits honor the SOTA floor on surfaces touched; full eight-surface audit applies to meaningful-scope changes). The OSS-distribution-project pre-condition (internal dev-tools are out of scope).
|
|
52
|
+
- **Cross-bound with ↔** `rules/sota-elevation-exemplars.md` (path-filtered companion sub-rule carrying the eight-surface table, named-exemplar catalogue, calibration binding, Filter-5 binding, gap-surfacing protocol, disclosure markers, and failure tells). `rules/production-ready-prs.md` + `rules/production-ready-prs-surfaces.md` (production-ready is the floor; SOTA lifts the ceiling). `rules/cognitive-identity.md` (Filter 5 aesthetic-demand binding). `rules/expertise-posture.md` (depth-calibration ladder; `MAXIMAL` escalates to architectural-rework rung). `rules/persistent-conventions-vigilance.md` (CM-22 — SOTA-gap detection feeds the §4 ecosystem-gap-detection surface). `rules/option-annotation.md` (every recommended-option rationale cites a concrete-exemplar concrete-driver class 6). `rules/authoritative-referencing.md` (§2 named-exemplar discipline — the authoritative-referencing standing mandate consolidates this no-"industry-standard" citation bar by reference).
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "source-accessibility"
|
|
3
|
+
description: "Source trust outranks source accessibility — reach a trusted but inaccessible source via browser then operator interview; never prefer an untrusted-but-free source over a trusted-but-inaccessible one; record the source-trust decision in the ledger."
|
|
4
|
+
pathFilter: ""
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: Source Accessibility — Trust Outranks Reachability
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Govern source selection when the authoritative source for a claim, convention, API contract, or version pin is hard to reach. Convenience MUST NOT silently demote authority: a paywalled specification, a login-gated vendor doc, or an offline standard stays the source of record even when a free, open, lower-trust page is one click away. This rule fixes the ranking and the escalation path so the agent reaches the trusted source instead of the reachable one.
|
|
15
|
+
|
|
16
|
+
## Obligations
|
|
17
|
+
|
|
18
|
+
### 1. Trust outranks accessibility
|
|
19
|
+
|
|
20
|
+
When candidate sources conflict on trust and on reachability, the higher-trust source wins regardless of how much harder it is to reach. The agent MUST NOT prefer an untrusted-but-accessible source — an SEO blog, a forum answer, a model's own recollection, a mirror of unknown fidelity — over a trusted-but-inaccessible one: the vendor's official doc, the ratified standard, the primary specification, the maintainer's own statement.
|
|
21
|
+
|
|
22
|
+
### 2. Escalate to reach the trusted source
|
|
23
|
+
|
|
24
|
+
A trusted source that is not immediately readable MUST be reached through an ordered escalation, not abandoned:
|
|
25
|
+
|
|
26
|
+
1. Retrieve it directly through the host's browser / fetch capability — declared per-harness in `capabilities.yml` `web_fetch` (the backing dimension per `rules/agent-capability-discipline-matrix.md` §1A). A `no` / `discovery-pending` cell means no capability to invoke; escalate to step 2.
|
|
27
|
+
2. Where that capability is absent, or the source sits behind credentials the agent does not hold, interview the operator for the content or for access per `rules/authority-inquiry.md`.
|
|
28
|
+
|
|
29
|
+
The agent settles for a lower-trust substitute only after both steps are exhausted, and MUST disclose the substitution.
|
|
30
|
+
|
|
31
|
+
### 3. Record the source-trust decision
|
|
32
|
+
|
|
33
|
+
Every source-selection decision of meaningful scope MUST record, in the change ledger per `rules/disclosure-ledger.md`: which source was used, its trust tier, whether the first-choice trusted source was reachable, and — when a substitute was used — why the trusted source was not reachable. A claim resting on a lower-trust source carries that provenance with it.
|
|
34
|
+
|
|
35
|
+
## Seriousness Scaling
|
|
36
|
+
|
|
37
|
+
| Level | Source discipline |
|
|
38
|
+
| ----- | ----------------- |
|
|
39
|
+
| EXPLORING | Prefer the trusted source; substitution disclosure optional. |
|
|
40
|
+
| PERSONAL_USE | Reach the trusted source via browser; disclose substitutions. |
|
|
41
|
+
| SHARED | Full escalation (browser then operator interview) before any substitution; every source-trust decision recorded. |
|
|
42
|
+
| PUBLIC_LAUNCH | No lower-trust substitute on a public-surface claim without recorded exhaustion of the escalation and an explicit operator-confirmed fallback. |
|
|
43
|
+
|
|
44
|
+
## Enforcement
|
|
45
|
+
|
|
46
|
+
Always-on at every seriousness level, scaling per the table above. Source selection is a discrete behavior that precedes any claim the artifact rests on; the ranking and escalation apply before the claim is committed.
|
|
47
|
+
|
|
48
|
+
## Failure tells
|
|
49
|
+
|
|
50
|
+
A free low-trust page cited where the vendor's gated doc is the real source of record; "it was not accessible" offered as justification with no browser attempt and no operator interview logged; a version pin or a security claim resting on a forum post; a substituted source used with no ledger record of the trust downgrade.
|
|
51
|
+
|
|
52
|
+
## Bindings (§0.j five-direction)
|
|
53
|
+
|
|
54
|
+
- **Drives →** Every source-selection decision behind a claim, a convention adoption, an API-contract reading, or a version pin across every ecosystem surface; the provenance each lower-trust-sourced claim must carry.
|
|
55
|
+
- **Satisfies →** The standing-mandate end-state that authority, not convenience, decides which source a claim rests on.
|
|
56
|
+
- **Established by ↑** The operator's standing-mandate set (the inaccessible-source mandate — trust outranks reachability).
|
|
57
|
+
- **Gated by ←** The host's browser / fetch capability surface — declared per-harness in `capabilities.yml` `web_fetch` per `rules/agent-capability-discipline-matrix.md` §1A — and the operator-interview channel (the two reachability paths the escalation depends on).
|
|
58
|
+
- **Cross-bound with ↔** `rules/authority-inquiry.md` (M5 — the operator-interview channel this rule escalates to when a trusted source is credential-gated is owned there); `rules/ten-dimension-check.md` (dimension 9 Scholarly / technical referencing — source-trust selection is the upstream behavior that referencing dimension verifies); `rules/disclosure-ledger.md` (M2 — the source-trust decision is recorded as a ledger entry); `rules/authoritative-referencing.md` (the trust-outranks-accessibility ranking decides WHICH source that referencing mandate cites).
|