Skip to content

Commit 47f88d6

Browse files
committed
Harden Antigravity governance docs
1 parent 8ae9f1e commit 47f88d6

10 files changed

Lines changed: 36 additions & 32 deletions

.agent/skills/ctxt-antigravity-governance/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: ctxt-antigravity-governance
3+
description: "Defines token-efficient governance and operating guidelines for agent runs."
34
summary: "Defines token-efficient governance and operating guidelines for agent runs."
45
---
56

docs/ANTIGRAVITY_CLI_INTEGRATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ flowchart TD
3737
subagent -->|7. audit proposal| prop
3838
agent -->|8. apply gate| ctxt
3939
ctxt -->|9. policy hook validation| policy
40-
policy -->|10. sandboxed commit| repo
40+
policy -->|10. sandboxed write execution| repo
4141
```
4242

4343
---
4444

4545
## 3. Operational Flow
4646

4747
1. **Context Harvesting**: Before launching a task, the Antigravity Orchestrator executes `ctxt context pack --task "<task_description>"`. This harvest sanitizes the repository state, redacting secrets and building a deterministic Context Pack under `.comptext/context_pack.latest.json`.
48-
2. **Proposal Generation**: When proposing changes, the agent runs `ctxt propose --provider dummy "<prompt>"`. This creates a structured JSON patch proposal under `proposals/` without mutating source files.
48+
2. **Proposal Generation**: When proposing changes, the agent runs `ctxt propose --provider dummy "<prompt>"`. This creates a structured JSON patch proposal under `proposals/` without mutating source files. Note that `proposals/` contains ignored/generated runtime state and is excluded from Git tracking in the release package baseline.
4949
3. **Apply and Verification**: To modify the codebase, the agent calls `ctxt apply <proposal_path>`. The CompText control plane intercepts the request, validates that target files lie within allowed write boundaries, prompts for user confirmation (or validation suite success), applies the patches, and runs local tests.

docs/ARTIFACT_POLICY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ This document clarifies the classification, location, and Git tracking rules for
1818
- **Classification**: Committed audit evidence.
1919
- **Location**: `reports/` at the repository root.
2020
- **Git Policy**: **Tracked**. These files serve as permanent evidence of completed developmental milestones, including network constraints and validation command logs.
21-
- **Purpose**: Documents phase reports and compliance tracking logs (e.g., `reports/phase_*_status.md`).
21+
- **Purpose**: Documents phase reports and milestone tracking logs (e.g., `reports/phase_*_status.md`).

docs/HOOK_GOVERNANCE.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hook Governance Model
22

3-
Hooks are policy-interceptor targets designed to enforce strict safety boundaries before, during, and after agent runs. This document defines the target architecture for interceptor hooks within the CompText workspace.
3+
Hooks are policy-interceptor targets designed to enforce safety boundaries before, during, and after agent runs. This document defines the target architecture for interceptor hooks within the CompText workspace. Note that these hooks represent a planned target architecture and are not yet locally implemented in the current code execution pipeline.
44

55
---
66

@@ -25,28 +25,28 @@ The target architecture defines four critical interceptor locations:
2525
```
2626

2727
1. **SessionStart**:
28-
- **Trigger**: Executed when a new agent session or subagent run is initiated.
29-
- **Verification**: Parses workspace config, verifies CLI version, and checks that `AGENTS.md` and `PROJEKT.md` match remote origin main branches.
28+
- **Trigger**: Planned trigger when a new agent session or subagent run is initiated.
29+
- **Verification**: Intended to parse workspace config and verify CLI version. Checks local Git state by default; matching against remote origin main branches is performed only when remote checks are explicitly authorized.
3030
2. **PreToolUse**:
31-
- **Trigger**: Executed immediately before any tool (e.g. file read, file write, shell command execution) is run.
32-
- **Verification**: Evaluates inputs against active policy rules. Fails closed and blocks execution if a violation is detected.
31+
- **Trigger**: Planned trigger immediately before any tool (e.g. file read, file write, shell command execution) is run.
32+
- **Verification**: Intended to evaluate inputs against active policy rules, failing closed and blocking execution if a violation is detected.
3333
3. **PostToolUse**:
34-
- **Trigger**: Executed immediately after a tool finishes running, before returning the output to the agent's context.
35-
- **Verification**: Filters and redacts high-entropy secrets, passwords, or credentials from command output and file read buffers.
34+
- **Trigger**: Planned trigger immediately after a tool finishes running, before returning the output to the agent's context.
35+
- **Verification**: Intended to filter and redact high-entropy secrets, passwords, or credentials from command output and file read buffers.
3636
4. **PostPhase**:
37-
- **Trigger**: Executed when an agent signals completion of a roadmap phase.
38-
- **Verification**: Runs the **Global Validation Suite** and checks git status to ensure the working tree remains clean before triggering the git push progression pipeline.
37+
- **Trigger**: Planned trigger when an agent signals completion of a roadmap phase.
38+
- **Verification**: Intended to run the **Global Validation Suite** and check Git status to ensure the working tree remains clean before triggering the Git push progression pipeline.
3939

