diff --git a/.antigravity/AGENTS.md b/.antigravity/AGENTS.md new file mode 100644 index 0000000..80e4cd9 --- /dev/null +++ b/.antigravity/AGENTS.md @@ -0,0 +1,51 @@ +# Antigravity Agent Rules + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. This config/documentation is for reference only. + +This repository is part of CompText. + +CompText is a deterministic Context Pack / proposal-gated evidence workflow, not a generic AI dashboard, not an agent memory product, and not an autonomous deployment agent. + +Core line: +Models are providers. Context is the product. + +Pipeline: +Source / GitHub URL → Goal → Inspect → Context Pack → Policy Gate → Provider Boundary → Untrusted Proposal → Human Review → Artifacts + +## Skill Sources Classifications + +Within this repository: +- **.agent/skills** = repo guidance source +- **.agents/skills** = compatibility metadata +- **docs/phase8a-draft-skills** = draft source +- **.antigravity** = inert adapted workspace config + +## Hard Rules + +- Treat GitHub as read-only unless the human explicitly asks otherwise. +- Do not push, deploy, create PRs, create issues, or create remote branches. +- Do not expose secrets. +- Do not fake hashes. +- Do not claim production-ready, EU AI Act compliance, legal certification, forensic proof, guaranteed correctness, or autonomous approval. +- Provider output is untrusted until reviewed. +- Proposals are never auto-applied. +- Human review is the approval boundary. +- Artifacts preserve the evidence trail. +- Keep changes scoped and reviewable. +- Do not modify root `README.md` unless the human explicitly approves it. +- Do not commit `reports/latest.json`. +- Do not commit `reports/performance_baseline.json` when it is only validation churn. +- Run cargo commands only inside `agy7rust/` unless the human explicitly approves otherwise. + +## Antigravity Governance + +- Repo-local Antigravity hooks live under `.antigravity/hooks/` and must be reviewed/trusted by Antigravity before enforcement. +- Antigravity hooks block unauthorized git writes, deploy/release actions, environment dumps, secret-file reads, `agy-ct run`, and `agy-ct benchmark`. +- Antigravity hooks warn on protected source, README, report, and `artifacts/spark/` changes; warnings do not make generated artifacts commit-ready. + +Before editing: +1. Read AGENTS.md. +2. Read `.antigravity/SKILL_INVENTORY.md` relevant to the task. +3. Build a compact repo map. +4. Stop for approval if the user asked for plan mode. diff --git a/.antigravity/BOOTSTRAP.md b/.antigravity/BOOTSTRAP.md new file mode 100644 index 0000000..987c1da --- /dev/null +++ b/.antigravity/BOOTSTRAP.md @@ -0,0 +1,32 @@ +# Antigravity Bootstrap Context + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. Reference only. + +## 1. Bootstrap Protocol +To prevent context redundancy, follow this exact initial sequence: +1. Read `AGENTS.md` first for fundamental workspace rules. +2. Read `.antigravity/BOOTSTRAP.md` second to align config boundaries. +3. Use `.antigravity/SKILL_INVENTORY.md` as the index for local/system skills. + +## 2. Repo Purpose & Scope +Deterministic trace packaging, replay-sidecar validation, and SPARK-style context artifact rendering for CompText. + +## 3. Skill & Source Classifications +- **.agent/skills**: Repo guidance source (15 guidelines). +- **.agents/skills**: Compatibility metadata (9 legacy skill directories). +- **docs/phase8a-draft-skills**: Draft global skill candidates / design source only. +- **.antigravity**: Inert adapted workspace configuration directory. + +## 4. Environment & Safety Boundaries +- **Hooks & Plugins**: Inert, repo-local, review-gated, not active runtime. +- **MCP Status**: Disabled/Not active. Do not create `.mcp.json`. +- **Claim Hygiene**: No production-ready, EU AI Act, legal, or official SPARK compatibility claims. +- **Allowed Edit Zones**: `./.antigravity/` and `./docs/context/` only. +- **Forbidden Edit Zones**: Rust sources (`./agy7rust/src/`), `README.md`, `.agent/skills/`, `.agents/skills/`, and `.codex/`. +- **Hard Rules**: Treat GitHub as read-only. No commits, pushes, deploys, secrets, or `.env` dumps. + +## 5. Next Workflow Order +1. Load startup parameters from `.antigravity/START_HERE.md`. +2. Inspect `docs/context/COMPTEXT_SPARKCTL_CONTEXT_CAPSULE.md` for active project state. +3. Formulate plans for user approval before proposing edits. diff --git a/.antigravity/SKILL_INVENTORY.md b/.antigravity/SKILL_INVENTORY.md new file mode 100644 index 0000000..3cf75f3 --- /dev/null +++ b/.antigravity/SKILL_INVENTORY.md @@ -0,0 +1,74 @@ +# Antigravity Skill Inventory + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. This config/documentation is for reference only. + +This inventory provides a complete comparison and registry of the skill sources in the repository, mapped to Antigravity guidelines. + +## Skill Sources Classifications + +- **.agent/skills** = repo guidance source +- **.agents/skills** = compatibility metadata +- **docs/phase8a-draft-skills** = draft source +- **.antigravity** = inert adapted workspace config + +--- + +## 1. Repo Guidance Source (`.agent/skills/`) + +These 15 files represent local repository guidance guidelines: +- `00_project_system.md`: Project system initialization guidelines. +- `01_phase_gate.md`: Phase transition verification. +- `02_rust_validation.md`: Cargo checks and testing protocols. +- `03_artifact_validation.md`: Validation rules for generated assets. +- `04_spark_context_layer.md`: Context pipeline documentation. +- `05_claim_hygiene.md`: Claim constraints. +- `06_git_handoff.md`: Handoff protocols. +- `07_cli_surface.md`: Command surface rules. +- `08_agentic_output_contract.md`: Code quality expectations. +- `09_codex_desktop_governance.md` -> **09_antigravity_governance.md**: Hook rules and boundaries. +- `09_phase6_implementation_gate.md`: Gate guidelines for Phase 6. +- `10_generated_artifact_policy.md`: Generated output management rules. +- `10_spark_evidence_review.md`: Evidence package checking instructions. +- `11_comptext_validate.md`: Local validation commands execution guide. +- `12_agent_handoff_profile.md`: Profile specifications for handoffs. + +--- + +## 2. Compatibility Metadata (`.agents/skills/`) + +These 9 folders contain compatibility metadata (with `SKILL.md` files): +- **comptext-governance**: Mapped to Antigravity workflow governance for CompText integrity. +- **codex-role-workflows** -> **antigravity-role-workflows**: Guidelines for role orchestration. +- **codex-token-saving** -> **antigravity-token-saving**: Strategies to minimize prompt size and trace context. +- **pdf-extraction-contracts**: Structural rules for processing and validation of PDF files. +- **reviewer-final-report**: Guidelines for creating evidence reports for human review. +- **rust-canonical-artifacts**: Rules for generating serialized Rust structures. +- **security-readonly-boundaries**: Enforcing read-only rules for source control and GitHub. +- **spark-hackathon-alignment**: Specific prompt engineering and validation guides for the SPARK challenge. +- **sparkctl-evidence-packet**: Structuring SPARK evidence packets for review gates. + +--- + +## 3. Draft Source (`docs/phase8a-draft-skills/`) + +These 7 subdirectories contain draft global skill candidates for review only: +- **comptext-operating-boundary**: Load governance and confirm boundaries before CompText work. +- **comptext-context-pack-review**: Review deterministic, redacted, replayable Context Pack workflows. +- **comptext-proposal-gate-review**: Review proposal schema, path safety, validation commands, and human gate before apply. +- **comptext-provider-boundary**: Review dry-run-first provider boundaries, network deny-by-default, auth metadata redaction, and untrusted outputs. +- **comptext-claim-hygiene**: Review docs and handoffs for unsupported assurance claims. +- **comptext-artifact-hygiene**: Classify generated artifacts and commit candidates before staging or handoff. +- **comptext-compact-handoff**: Produce concise phase handoffs with files, commands, validation, git state, risks, and next action. + +--- + +## 4. System-Level Antigravity Skills + +The following core Antigravity capabilities are available to this assistant: +- **kernel-dev**: Logic for Multimodal Graph VM and Bytecode Execution. +- **replay-engine**: Kernel Record-Replay (KRR) and Determinism Logic. +- **workflow-skill-creator**: Packages a completed workflow into a reusable Antigravity skill. +- **uv**: Python package manager helper. +- **Scientific Databases**: ensembl-database, pubchem-database, uniprot-database, gnomad-database, clinical-trials-database, etc. +- **Literature Search**: literature-search-arxiv, literature-search-openalex, pubmed-database, etc. diff --git a/.antigravity/START_HERE.md b/.antigravity/START_HERE.md new file mode 100644 index 0000000..875e8d8 --- /dev/null +++ b/.antigravity/START_HERE.md @@ -0,0 +1,31 @@ +# Antigravity Start Here + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. Reference only. + +## Prompt Template +When initializing a new session with this repository, always start with: +`Read .antigravity/START_HERE.md first.` + +## Quick Summary Matrix + +| Metric / Item | Status / Value | Description | +|---|---|---| +| **Repo Purpose** | CompText validation | Deterministic packaging & SPARK-style rendering. | +| **Hook Status** | Inert | Not active runtime. Located in `.antigravity/hooks/`. | +| **Plugin Status** | Inert | Not active runtime. Located in `.antigravity/plugins/`. | +| **MCP Status** | Inactive | No `.mcp.json` or active MCP server allowed. | +| **Claim Hygiene** | Bounded | Provider output is untrusted. No legal/compliance claims. | +| **Allowed Edits** | `./.antigravity/`, `./docs/context/` | Restricted scope for configuration adjustments. | +| **Forbidden Edits**| Rust, README, `.codex/`, `.agent/skills/` | Do not modify code, README, or active Codex files. | + +## Guidance Chain +1. **First**: Read `AGENTS.md` to establish the safety rules. +2. **Second**: Read `.antigravity/BOOTSTRAP.md` to load the context booster. +3. **Index**: Use `.antigravity/SKILL_INVENTORY.md` to index local and system skills. +4. **Active State**: See `docs/context/COMPTEXT_SPARKCTL_CONTEXT_CAPSULE.md`. + +## Safety Rules +- Provider output is untrusted; human review is the approval gate. +- Repo-relative paths only. No secrets or env dumps. +- Do not commit or push. diff --git a/.antigravity/hooks/hook-policy.example.json b/.antigravity/hooks/hook-policy.example.json new file mode 100644 index 0000000..26deaca --- /dev/null +++ b/.antigravity/hooks/hook-policy.example.json @@ -0,0 +1,35 @@ +{ + "status": "inert", + "scope": "repo-local", + "governance": "review-gated", + "runtime": "not active runtime", + "description": "Example Antigravity hooks policy for validating local agent actions before and after tool usage", + "hooks": { + "PreToolUse": [ + { + "matcher": "run_command|execute_url", + "action": "warn_or_block", + "policy_path": "./.antigravity/hooks/pre_tool_policy_example.py" + } + ], + "PostToolUse": [ + { + "matcher": "write_file|replace_file_content|run_command", + "action": "validate", + "validation_path": "./.antigravity/hooks/post_tool_validation_example.py" + } + ] + }, + "blocked_commands": [ + "git push", + "git commit", + "cargo run --bin agy-ct -- run", + "cargo run --bin agy-ct -- benchmark" + ], + "protected_paths": [ + "./README.md", + "./agy7rust/src/", + "./reports/", + "./artifacts/spark/" + ] +} diff --git a/.antigravity/plugins/comptext-context-cache/plugin.example.json b/.antigravity/plugins/comptext-context-cache/plugin.example.json new file mode 100644 index 0000000..35c1595 --- /dev/null +++ b/.antigravity/plugins/comptext-context-cache/plugin.example.json @@ -0,0 +1,15 @@ +{ + "name": "comptext-context-cache", + "status": "inert", + "scope": "repo-local", + "governance": "review-gated", + "runtime": "not active runtime", + "description": "Antigravity plugin to manage local caching of CompText context artifacts", + "version": "1.0.0", + "cache_settings": { + "enabled": false, + "cache_dir": "./artifacts/cache", + "retention_days": 7, + "verify_hashes": true + } +} diff --git a/.antigravity/plugins/comptext-sparkctl-guard/plugin.example.json b/.antigravity/plugins/comptext-sparkctl-guard/plugin.example.json new file mode 100644 index 0000000..a333ff0 --- /dev/null +++ b/.antigravity/plugins/comptext-sparkctl-guard/plugin.example.json @@ -0,0 +1,20 @@ +{ + "name": "comptext-sparkctl-guard", + "status": "inert", + "scope": "repo-local", + "governance": "review-gated", + "runtime": "not active runtime", + "description": "Antigravity plugin protecting CompText boundaries and ensuring human review validation", + "version": "1.0.0", + "rules": { + "block_remote_writes": true, + "require_human_review": true, + "untrusted_provider_output": true, + "repo_relative_paths_only": true + }, + "monitored_paths": [ + "./agy7rust/src/", + "./reports/", + "./artifacts/spark/" + ] +} diff --git a/.antigravity/settings.comptext-sparkctl.json b/.antigravity/settings.comptext-sparkctl.json new file mode 100644 index 0000000..c535450 --- /dev/null +++ b/.antigravity/settings.comptext-sparkctl.json @@ -0,0 +1,24 @@ +{ + "status": "inert", + "scope": "repo-local", + "governance": "review-gated", + "runtime": "not active runtime", + "project": { + "name": "comptext-sparkctl", + "root_dir": "./", + "rust_dir": "./agy7rust" + }, + "antigravity": { + "skills_dir": "./.agents/skills", + "hooks_dir": "./.antigravity/hooks", + "plugins_dir": "./.antigravity/plugins" + }, + "safety_rules": { + "provider_output_untrusted": true, + "human_review_required": true, + "repo_relative_only": true, + "allow_push": false, + "allow_deploy": false, + "expose_secrets": false + } +} diff --git a/README.md b/README.md index 0ea6c6f..ab36835 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ cargo run --bin sparkctl -- doctor cargo run --bin sparkctl -- rust-validate cargo run --bin sparkctl -- context-all cargo run --bin sparkctl -- spark-demo +cargo run --bin sparkctl -- spark-evidence-demo --output +cargo run --bin sparkctl -- spark-evidence-validate --input cargo run --bin sparkctl -- handoff-check ``` @@ -65,6 +67,8 @@ Validated command responsibilities: - `sparkctl rust-validate` runs local Rust quality checks. - `sparkctl context-all` runs the local context build/render/validate sequence. - `sparkctl spark-demo` runs the local end-to-end demonstration flow. +- `sparkctl spark-evidence-demo` writes a deterministic SPARK Evidence Packet v1 demo envelope. +- `sparkctl spark-evidence-validate` validates a SPARK Evidence Packet v1 envelope. - `sparkctl handoff-check` checks local repository handoff readiness. ### `agy-ct` @@ -91,7 +95,7 @@ Current wrapper mapping: | `agy-ct demo` | `sparkctl::spark_demo::run_spark_demo()` | | `agy-ct context all` | `sparkctl::context_all::run_context_all()` | -Other `agy-ct` commands remain explicit placeholders until their implementation phase is approved. +Other `agy-ct` commands remain scaffolded placeholders until their implementation phase is approved. --- @@ -108,8 +112,8 @@ These artifacts are intended for local, reproducible validation and review workf ### Demo Evidence Demo evidence: -- SPARK challenge demo evidence: [DEMO_SPARK_EVIDENCE.md](file:///C:/Users/contr/sandbox_workspace/Antigravity-Comptextv7-unified/git_post_push_verification/repo/DEMO_SPARK_EVIDENCE.md) -- Local performance baseline: [PERFORMANCE_BASELINE.md](file:///C:/Users/contr/sandbox_workspace/Antigravity-Comptextv7-unified/git_post_push_verification/repo/PERFORMANCE_BASELINE.md) +- SPARK challenge demo evidence: [DEMO_SPARK_EVIDENCE.md](DEMO_SPARK_EVIDENCE.md) +- Local performance baseline: [PERFORMANCE_BASELINE.md](PERFORMANCE_BASELINE.md) #### Reviewer Quickstart diff --git a/docs/context/ACTIVE_WORK_LEDGER.md b/docs/context/ACTIVE_WORK_LEDGER.md new file mode 100644 index 0000000..633eb42 --- /dev/null +++ b/docs/context/ACTIVE_WORK_LEDGER.md @@ -0,0 +1,24 @@ +# Active Work Ledger + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. This ledger is for local reference and documentation only. + +This ledger tracks active work items, task mappings, and status checkpoints for the CompText-Sparkctl project. + +## Active Task Inventory + +1. **Antigravity Mapping Configuration**: + - Mapping Codex concepts to Antigravity. (Status: Done) + - Configuration files created under `./.antigravity/`. (Status: Done) + - Migration and claim ledgers created under `./docs/context/`. (Status: Done) + +2. **Compliance / Verification Gate**: + - Ensure all provider outputs are treated as untrusted proposals. + - Maintain the human review approval gate before modifying any source tree. + - Restrict all actions to repo-relative paths only. + +## Local Environment Integrity + +- **Active Runtime**: None (hooks and plugins are example files and not actively running). +- **GitHub / Remote Writes**: Blocked (read-only mode is active). +- **Environment and Secret Isolation**: No secrets, `.env`, or credential tokens are read or referenced. diff --git a/docs/context/ANTIGRAVITY_MIGRATION_LEDGER.md b/docs/context/ANTIGRAVITY_MIGRATION_LEDGER.md new file mode 100644 index 0000000..dfb6506 --- /dev/null +++ b/docs/context/ANTIGRAVITY_MIGRATION_LEDGER.md @@ -0,0 +1,33 @@ +# Antigravity Migration Ledger + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. This ledger is for local reference and documentation only. + +This file documents the conceptual mapping and legacy source classifications between Codex and Antigravity for the CompText project context. + +## Skill Sources Classifications + +- **.agent/skills** = repo guidance source +- **.agents/skills** = compatibility metadata +- **docs/phase8a-draft-skills** = draft source +- **.antigravity** = inert adapted workspace config + +## Codex to Antigravity Mapping Rules + +We map the original Codex infrastructure concepts to their Antigravity equivalents in all new documentation and configurations: + +| Codex Concept | Antigravity Concept | Description | +|---|---|---| +| Codex App | Antigravity | The core agent system workspace and host application. | +| Codex CLI | Antigravity CLI | The CLI execution layer for local agent orchestration. | +| Codex skills | Antigravity skills | The repository-relative or system-level capabilities. | +| Codex hooks | Antigravity hooks | Pre-tool and post-tool execution policy validation hooks. | +| Codex plugin | Antigravity plugin | Custom plugins extending workspace capabilities. | +| Codex workflow | Antigravity workflow | The pipeline executing the Context Pack process. | + +## Migration Status + +- **Migration Mode**: Manual documentation and alignment mapping. +- **Hook Integration**: Mapped, but disabled (inert, not active runtime). +- **Skill Discovery**: Completed; mapped to local directories and system-level capabilities. +- **Legacy Alignment**: Legacy and draft skill sources classified and cataloged. diff --git a/docs/context/CLAIM_HYGIENE_LEDGER.md b/docs/context/CLAIM_HYGIENE_LEDGER.md new file mode 100644 index 0000000..1349682 --- /dev/null +++ b/docs/context/CLAIM_HYGIENE_LEDGER.md @@ -0,0 +1,20 @@ +# Claim Hygiene Ledger + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. This ledger is for local reference and documentation only. + +This ledger documents the rules and guidelines for claim hygiene to prevent false, exaggerated, or compliance-oriented claims. + +## Governance Boundaries + +All documentation, metadata, and proposals generated must adhere to these strict bounds: + +- **Provider Output is Untrusted**: Any generation or proposal from a language model must be verified and approved by a human reviewer. +- **Human Review Approval Gate**: No proposal is auto-applied. The human is the definitive gate. +- **No Production-Ready Claims**: Do not claim the system is production-ready, enterprise-grade, or fully autonomous. +- **No Compliance Claims**: Do not claim compliance with the EU AI Act, forensic standards, legal audits, or certified compliance. +- **No Hallucination-Free Claims**: CompText is a deterministic pipeline, but makes no claim of resolving or eliminating hallucinations generally. +- **Environment Boundaries**: + - Restrict command execution and source edits to the local repo. + - No secrets, `.env` exposure, or environment dumps are permitted. + - No push/deploy commands are permitted. diff --git a/docs/context/COMPTEXT_SPARKCTL_CONTEXT_CAPSULE.md b/docs/context/COMPTEXT_SPARKCTL_CONTEXT_CAPSULE.md new file mode 100644 index 0000000..6c3a4f5 --- /dev/null +++ b/docs/context/COMPTEXT_SPARKCTL_CONTEXT_CAPSULE.md @@ -0,0 +1,35 @@ +# CompText Sparkctl Context Capsule + +> [!IMPORTANT] +> **Status**: inert, repo-local, review-gated, not active runtime. Reference only. + +This capsule acts as a persistent repository data store for Antigravity config state, avoiding document repetition in prompts. + +## 1. Governance & Protocol Chain +- **Read Order**: + 1. `AGENTS.md` (Rules and core constraints) + 2. `.antigravity/BOOTSTRAP.md` (Context alignment) + 3. `.antigravity/START_HERE.md` (Active prompt template) +- **Index**: Reference `.antigravity/SKILL_INVENTORY.md` for local and system capabilities. + +## 2. Skill Source Classifications +- `.agent/skills/` = repo guidance source +- `.agents/skills/` = compatibility metadata +- `docs/phase8a-draft-skills/` = draft source / design reference only +- `.antigravity/` = inert adapted workspace config + +## 3. Project Configuration Matrix +- **Purpose**: Local packaging, validation, and metadata generation for CompText. +- **Hook Status**: Inert (no active runtime) example configs. +- **Plugin Status**: Inert (no active runtime) example configs. +- **MCP Status**: Inactive (no MCP configurations or servers). +- **Claim Hygiene**: Strict adherence to no production-ready, legal, compliance, or official SPARK claims. Provider output is untrusted and human review is the gate. +- **Edit Isolation**: + - *Allowed*: `./.antigravity/` and `./docs/context/`. + - *Forbidden*: `./agy7rust/src/` (Rust source), `./README.md`, `./.agent/skills/`, `./.agents/skills/`, and `./.codex/`. +- **Handoff Rules**: All paths must be repo-relative. No secrets, `.env` files, git pushes, or deployments. + +## 4. Next Workflow Order +1. Apply the prompt prefix: `"Read .antigravity/START_HERE.md first."` +2. Follow the bootstrap and inventory files for contextual queries. +3. Obtain user approval before proposing changes to any workspace configs.