AGENTS.md instructions for /home/clive/PycharmProjects/Orac
Follow standard Python conventions unless otherwise specified.
-
Module structure:
-
A module docstring MUST appear at the very top of the file describing its purpose.
-
Immediately following the module docstring, include comment-based metadata headers:
Author: Clive Bostock
Date:
Description:
-
Command-line scripts:
- Use argparse for command-line parameters.
-
Code quality:
- Include Google-style docstrings for all new public modules, classes, and functions.
- When modifying existing public code, add missing docstrings where it is reasonable to do so within the scope of the change.
- Use type hints where appropriate.
- Favour readable, production-usable code with sensible error handling.
-
General:
- Prefer clarity over cleverness.
- Avoid unnecessary complexity.
-
For any created programs / executable scripts include provenance.
If pre-existing code does not already have these, ask for confirmation before adding.
Template:
Author: Clive Bostock
Date: DD-Mon-YYYY
Purpose:
Usage:
--- project-doc ---
Orac Agent Instructions
Before making changes, read this file first.
Do not read every guardrail document automatically. Select the relevant guardrails based on the files being changed and the nature of the task.
If the task crosses multiple areas, read all relevant guardrails.
If unsure, read the stricter or more relevant document rather than guessing.
Always read
- docs/agent-guardrails/00-project-principles.md
- docs/agent-guardrails/10-architecture-boundaries.md
Database, DDL, SQL, install scripts, grants, schemas
When changing files under resources/db/schema, read:
- resources/db/schema/AGENTS.md
Also read the adjacent database context file when it exists:
- resources/db/schema/AGENT_CONTEXT.md
Read:
- docs/agent-guardrails/20-database-standards.md
Also read:
- docs/agent-guardrails/25-plsql-standards.md
when changing:
- packages
- package bodies
- procedures
- functions
- triggers
- PL/SQL install blocks
- dynamic SQL
- TAPI/XAPI logic
Python
Read:
- docs/agent-guardrails/30-python-standards.md
when changing:
- Python application code
- Python scripts
- command line tools
- tests
- packaging code
- plugin runtime code implemented in Python
Web applications
When changing files under web, read:
Also read the adjacent web application context file when it exists:
APEX applications are not part of the web tree. Treat APEX exports and APEX
workspace assets as database assets under resources/db/schema.
Plugins
Read:
- docs/agent-guardrails/50-plugin-standards.md
when changing:
- plugin manifests
- plugin discovery
- plugin registration
- plugin routing
- plugin runtime
- plugin capability definitions
- plugin schemas
- plugin implementations
- gateway plugins
Also read:
- docs/agent-guardrails/60-security-and-risk.md
when plugin changes involve:
- permissions
- external services
- credentials
- network access
- filesystem access
- database writes
- device control
- user data
- LLM access
- context injection
Security and risk
Read:
- docs/agent-guardrails/60-security-and-risk.md
when changing anything involving:
- credentials
- secrets
- authentication
- authorisation
- grants
- dynamic SQL
- shell execution
- filesystem access
- external APIs
- plugin permissions
- home automation control
- user data
- audit logging
- confirmation flows
- risky actions
Context management
Read:
- docs/agent-guardrails/70-context-management.md
when changing anything involving:
- conversation history
- messages
- message roles
- message types
- context assembly
- summaries
- tool calls
- tool results
- plugin provenance
- LLM prompts
- context-window management
- stale context handling
Table abbreviations
Read:
- docs/agent-guardrails/table-abbreviations.csv
before creating or renaming:
- tables
- constraints
- indexes
- triggers
- TAPI packages
- object names derived from table abbreviations
Do not invent table abbreviations.
Conflict handling
If two guardrails appear to conflict:
- Prefer the more specific guardrail.
- Prefer the guardrail closest to the changed code.
- Preserve existing working project conventions unless explicitly asked to refactor.
- Ask for clarification before making a schema, security, plugin, or context-management decision that changes architecture.
Non-negotiable rules
- Do not bypass Orac schema boundaries.
- Do not bypass plugin registration or policy.
- Do not bypass context management.
- Do not expose secrets.
- Do not execute LLM-generated SQL or shell commands.
- Do not grant broad privileges to fix errors.
- Do not rename existing objects unless explicitly instructed.