4040
---
4141

42-
## 2. Policy Enforcements
42+
## 2. Intended Policy Enforcement (Target Architecture)
4343

44-
The hook governance architecture must actively enforce the following rules:
44+
The hook governance target architecture is designed for the following intended enforcement policies:
4545

46-
- **Block `.env` and Secret Reads**: PreToolUse hooks block attempts to read `.env`, `.env.*`, keyfiles (`*.key`, `*.pem`, `*.p12`, `*.pfx`), or private keys.
47-
- **Block Environment Variable Printing**: Blocks executing commands like `env`, `printenv`, or `Get-ChildItem Env:` to prevent leakages of system configuration credentials.
48-
- **Block Network and Provider Calls**: Intercepts socket calls or provider invocations unless the active phase config explicitly permits network access.
49-
- **Block Out-of-Bounds Writes**: Restricts file modifications to paths inside the repository root. Rejects edits targeting directories outside the workspace.
50-
- **Block Broad Repository Rereads**: Limits tool executions that read the entire codebase recursively unless justified by a phase transition.
51-
- **Require Proposal Before Apply**: Enforces that source code modification is only done via the `ctxt apply` flow referencing a verified JSON proposal from `proposals/`.
52-
- **Require Local Validation**: Blocks marking a phase as complete until all commands in the validation suite pass successfully.
46+
- **Block `.env` and Secret Reads**: PreToolUse hooks are planned to block attempts to read `.env`, `.env.*`, keyfiles (`*.key`, `*.pem`, `*.p12`, `*.pfx`), or private keys.
47+
- **Block Environment Variable Printing**: Intended to block executing commands like `env`, `printenv`, or `Get-ChildItem Env:` to prevent leakages of system configuration credentials.
48+
- **Block Network and Provider Calls**: Intended to intercept socket calls or provider invocations unless the active phase config explicitly permits network access.
49+
- **Block Out-of-Bounds Writes**: Intended to restrict file modifications to paths inside the repository root, rejecting edits targeting directories outside the workspace.
50+
- **Block Broad Repository Rereads**: Intended to limit tool executions that read the entire codebase recursively unless justified by a phase transition.
51+
- **Require Proposal Before Apply**: Intended to enforce that source code modification is only done via the `ctxt apply` flow referencing a verified JSON proposal from `proposals/`.
52+
- **Require Local Validation**: Intended to block marking a phase as complete until all commands in the validation suite pass successfully.

docs/MVP_STATUS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ All core architecture components and phase requirements are fully implemented an
1616

1717
---
1818

19-
## 2. Security Boundaries & Constitution Compliance
19+
## 2. Security Boundaries & Constitution Alignment
2020

2121
- **Model/Provider Output Untrusted**: All suggestions, snippets, and patches produced by provider models are treated as untrusted inputs. They are subjected to the apply-time write sandbox and post-apply validation gates.
2222
- **Network Boundaries (Deny-by-Default)**: Real external network execution is strictly denied unless explicitly authorized. The OpenAI-compatible adapter operates entirely offline in this MVP phase.

docs/PERMISSIONS_MODEL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Permissions Model
22

