@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,590 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "interactive-questions-canonical-shapes"
|
|
3
|
+
description: "Path-filtered companion rule carrying the canonical invocation shapes, worked examples, recommendation-taxonomy details, harness-fallback shape, destructive-op canonical option-set templates, and default-pointer worked examples for the parent `interactive-questions.md` rule; demand-loaded on path match."
|
|
4
|
+
pathFilter: "**/commands/**/*.md, **/rules/**/*.md, **/skills/**/*.md, **/agents/**/*.md, **/hooks/**/*.md"
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
9
|
+
|
|
10
|
+
# Rule: Interactive-Questions Canonical Shapes (Companion Sub-Rule)
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Detail-tier companion to `rules/interactive-questions.md`: the canonical worked examples (single-select / multi-select), the three-segment annotation schema with label-postfix specification, the recommendation taxonomy (driver classes, vague-rationale forbid list, downgrade path, extension protocol), the harness-fallback specification (detection, prose shape, explicit-flag mandate, sole-permitted-free-form invariant), the four destructive-op option-set templates (Delete / Rename / Move / Revert), and the default-pointer worked examples. Path-filtered to artifact classes that author structured-inquiry invocations or fallback prompts. The parent rule owns the canonical-channel obligation, structured-inquiry shape table, section anchors, seriousness scaling, and CM-2 extension binding; this companion owns the worked examples and full schema bodies.
|
|
15
|
+
|
|
16
|
+
## Obligations
|
|
17
|
+
|
|
18
|
+
### 1. Worked Examples — Canonical Invocations
|
|
19
|
+
|
|
20
|
+
#### 1.1 Worked Example — Single-Select
|
|
21
|
+
|
|
22
|
+
Scenario: a prose-refinement workflow has completed signal crystallization and asks the operator whether the consolidated prose is ready to promote, or whether sections should iterate further. Three mutually-exclusive outcomes; the operator's pick is the sole gate on promotion.
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
question: Is the consolidated prose ready to promote, or should it iterate further?
|
|
26
|
+
header: Prose output
|
|
27
|
+
multiSelect: false
|
|
28
|
+
options:
|
|
29
|
+
- label: Accept (Recommended)
|
|
30
|
+
description:
|
|
31
|
+
rationale: The prose meets the specification bar; promotion writes the output to the authored-specification path and closes the crystallization loop.
|
|
32
|
+
recommendation: recommended — the crystallization summary shows zero open unknowns and zero contradictions.
|
|
33
|
+
default-pointer: Accept — safe because the output is written to a versioned path and can be regenerated from the signal inventory.
|
|
34
|
+
- label: Iterate
|
|
35
|
+
description:
|
|
36
|
+
rationale: Specific sections need surgical refinement before promotion; the rest of the draft is preserved.
|
|
37
|
+
recommendation: acceptable
|
|
38
|
+
default-pointer: Accept — the crystallization summary does not flag any section as weak; Iterate is offered for operator-driven refinement, not as the default.
|
|
39
|
+
- label: Reject
|
|
40
|
+
description:
|
|
41
|
+
rationale: The draft is not salvageable; restart preserving only the raw input.
|
|
42
|
+
recommendation: discouraged — the crystallization check reports more than 50% signal capture, so iteration is viable.
|
|
43
|
+
default-pointer: Accept — Reject should be chosen only when the draft is fundamentally unsalvageable, which the crystallization check does not indicate here.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Exactly one option carries the ` (Recommended)` label postfix, bidirectionally bound to the `recommendation: recommended` body value on the same option per §2.
|
|
47
|
+
|
|
48
|
+
#### 1.2 Worked Example — Multi-Select
|
|
49
|
+
|
|
50
|
+
Scenario: an ecosystem-audit triage has surfaced four optional tooling components for the next release. Any combination is admissible — the release does not force exclusivity. Multi-select.
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
question: Which auxiliary tooling should ship with this release?
|
|
54
|
+
header: Aux tools
|
|
55
|
+
multiSelect: true
|
|
56
|
+
options:
|
|
57
|
+
- label: Migration helper (Recommended)
|
|
58
|
+
description:
|
|
59
|
+
rationale: Automates schema upgrades for long-running deployments.
|
|
60
|
+
recommendation: recommended — 40% of active deployments still run the pre-migration schema per the telemetry dashboard.
|
|
61
|
+
default-pointer: no-default: user decision required.
|
|
62
|
+
- label: Admin dashboard
|
|
63
|
+
description:
|
|
64
|
+
rationale: Web UI for runtime inspection; not required for headless deployments.
|
|
65
|
+
recommendation: acceptable
|
|
66
|
+
default-pointer: no-default: user decision required.
|
|
67
|
+
- label: Metrics exporter
|
|
68
|
+
description:
|
|
69
|
+
rationale: Exposes runtime metrics on a standard scrape endpoint; useful only when a metrics sink is already deployed.
|
|
70
|
+
recommendation: acceptable
|
|
71
|
+
default-pointer: no-default: user decision required.
|
|
72
|
+
- label: Audit log shipper (Recommended)
|
|
73
|
+
description:
|
|
74
|
+
rationale: Streams audit events to a downstream log destination; required only in regulated-deployment variants.
|
|
75
|
+
recommendation: recommended — two regulated deployments already require exportable audit trails per the release-readiness ledger.
|
|
76
|
+
default-pointer: no-default: user decision required.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Multi-select questions MAY carry more than one ` (Recommended)` label postfix when several options are independently recommended and the operator may select all of them. The label/body bind still applies per option: every `recommendation: recommended` option carries the postfix, no non-recommended option carries it. Multi-select questions carry `default-pointer: no-default` on every option when the question has no canonical subset-default — the operator's pick is the sole source of truth. When a canonical subset-default exists (e.g., a known-good default tool set), every option's `default-pointer:` names the same subset so the question stays internally consistent.
|
|
80
|
+
|
|
81
|
+
### 2. Three-Segment Option Annotation — Full Schema
|
|
82
|
+
|
|
83
|
+
Every option's description body contains exactly three segments, in fixed order, separated by newlines or period-space:
|
|
84
|
+
|
|
85
|
+
1. **rationale:** one sentence. What this option means and its immediate effect on ecosystem state. No forward-looking promises; only the direct, observable consequence.
|
|
86
|
+
2. **recommendation:** one value from the closed taxonomy, optionally followed by a concrete-driver why-clause (required when the value is non-neutral per §3):
|
|
87
|
+
- `recommended` — the operator is advised to pick this.
|
|
88
|
+
- `acceptable` — valid choice; the operator may pick freely.
|
|
89
|
+
- `discouraged` — valid but the rationale makes it structurally inferior for the situation.
|
|
90
|
+
- `destructive-no-default` — the option represents an irreversible operation; no default is admissible.
|
|
91
|
+
3. **default-pointer:** names the safe default with rationale, OR explicitly `no-default: user decision required`. Destructive operations always use the `no-default` form per §6.
|
|
92
|
+
|
|
93
|
+
A fifth taxonomy value is admissible only via the §3.3 extension protocol; ad-hoc values are non-compliant.
|
|
94
|
+
|
|
95
|
+
At the label level, one marker is permitted: ` (Recommended)` (single leading space) MAY be appended to the label of the option whose body `recommendation:` value is exactly `recommended`. Bidirectional bind — the label carries the marker iff the body says `recommended`. No option carries more than one marker; no two options in the same question carry it — in a single-select (`multiSelect: false`) question. A `multiSelect: true` question MAY carry the marker on more than one option per §2.1 (each independently-recommended option carries its own postfix); see the §1.2 multi-select worked example. The marker lives SOLELY in the `label`; it MUST NOT appear anywhere in the option body (`rationale:` / `recommendation:` / `default-pointer:` narrative). The body carries verifiable concrete-driver evidence per §3.2, never the postfix string.
|
|
96
|
+
|
|
97
|
+
#### 2.1 Label Postfix Convention — Formal Specification
|
|
98
|
+
|
|
99
|
+
The label postfix is a positive-highlight marker that draws the operator's attention to the recommended path without competing for visual weight across the rest of the option set.
|
|
100
|
+
|
|
101
|
+
| Rule | Specification |
|
|
102
|
+
|------|---------------|
|
|
103
|
+
| Postfix string | Literal `(Recommended)` — the past-participle `Recommended` wrapped in parentheses, matching the native tool schema's own recommended-option convention. The canonical form is capital-`R` `(Recommended)`, recognized case-correctly. No abbreviations (`(Rec)`, `(R)`), no variants (`(recommend)`, the lowercase `(recommended)`, `[Recommended]` square-bracketed), no translation. |
|
|
104
|
+
| Separator | Exactly one space between the domain label and the opening parenthesis. `Accept (Recommended)` is compliant; `Accept(Recommended)` and `Accept (Recommended)` are not. |
|
|
105
|
+
| Placement | End of the `label` field. No trailing whitespace, no trailing punctuation after the closing parenthesis. |
|
|
106
|
+
| Trigger condition | The option's body `recommendation:` value is exactly the string `recommended`. No other taxonomy value triggers the postfix; `acceptable`, `discouraged`, and `destructive-no-default` carry the body segment only. |
|
|
107
|
+
| Per-invocation cardinality | `multiSelect: false` invocations allow at most one postfix, since the choices are mutually exclusive. `multiSelect: true` invocations may carry one or more postfixes when multiple options are independently recommended and can be selected together. An invocation with zero recommended options (all `acceptable`/`discouraged`/`destructive-no-default`) carries zero postfixes and is compliant when no option dominates. |
|
|
108
|
+
| Bidirectional bind | If the label carries `(Recommended)`, the body `recommendation:` value MUST be exactly `recommended`. If the body value is exactly `recommended`, the label MAY carry `(Recommended)` — in practice, the label SHOULD carry the postfix on the recommended option to realize the positive-highlight intent. The H6 heuristic flags label↔body mismatches in both directions. |
|
|
109
|
+
| Label-only placement | The `(Recommended)` (and the prose-and-document `**Recommended**`) marker lives SOLELY in the `label`. It MUST NOT appear in any body segment — not in `rationale:`, not in `recommendation:`, not in `default-pointer:`. The body's `recommendation:` segment carries the closed-taxonomy value plus a verifiable concrete-driver why-clause per §3.2, never the marker string. A marker string surfacing inside a body segment is a `narrative-marker-leak` — the H6 matcher flags it as a finding (`conformity/option_annotation_grep.py`). |
|
|
110
|
+
| Multi-select cardinality | A `multiSelect: true` question MAY carry the marker on more than one option — one postfix per independently-recommended option whose body value is exactly `recommended`. Only `multiSelect: false` questions are capped at a single recommended option. The §1.2 multi-select worked example is the canonical multiple-recommended shape. |
|
|
111
|
+
|
|
112
|
+
##### 2.1.1 Runtime Call-Time Validator
|
|
113
|
+
|
|
114
|
+
The static H4–H7 sweep (`rules/interactive-questions-sweep-matchers.md`) checks committed `*.md` artifacts; it does NOT see the live `AskUserQuestion` tool payload at the moment the agent asks the operator. The runtime PreToolUse `AskUserQuestion` validator (`hooks/askuserquestion_validator.py`, dispatch-routed via the `pretooluse-askuserquestion-recommended` message basename and persisting plugin-alone through `_PLUGIN_HOOK_ENTRIES` in `lib/plugin_tree.py`) closes that call-time gap. It inspects the live `questions` array — each question's `options[].label` and `multiSelect` — and validates the §2.1 postfix specification against the payload directly, reusing the canonical marker forms from `conformity/option_annotation_grep.py`.
|
|
115
|
+
|
|
116
|
+
The validator checks two finding classes:
|
|
117
|
+
|
|
118
|
+
- **Well-formedness (block-eligible under the strict opt-in)** — objectively decidable from the payload: a banned lowercase `(recommended)` (non-canonical case), a non-canonical bracket/spacing form (`[Recommended]`, `(Rec)`, `(Recommended )`), the marker on a clearly-destructive option label (contradicts the §5.8 no-default floor for irreversible operations), and more than one marker on a `multiSelect: false` question (single-select multi-recommended).
|
|
119
|
+
- **Nudge (advisory only — never blocks)** — a `multiSelect: false` question with two or more substantive options and zero markers is *advised* to mark its recommended option. Because the native payload carries no separate "recommended" field — the marker IS the only signal of which option is recommended — a missing marker cannot be proven a defect at runtime; forcing a recommendation to exist remains a behavioral-convention obligation, surfaced here only as a heuristic nudge.
|
|
120
|
+
|
|
121
|
+
The validator is advisory by default (a `systemMessage`; the question proceeds) and escalates well-formedness findings — never the nudge — to a `decision: block` under the repo's strict opt-in (`APOTHEM_CONFORMITY_STRICT=1` or `--strict`, mirroring `conformity/gate.py`). It is fail-open: any exception yields an allow envelope, so a validator error never crashes the operator's question.
|
|
122
|
+
|
|
123
|
+
#### 2.2 Invariants — Failure Modes
|
|
124
|
+
|
|
125
|
+
The heuristic sweep (`rules/interactive-questions-sweep-matchers.md`) detects these as HIGH-severity gate findings:
|
|
126
|
+
|
|
127
|
+
1. **Body-segment omission (H4).** An option's `description` lacks any of the three required segments (`rationale:`, `recommendation:`, `default-pointer:`). Every option carries all three regardless of taxonomy value.
|
|
128
|
+
2. **Missing label postfix (H6, body→label direction).** An option's body `recommendation:` value is exactly `recommended` but the label does not end with ` (Recommended)`. Bidirectional bind violated.
|
|
129
|
+
3. **Spurious label postfix (H6, label→body direction).** An option's label ends with ` (Recommended)` but the body `recommendation:` value is not `recommended`. Bidirectional bind violated; the lowercase ` (recommended)` form is itself a non-canonical-case violation.
|
|
130
|
+
4. **Single-select multi-postfix (H6, cardinality direction).** A `multiSelect: false` invocation has more than one recommended postfix. The mutually-exclusive shape cannot recommend multiple choices.
|
|
131
|
+
|
|
132
|
+
Two related failure modes anchor to adjacent subsections:
|
|
133
|
+
|
|
134
|
+
- **Non-neutral recommendation without concrete driver (H5)** — flagged per §3.2's concrete-driver citation requirement.
|
|
135
|
+
- **Destructive op without `no-default` floor (H7)** — flagged per §5.2's default floor and §6's default-pointer convention.
|
|
136
|
+
|
|
137
|
+
#### 2.3 Worked Examples — Anchor
|
|
138
|
+
|
|
139
|
+
The canonical worked examples for the annotation schema are §1.1 (single-select) and §1.2 (multi-select). §4.2 shows the same schema rendered in fallback prose form; §5.4–§5.7 show it applied to destructive-op canonical option sets. Downstream artifacts copy any of these fenced blocks as invocation templates.
|
|
140
|
+
|
|
141
|
+
### 3. Recommendation Taxonomy
|
|
142
|
+
|
|
143
|
+
#### 3.1 Closed Four-Value Set
|
|
144
|
+
|
|
145
|
+
The closed taxonomy is `{recommended, acceptable, discouraged, destructive-no-default}`. Every `recommendation:` body segment resolves to exactly one value from the set.
|
|
146
|
+
|
|
147
|
+
#### 3.2 Concrete-Driver Citation Requirement
|
|
148
|
+
|
|
149
|
+
Every non-neutral recommendation (`recommended`, `discouraged`, `destructive-no-default`) cites at least one concrete driver in its why-clause. The neutral value `acceptable` requires no why-clause but may carry one.
|
|
150
|
+
|
|
151
|
+
##### 3.2.1 Driver Taxonomy
|
|
152
|
+
|
|
153
|
+
A concrete driver is one of six classes:
|
|
154
|
+
|
|
155
|
+
1. **Locked decision** — a previously-resolved decision referenced by its identifier (e.g., a plan-suite decision-log row, an RFC resolution, a design-review outcome). The citation is the identifier plus the anchor (e.g., `D-7` in the plan-suite decision log, or a section pointer in the design-review minute).
|
|
156
|
+
2. **Named risk** — a risk the ecosystem has cataloged with an identifier and a mitigation path (e.g., an entry in a risk register). The citation is the identifier.
|
|
157
|
+
3. **Named constraint** — a constraint the ecosystem has declared with an identifier (e.g., a non-negotiable invariant, a compliance requirement, an SLA clause). The citation is the identifier.
|
|
158
|
+
4. **Open-question posture** — a decision the operator has deferred or not yet resolved, referenced by its identifier. The citation is the identifier and a note on the posture's current state.
|
|
159
|
+
5. **Rule citation** — a specific rule with an explicit path and section anchor (e.g., `rules/context-management.md §2.6.1`). The citation is the full rule-file path plus the section anchor that states the binding clause.
|
|
160
|
+
6. **Observed ecosystem state** — a measured fact (metric, file contents, gate result, log entry, dependency-graph analysis) with a reproducible evidence pointer (path, line range, or command that produces the evidence). The citation includes enough context for an auditor to verify the observation.
|
|
161
|
+
|
|
162
|
+
Every non-neutral recommendation cites at least one driver from classes 1–6 inside its why-clause. Citing two or three is admissible when they jointly justify the recommendation; citing more than three signals the recommendation is probably `acceptable` in disguise (the weight of evidence makes the call underdetermined).
|
|
163
|
+
|
|
164
|
+
##### 3.2.2 Vague-Rationale Forbid List
|
|
165
|
+
|
|
166
|
+
The following phrases are NOT concrete drivers and MUST NOT serve as the sole justification for a non-neutral recommendation. The list is non-exhaustive — any phrase expressing an opinion without grounding it in one of the six driver classes falls under the same prohibition:
|
|
167
|
+
|
|
168
|
+
- `"this is better"` / `"this is safer"` / `"this is faster"` — opinion without measurement
|
|
169
|
+
- `"industry standard"` / `"best practice"` / `"widely accepted"` — appeal to external consensus without a named source
|
|
170
|
+
- `"more scalable"` / `"more maintainable"` / `"more robust"` — quality claim without a specific pressure metric
|
|
171
|
+
- `"cleaner"` / `"more elegant"` / `"more idiomatic"` — aesthetic claim without a concrete reader or convention citation
|
|
172
|
+
- `"generally speaking"` / `"in most cases"` / `"usually"` — hedge that concedes the recommendation does not apply to the specific case
|
|
173
|
+
|
|
174
|
+
The anti-example: `"Safer, generally speaking"` is not a concrete driver; `"rollback is trivial if we keep the prior file around"` is.
|
|
175
|
+
|
|
176
|
+
##### 3.2.3 Downgrade Path
|
|
177
|
+
|
|
178
|
+
When no concrete driver supports a non-neutral recommendation, the author's obligation is to downgrade the recommendation to `acceptable` and make the rationale neutral — no implied ordering between options, no hedge words, no appeal to opinion. A downgraded option's `recommendation:` value becomes `acceptable`; its label drops the ` (Recommended)` postfix if it carried one; its `rationale:` describes the option's observable effect without claiming superiority. The downgrade is the safe default when evidence is insufficient; it is never a degradation of the option set.
|
|
179
|
+
|
|
180
|
+
##### 3.2.4 Worked Example — Before / After
|
|
181
|
+
|
|
182
|
+
**Before (non-compliant):**
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
- label: Rewrite from scratch (Recommended)
|
|
186
|
+
description:
|
|
187
|
+
rationale: Fresh rewrite resets accumulated technical debt.
|
|
188
|
+
recommendation: recommended — this is safer and cleaner.
|
|
189
|
+
default-pointer: Rewrite from scratch — the cleaner option is the default.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The `recommendation:` why-clause cites no concrete driver. `"safer and cleaner"` is on the forbid list.
|
|
193
|
+
|
|
194
|
+
**After (compliant):**
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
- label: Rewrite from scratch (Recommended)
|
|
198
|
+
description:
|
|
199
|
+
rationale: Fresh rewrite resets accumulated technical debt.
|
|
200
|
+
recommendation: recommended — cites observed-state fact: the current module has 14 `# TODO:` markers and 6 orphan branches per the dependency graph; a partial rewrite would preserve the orphan branches. Also cites the rule `rules/clean-room-generation.md` §3 re-writing protocol requiring quality elevation over cosmetic editing.
|
|
201
|
+
default-pointer: Rewrite from scratch — the current module's measured defect density supports the default.
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The non-compliant version was downgradeable to `acceptable` if no evidence were available. The compliant version cites a class 6 observed-state fact and a class 5 rule citation, satisfying §3.2.1 with double-grounded justification.
|
|
205
|
+
|
|
206
|
+
##### 3.2.5 Mitigation Anchor
|
|
207
|
+
|
|
208
|
+
The concrete-driver requirement mitigates driverless-recommendation bias — a recommendation without a driver nudges the operator without giving them reasoning to evaluate. H5 sweeps every invocation for non-neutral `recommendation:` values lacking an admissible §3.2.1 driver or matching the §3.2.2 forbid list; hits are HIGH-severity gate findings.
|
|
209
|
+
|
|
210
|
+
#### 3.3 Extension Protocol
|
|
211
|
+
|
|
212
|
+
Introducing a fifth taxonomy value requires: (a) a documented rationale grounded in a concrete driver the existing four cannot capture, (b) a definition entry written into this companion's §3.1 closed set, (c) a matching update to any compliance checks the sweep tooling emits. Ad-hoc extension in a single artifact is non-compliant; the extension is ecosystem-wide when it lands.
|
|
213
|
+
|
|
214
|
+
### 4. Harness Fallback — Full Specification
|
|
215
|
+
|
|
216
|
+
When the active harness exposes structured inquiry on neither the runtime tool surface (direct inspection) nor the deferred-tool discovery mechanism, the structured prose fallback replaces the tool invocation.
|
|
217
|
+
|
|
218
|
+
#### 4.1 Detection Logic
|
|
219
|
+
|
|
220
|
+
The activation predicate is `direct-surface-outcome = absent AND deferred-resolution-outcome ∈ {absent, not-applicable}`. Any other combination (including `direct-surface-outcome = absent` with `deferred-resolution-outcome = exposed-after-resolution`) keeps the tool as the primary channel; the fallback does not fire.
|
|
221
|
+
|
|
222
|
+
The detection record is the authoritative upstream source. Artifacts cite the pre-flight probe record (path, `final-state` field, timestamp) instead of re-inferring state. The probe record and its post-install re-probe sibling carry the five-field schema. Detection pseudocode:
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
probe = read(probe-record-path)
|
|
226
|
+
direct = probe.fields["direct-surface-outcome"]
|
|
227
|
+
deferred = probe.fields["deferred-resolution-outcome"]
|
|
228
|
+
final = probe.fields["final-state"]
|
|
229
|
+
|
|
230
|
+
if direct == "absent" and deferred in {"absent", "not-applicable"}:
|
|
231
|
+
emit_fallback() # §4.2 + §4.3 apply
|
|
232
|
+
else:
|
|
233
|
+
invoke_tool() # canonical channel per parent §1
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
A harness whose runtime surface exposes neither direct nor deferred-tool discovery declares the absent-absent combination by default; an operator override (explicit declaration that the harness lacks the tool) produces the same combination and activates the fallback.
|
|
237
|
+
|
|
238
|
+
#### 4.2 Fallback Prose Shape
|
|
239
|
+
|
|
240
|
+
The fallback emits a structured prose prompt mirroring the tool's schema:
|
|
241
|
+
|
|
242
|
+
- one-sentence question ending in `?`, identical shape to the tool's `question` field;
|
|
243
|
+
- a short header (at most 12 characters) on its own line;
|
|
244
|
+
- a labeled option list, one option per line, in the form `- <label>: <three-segment body>`;
|
|
245
|
+
- a closing instruction of the exact form `Reply with the label of your choice.` (or, when multi-select is explicitly admissible, `Reply with the labels of your choices, comma-separated.`).
|
|
246
|
+
|
|
247
|
+
The three-segment body inside the fallback mirrors §2 exactly — `rationale:`, `recommendation:`, `default-pointer:` — so the operator sees identical information density in both forms. The `(Recommended)` label postfix per §2 is carried through unchanged. Destructive-op fallbacks carry the §5.4–§5.7 canonical option sets verbatim and the §5.2 default-floor (`default-pointer: no-default: user decision required` on every option); the §5.8 no-multiSelect invariant applies equally (the closing instruction uses the single-label phrasing, never the comma-separated variant, on destructive-op invocations).
|
|
248
|
+
|
|
249
|
+
**Worked example — single-select fallback (mirrors §1.1):**
|
|
250
|
+
|
|
251
|
+
```text
|
|
252
|
+
[FALLBACK — structured-inquiry channel unavailable]
|
|
253
|
+
|
|
254
|
+
Is the consolidated prose ready to promote, or should it iterate further?
|
|
255
|
+
|
|
256
|
+
Prose output
|
|
257
|
+
|
|
258
|
+
- Accept (Recommended): rationale: The prose meets the specification bar; promotion writes the output to the authored-specification path and closes the crystallization loop. recommendation: recommended — the crystallization summary shows zero open unknowns and zero contradictions. default-pointer: Accept — safe because the output is written to a versioned path and can be regenerated from the signal inventory.
|
|
259
|
+
- Iterate: rationale: Specific sections need surgical refinement before promotion; the rest of the draft is preserved. recommendation: acceptable. default-pointer: Accept — the crystallization summary does not flag any section as weak; Iterate is offered for operator-driven refinement, not as the default.
|
|
260
|
+
- Reject: rationale: The draft is not salvageable; restart preserving only the raw input. recommendation: discouraged — the crystallization check reports more than 50% signal capture, so iteration is viable. default-pointer: Accept — Reject should be chosen only when the draft is fundamentally unsalvageable, which the crystallization check does not indicate here.
|
|
261
|
+
|
|
262
|
+
Reply with the label of your choice.
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
The fallback prose preserves the ` (Recommended)` label postfix, every option's three-segment body, the same default-pointer convention, and the exact closing-instruction form the canonical schema specifies. Annotation-compliance heuristics (H4–H7) sweep the fallback form with the same matchers used against native tool invocations — the fallback is not an exemption channel.
|
|
266
|
+
|
|
267
|
+
#### 4.3 Explicit-Flag Mandate
|
|
268
|
+
|
|
269
|
+
Every fallback invocation emits two concurrent artifacts — a conversation-visible marker and a ledger-append record — so the degradation from tool to prose is never silent on either surface.
|
|
270
|
+
|
|
271
|
+
**Conversation marker (required).** The fallback prompt is immediately preceded by the literal string `[FALLBACK — structured-inquiry channel unavailable]` on its own line, rendered as part of the assistant's reply. The marker is visible to the operator; it is never suppressed, collapsed, or moved to a peripheral location.
|
|
272
|
+
|
|
273
|
+
**Ledger-append record (required).** Every fallback invocation appends one row to `ecosystem-remediation-ledger.md` under a `fallback-invocations` section, with these fields:
|
|
274
|
+
|
|
275
|
+
| Field | Type | Content |
|
|
276
|
+
|-------|------|---------|
|
|
277
|
+
| `timestamp` | ISO 8601 UTC | Invocation moment |
|
|
278
|
+
| `surface-id` | string | Catalog ID of the surface that emitted the fallback (e.g., `S-003`), or a synthesized `adhoc-<short-uuid>` when the invocation does not originate from a cataloged surface |
|
|
279
|
+
| `detection-outcome` | tuple | `(direct-surface-outcome, deferred-resolution-outcome, final-state)` as derived from the pre-flight probe record |
|
|
280
|
+
| `question-text` | string | The exact `question` field as rendered in the fallback |
|
|
281
|
+
| `options-labels` | ordered array of strings | The option labels in render order |
|
|
282
|
+
| `multiSelect` | boolean | `false` on destructive-op invocations per §5.8; otherwise matches the underlying invocation's shape |
|
|
283
|
+
| `probe-record-path` | string | Path to the probe record that established the absent-absent detection outcome |
|
|
284
|
+
|
|
285
|
+
A fallback invocation that lands on the conversation without its ledger-append row, or in the ledger without its conversation marker, is a protocol violation flagged HIGH severity by the 13th-gate heuristic sweep.
|
|
286
|
+
|
|
287
|
+
#### 4.4 Invariant — Fallback Is the Sole Permitted Free-Form Prompt
|
|
288
|
+
|
|
289
|
+
Outside the fallback context defined by §4.1's activation predicate, free-form prose questions as primary input are forbidden ecosystem-wide. The fallback's structured prose shape (§4.2) is the SOLE permitted free-form-looking prompt, and even that form carries the §4.3 conversation marker so the degradation is unambiguous. Every non-fallback free-form question across commands, rules, skills, agents, and hook code is a violation of heuristic H1, H2, or H3 and fails the interactive-channel compliance gate admitted to the airtightness composite. The invariant's enforcement arm is the heuristic sweep at `rules/interactive-questions-sweep-matchers.md`; this subsection declares the invariant itself.
|
|
290
|
+
|
|
291
|
+
### 5. Per-File Destructive-Op Confirmation — Canonical Option Sets
|
|
292
|
+
|
|
293
|
+
Every destructive operation routes through the structured-inquiry channel on a per-file basis. One question per file, every time, with no batching across files.
|
|
294
|
+
|
|
295
|
+
#### 5.1 Option Set
|
|
296
|
+
|
|
297
|
+
Destructive-op questions carry a standardized two-option body at minimum:
|
|
298
|
+
|
|
299
|
+
- one option representing the destructive action, with `recommendation: destructive-no-default` and a concrete-driver why-clause explaining why the destruction is proposed;
|
|
300
|
+
- one option representing the non-destructive alternative (retain, rename-to-archive, convert-to-reference), with `recommendation: recommended` or `acceptable` as appropriate and a concrete-driver why-clause.
|
|
301
|
+
|
|
302
|
+
A third option is admissible when the decision has a genuinely three-way shape; a fourth when genuinely four-way. Padding the option count for symmetry is non-compliant.
|
|
303
|
+
|
|
304
|
+
#### 5.2 Default Floor
|
|
305
|
+
|
|
306
|
+
Every option in a destructive-op question carries `default-pointer: no-default: user decision required`. No silent agent-proposed default is admissible on irreversible operations. Pre-selection, pre-highlighting, or pre-sorting the options so the destructive option lands in the first slot — all are non-compliant.
|
|
307
|
+
|
|
308
|
+
#### 5.3 Logging Mandate
|
|
309
|
+
|
|
310
|
+
The operation, its options, the user's response, and the post-confirmation filesystem delta all land in the authoritative remediation record for the session.
|
|
311
|
+
|
|
312
|
+
#### 5.4 Canonical Option Set — Delete
|
|
313
|
+
|
|
314
|
+
File or directory removal from the working tree. The canonical option set is `{Retire, Keep, Defer, Explain-first}`.
|
|
315
|
+
|
|
316
|
+
- **Retire** — destructive; the artifact is removed from the working tree. Body `recommendation: destructive-no-default` with a concrete-driver why-clause naming why removal is proposed (e.g., "zero inbound references in the dependency graph; not load-bearing per the stratum assignment").
|
|
317
|
+
- **Keep** — non-destructive; the artifact remains at its current path. Body `recommendation: acceptable` by default, or `recommended` when the retain-bias invariant applies (retention preserves the option of a later retire cycle).
|
|
318
|
+
- **Defer** — the decision is deferred to a later cycle; the artifact is flagged for re-examination. Body `recommendation: acceptable`.
|
|
319
|
+
- **Explain-first** — the agent surfaces additional evidence (dependency graph, usage trace, stratum classification) before the operator commits; a follow-up invocation runs once the evidence is reviewed. Body `recommendation: acceptable`.
|
|
320
|
+
|
|
321
|
+
#### 5.5 Canonical Option Set — Rename
|
|
322
|
+
|
|
323
|
+
Path change at the file level (name change; parent directory unchanged). The canonical option set is `{Rename-as-proposed, Keep-current, Propose-alternative, Defer}`.
|
|
324
|
+
|
|
325
|
+
- **Rename-as-proposed** — destructive at the path level; the artifact moves to the agent's proposed new path and its prior path becomes invalid for any inbound reference. Body `recommendation: destructive-no-default` with a concrete-driver why-clause naming why the proposed name is superior (e.g., "conforms to kebab-case convention; current name is a legacy outlier per the naming-convention sweep").
|
|
326
|
+
- **Keep-current** — non-destructive; the path is unchanged.
|
|
327
|
+
- **Propose-alternative** — the operator supplies a different name via the Other-text affordance; the agent re-invokes with the alternative as the proposed rename, preserving the per-file invocation floor.
|
|
328
|
+
- **Defer** — decision deferred; the artifact retains its current path for now.
|
|
329
|
+
|
|
330
|
+
#### 5.6 Canonical Option Set — Move
|
|
331
|
+
|
|
332
|
+
Path change at the directory level. The canonical option set is `{Move-as-proposed, Keep-current, Propose-alternative, Defer}`.
|
|
333
|
+
|
|
334
|
+
- **Move-as-proposed** — destructive at the path level; the artifact moves to the agent's proposed new directory. Body `recommendation: destructive-no-default` with a concrete-driver why-clause naming why the move preserves reachability.
|
|
335
|
+
- **Keep-current** — non-destructive; the artifact stays in its current directory.
|
|
336
|
+
- **Propose-alternative** — the operator supplies a different destination via Other-text; the agent re-invokes with the alternative.
|
|
337
|
+
- **Defer** — decision deferred; the artifact retains its current directory.
|
|
338
|
+
|
|
339
|
+
#### 5.7 Canonical Option Set — Revert Uncommitted Modifications
|
|
340
|
+
|
|
341
|
+
Version-control-level discard: uncommitted edits in the working tree are dropped. The canonical option set is `{Discard, Keep, Stash-for-later, Defer}`.
|
|
342
|
+
|
|
343
|
+
- **Discard** — destructive; `git restore --worktree` (or the VCS-equivalent) removes the uncommitted edits from the working tree. Body `recommendation: destructive-no-default` with a concrete-driver why-clause naming why the revert is proposed (e.g., "partial task state is inconsistent; the documented recovery path is a clean re-execute of the task from scratch").
|
|
344
|
+
- **Keep** — non-destructive; the uncommitted edits remain in the working tree for the operator to triage. Body `recommendation: acceptable`.
|
|
345
|
+
- **Stash-for-later** — non-destructive; the uncommitted edits are stashed to a VCS-managed holding area (`git stash push` or the VCS-equivalent) and can be retrieved later via `git stash pop`. Body `recommendation: acceptable`.
|
|
346
|
+
- **Defer** — decision deferred; STOP and emit a fresh invocation before any subsequent action. Body `recommendation: acceptable`.
|
|
347
|
+
|
|
348
|
+
#### 5.8 Invocation-Shape Invariants
|
|
349
|
+
|
|
350
|
+
Destructive-op invocations carry two invariants on top of the generic invocation shape:
|
|
351
|
+
|
|
352
|
+
- **No multi-select.** `multiSelect: true` is non-compliant on destructive-op invocations. Each invocation resolves a single destructive decision on a single file. Batching destructive decisions across multiple files — whether via `multiSelect: true` or via a single invocation whose options conflate multiple files — is forbidden by the per-file floor. The loop-over-files-and-invoke pattern is the only compliant shape.
|
|
353
|
+
- **Default floor preserved.** Every option's `default-pointer:` is `no-default: user decision required` per §5.2. Enforcement of the floor is specified at §6 (default-pointer convention) and compliance-checked by the H7 heuristic. The label-level postfix marker ` (Recommended)` per §2 MUST NOT mark a destructive option, because a recommendation marker on an irreversible action contradicts the no-default floor; the postfix may mark a non-destructive option when its body `recommendation:` value is `recommended`.
|
|
354
|
+
|
|
355
|
+
### 6. Default-Pointer Convention — Worked Examples
|
|
356
|
+
|
|
357
|
+
The `default-pointer:` body segment names the safe default with rationale OR explicitly declares `no-default: user decision required`.
|
|
358
|
+
|
|
359
|
+
- **Named-default form:** `default-pointer: <option-label> — <one-sentence rationale>`. The named option's rationale explains why it is safe (reversible, low-impact, aligns with prior decisions). The named default must be one of the question's actual options.
|
|
360
|
+
- **No-default form:** `default-pointer: no-default: user decision required`. Destructive operations always use this form per §5.2. Non-destructive operations may use it when the decision is genuinely non-comparable across options (e.g., strategic scope choices).
|
|
361
|
+
|
|
362
|
+
The convention is bidirectional: a question whose options all carry `destructive-no-default` in their `recommendation:` values MUST carry the no-default form on every option's `default-pointer:`. A question carrying a mix of neutral and named-default pointers MUST be consistent — no option's pointer contradicts another's.
|
|
363
|
+
|
|
364
|
+
#### 6.1 Safe-Default Naming
|
|
365
|
+
|
|
366
|
+
When the question admits a safe default, every option's `default-pointer:` uses the named-default form:
|
|
367
|
+
|
|
368
|
+
```yaml
|
|
369
|
+
default-pointer: <option-label> — <one-sentence rationale citing a concrete driver from §3.2.1>
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
The named option's rationale cites at least one concrete driver from the six-class taxonomy at §3.2.1. "Safe" is never a bare claim — it is grounded in a class 6 observed-state fact (e.g., "the output is written to a versioned path and can be regenerated") or a class 5 rule citation (e.g., "the retain-bias invariant prevents silent destruction") or another admissible driver class.
|
|
373
|
+
|
|
374
|
+
Every option in the same question carries the SAME named-default value — the default is a question-wide property, not a per-option property. Each option's `default-pointer:` may vary the rationale text (explaining why the default applies from that option's vantage) but MUST name the same default option.
|
|
375
|
+
|
|
376
|
+
#### 6.2 No-Default Declaration
|
|
377
|
+
|
|
378
|
+
When no safe default exists, every option's `default-pointer:` uses the no-default form with the verbatim marker string:
|
|
379
|
+
|
|
380
|
+
```yaml
|
|
381
|
+
default-pointer: no-default: user decision required
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
The string is literal — no abbreviations (`no-default: user decides`), no variants (`no-default: none`), no translation. The H7 heuristic matcher searches for this exact string; a question carrying a near-variant is a HIGH-severity gate finding.
|
|
385
|
+
|
|
386
|
+
Non-destructive operations use no-default when the decision is genuinely non-comparable across options — strategic scope choices, subset-triage decisions under multi-select, tier-selection decisions where operator context dominates agent heuristics.
|
|
387
|
+
|
|
388
|
+
#### 6.3 Destructive-Op Invariant
|
|
389
|
+
|
|
390
|
+
Every destructive-op invocation (delete / rename / move / overwrite-without-retention / revert-uncommitted-modifications) carries the no-default marker on every option; silent agent-proposed defaults on irreversible operations are forbidden. Anchored at §5.2 Default Floor + §5.8 Invocation-Shape Invariants; inherited by every §5.4–§5.7 canonical option-set.
|
|
391
|
+
|
|
392
|
+
#### 6.4 Worked Examples — Contrast
|
|
393
|
+
|
|
394
|
+
**Non-destructive, safe-default named:**
|
|
395
|
+
|
|
396
|
+
```yaml
|
|
397
|
+
question: Should the schema migration apply a patch or a full rewrite?
|
|
398
|
+
header: Migration
|
|
399
|
+
multiSelect: false
|
|
400
|
+
options:
|
|
401
|
+
- label: Patch (Recommended)
|
|
402
|
+
description:
|
|
403
|
+
rationale: Applies the minimal diff to the schema; preserves every existing row without touching column types.
|
|
404
|
+
recommendation: recommended — cites observed-state fact: the migration target is one additive column, no type change, no data migration; the rule `rules/clean-room-generation.md` §1.1 case (c) applies (needs-integration-changes; re-write-only-the-modified-portion).
|
|
405
|
+
default-pointer: Patch — safe because the patch is reversible via a down-migration and the schema's primary-key column is untouched.
|
|
406
|
+
- label: Full rewrite
|
|
407
|
+
description:
|
|
408
|
+
rationale: Reconstructs the schema from scratch with a clean re-derivation.
|
|
409
|
+
recommendation: discouraged — cites observed-state fact: migration scope is one additive column, far below the clean-room-threshold for full re-derivation.
|
|
410
|
+
default-pointer: Patch — safe because the patch is reversible via a down-migration and the schema's primary-key column is untouched.
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Both options' `default-pointer:` names `Patch` as the question-wide default, with rationales citing class 6 observed-state facts per §3.2.1.
|
|
414
|
+
|
|
415
|
+
**Destructive, no-default universal:**
|
|
416
|
+
|
|
417
|
+
```yaml
|
|
418
|
+
question: How should the orphan module at `src/legacy/parser_v1.py` be retired?
|
|
419
|
+
header: Retire file
|
|
420
|
+
multiSelect: false
|
|
421
|
+
options:
|
|
422
|
+
- label: Retire
|
|
423
|
+
description:
|
|
424
|
+
rationale: Removes the file from the working tree.
|
|
425
|
+
recommendation: destructive-no-default — cites observed-state fact: zero inbound references in the dependency graph; the stratum assignment places the file in the orphan tail; the retain-bias invariant yields to the measurable absence of callers.
|
|
426
|
+
default-pointer: no-default: user decision required
|
|
427
|
+
- label: Keep
|
|
428
|
+
description:
|
|
429
|
+
rationale: Preserves the file at its current path for a later re-examination cycle.
|
|
430
|
+
recommendation: acceptable
|
|
431
|
+
default-pointer: no-default: user decision required
|
|
432
|
+
- label: Defer
|
|
433
|
+
description:
|
|
434
|
+
rationale: Marks the file for re-examination in a subsequent retire-cycle; no filesystem change now.
|
|
435
|
+
recommendation: acceptable
|
|
436
|
+
default-pointer: no-default: user decision required
|
|
437
|
+
- label: Explain-first
|
|
438
|
+
description:
|
|
439
|
+
rationale: Surfaces additional evidence before the operator commits; a follow-up invocation runs after review.
|
|
440
|
+
recommendation: acceptable
|
|
441
|
+
default-pointer: no-default: user decision required
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Every option's `default-pointer:` carries the verbatim no-default marker; no named default is admissible because the Retire leg is irreversible. No option carries the ` (Recommended)` label postfix — §5.8 forbids the postfix on destructive options, and the only `recommendation: recommended`-eligible candidate would be the Retire leg, which is destructive.
|
|
445
|
+
|
|
446
|
+
### 5.9 Canonical Option Set — Plans-Locality Guard
|
|
447
|
+
|
|
448
|
+
Plans-Discipline write guard for Write / Edit / NotebookEdit / Bash tool calls intercepting plan-shaped writes that would land outside the active project's `.apothem/plans/` tree. Two variants — the hard-block 2-option set fires when the target path is under a harness-config-root `.plans/` directory; the soft-flag 3-option set fires when the target path is in another global-ecosystem location with plan-shaped filename or content. Sourced by `hooks/messages/pretooluse-write-plan-guard.md` and `hooks/messages/pretooluse-bash-plan-guard.md`.
|
|
449
|
+
|
|
450
|
+
#### 5.9.1 Hard-Block Variant — 2-Option Set
|
|
451
|
+
|
|
452
|
+
```yaml
|
|
453
|
+
question: "The write target '<rejected-path>' is under a global plans
|
|
454
|
+
directory (e.g., '~/.claude/.plans/' on the claude_code harness)
|
|
455
|
+
but the active project root is '<project-root>'.
|
|
456
|
+
Plans-Discipline forbids writing plans to the global ecosystem;
|
|
457
|
+
redirect to the project-local plans directory or cancel?"
|
|
458
|
+
header: "Plan guard"
|
|
459
|
+
multiSelect: false
|
|
460
|
+
options:
|
|
461
|
+
- label: "redirect-to-project-plans (Recommended)"
|
|
462
|
+
description:
|
|
463
|
+
rationale: Rewrites the target path under the resolved project's
|
|
464
|
+
.apothem/plans/ directory ('<project-root>/.apothem/plans/...'), preserving
|
|
465
|
+
the file's relative position within the suite.
|
|
466
|
+
recommendation: recommended — cites class 5 rule citation: the CLAUDE.md Plans
|
|
467
|
+
Discipline section (Plans-Locality) and the spec at
|
|
468
|
+
suite specification; class 6 observed-state: the
|
|
469
|
+
target path resolves under the global ecosystem but the
|
|
470
|
+
active project has its own .apothem/plans/ directory.
|
|
471
|
+
default-pointer: redirect-to-project-plans — safe because the redirected
|
|
472
|
+
write lands at the canonical project-local destination
|
|
473
|
+
and is reversible at the project's git layer.
|
|
474
|
+
- label: "cancel"
|
|
475
|
+
description:
|
|
476
|
+
rationale: Blocks the write; no file is modified; the operator may
|
|
477
|
+
revise the target path or invoke /plan-spec --quick to
|
|
478
|
+
route the content through the canonical plan-write path.
|
|
479
|
+
recommendation: acceptable
|
|
480
|
+
default-pointer: redirect-to-project-plans — cancel is appropriate when
|
|
481
|
+
the write requires architectural review before emission.
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
For Bash-tool invocations the label is `rewrite-redirect-to-project-plans` (in place of `redirect-to-project-plans`) and the question prose substitutes "Bash command would write … via shell redirection" for the Write-route phrasing; option bodies are otherwise identical.
|
|
485
|
+
|
|
486
|
+
#### 5.9.2 Soft-Flag Variant — 3-Option Set
|
|
487
|
+
|
|
488
|
+
```yaml
|
|
489
|
+
question: "The write target '<flagged-path>' lies outside the project's
|
|
490
|
+
.apothem/plans/ directory but carries plan-shaped content. Redirect to
|
|
491
|
+
project-local .apothem/plans/, write as proposed, or cancel?"
|
|
492
|
+
header: "Plan flag"
|
|
493
|
+
multiSelect: false
|
|
494
|
+
options:
|
|
495
|
+
- label: "redirect-to-project-plans (Recommended)"
|
|
496
|
+
description:
|
|
497
|
+
rationale: Rewrites the target path under the resolved project's
|
|
498
|
+
.apothem/plans/ directory ('<project-root>/.apothem/plans/<basename>'),
|
|
499
|
+
capturing the plan-shaped artifact at its canonical
|
|
500
|
+
destination.
|
|
501
|
+
recommendation: recommended — cites class 6 observed-state: the proposed
|
|
502
|
+
content has plan-shaped markers (filename pattern or
|
|
503
|
+
frontmatter signature) and the current target is outside
|
|
504
|
+
the project's .apothem/plans/ directory.
|
|
505
|
+
default-pointer: redirect-to-project-plans — safe because plan-shaped
|
|
506
|
+
artifacts at the canonical location preserve the
|
|
507
|
+
project's planning history under version control.
|
|
508
|
+
- label: "write-as-proposed"
|
|
509
|
+
description:
|
|
510
|
+
rationale: Writes the content at the originally-proposed path
|
|
511
|
+
without redirection; appropriate when the soft-flag
|
|
512
|
+
triggered on a false positive (a non-plan artifact whose
|
|
513
|
+
filename happens to contain 'plan' / 'notes' / 'draft').
|
|
514
|
+
recommendation: acceptable
|
|
515
|
+
default-pointer: redirect-to-project-plans — choose this only when the
|
|
516
|
+
artifact is genuinely not a plan despite the heuristic
|
|
517
|
+
match.
|
|
518
|
+
- label: "cancel"
|
|
519
|
+
description:
|
|
520
|
+
rationale: Blocks the write; no file is modified.
|
|
521
|
+
recommendation: acceptable
|
|
522
|
+
default-pointer: redirect-to-project-plans — cancel is appropriate when
|
|
523
|
+
the write requires triage before emission.
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
For Bash-tool invocations the action labels are `rewrite-redirect-to-project-plans` and `run-as-proposed` (in place of `redirect-to-project-plans` and `write-as-proposed`); option bodies are otherwise identical.
|
|
527
|
+
|
|
528
|
+
### 5.10 Canonical Option Set — Authorship-Header Guard
|
|
529
|
+
|
|
530
|
+
Authorship-header inject guard for Write / Edit tool calls — fires when a target file is applicable (suffix or basename maps to a known variant family) and `file-header-grep.check()` returns `HEADER_ABSENT` or `HEADER_MALFORMED`. Sourced by `hooks/messages/pretooluse-write-header-guard.md` (Write scope) and `hooks/messages/pretooluse-edit-header-guard.md` (Edit corner cases A and B).
|
|
531
|
+
|
|
532
|
+
```yaml
|
|
533
|
+
question: "The write target '<path>' has no canonical authorship header
|
|
534
|
+
(<rule-or-corner-case> · variant '<variant>') — accept the
|
|
535
|
+
corrected content, override with justification, or cancel?"
|
|
536
|
+
header: "Header guard"
|
|
537
|
+
multiSelect: false
|
|
538
|
+
options:
|
|
539
|
+
- label: "accept-corrected (Recommended)"
|
|
540
|
+
description:
|
|
541
|
+
rationale: Writes the corrected content with the canonical single-line SPDX license header
|
|
542
|
+
prepended at the correct position; the file body is
|
|
543
|
+
otherwise byte-identical to the original.
|
|
544
|
+
recommendation: recommended — the canonical single-line SPDX license header is required for all
|
|
545
|
+
applicable files per the ratification at
|
|
546
|
+
src/apothem/schemas/authorship-header.txt.
|
|
547
|
+
default-pointer: accept-corrected — safe because the change is limited
|
|
548
|
+
to the prepended header block and the write is fully
|
|
549
|
+
reversible.
|
|
550
|
+
- label: "write-anyway-with-justification"
|
|
551
|
+
description:
|
|
552
|
+
rationale: Writes the original headerless content and appends a
|
|
553
|
+
timestamped override row to .audit/header-overrides.md
|
|
554
|
+
(schema: timestamp · path · variant · rule ·
|
|
555
|
+
justification from Other-text, or
|
|
556
|
+
"[no justification supplied]" when absent).
|
|
557
|
+
recommendation: discouraged — bypasses the header policy; the override
|
|
558
|
+
record is an audit trail, not a closure; inject via
|
|
559
|
+
the apothem header-injector at
|
|
560
|
+
https://github.com/ahmed-g-gad/apothem/blob/main/scripts/inject-header.py
|
|
561
|
+
or add the path to
|
|
562
|
+
src/apothem/schemas/header-exceptions.txt to close the gap.
|
|
563
|
+
default-pointer: accept-corrected — choose this only when the file is
|
|
564
|
+
an exemption candidate not yet listed in
|
|
565
|
+
src/apothem/schemas/header-exceptions.txt.
|
|
566
|
+
- label: "cancel"
|
|
567
|
+
description:
|
|
568
|
+
rationale: Blocks the write; no file is modified; the user may
|
|
569
|
+
revise the content, update src/apothem/schemas/header-exceptions.txt,
|
|
570
|
+
or run the apothem header-injector
|
|
571
|
+
(https://github.com/ahmed-g-gad/apothem/blob/main/scripts/inject-header.py)
|
|
572
|
+
independently before retrying.
|
|
573
|
+
recommendation: acceptable
|
|
574
|
+
default-pointer: accept-corrected — cancel is appropriate when the write
|
|
575
|
+
requires architectural review before emission.
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
**Override-record schema.** When the operator selects `write-anyway-with-justification`, the guard appends one row to `.audit/header-overrides.md` with these columns: `timestamp` (ISO 8601 UTC) · `path` (target file's absolute path) · `variant` (variant-family identifier from SUFFIX_VARIANT / BASENAME_VARIANT) · `rule` (Write-route rule label OR Edit-route corner-case label: `create-via-edit` | `header-removal`) · `justification` (operator's Other-text content, or the literal `[no justification supplied]` when absent). The override record is an audit trail, not a closure — gap closure requires either injecting the header via the apothem header-injector or adding the path to `src/apothem/schemas/header-exceptions.txt`.
|
|
579
|
+
|
|
580
|
+
## Enforcement
|
|
581
|
+
|
|
582
|
+
Path-filtered (the five glob patterns in this rule's `pathFilter` field), always-on at every seriousness level when in scope. Demand-loaded canonical-shapes companion to `rules/interactive-questions.md`. The parent rule owns the canonical-channel obligation, structured-inquiry shape, section anchors, seriousness scaling, anti-patterns, and CM-2 extension binding; this companion owns the worked examples, annotation schema body, recommendation-taxonomy details, harness-fallback specification, destructive-op option-set templates, and default-pointer worked examples. With `rules/interactive-questions-sweep-matchers.md` (H1–H7 matcher catalog) they constitute the canonical specification for user-input surface discipline.
|
|
583
|
+
|
|
584
|
+
## Bindings (§0.j five-direction)
|
|
585
|
+
|
|
586
|
+
- **Drives →** ● Every authored structured-inquiry invocation (downstream artifacts copy §1.1 / §1.2 / §6.4 fenced blocks as templates). ● Every concrete-driver citation on non-neutral recommendations (the §3.2.1 driver taxonomy). ● Every fallback invocation's prose shape and explicit-flag emission (the §4.2 + §4.3 surfaces). ● Every destructive-op invocation's canonical option-set (the §5.4–§5.7 templates).
|
|
587
|
+
- **Satisfies →** ● CM-2 extension (companion-shapes tier of the structured-inquiry surface CM-2 delegates to). ● the rules registry row "Interactive Questions" (canonical-shapes companion). ● `rules/interactive-questions.md` (the parent rule's pointer to this companion's full schema and worked examples).
|
|
588
|
+
- **Established by ↑** ● `rules/interactive-questions.md` (parent-rule anchor at §2/§3/§4/§5/§6/§7). ● CM-2 extension. ● Option Annotation Discipline (the mandate the schema and examples enforce).
|
|
589
|
+
- **Gated by ←** ● The path-filter (the five glob patterns) — this rule demand-loads only on artifact classes that author structured-inquiry invocations. ● `rules/interactive-questions.md` always-on baseline (parent rule must be live for the section anchors to resolve coherently).
|
|
590
|
+
- **Cross-bound with ↔** ↔ `rules/interactive-questions.md` (parent rule; section anchors at §2/§3/§4/§5/§6/§7 bind this companion). ↔ `rules/interactive-questions-sweep-matchers.md` (sibling companion; H4–H7 matcher catalog enforces this companion's annotation-schema and destructive-op invariants). ↔ `rules/operational-mandates.md` (CM-2 inline anchor delegates to the parent, which delegates schema bodies here). ↔ `commands/plan-execute.md` + `commands/plan-generate.md` + `commands/plan-spec.md` + `commands/plan-review.md` (every plan-pipeline command's structured-inquiry invocations adopt this companion's worked-example templates). ↔ `scripts/dev/validate_ecosystem.py` (the `--check option-annotation` subcommand operationalizes matcher specifications grounded in this companion's schema). ↔ `rules/determinism.md` (the canonical option-set shapes render deterministically — same decision space yields the same invocation payload).
|