god-code 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- god_code-0.1.0/.gitignore +12 -0
- god_code-0.1.0/CHANGELOG.md +34 -0
- god_code-0.1.0/CONTRIBUTING.md +54 -0
- god_code-0.1.0/LICENSE +674 -0
- god_code-0.1.0/PKG-INFO +18 -0
- god_code-0.1.0/README.md +199 -0
- god_code-0.1.0/godot_agent/__init__.py +0 -0
- god_code-0.1.0/godot_agent/cli.py +352 -0
- god_code-0.1.0/godot_agent/godot/__init__.py +0 -0
- god_code-0.1.0/godot_agent/godot/collision_planner.py +166 -0
- god_code-0.1.0/godot_agent/godot/consistency_checker.py +168 -0
- god_code-0.1.0/godot_agent/godot/dependency_graph.py +153 -0
- god_code-0.1.0/godot_agent/godot/gdscript_linter.py +189 -0
- god_code-0.1.0/godot_agent/godot/pattern_advisor.py +161 -0
- god_code-0.1.0/godot_agent/godot/project.py +58 -0
- god_code-0.1.0/godot_agent/godot/resource_validator.py +27 -0
- god_code-0.1.0/godot_agent/godot/scene_parser.py +114 -0
- god_code-0.1.0/godot_agent/godot/scene_writer.py +77 -0
- god_code-0.1.0/godot_agent/godot/tscn_validator.py +185 -0
- god_code-0.1.0/godot_agent/llm/__init__.py +0 -0
- god_code-0.1.0/godot_agent/llm/client.py +148 -0
- god_code-0.1.0/godot_agent/llm/streaming.py +26 -0
- god_code-0.1.0/godot_agent/llm/vision.py +11 -0
- god_code-0.1.0/godot_agent/prompts/__init__.py +0 -0
- god_code-0.1.0/godot_agent/prompts/build_discipline.py +57 -0
- god_code-0.1.0/godot_agent/prompts/godot_playbook.py +267 -0
- god_code-0.1.0/godot_agent/prompts/knowledge_selector.py +112 -0
- god_code-0.1.0/godot_agent/prompts/system.py +89 -0
- god_code-0.1.0/godot_agent/py.typed +0 -0
- god_code-0.1.0/godot_agent/runtime/__init__.py +0 -0
- god_code-0.1.0/godot_agent/runtime/auth.py +22 -0
- god_code-0.1.0/godot_agent/runtime/config.py +53 -0
- god_code-0.1.0/godot_agent/runtime/context_manager.py +135 -0
- god_code-0.1.0/godot_agent/runtime/engine.py +104 -0
- god_code-0.1.0/godot_agent/runtime/error_loop.py +175 -0
- god_code-0.1.0/godot_agent/runtime/oauth.py +128 -0
- god_code-0.1.0/godot_agent/runtime/session.py +37 -0
- god_code-0.1.0/godot_agent/tools/__init__.py +0 -0
- god_code-0.1.0/godot_agent/tools/base.py +30 -0
- god_code-0.1.0/godot_agent/tools/file_ops.py +112 -0
- god_code-0.1.0/godot_agent/tools/git.py +49 -0
- god_code-0.1.0/godot_agent/tools/godot_cli.py +152 -0
- god_code-0.1.0/godot_agent/tools/list_dir.py +45 -0
- god_code-0.1.0/godot_agent/tools/registry.py +29 -0
- god_code-0.1.0/godot_agent/tools/screenshot.py +72 -0
- god_code-0.1.0/godot_agent/tools/search.py +72 -0
- god_code-0.1.0/godot_agent/tools/shell.py +79 -0
- god_code-0.1.0/pyproject.toml +34 -0
- god_code-0.1.0/tests/__init__.py +0 -0
- god_code-0.1.0/tests/godot/__init__.py +0 -0
- god_code-0.1.0/tests/godot/test_collision_planner.py +33 -0
- god_code-0.1.0/tests/godot/test_consistency.py +31 -0
- god_code-0.1.0/tests/godot/test_dependency_graph.py +36 -0
- god_code-0.1.0/tests/godot/test_linter.py +35 -0
- god_code-0.1.0/tests/godot/test_pattern_advisor.py +53 -0
- god_code-0.1.0/tests/godot/test_project.py +51 -0
- god_code-0.1.0/tests/godot/test_resource_validator.py +54 -0
- god_code-0.1.0/tests/godot/test_scene_parser.py +63 -0
- god_code-0.1.0/tests/godot/test_scene_writer.py +56 -0
- god_code-0.1.0/tests/godot/test_tscn_validator.py +46 -0
- god_code-0.1.0/tests/llm/__init__.py +0 -0
- god_code-0.1.0/tests/llm/test_client.py +84 -0
- god_code-0.1.0/tests/llm/test_vision.py +20 -0
- god_code-0.1.0/tests/prompts/__init__.py +0 -0
- god_code-0.1.0/tests/prompts/test_knowledge_selector.py +35 -0
- god_code-0.1.0/tests/prompts/test_system_prompt.py +35 -0
- god_code-0.1.0/tests/runtime/__init__.py +0 -0
- god_code-0.1.0/tests/runtime/test_config.py +39 -0
- god_code-0.1.0/tests/runtime/test_context_manager.py +61 -0
- god_code-0.1.0/tests/runtime/test_engine.py +138 -0
- god_code-0.1.0/tests/runtime/test_error_loop.py +46 -0
- god_code-0.1.0/tests/test_e2e.py +206 -0
- god_code-0.1.0/tests/tools/__init__.py +0 -0
- god_code-0.1.0/tests/tools/test_file_ops.py +79 -0
- god_code-0.1.0/tests/tools/test_git.py +70 -0
- god_code-0.1.0/tests/tools/test_godot_cli.py +127 -0
- god_code-0.1.0/tests/tools/test_list_dir.py +42 -0
- god_code-0.1.0/tests/tools/test_registry.py +58 -0
- god_code-0.1.0/tests/tools/test_search.py +70 -0
- god_code-0.1.0/tests/tools/test_shell.py +27 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to God Code will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-04-02
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- CLI with `ask`, `chat`, `info`, `login`, `logout`, `status` commands
|
|
9
|
+
- 10 tools: read_file, write_file, edit_file, list_dir, grep, glob, git, run_shell, run_godot, screenshot_scene
|
|
10
|
+
- OpenAI-compatible API client with streaming and vision support
|
|
11
|
+
- OAuth login via Codex CLI refresh token
|
|
12
|
+
- Godot project parser (project.godot, autoloads, resolution)
|
|
13
|
+
- .tscn scene parser, writer, and format validator with auto-fix
|
|
14
|
+
- GDScript linter (naming, ordering, type annotations, anti-patterns)
|
|
15
|
+
- Collision layer planner (standard 8-layer scheme)
|
|
16
|
+
- Cross-file consistency checker (collision, signals, resource paths, groups)
|
|
17
|
+
- Project dependency graph builder
|
|
18
|
+
- Design pattern advisor (object pool, component, state machine)
|
|
19
|
+
- Godot Playbook knowledge system (17 sections, context-aware injection)
|
|
20
|
+
- Build discipline rules (incremental build-and-verify)
|
|
21
|
+
- Error detection loop with Godot output parsing and fix suggestions
|
|
22
|
+
- Conversation context compaction for long sessions
|
|
23
|
+
- Path containment security (file ops restricted to project root)
|
|
24
|
+
- Shell command sandboxing (dangerous pattern blocking)
|
|
25
|
+
- API retry with exponential backoff (429 rate limits)
|
|
26
|
+
- Content filter graceful handling (400 errors)
|
|
27
|
+
- Session persistence to JSON
|
|
28
|
+
|
|
29
|
+
### Security
|
|
30
|
+
- File operations restricted to project root directory
|
|
31
|
+
- Shell commands blocked for dangerous patterns (rm -rf /, sudo, etc.)
|
|
32
|
+
- Git argument parsing via shlex.split()
|
|
33
|
+
- OAuth tokens stored with 600 permissions
|
|
34
|
+
- API key/token masked in status output
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Contributing to God Code
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing!
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/888wing/god-code.git
|
|
9
|
+
cd god-code
|
|
10
|
+
python3 -m venv .venv
|
|
11
|
+
source .venv/bin/activate
|
|
12
|
+
pip install -e ".[dev]"
|
|
13
|
+
python -m pytest tests/ -v
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Development Workflow
|
|
17
|
+
|
|
18
|
+
1. Create a feature branch: `git checkout -b feature/your-feature`
|
|
19
|
+
2. Write tests first (TDD encouraged)
|
|
20
|
+
3. Implement the feature
|
|
21
|
+
4. Run tests: `python -m pytest tests/ -v`
|
|
22
|
+
5. Commit with descriptive messages
|
|
23
|
+
6. Open a Pull Request
|
|
24
|
+
|
|
25
|
+
## Code Style
|
|
26
|
+
|
|
27
|
+
- Python 3.12+ with type annotations
|
|
28
|
+
- Follow existing patterns in the codebase
|
|
29
|
+
- Use `pydantic` for tool input/output models
|
|
30
|
+
- New tools inherit from `BaseTool` in `godot_agent/tools/base.py`
|
|
31
|
+
|
|
32
|
+
## Adding a New Tool
|
|
33
|
+
|
|
34
|
+
1. Create `godot_agent/tools/your_tool.py`
|
|
35
|
+
2. Implement a class inheriting `BaseTool` with `Input`, `Output`, and `execute()`
|
|
36
|
+
3. Register it in `godot_agent/cli.py:build_registry()`
|
|
37
|
+
4. Add tests in `tests/tools/test_your_tool.py`
|
|
38
|
+
|
|
39
|
+
## Adding Godot Knowledge
|
|
40
|
+
|
|
41
|
+
Edit `godot_agent/prompts/godot_playbook.py` to add new sections. Each section has:
|
|
42
|
+
- Title
|
|
43
|
+
- Keywords (for auto-selection)
|
|
44
|
+
- Content (injected into system prompt when relevant)
|
|
45
|
+
|
|
46
|
+
## Reporting Issues
|
|
47
|
+
|
|
48
|
+
- Use GitHub Issues
|
|
49
|
+
- Include: Python version, Godot version, god-code version, error output
|
|
50
|
+
- For API errors: include the status code and error message (not your API key)
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
By contributing, you agree that your contributions will be licensed under GPL-3.0.
|