3-
CompText utilizes a defense-in-depth permissions model to restrict agent actions at the operating system and execution environment level.
3+
CompText utilizes a defense-in-depth permissions model to restrict agent actions at the orchestrator and runtime execution environment level.
44

55
---
66

@@ -10,9 +10,9 @@ Permissions do not serve as the primary policy compiler. Instead, they act as lo
1010

1111
1. **Safety Constitution (`AGENTS.md`)**: The primary rulebook governing logical behavior.
1212
2. **Hook Interceptors (`docs/HOOK_GOVERNANCE.md`)**: Contextual software gates executing within the workspace.
13-
3. **Permissions Model**: Hardware/runtime restrictions enforced by the orchestration host.
13+
3. **Permissions Model**: Orchestrator-enforced runtime restrictions acting as a defense-in-depth policy layer.
1414

15-
If a hook fails or an agent attempts to bypass logical constraints, the permissions model catches the violation and halts the execution thread.
15+
If a hook fails or an agent attempts to bypass logical constraints, the orchestrator's runtime permissions model acts as a secondary layer to block unauthorized actions.
1616

1717
---
1818

docs/RELEASE_CHECKLIST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Use this checklist to verify the stability, security boundaries, and validation
3030
```bash
3131
cargo clippy -- -D warnings
3232
```
33-
- [ ] Production build succeeds:
33+
- [ ] Release target build succeeds:
3434
```bash
3535
cargo build --release
3636
```

docs/SKILL_AUTHORING_GUIDE.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ Skills are progressive context-loading capsules that guide agent behavior for sp
44

55
---
66

7-
## 1. Skill File Layout
7+
## 1. Skill Folder and File Layout
88

9-
Every skill must live in the `.agent/skills/` (or `.agents/skills/`) directory as a markdown file structured as:
9+
Every skill must be authored as a directory under `.agent/skills/` (or `.agents/skills/`) containing a `SKILL.md` file. For example, `.agent/skills/ctxt-antigravity-governance/SKILL.md`.
10+
11+
The frontmatter of each `SKILL.md` file must be structured as:
1012

1113
```markdown
1214
---
1315
name: ctxt-phase-XX-name
14-
summary: "A brief 1-line description of the skill for the compatibility manifest."
16+
description: "A detailed description of the skill used as the primary routing and trigger field by the Antigravity Orchestrator."
17+
summary: "Optional secondary metadata summarizing the skill."
1518
---
1619

1720
# Skill: ctxt-phase-XX-name
@@ -40,7 +43,7 @@ The requested response format (e.g., standard status report schema).
4043
## 2. YAML Trigger Tracing
4144

4245
Triggers in the YAML frontmatter inform the Antigravity Orchestrator when a skill is relevant. Triggers are resolved from:
43-
- The **task description** matching the skill `name` or `summary`.
46+
- The **task description** matching the skill `name` or `description`.
4447
- Active **phase declarations** (e.g., `Phase 12`).
4548

4649
---

docs/SUBAGENT_GOVERNANCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Subagents allow parallel task execution and validation. To prevent recursive exe
88

99
Only the following specialist subagent roles are permitted in the CompText workspace:
1010

11-
- **`security-reviewer`**: Audits codebase modifications and document updates for secret leakage, credentials, and forbidden compliance claims.
11+
- **`security-reviewer`**: Audits codebase modifications and document updates for secret leakage, credentials, and forbidden readiness/compatibility claims.
1212
- **`ci-diagnoser`**: Analyzes Cargo compilation failures, clippy warnings, or test logs, and recommends precise, localized corrections.
1313
- **`docs-consistency-checker`**: Audits documentation links, checks for file presence, and verifies README consistency.
1414
- **`proposal-auditor`**: Reviews proposal JSON structures before apply gate execution, confirming target write path safety.

docs/VALIDATE_BENCHMARK.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This document details the usage and specifications for the local validation and
44

55
## 1. Local Validation Command
66

7-
The `ctxt validate` command prints the standard local validation commands used to ensure codebase integrity and safety compliance.
7+
The `ctxt validate` command prints the standard local validation commands used to ensure codebase integrity and safety verification.
88

99
### Usage
1010
```bash

0 commit comments

Comments
 (0)