Skip to main content

Guardrails tool for AI-assisted code changes (pack / check / run)

Project description

README.md

OceansGuard

AI-assisted development guardrails for any repository.

What it solves

  • AI-generated changes that accidentally drop existing code
  • Lack of global context (only partial files shown)
  • Forgetfulness / inconsistent constraints across sessions
  • No test / lint guarantees
  • Secret leakage (keys/tokens) into commits
  • Risky full-rewrite changes

Core commands

init

Create minimal guard files in target repo (idempotent; no overwrite).

python core/aiguard.py init --repo .

pack

Generate AI context pack (diff-first).

python core/aiguard.py pack --repo .

check

Run guard checks + configured project checks and write reports.

python core/aiguard.py check --repo .

run

Shortcut = pack + check.

python core/aiguard.py run --repo . --task "your task"

Strict mode

--strict makes guardrails non-negotiable:

  • requires PyYAML
  • fails if checks.commands is empty
  • fails if contracts/openapi.json is missing/empty
python core/aiguard.py run --repo . --task "CI guard" --strict

Submodule usage (recommended)

In your target repository:

git submodule add https://github.com/OceansCreative/OceansGuard.git tools/OceansGuard
python tools/OceansGuard/core/aiguard.py init --repo .
python tools/OceansGuard/core/aiguard.py run --repo . --task "初回ガード適用"

Outputs

  • ai_context_pack.md: single file to paste into AI chat
  • ai_test_last.log: raw execution logs
  • ai_check_report.json: structured result for CI/PR gating

Git hooks (prevent committing to main)

Install with:

python core/install_hooks.py --repo .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oceansguard-0.1.5.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oceansguard-0.1.5-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file oceansguard-0.1.5.tar.gz.

File metadata

  • Download URL: oceansguard-0.1.5.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for oceansguard-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5a42a62041191ba6717c9f8b9be1603ec24acdd4841810c6f739dc325f674cac
MD5 d9f3d024fa9d3f5da83a187554d8bbdf
BLAKE2b-256 039e49bae55e46828e9be433149443a8c92417336db2e36d4415dcab0515eb36

See more details on using hashes here.

File details

Details for the file oceansguard-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: oceansguard-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for oceansguard-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9ae39831d0c79ecb19747747d5229af9b9c83a7b572bd40aaefb1a3f4c28d6
MD5 c5c4e65dd9c183d0ecb7e671b30a90e7
BLAKE2b-256 0deb88b5db54c255de7f12770043aa5a3e21e4a08abb64ebbb6f28b32f42ee9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page