Thank you for contributing to the Prolog Agent Toolkit! We welcome contributions for adding new engine safety wrappers, extending AI agent skills, and improving Prolog guidelines.
Note
Project Status: Active Development
The toolkit is fully functional and usable today, but remains under active development. We strongly encourage community feedback and contributions!
We are open to:
- Pull Requests: Code changes, new Prolog engine safety wrappers, bug fixes, or AI skill additions.
- GitHub Issues for:
- Suggestions for new features, architectural goals, or engine targets.
- Examples of unwanted AI-generated Prolog code ("AI slop", copy-pasted loops, unnecessary low-level cuts
!,->,\+) to help refine agent rules and purity guidelines. - Suggestions for prompts or agent workflows to run on this project itself!
The toolkit consists of three primary layers:
- Authoritative Coding Standards (
codingstandards.md&.agents/rules/coding_invariants.md):- The standalone, canonical standard for Prolog coding, Covington formatting, logical purity, reification, constraints, and data modeling across both human programmers and AI assistants.
- AI Agent Customizations & Operational Policies (
.agents/):- Operational policies (
.agents/AGENTS.md, symlinked asAGENTS.mdat root) and skills (.agents/skills/) for library discovery, unit testing (testing.pl), package management (bakage), and release orchestration.
- Operational policies (
- Python Execution Safety CLI (
prolog_agent_toolkit/):- Cross-platform resource sandboxing, execution timeout monitoring, low-CPU scheduling, and RAM limits (
prolog-safe,scryer-safe,swi-safe,trealla-safe,tau-safe).
- Cross-platform resource sandboxing, execution timeout monitoring, low-CPU scheduling, and RAM limits (
All AI agent instructions, rules, and skills MUST remain 100% vendor-neutral and open-format:
- Use Open Standards: All guidelines MUST be authored in standard Markdown and JSON inside
.agents/(AGENTS.md,.agents/skills/<name>/SKILL.md,.agents/agents/<name>.md). - Prohibit Vendor/IDE Lock-In Files: Do NOT create proprietary, vendor-specific, or IDE-harness-specific configuration files or directories (such as
.claude/,.windsurfrule,.cursorrules,.github/copilot-instructions.md,.clinerules,.gemini/, or harness-specific Emacs config snippets). - Universal Portability: By storing guidelines strictly in standard
.agents/layout, any AI coding assistant or harness (Google Antigravity, Claude Code, Cursor, Windsurf, GitHub Copilot, aidermacs/agent-shell/gptel) can natively read and apply the instructions without fragmentation.
Note
Generating Skills with AI: You can also ask your AI coding agent to write and register the skill for you rather than writing it manually (e.g. "Create a new skill in .agents/skills/my-skill covering XYZ").
- Create a new directory in
.agents/skills/<skill-name>/. - Include a
SKILL.mdfile with standard YAML frontmatter:--- name: skill-name description: Concise description of when and why the AI should use this skill. --- # Skill Title Detailed instructions for the AI assistant...
- Test skill discovery in Google Antigravity, Claude Code, or Emacs AI (
aidermacs/gptel).
Python tools and tests MUST NOT leave intermediate bytecode (__pycache__, .pyc) or test cache artifacts inside the source or test directories.
Always run pytest and Python tools with PYTHONDONTWRITEBYTECODE=1 (or PYTHONPYCACHEPREFIX=.cache/pycache):
# Run pytest suite without generating __pycache__ in source tree
PYTHONDONTWRITEBYTECODE=1 uv run pytest
# Test CLI commands manually
PYTHONDONTWRITEBYTECODE=1 uv run scryer-safe -g "write('Test OK'), nl, halt."For contributors working on the Python source code (prolog_agent_toolkit/), install the CLI tools locally in editable mode so changes to Python files take effect immediately:
uv tool install --editable . --forceTip
If you installed in non-editable mode (uv tool install . --force), re-run uv tool install . --force after modifying Python code to rebuild and update the system binaries on your PATH.
- Commit messages follow Conventional Commits format (e.g.
feat(cli): add support for Ciao Prolog,docs(skills): update testing.pl guidelines). - Development takes place on branch
DEV202608. - Ensure all version numbers remain synchronized across
README.md,pyproject.toml, andprolog_agent_toolkit/__init__.py.
Tip
Interactive Workflow Available: You can automate and execute this onboarding process step-by-step with your AI assistant by using the prolog-engine-onboarding skill (e.g. "Use prolog-engine-onboarding skill to guide me through adding support for GNU Prolog").
Whenever adding or extending support for a new Prolog engine (e.g. GNU Prolog, Ciao Prolog, SICStus, B-Prolog, ECLiPSe, etc.), you MUST update all of the following:
- Metadata & Web Annotations:
README.md: Update OpenGraph description<meta>, Schema.org JSON-LD snippet<script type="application/ld+json">, supported engines table, CLI list, and keywords array.codemeta.json: Updatedescriptionandkeywordsarray.pyproject.toml: Add engine keyword (e.g."tau-prolog") and script entry point (e.g.<engine>-safe).
- CLI Runner & Sandboxing:
prolog_agent_toolkit/runner.py: Add binary mapping inresolve_engine_binary().prolog_agent_toolkit/cli.py: Add entry point function (e.g.<engine>_safe_main()).tests/test_runner.py: Add unit test assertions verifying binary resolution.
- Coding Rules & Standards:
- Create
.agents/skills/<engine>-prolog-standards/SKILL.mddetailing system syntax, modules, string types, and constraints. .agents/AGENTS.md: Add standard entry under Multi-Engine Prolog System Selection & Rules.
- Create
- Packaging Frameworks:
.agents/skills/prolog-packaging/SKILL.md: Document engine package manager conventions (e.g.bakage,pack,npm).
- Testing Frameworks:
.agents/skills/prolog-testing/SKILL.md: Document assertion patterns, test runner predicates, and execution CLI options.
AI coding agents (Google Antigravity, Claude Code, Cursor, Windsurf, Copilot, or Emacs AI tools) contributing changes to this repository MUST follow this protocol:
- Orientation: Read
AGENT_GUIDE.md,AGENTS.md, and inspectAGENT_INDEX.jsonbefore proposing or implementing changes. - Anti-Pattern Check: Check
docs/ANTI_PATTERNS.mdto ensure proposed changes do not violate purity rules or duplicate existing helpers. - Execution Safety: Execute Prolog goals via safe execution wrappers (
prolog-safe,scryer-safe,swi-safe). Never run raw interpreter binaries. - Clean Bytecode: Always invoke Python tools with bytecode disabled (
PYTHONDONTWRITEBYTECODE=1 uv run pytest). - Skill Validation: When adding or modifying skills in
.agents/skills/, runprolog-agent validate-skillsto ensure YAML frontmatter compliance. - Version Parity: When modifying version numbers, edit
pyproject.tomlas canonical source of truth and runprolog-agent release. Runprolog-agent check-versionto verify parity. - Portable Hyperlinks: Avoid absolute
file://hyperlinks. Use relative Markdown links for local workspace files. If afile://link was authored by a human contributor, ask them if they want to fix it first before replacing it.