Skip to content

Commit dbca254

Browse files
committed
Sync git safety gate governance
1 parent 8cda580 commit dbca254

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ To ensure long-running safe autonomous execution, the following rules are strict
3737
6. **Proposal Mutability Boundary**: Proposal outputs (in `proposals/`) must never mutate active source files until approved and applied through the apply gate.
3838
7. **Subagent Restrictions**: Subagents may validate, search, or inspect codebase assets but must never be used to bypass network, API key, browser, or write restrictions.
3939
8. **Browser Sandbox**: Browser use is denied by default and requires explicit phase permission.
40-
9. **Network Sandbox**: Network socket connections are denied by default and require explicit phase permission.
40+
9. **Network Sandbox**: Network socket connections are denied by default and requires explicit phase permission.
4141
10. **Provider Isolation**: Live provider LLM calls are denied by default and require explicit phase permission.
4242
11. **Secrets Redaction**: Private keys, `.env` file details, passwords, and API credentials must never be read, printed, packed, proposed, or committed.
43-
12. **Git Progression Pipeline**: After completing a phase successfully (all checks green), the agent must validate the build, update `PROJEKT.md` status, commit the modifications, and push changes to origin.
43+
12. **Git Safety Gate**: After completing a phase successfully, the agent may update project status and report local validation evidence. `git commit` is allowed only when the phase prompt explicitly requests a commit. `git push`, remote branch creation, PR creation, and merge actions require separate explicit user authorization. If authentication, network access, or remote Git interaction is needed without that authorization, halt and report `BLOCKED`.
4444
13. **Explicit Halt**: If blocked by stop conditions, the agent must immediately stop execution and report the precise reason to the user.
4545

4646
---
@@ -96,7 +96,7 @@ FILES_CHANGED: <list of changed files>
9696
COMMANDS_RUN: <list of commands executed>
9797
VALIDATION: <validation output summary>
9898
ARTIFACTS: <list of generated artifacts>
99-
GIT: <git commit and push hash/result>
99+
GIT: <commit only if explicitly requested; push/remote action only if separately explicitly authorized>
100100
NETWORK: <network status during phase>
101101
SECRETS: <secrets status>
102102
POLICY_DECISIONS: <policy status>

PROJEKT.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ NEXT_ALLOWED_ACTION: Await review gate confirmation
3030
- **Allowed Modifications**: May edit source code (`src/**`), tests (`tests/**`), docs (`docs/**`), skills (`.agent/skills/**`, `.agents/skills/**`), prompts (`prompts/**`), and configurations (`Cargo.toml`, `comptext.example.toml`).
3131
- **Allowed Commands**: May run local compilation, lint checks, tests, and formatting validation.
3232
- **Error Remediation**: May automatically modify code to fix local build, format, test, or clippy failures.
33-
- **Phase Transition**: May commit and push changes after all validation passes for a green phase, and await Review-Gate feedback before transitioning to any new phase.
33+
- **Phase Transition**: May update project status and phase reports after local validation passes. A local commit requires explicit phase-level authorization. Any remote publication, branch publication, PR creation, or merge requires separate explicit user authorization. If remote interaction is needed without that authorization, halt as `BLOCKED`.
3434

3535
### Forbidden Rules
36-
- **No Credential Material Access**: Forbidden to read or parse credential-bearing local files or authentication material.
36+
- **No Secret Material Access**: Forbidden to read or parse secret-bearing local files or private auth material.
3737
- **No Sensitive Output Leakage**: Forbidden to print sensitive values in stdout/stderr or write them to logs/reports/artifacts.
3838
- **No Untrusted Provider Action**: Forbidden to execute real cloud API provider calls during coding/validation phases unless explicitly approved for live integration runs.
3939
- **No Destructive/Out-of-Scope Commands**: Forbidden to run shell operations outside the repo root.
@@ -42,12 +42,13 @@ NEXT_ALLOWED_ACTION: Await review gate confirmation
4242

4343
### Stop Conditions
4444
The agent must halt execution and yield to the user when:
45-
1. Authentication material is required to proceed.
45+
1. Secret or private auth material is required to proceed.
4646
2. Real cloud provider execution or live network calls are needed.
4747
3. Git merge conflicts arise that cannot be resolved safely.
4848
4. Validation fails and cannot be resolved with small, safe changes.
4949
5. Codebase requirements or user requests are contradictory.
5050
6. Target files outside the repository root need to be accessed or created.
51+
7. Local commit, remote publication, branch publication, PR creation, or merge is needed without explicit authorization for that exact action.
5152

5253
### Global Validation Suite
5354
The agent must run and satisfy the following validation suite before completing any phase:
@@ -58,14 +59,25 @@ cargo test
5859
cargo clippy -- -D warnings
5960
```
6061

61-
### Git Progression Rule
62-
Upon achieving green status for any phase, the agent must execute:
63-
```bash
64-
git status
65-
git add .
66-
git commit -m "<phase commit message>"
67-
git push
68-
```
62+
### Git Safety Gate
63+
Passing validation does not imply permission to mutate Git or remote state.
64+
65+
Allowed without separate Git authorization:
66+
- read-only status checks
67+
- read-only diff/stat inspection
68+
- read-only latest-commit inspection
69+
70+
Requires explicit phase-level authorization:
71+
- staging phase changes
72+
- creating a local commit
73+
74+
Requires separate explicit remote authorization:
75+
- publishing to remote
76+
- creating remote branches
77+
- creating PRs
78+
- merging
79+
80+
If remote Git interaction is required without explicit remote authorization, stop and report `BLOCKED`.
6981

7082
---
7183

@@ -105,7 +117,7 @@ FILES_CHANGED: <list of changed files>
105117
COMMANDS_RUN: <list of commands executed>
106118
VALIDATION: <validation output summary>
107119
ARTIFACTS: <list of generated artifacts>
108-
GIT: <git commit and push hash/result>
120+
GIT: <read-only status by default; local commit only if explicitly authorized; remote action only if separately explicitly authorized>
109121
RISKS: <analysis of potential risks>
110122
NEXT: <next action or phase name>
111123
```

0 commit comments

Comments
 (0)