@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,448 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
"""Factories for the thin per-adapter wrapper shims.
|
|
4
|
+
|
|
5
|
+
Every harness adapter's ``update.py`` / ``verify.py`` (and the project-scope
|
|
6
|
+
adapters' ``install.py`` / ``plan()`` plus the native-config adapters'
|
|
7
|
+
``install.py``) repeats byte-identical boilerplate that differs only by the
|
|
8
|
+
harness's manifest key, scope, and a handful of per-adapter deltas. This
|
|
9
|
+
module carries those wrapper shapes once as closure factories so each adapter
|
|
10
|
+
holds only its harness-specific identity; the heavy materialization logic
|
|
11
|
+
already lives in :mod:`apothem.harnesses._shared.install_driver` and its
|
|
12
|
+
sibling modules and is untouched here.
|
|
13
|
+
|
|
14
|
+
Behavior is identical to the hand-written shims these factories replace: the
|
|
15
|
+
returned closures call the same driver entry points with the same arguments
|
|
16
|
+
in the same order, so no rendered install output changes.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from collections.abc import Callable
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
from typing import Any
|
|
24
|
+
|
|
25
|
+
from . import install_driver
|
|
26
|
+
from .install_driver import MaterializationError, MaterializationRun
|
|
27
|
+
|
|
28
|
+
# Lifecycle-delegate closure signatures shared by the class factories below.
|
|
29
|
+
_ProjectInstallFn = Callable[..., MaterializationRun]
|
|
30
|
+
_ProjectPlanFn = Callable[..., list[dict[str, str]]]
|
|
31
|
+
_ProjectUninstallFn = Callable[..., None]
|
|
32
|
+
_ProjectVerifyFn = Callable[..., bool]
|
|
33
|
+
_NativeInstallFn = Callable[[Path, dict[str, Any]], MaterializationRun]
|
|
34
|
+
_NativeUninstallFn = Callable[[Path], None]
|
|
35
|
+
_NativeVerifyFn = Callable[[Path], bool]
|
|
36
|
+
|
|
37
|
+
# Type aliases for the wrapper closure signatures.
|
|
38
|
+
_UserScopeInstall = Callable[[Path, dict[str, Any]], MaterializationRun]
|
|
39
|
+
_ProjectScopeInstall = Callable[..., MaterializationRun]
|
|
40
|
+
_UserScopeUpdate = Callable[[Path, dict[str, Any]], MaterializationRun]
|
|
41
|
+
_ProjectScopeUpdate = Callable[..., MaterializationRun]
|
|
42
|
+
_UserScopeVerify = Callable[[Path], bool]
|
|
43
|
+
_ProjectScopeVerify = Callable[..., bool]
|
|
44
|
+
_ProjectScopePlan = Callable[..., list[dict[str, str]]]
|
|
45
|
+
_MaterializeFn = Callable[[dict[str, Any]], str]
|
|
46
|
+
|
|
47
|
+
_UPDATE_DOC = """Re-materialize the harness configuration from the updated profile.
|
|
48
|
+
|
|
49
|
+
Functionally equivalent to install; kept as a separate entry point
|
|
50
|
+
so future update semantics (diff, backup-before-overwrite, etc.)
|
|
51
|
+
can be added without changing the install contract."""
|
|
52
|
+
|
|
53
|
+
_UPDATE_DOC_PROJECT = (
|
|
54
|
+
_UPDATE_DOC
|
|
55
|
+
+ " Threads the\n operator-supplied ``project`` root through to the install entry."
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def make_update(install_fn: _UserScopeInstall) -> _UserScopeUpdate:
|
|
60
|
+
"""Return a user-scope ``update`` shim delegating to *install_fn*.
|
|
61
|
+
|
|
62
|
+
The returned closure has the identical contract and behavior as the
|
|
63
|
+
hand-written user-scope ``update`` it replaces: ``return install(...)``.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
def update(output_path: Path, profile: dict[str, Any]) -> MaterializationRun:
|
|
67
|
+
return install_fn(output_path, profile)
|
|
68
|
+
|
|
69
|
+
update.__doc__ = _UPDATE_DOC
|
|
70
|
+
return update
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def make_update_project(install_fn: _ProjectScopeInstall) -> _ProjectScopeUpdate:
|
|
74
|
+
"""Return a project-scope ``update`` shim delegating to *install_fn*.
|
|
75
|
+
|
|
76
|
+
The returned closure threads the operator-supplied ``project`` keyword
|
|
77
|
+
through to *install_fn*, matching the hand-written project-scope shim.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
def update(
|
|
81
|
+
output_path: Path,
|
|
82
|
+
profile: dict[str, Any],
|
|
83
|
+
*,
|
|
84
|
+
project: Path | None = None,
|
|
85
|
+
) -> MaterializationRun:
|
|
86
|
+
return install_fn(output_path, profile, project=project)
|
|
87
|
+
|
|
88
|
+
update.__doc__ = _UPDATE_DOC_PROJECT
|
|
89
|
+
return update
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
_VERIFY_DOC = """Return True when every manifest install-list target is present and valid.
|
|
93
|
+
|
|
94
|
+
Delegates to the shared manifest-walk verifier: every install entry's
|
|
95
|
+
resolved target must exist per its mode and parse if it is a JSON/YAML
|
|
96
|
+
config. The harness root is ``output_path.parent``."""
|
|
97
|
+
|
|
98
|
+
_VERIFY_DOC_PROJECT = """Return True when every manifest install-list target is present and valid.
|
|
99
|
+
|
|
100
|
+
Project-scope: the manifest walk resolves targets from the project root, so
|
|
101
|
+
``output_path`` (already resolved by the adapter wrapper) is unused here."""
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def make_verify_harness_root(harness_name: str) -> _UserScopeVerify:
|
|
105
|
+
"""Return a user-scope ``verify`` shim for the harness-root cluster."""
|
|
106
|
+
|
|
107
|
+
def verify(output_path: Path) -> bool:
|
|
108
|
+
return install_driver.verify_install(
|
|
109
|
+
harness_name, harness_root=output_path.parent
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
verify.__doc__ = _VERIFY_DOC
|
|
113
|
+
return verify
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def make_verify_project(harness_name: str) -> _ProjectScopeVerify:
|
|
117
|
+
"""Return a project-scope ``verify`` shim for the project-scope cluster."""
|
|
118
|
+
|
|
119
|
+
def verify(output_path: Path, *, project: Path | None = None) -> bool:
|
|
120
|
+
del output_path # the manifest walk resolves targets from the project root
|
|
121
|
+
if project is None:
|
|
122
|
+
return False
|
|
123
|
+
return install_driver.verify_install(harness_name, project_root=project)
|
|
124
|
+
|
|
125
|
+
verify.__doc__ = _VERIFY_DOC_PROJECT
|
|
126
|
+
return verify
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def make_verify_native_config(harness_name: str) -> _UserScopeVerify:
|
|
130
|
+
"""Return a verify shim for the native-config (materializer) cluster."""
|
|
131
|
+
|
|
132
|
+
def verify(output_path: Path) -> bool:
|
|
133
|
+
return install_driver.verify_install(
|
|
134
|
+
harness_name,
|
|
135
|
+
harness_root=output_path.parent,
|
|
136
|
+
native_config=output_path,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
verify.__doc__ = _VERIFY_DOC
|
|
140
|
+
return verify
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def make_project_scope_install(
|
|
144
|
+
harness_name: str, *, error_message: str
|
|
145
|
+
) -> _ProjectScopeInstall:
|
|
146
|
+
"""Return a project-scope ``install`` shim for the rules-only cluster.
|
|
147
|
+
|
|
148
|
+
*error_message* is the adapter's distinct ``--project`` rejection message.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
def install(
|
|
152
|
+
output_path: Path,
|
|
153
|
+
profile: dict[str, Any],
|
|
154
|
+
*,
|
|
155
|
+
project: Path | None = None,
|
|
156
|
+
) -> MaterializationRun:
|
|
157
|
+
del output_path # resolved per-entry from manifest + project root
|
|
158
|
+
if project is None:
|
|
159
|
+
raise ValueError(error_message)
|
|
160
|
+
return install_driver.finalize_install(
|
|
161
|
+
install_driver.run_install(
|
|
162
|
+
harness_name, project_root=project, profile=profile
|
|
163
|
+
),
|
|
164
|
+
root=project,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
return install
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def make_project_scope_plan(harness_name: str) -> _ProjectScopePlan:
|
|
171
|
+
"""Return a project-scope ``plan`` shim for the rules-only cluster."""
|
|
172
|
+
|
|
173
|
+
def plan(output_path: Path, *, project: Path | None = None) -> list[dict[str, str]]:
|
|
174
|
+
del output_path # resolved per-entry from manifest + project root
|
|
175
|
+
return install_driver.build_plan(harness_name, project_root=project)
|
|
176
|
+
|
|
177
|
+
return plan
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def make_native_config_install(
|
|
181
|
+
harness_name: str,
|
|
182
|
+
materialize_fn: _MaterializeFn,
|
|
183
|
+
*,
|
|
184
|
+
harness_id: str,
|
|
185
|
+
render_tokens: bool = False,
|
|
186
|
+
support_profile: bool = False,
|
|
187
|
+
) -> _UserScopeInstall:
|
|
188
|
+
"""Return a native-config (materializer) ``install`` shim.
|
|
189
|
+
|
|
190
|
+
The pipeline is identical for every native-config adapter: materialize the
|
|
191
|
+
native config, project capability warnings, apply the operator-owned write,
|
|
192
|
+
raise on a write error, run the support install, drop ``warning`` results,
|
|
193
|
+
project the profile document, and finalize. Per-adapter deltas:
|
|
194
|
+
|
|
195
|
+
- *render_tokens*: when True, the materialized content is passed through
|
|
196
|
+
:func:`install_driver.render_content_tokens` against the harness root
|
|
197
|
+
(qwen_code only).
|
|
198
|
+
- *support_profile*: when True, the support ``run_install`` receives the
|
|
199
|
+
``profile`` keyword (qwen_code only).
|
|
200
|
+
"""
|
|
201
|
+
|
|
202
|
+
def install(output_path: Path, profile: dict[str, Any]) -> MaterializationRun:
|
|
203
|
+
content = materialize_fn(profile)
|
|
204
|
+
if render_tokens:
|
|
205
|
+
content = install_driver.render_content_tokens(
|
|
206
|
+
content, harness_root=output_path.parent
|
|
207
|
+
)
|
|
208
|
+
capability_warnings = install_driver._capability_projection_results(
|
|
209
|
+
harness_name
|
|
210
|
+
)
|
|
211
|
+
native_result = install_driver.apply_operator_owned_content(
|
|
212
|
+
output_path,
|
|
213
|
+
content,
|
|
214
|
+
install_root=output_path.parent,
|
|
215
|
+
harness_name=harness_name,
|
|
216
|
+
)
|
|
217
|
+
if native_result.outcome == "error":
|
|
218
|
+
raise MaterializationError(
|
|
219
|
+
f"materialization write failed: {native_result.message}",
|
|
220
|
+
MaterializationRun(
|
|
221
|
+
harness=harness_name,
|
|
222
|
+
dry_run=False,
|
|
223
|
+
results=(*capability_warnings, native_result),
|
|
224
|
+
),
|
|
225
|
+
)
|
|
226
|
+
if support_profile:
|
|
227
|
+
support_run = install_driver.run_install(
|
|
228
|
+
harness_name,
|
|
229
|
+
harness_root=output_path.parent,
|
|
230
|
+
profile=profile,
|
|
231
|
+
)
|
|
232
|
+
else:
|
|
233
|
+
support_run = install_driver.run_install(
|
|
234
|
+
harness_name,
|
|
235
|
+
harness_root=output_path.parent,
|
|
236
|
+
)
|
|
237
|
+
support_results = tuple(
|
|
238
|
+
result for result in support_run.results if result.outcome != "warning"
|
|
239
|
+
)
|
|
240
|
+
profile_result = install_driver.project_profile_document(
|
|
241
|
+
output_path.parent,
|
|
242
|
+
harness_id=harness_id,
|
|
243
|
+
harness_name=harness_name,
|
|
244
|
+
profile=profile,
|
|
245
|
+
)
|
|
246
|
+
return install_driver.finalize_install(
|
|
247
|
+
MaterializationRun(
|
|
248
|
+
harness=harness_name,
|
|
249
|
+
dry_run=False,
|
|
250
|
+
results=(
|
|
251
|
+
*capability_warnings,
|
|
252
|
+
native_result,
|
|
253
|
+
*support_results,
|
|
254
|
+
profile_result,
|
|
255
|
+
),
|
|
256
|
+
),
|
|
257
|
+
root=output_path.parent,
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
return install
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def make_project_scope_adapter(
|
|
264
|
+
name: str,
|
|
265
|
+
*,
|
|
266
|
+
error_label: str,
|
|
267
|
+
relative_target: Path,
|
|
268
|
+
install_fn: _ProjectInstallFn,
|
|
269
|
+
plan_fn: _ProjectPlanFn,
|
|
270
|
+
uninstall_fn: _ProjectUninstallFn,
|
|
271
|
+
update_fn: _ProjectInstallFn,
|
|
272
|
+
verify_fn: _ProjectVerifyFn,
|
|
273
|
+
class_name: str,
|
|
274
|
+
) -> type:
|
|
275
|
+
"""Return a project-scope ``<Name>Adapter`` class.
|
|
276
|
+
|
|
277
|
+
Builds the byte-identical project-scope adapter class the rules-only
|
|
278
|
+
cohort (codebuddy, cursor, gemini_cli, github_copilot, kiro, trae,
|
|
279
|
+
windsurf, zed) each hand-rolled. The class opts into the
|
|
280
|
+
``requires_project`` contract, resolves its on-disk target under the
|
|
281
|
+
operator-supplied ``--project`` root, and delegates every lifecycle
|
|
282
|
+
method to the per-adapter sibling functions passed in. Per-adapter
|
|
283
|
+
deltas captured as parameters:
|
|
284
|
+
|
|
285
|
+
- *name*: the canonical kebab-case identifier the ``name`` property returns.
|
|
286
|
+
- *error_label*: the package-name token the ``resolve_output_path``
|
|
287
|
+
``ValueError`` message uses (underscore form, e.g. ``github_copilot``),
|
|
288
|
+
which is distinct from *name* for the hyphen-vs-underscore harnesses.
|
|
289
|
+
- *relative_target*: the sentinel relative path ``output_path`` returns
|
|
290
|
+
and the concrete target ``resolve_output_path`` joins onto the project
|
|
291
|
+
root.
|
|
292
|
+
- *class_name*: the ``__name__`` / ``__qualname__`` the returned class
|
|
293
|
+
carries so entry-point and discovery resolution find ``<Name>Adapter``.
|
|
294
|
+
|
|
295
|
+
Behavior is identical to the hand-written classes: same ``name``, same
|
|
296
|
+
resolved output paths, same ``requires_project`` flag, same method
|
|
297
|
+
delegation and argument order.
|
|
298
|
+
"""
|
|
299
|
+
_relative = relative_target
|
|
300
|
+
_error = error_label
|
|
301
|
+
_name = name
|
|
302
|
+
|
|
303
|
+
class _ProjectScopeAdapter:
|
|
304
|
+
#: Opt-in to the project-scope adapter contract.
|
|
305
|
+
requires_project: bool = True
|
|
306
|
+
|
|
307
|
+
@property
|
|
308
|
+
def name(self) -> str:
|
|
309
|
+
"""Return the canonical kebab-case harness identifier."""
|
|
310
|
+
return _name
|
|
311
|
+
|
|
312
|
+
@property
|
|
313
|
+
def output_path(self) -> Path:
|
|
314
|
+
"""Return a display-only sentinel relative path."""
|
|
315
|
+
return _relative
|
|
316
|
+
|
|
317
|
+
def resolve_output_path(self, project: Path | None) -> Path:
|
|
318
|
+
"""Return the concrete on-disk target under the project root."""
|
|
319
|
+
if project is None:
|
|
320
|
+
raise ValueError(
|
|
321
|
+
f"{_error} adapter requires --project <path> to resolve output_path"
|
|
322
|
+
)
|
|
323
|
+
return project / _relative
|
|
324
|
+
|
|
325
|
+
def install(
|
|
326
|
+
self, profile: dict[str, Any], *, project: Path | None = None
|
|
327
|
+
) -> MaterializationRun:
|
|
328
|
+
"""Materialize the harness configuration into the project root."""
|
|
329
|
+
output_path = self.resolve_output_path(project)
|
|
330
|
+
return install_fn(output_path, profile, project=project)
|
|
331
|
+
|
|
332
|
+
def update(
|
|
333
|
+
self, profile: dict[str, Any], *, project: Path | None = None
|
|
334
|
+
) -> MaterializationRun:
|
|
335
|
+
"""Re-materialize the harness configuration into the project root."""
|
|
336
|
+
output_path = self.resolve_output_path(project)
|
|
337
|
+
return update_fn(output_path, profile, project=project)
|
|
338
|
+
|
|
339
|
+
def plan(
|
|
340
|
+
self,
|
|
341
|
+
output_path: Path | None = None,
|
|
342
|
+
*,
|
|
343
|
+
project: Path | None = None,
|
|
344
|
+
) -> list[dict[str, str]]:
|
|
345
|
+
"""Return the manifest-driven propagation plan without writing."""
|
|
346
|
+
resolved = output_path or (
|
|
347
|
+
self.resolve_output_path(project) if project is not None else _relative
|
|
348
|
+
)
|
|
349
|
+
return plan_fn(resolved, project=project)
|
|
350
|
+
|
|
351
|
+
def uninstall(self, *, project: Path | None = None) -> None:
|
|
352
|
+
"""Remove the harness configuration file if present."""
|
|
353
|
+
output_path = self.resolve_output_path(project)
|
|
354
|
+
uninstall_fn(output_path, project=project)
|
|
355
|
+
|
|
356
|
+
def is_installed(self, *, project: Path | None = None) -> bool:
|
|
357
|
+
"""Return True if the configuration file exists on disk."""
|
|
358
|
+
if project is None:
|
|
359
|
+
return False
|
|
360
|
+
return self.resolve_output_path(project).exists()
|
|
361
|
+
|
|
362
|
+
def verify(self, *, project: Path | None = None) -> bool:
|
|
363
|
+
"""Return True if the installed configuration is valid."""
|
|
364
|
+
if project is None:
|
|
365
|
+
return False
|
|
366
|
+
return verify_fn(self.resolve_output_path(project), project=project)
|
|
367
|
+
|
|
368
|
+
_ProjectScopeAdapter.__name__ = class_name
|
|
369
|
+
_ProjectScopeAdapter.__qualname__ = class_name
|
|
370
|
+
_ProjectScopeAdapter.__doc__ = (
|
|
371
|
+
f"{class_name} — implements :class:`~apothem.harnesses.HarnessAdapter`.\n\n"
|
|
372
|
+
" Project-scope adapter: opts into the ``requires_project`` contract\n"
|
|
373
|
+
" declared at :func:`apothem.cli._adapter_requires_project`. The CLI\n"
|
|
374
|
+
" threads the operator-supplied ``--project <path>`` value through\n"
|
|
375
|
+
" ``_invoke_with_project`` for every lifecycle method."
|
|
376
|
+
)
|
|
377
|
+
return _ProjectScopeAdapter
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
def make_native_config_adapter(
|
|
381
|
+
name: str,
|
|
382
|
+
*,
|
|
383
|
+
target_factory: Callable[[], Path],
|
|
384
|
+
install_fn: _NativeInstallFn,
|
|
385
|
+
uninstall_fn: _NativeUninstallFn,
|
|
386
|
+
update_fn: _NativeInstallFn,
|
|
387
|
+
verify_fn: _NativeVerifyFn,
|
|
388
|
+
class_name: str,
|
|
389
|
+
) -> type:
|
|
390
|
+
"""Return a native-config (materializer) ``<Name>Adapter`` class.
|
|
391
|
+
|
|
392
|
+
Builds the byte-identical user-scope adapter class the native-config
|
|
393
|
+
cohort (hermes, open_claw, opencode, qwen_code) each hand-rolled. The
|
|
394
|
+
class owns one absolute ``output_path`` anchor and delegates every
|
|
395
|
+
lifecycle method to the per-adapter sibling functions passed in.
|
|
396
|
+
Per-adapter deltas captured as parameters:
|
|
397
|
+
|
|
398
|
+
- *name*: the canonical kebab-case identifier the ``name`` property returns.
|
|
399
|
+
- *target_factory*: a zero-arg callable returning the absolute target
|
|
400
|
+
configuration path; called lazily on every ``output_path`` access so the
|
|
401
|
+
hand-rolled property's per-access ``Path.home()`` evaluation is preserved
|
|
402
|
+
(eager evaluation at import would bind the operator's real home directory
|
|
403
|
+
before test HOME-isolation could redirect it).
|
|
404
|
+
- *class_name*: the ``__name__`` / ``__qualname__`` the returned class
|
|
405
|
+
carries so entry-point and discovery resolution find ``<Name>Adapter``.
|
|
406
|
+
|
|
407
|
+
Behavior is identical to the hand-written classes: same ``name``, same
|
|
408
|
+
``output_path``, same method delegation and argument order.
|
|
409
|
+
"""
|
|
410
|
+
_name = name
|
|
411
|
+
|
|
412
|
+
class _NativeConfigAdapter:
|
|
413
|
+
@property
|
|
414
|
+
def name(self) -> str:
|
|
415
|
+
"""Return the canonical kebab-case harness identifier."""
|
|
416
|
+
return _name
|
|
417
|
+
|
|
418
|
+
@property
|
|
419
|
+
def output_path(self) -> Path:
|
|
420
|
+
"""Return the target configuration file path."""
|
|
421
|
+
return target_factory()
|
|
422
|
+
|
|
423
|
+
def install(self, profile: dict[str, Any]) -> MaterializationRun:
|
|
424
|
+
"""Materialize the harness configuration from the shared profile."""
|
|
425
|
+
return install_fn(self.output_path, profile)
|
|
426
|
+
|
|
427
|
+
def update(self, profile: dict[str, Any]) -> MaterializationRun:
|
|
428
|
+
"""Re-materialize the harness configuration from the updated profile."""
|
|
429
|
+
return update_fn(self.output_path, profile)
|
|
430
|
+
|
|
431
|
+
def uninstall(self) -> None:
|
|
432
|
+
"""Remove the harness configuration file if present."""
|
|
433
|
+
uninstall_fn(self.output_path)
|
|
434
|
+
|
|
435
|
+
def is_installed(self) -> bool:
|
|
436
|
+
"""Return True if the configuration file exists on disk."""
|
|
437
|
+
return self.output_path.exists()
|
|
438
|
+
|
|
439
|
+
def verify(self) -> bool:
|
|
440
|
+
"""Return True if the installed configuration is valid."""
|
|
441
|
+
return verify_fn(self.output_path)
|
|
442
|
+
|
|
443
|
+
_NativeConfigAdapter.__name__ = class_name
|
|
444
|
+
_NativeConfigAdapter.__qualname__ = class_name
|
|
445
|
+
_NativeConfigAdapter.__doc__ = (
|
|
446
|
+
f"{class_name} implements :class:`~apothem.harnesses.HarnessAdapter`."
|
|
447
|
+
)
|
|
448
|
+
return _NativeConfigAdapter
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
2
|
+
|
|
3
|
+
# Antigravity Standard Convention Pin
|
|
4
|
+
|
|
5
|
+
## Snapshot
|
|
6
|
+
|
|
7
|
+
- Snapshot date: 2026-06-25
|
|
8
|
+
- Snapshot note: live re-verification via the official Antigravity codelabs (`codelabs.developers.google.com`) + launch blog (`antigravity.google/blog`) — the `antigravity.google/docs` SPA still returns empty bodies under fetch, so partial confidence persists, but official Google sources now CONFIRM the `~/.gemini/GEMINI.md` global anchor, the `~/.gemini/antigravity-cli/plugins/` plugin root, and plugin `skills/` auto-discovery (resolving the prior unverified skills-scan limitation below), and REFINE the MCP-config path toward `~/.gemini/config/mcp_config.json` (vs the prior `antigravity-cli/` reading — the adapter authors no MCP entries, so no write is affected). Previous 2026-05-31 / 2026-05-28.
|
|
9
|
+
- Adapter source: `src/apothem/harnesses/antigravity/`.
|
|
10
|
+
- Evidence level: **partial confidence.** The official `antigravity.google/docs/*`
|
|
11
|
+
pages are a JavaScript single-page app that returns empty bodies under fetch;
|
|
12
|
+
a browser-capable re-fetch on 2026-05-31 could not defeat the empty-body
|
|
13
|
+
problem. Every convention claim below rests on dated-2026 authority-domain
|
|
14
|
+
snapshots and third-party sources quoting the official docs, not raw official
|
|
15
|
+
page text. No vendor-native UI claim is made here.
|
|
16
|
+
- Immutable pin: none — Antigravity is a hosted product with no version or
|
|
17
|
+
commit surface (the sitemap exposes a changelog but no pin); the
|
|
18
|
+
`no-immutable-source` exception stands for every claim.
|
|
19
|
+
|
|
20
|
+
## Antigravity CLI Surface Projection (partial confidence)
|
|
21
|
+
|
|
22
|
+
- Global context anchor: `~/.gemini/GEMINI.md` (shared with Gemini CLI; both
|
|
23
|
+
harnesses write this file). `AGENTS.md` continues working unchanged.
|
|
24
|
+
- Migration: Gemini CLI sunsets 2026-06-18 and folds into Antigravity CLI
|
|
25
|
+
(binary `agy`); `GEMINI.md` and `AGENTS.md` continue working unchanged.
|
|
26
|
+
- CLI customization root: `~/.gemini/antigravity-cli/`.
|
|
27
|
+
- Apothem plugin root: `~/.gemini/antigravity-cli/plugins/apothem/`.
|
|
28
|
+
- MCP: the `mcpServers` object in `~/.gemini/antigravity-cli/mcp_config.json`
|
|
29
|
+
(global) / `.agents/mcp_config.json` (workspace); stdio entries use
|
|
30
|
+
`command`/`args`/`env`, remote entries use `serverUrl`. Apothem names this
|
|
31
|
+
surface but does not author MCP server entries. The CLI path carries a known
|
|
32
|
+
ambiguity (one authority snapshot read `~/.gemini/antigravity/`, the
|
|
33
|
+
IDE-scoped path); cross-source consensus favors `antigravity-cli/` for the
|
|
34
|
+
CLI. The adapter writes no MCP entries, so the ambiguity affects no write.
|
|
35
|
+
- Skills: the confirmed global discovery root is `~/.gemini/antigravity-cli/skills/`;
|
|
36
|
+
workspace skills live at `.agents/skills/`; the shared `~/.gemini/skills/`
|
|
37
|
+
still auto-loads. Apothem installs its skills cohort into its own
|
|
38
|
+
`plugins/apothem/skills/` namespace to avoid colliding with the operator's
|
|
39
|
+
skills and Gemini CLI project-local files. The agent's auto-discovery of
|
|
40
|
+
skills inside each plugin's `skills/` directory is confirmed by the official
|
|
41
|
+
Antigravity codelabs + launch blog (re-verified 2026-06-25), resolving the
|
|
42
|
+
prior tracked limitation; Apothem's `plugins/apothem/skills/` namespace is
|
|
43
|
+
therefore a confirmed-discovered placement.
|
|
44
|
+
- Commands: converted into Antigravity skills under the Apothem plugin because the current CLI migration convention routes command-like prompts through skills.
|
|
45
|
+
- Hooks: Antigravity now documents a simple-JSON lifecycle-hook surface
|
|
46
|
+
(global and workspace scope). Apothem retains its hook prose as support
|
|
47
|
+
material under the Apothem plugin and does not register Antigravity hook
|
|
48
|
+
events, because the adapter does not yet own a verified schema translation
|
|
49
|
+
layer for the Antigravity hook JSON; building one is deferred until the docs
|
|
50
|
+
are browser-verifiable.
|
|
51
|
+
|
|
52
|
+
## Recommended Postfix Rendering
|
|
53
|
+
|
|
54
|
+
- Status: supported as plain text.
|
|
55
|
+
- Mechanism: Apothem emits the literal ` (Recommended)` suffix in the option label. The adapter forwards instruction text without transforming that suffix.
|
|
56
|
+
- Boundary: this pin does not claim a harness-native recommended-option widget. It only pins the text-rendered convention used by `rules/interactive-questions.md`.
|
|
57
|
+
|
|
58
|
+
## Long Context and Compaction
|
|
59
|
+
|
|
60
|
+
- Status: profile-managed.
|
|
61
|
+
- Mechanism: Apothem keeps full-suite `/plan-execute` runs continuous by externalizing state to `.apothem/plans/`, compacting or restarting the harness session at phase boundaries as needed, and restoring via the Blind Bootstrap sequence.
|
|
62
|
+
- Boundary: this pin does not claim vendor-native autocompaction or a long-context size. It pins the adapter-local state handoff and compaction-restoration convention used by `rules/context-management.md`.
|
|
63
|
+
|
|
64
|
+
## Large-Codebase Practice Projection
|
|
65
|
+
|
|
66
|
+
- Layered context: declared in `capabilities.yml` under `layered_context_surface`; no vendor-native hierarchy is claimed beyond the adapter's documented file/template surface.
|
|
67
|
+
- LSP symbol navigation: `tracked-gap` until a vendor-ratified plugin or tool surface is pinned.
|
|
68
|
+
- Hook learning capture: routed through the `persistent-conventions-vigilance` artifact-evolution cycle; pass-class hooks stay silent and recurring findings become rule, skill, hook, or documentation updates.
|
|
69
|
+
|
|
70
|
+
## Plugin-alone Persistence
|
|
71
|
+
|
|
72
|
+
Antigravity has a plugin directory convention
|
|
73
|
+
(`~/.gemini/antigravity-cli/plugins/apothem/`), but that tree is
|
|
74
|
+
**engine-materialized**, not a standalone-installable bundle: the `plugin.json`
|
|
75
|
+
and every cohort beneath it are written by `apothem install`, not shipped as a
|
|
76
|
+
pre-built plugin an operator installs by itself. There is no Apothem-distributed
|
|
77
|
+
plugin-alone install path for this harness; everything requires the full
|
|
78
|
+
`apothem install --harness antigravity` engine run.
|
|
79
|
+
|
|
80
|
+
| Artifact class | Persists standalone? | Mechanism / limit |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| Context anchor (rules-as-text) | No — requires `apothem install` | `~/.gemini/GEMINI.md` is engine-written; no pre-built bundle carries it. |
|
|
83
|
+
| Commands / Skills / Agents / Rules | No — requires `apothem install` | The plugin tree (`plugins/apothem/{skills,agents,rules}/`) is engine-materialized; nothing exists before the install run. |
|
|
84
|
+
| Hooks | No — tracked-gap | Antigravity documents a JSON lifecycle-hook surface, but the adapter owns no verified schema-translation layer yet, so it registers no hooks even via the engine. |
|
|
85
|
+
| MCP / Settings | No — operator-owned | `mcpServers` lives in operator-owned `mcp_config.json`; the adapter authors no entries. |
|
|
86
|
+
|
|
87
|
+
Platform note: a plugin directory exists, but as an engine-write target, not a
|
|
88
|
+
distributable plugin-alone bundle. Building a standalone Antigravity plugin
|
|
89
|
+
package is deferred until the docs are browser-verifiable (the docs SPA returns
|
|
90
|
+
empty bodies under fetch — partial-confidence pin). The engine install is the
|
|
91
|
+
sole persistence path today.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
"""Apothem harness adapter for antigravity — manifest-driven install.
|
|
4
|
+
|
|
5
|
+
Materializes the apothem convention surface into the Antigravity CLI
|
|
6
|
+
harness target. Antigravity reads ``~/.gemini/GEMINI.md`` as global
|
|
7
|
+
context and stores CLI customization under ``~/.gemini/antigravity-cli/``;
|
|
8
|
+
Apothem installs a named plugin at
|
|
9
|
+
``~/.gemini/antigravity-cli/plugins/apothem/`` for cohorts that should not
|
|
10
|
+
collide with Gemini CLI project-local files.
|
|
11
|
+
|
|
12
|
+
Delegates installation to
|
|
13
|
+
:mod:`apothem.harnesses.antigravity.install`, which consumes the
|
|
14
|
+
canonical manifest at ``src/apothem/lib/propagation-manifest.yaml``.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
from typing import Any
|
|
21
|
+
|
|
22
|
+
from apothem.harnesses._shared.install_driver import MaterializationRun
|
|
23
|
+
from apothem.harnesses.antigravity.install import install as _install
|
|
24
|
+
from apothem.harnesses.antigravity.install import plan as _plan
|
|
25
|
+
from apothem.harnesses.antigravity.uninstall import uninstall as _uninstall
|
|
26
|
+
from apothem.harnesses.antigravity.update import update as _update
|
|
27
|
+
from apothem.harnesses.antigravity.verify import verify as _verify
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class AntigravityAdapter:
|
|
31
|
+
"""AntigravityAdapter — implements :class:`~apothem.harnesses.HarnessAdapter`."""
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def name(self) -> str:
|
|
35
|
+
"""Return the canonical kebab-case harness identifier."""
|
|
36
|
+
return "antigravity"
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def output_path(self) -> Path:
|
|
40
|
+
"""Return the always-propagated singleton config file path.
|
|
41
|
+
|
|
42
|
+
The adapter resolves the harness root as ``output_path.parent``
|
|
43
|
+
(``~/.gemini/``); ``is_installed()`` / ``verify()`` resolve
|
|
44
|
+
against the GEMINI.md anchor.
|
|
45
|
+
"""
|
|
46
|
+
return Path.home() / ".gemini/GEMINI.md"
|
|
47
|
+
|
|
48
|
+
def install(self, profile: dict[str, Any]) -> MaterializationRun:
|
|
49
|
+
"""Materialize the harness configuration from the shared profile."""
|
|
50
|
+
return _install(self.output_path, profile)
|
|
51
|
+
|
|
52
|
+
def update(self, profile: dict[str, Any]) -> MaterializationRun:
|
|
53
|
+
"""Re-materialize the harness configuration from the updated profile."""
|
|
54
|
+
return _update(self.output_path, profile)
|
|
55
|
+
|
|
56
|
+
def plan(self, output_path: Path | None = None) -> list[dict[str, str]]:
|
|
57
|
+
"""Return the manifest-driven propagation plan without writing."""
|
|
58
|
+
return _plan(output_path or self.output_path)
|
|
59
|
+
|
|
60
|
+
def uninstall(self) -> None:
|
|
61
|
+
"""Remove the harness configuration file if present."""
|
|
62
|
+
_uninstall(self.output_path)
|
|
63
|
+
|
|
64
|
+
def is_installed(self) -> bool:
|
|
65
|
+
"""Return True if the configuration file exists on disk."""
|
|
66
|
+
return self.output_path.exists()
|
|
67
|
+
|
|
68
|
+
def verify(self) -> bool:
|
|
69
|
+
"""Return True if the installed configuration is valid."""
|
|
70
|
+
return _verify(self.output_path)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
# Per rules/agent-capability-discipline.md §1 and the
|
|
4
|
+
# agent-capability-discipline-matrix companion §1 / §3 / §7. The
|
|
5
|
+
# antigravity adapter keeps ~/.gemini/GEMINI.md as the global context
|
|
6
|
+
# anchor and installs an Apothem plugin under
|
|
7
|
+
# ~/.gemini/antigravity-cli/plugins/apothem/. Commands are converted to
|
|
8
|
+
# skills because Antigravity CLI treats command migration as skill-based.
|
|
9
|
+
# MCP is natively supported via the mcpServers object in the operator-owned
|
|
10
|
+
# mcp_config.json; Apothem names the surface but does not author MCP server
|
|
11
|
+
# entries. Antigravity ships an unfetchable JavaScript docs site, so these
|
|
12
|
+
# claims carry partial confidence (re-fetched 2026-05-31 via authority-domain
|
|
13
|
+
# snapshots; see STANDARD-CONVENTION-PIN.md).
|
|
14
|
+
|
|
15
|
+
mcp_servers:
|
|
16
|
+
- mcp_config.json-mcpServers-stdio-and-http-operator-owned
|
|
17
|
+
# Operator-owned MCP surface: the adapter recognizes it but authors no entries.
|
|
18
|
+
mcp_servers_authored: false
|
|
19
|
+
sub_agent_dispatch: true
|
|
20
|
+
custom_command_support: "skills"
|
|
21
|
+
recommended_postfix_rendering: "plain-text"
|
|
22
|
+
long_context_compaction: "profile-managed"
|
|
23
|
+
context_ignore_surface: "not-documented-in-current-pin"
|
|
24
|
+
layered_context_surface: "~/.gemini/GEMINI.md plus ~/.gemini/antigravity-cli/plugins/apothem/"
|
|
25
|
+
lsp_symbol_navigation: "tracked-gap-no-adapter-owned-LSP-surface"
|
|
26
|
+
hook_learning_capture: "artifact-evolution-cycle"
|
|
27
|
+
standard_convention_pin: "STANDARD-CONVENTION-PIN.md"
|
|
28
|
+
# web-fetch / browser-retrieval surface — the backing capability dimension for
|
|
29
|
+
# rules/source-accessibility.md step 1 ("retrieve through the host's browser /
|
|
30
|
+
# fetch capability"). The pinned snapshot catalogs config-materialization
|
|
31
|
+
# surfaces, not the vendor tool surface, so the web-fetch tool is not yet
|
|
32
|
+
# discovered against the pin — discovery-pending per
|
|
33
|
+
# rules/agent-capability-discipline-matrix.md §1.
|
|
34
|
+
web_fetch: "discovery-pending"
|
|
35
|
+
tool_surface_restrictions:
|
|
36
|
+
- secrets-paths
|
|
37
|
+
- destructive-shell-ops
|
|
38
|
+
- network-write-unsigned
|
|
39
|
+
system_prompt_template_path: "templates/GEMINI.md"
|
|
40
|
+
agent_memory_surface: "not-documented-in-current-pin"
|