hermes-project-oracle 2.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.
Files changed (27) hide show
  1. hermes_project_oracle-2.1.0/LICENSE +21 -0
  2. hermes_project_oracle-2.1.0/PKG-INFO +161 -0
  3. hermes_project_oracle-2.1.0/README.md +128 -0
  4. hermes_project_oracle-2.1.0/pyproject.toml +73 -0
  5. hermes_project_oracle-2.1.0/scripts/hermes_project_oracle.egg-info/PKG-INFO +161 -0
  6. hermes_project_oracle-2.1.0/scripts/hermes_project_oracle.egg-info/SOURCES.txt +25 -0
  7. hermes_project_oracle-2.1.0/scripts/hermes_project_oracle.egg-info/dependency_links.txt +1 -0
  8. hermes_project_oracle-2.1.0/scripts/hermes_project_oracle.egg-info/entry_points.txt +4 -0
  9. hermes_project_oracle-2.1.0/scripts/hermes_project_oracle.egg-info/requires.txt +7 -0
  10. hermes_project_oracle-2.1.0/scripts/hermes_project_oracle.egg-info/top_level.txt +6 -0
  11. hermes_project_oracle-2.1.0/scripts/oracle_generate.py +1340 -0
  12. hermes_project_oracle-2.1.0/scripts/oracle_scan.py +322 -0
  13. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/__init__.py +40 -0
  14. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/constants.py +104 -0
  15. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/conventions.py +442 -0
  16. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/detectors.py +582 -0
  17. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/io.py +76 -0
  18. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/misc.py +125 -0
  19. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/structure.py +111 -0
  20. hermes_project_oracle-2.1.0/scripts/oracle_scan_lib/vcs.py +66 -0
  21. hermes_project_oracle-2.1.0/scripts/oracle_vault.py +220 -0
  22. hermes_project_oracle-2.1.0/scripts/safe_io.py +81 -0
  23. hermes_project_oracle-2.1.0/scripts/version.py +17 -0
  24. hermes_project_oracle-2.1.0/setup.cfg +4 -0
  25. hermes_project_oracle-2.1.0/tests/test_oracle.py +1001 -0
  26. hermes_project_oracle-2.1.0/tests/test_oracle_hardening.py +251 -0
  27. hermes_project_oracle-2.1.0/tests/test_oracle_lib.py +181 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jules Zhou
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: hermes-project-oracle
3
+ Version: 2.1.0
4
+ Summary: Deep project scanner that generates agent-ready context files — AGENTS.md, CLAUDE.md, Obsidian notes.
5
+ Author-email: Jules Zhou <juleszhou01@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/iruzen-dono/hermes-project-oracle
8
+ Project-URL: Repository, https://github.com/iruzen-dono/hermes-project-oracle
9
+ Project-URL: Issues, https://github.com/iruzen-dono/hermes-project-oracle/issues
10
+ Project-URL: Changelog, https://github.com/iruzen-dono/hermes-project-oracle/blob/main/CHANGELOG.md
11
+ Keywords: ai-agents,agents-md,claude-code,cursor,codex,context-engineering,developer-tools,code-scanner,obsidian
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Documentation
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=8; extra == "dev"
28
+ Requires-Dist: pytest-cov>=5; extra == "dev"
29
+ Requires-Dist: ruff>=0.6; extra == "dev"
30
+ Requires-Dist: mypy>=1.11; extra == "dev"
31
+ Requires-Dist: pyyaml>=6; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # Project Oracle 🧠
35
+
36
+ [![CI](https://github.com/iruzen-dono/hermes-project-oracle/actions/workflows/ci.yml/badge.svg)](https://github.com/iruzen-dono/hermes-project-oracle/actions/workflows/ci.yml)
37
+ [![PyPI](https://img.shields.io/pypi/v/hermes-project-oracle.svg)](https://pypi.org/project/hermes-project-oracle/)
38
+ [![Python](https://img.shields.io/pypi/pyversions/hermes-project-oracle.svg)](https://pypi.org/project/hermes-project-oracle/)
39
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
40
+
41
+ **Deep project scanner that generates agent-ready context files.**
42
+
43
+ Scan any codebase and produce `AGENTS.md`, `CLAUDE.md`, or an Obsidian project
44
+ note so a coding agent — Claude Code, Cursor, Codex CLI, OpenClaw, Gemini, or
45
+ Hermes — understands the stack, the real commands, the conventions, and the
46
+ landmines instantly. **Zero dependencies**: pure Python 3.11+ standard library,
47
+ cross-platform (Windows, Linux, macOS).
48
+
49
+ Unlike a plain generator, Project Oracle also captures **human knowledge a scan
50
+ cannot see**. It interviews you for the project's intent and known pitfalls, then
51
+ embeds both in the generated file — so the agent reads the landmines before it
52
+ touches code.
53
+
54
+ ## Features
55
+
56
+ - **Every framework, not just the first** — a Next.js + Express + Socket.IO + React project lists all four
57
+ - **Real, runnable commands** — npm scripts captured with their actual shell command, not just the name
58
+ - **Environment variable names** — read from `.env.example`; values are never copied and the real `.env` is never opened
59
+ - **Secret-safe git context** — remote URLs are credential-masked (`https://***@host/...`) and de-duplicated
60
+ - **28 languages detected** — Python, Java, Kotlin, TypeScript, Go, Rust, PHP, C#, Ruby, and more
61
+ - **Build system + test detection** — Maven, Gradle, npm/yarn/pnpm/bun, uv/pip, Cargo, Go modules, Composer; Jest, Vitest, pytest, JUnit, and test-file counts
62
+ - **Monorepo aware** — nested manifests discovered up to 2 levels deep
63
+ - **Intent + pitfalls interview** — embeds project purpose and known landmines
64
+ - **Safe regeneration** — an existing file is never clobbered silently: content
65
+ between `<!-- oracle:start/end -->` markers is refreshed in place (your edits
66
+ outside survive), anything else requires `--force` and keeps a `.bak` backup
67
+ - **Multi-template output** — AGENTS.md, CLAUDE.md, Obsidian note, or all in one pass
68
+ - **Cross-platform** — `pathlib` everywhere, no platform-specific code
69
+
70
+ ## Install
71
+
72
+ **As a CLI** — one command, nothing to clone:
73
+
74
+ ```bash
75
+ pipx install hermes-project-oracle
76
+ # or
77
+ uv tool install hermes-project-oracle
78
+ ```
79
+
80
+ Three commands land on your `PATH`: **`oracle-scan`**, **`oracle-generate`**,
81
+ **`oracle-vault`**.
82
+
83
+ **As a skill** — for Claude Code, Cursor, Codex, Hermes. The zip carries only
84
+ what the skill needs (`SKILL.md`, `scripts/`, `references/`), no `.git/`, tests
85
+ or build artifacts:
86
+
87
+ ```bash
88
+ git clone https://github.com/iruzen-dono/hermes-project-oracle.git
89
+ cd hermes-project-oracle
90
+ python package_skill.py # builds hermes-project-oracle.zip + validates it
91
+
92
+ # Claude Code / generic SKILL.md agents
93
+ unzip hermes-project-oracle.zip -d ~/.claude/skills/
94
+
95
+ # Hermes Agent
96
+ unzip hermes-project-oracle.zip -d ~/.hermes/skills/
97
+ ```
98
+
99
+ On Windows (PowerShell): `Expand-Archive hermes-project-oracle.zip -DestinationPath $HOME\.claude\skills\`
100
+
101
+ ## Quick start
102
+
103
+ ```bash
104
+ # 1. Scan a project (writes <project>/.oracle/scan-report.json,
105
+ # and adds .oracle/ to the project's .gitignore when missing)
106
+ oracle-scan --path /path/to/project --output /path/to/project/.oracle/
107
+
108
+ # 2. Generate AGENTS.md, embedding the interview answers
109
+ oracle-generate \
110
+ --scan .oracle/scan-report.json \
111
+ --template agents-md \
112
+ --output /path/to/project/AGENTS.md \
113
+ --intent-file .oracle/intent.json
114
+
115
+ # 3. (Optional) push a note into your Obsidian vault
116
+ oracle-vault --scan .oracle/scan-report.json --vault ~/Documents/"Obsidian Vault"
117
+ ```
118
+
119
+ Running from a skill install instead? Prefix with `python $SKILL/scripts/`
120
+ (`SKILL=~/.claude/skills/hermes-project-oracle`) — the flags are identical.
121
+
122
+ `--output` accepts a directory (`.oracle/` or `.oracle`) or an explicit JSON
123
+ file path. Run any script with `--help` for all flags.
124
+
125
+ ## Scripts
126
+
127
+ | Script | Purpose |
128
+ |--------|---------|
129
+ | `scripts/oracle_scan.py` | Deep project scan → JSON report (28 languages, credential-safe) |
130
+ | `scripts/oracle_generate.py` | Report → context files (4 templates + optional intent file) |
131
+ | `scripts/oracle_vault.py` | Push a structured note into an Obsidian vault |
132
+
133
+ ## Docs
134
+
135
+ - Full skill instructions: [`SKILL.md`](SKILL.md)
136
+ - Interview script (intent + pitfalls): [`references/interview-script.md`](references/interview-script.md)
137
+ - Example intent file: [`references/intent-example.json`](references/intent-example.json)
138
+ - Example generated output: [`references/agents-md-example.md`](references/agents-md-example.md)
139
+
140
+ ## Development
141
+
142
+ ```bash
143
+ pip install -e ".[dev]"
144
+ ruff check . # lint (deterministic via ruff.toml)
145
+ mypy scripts/ --ignore-missing-imports
146
+ pytest tests/ -v # unit + end-to-end (scan → generate → vault)
147
+ pytest tests/ --cov=scripts # coverage (currently 77%)
148
+ ```
149
+
150
+ The end-to-end test builds a fixture Node project, runs the full pipeline, and
151
+ asserts the output is safe (no leaked tokens, no env values, no absolute paths)
152
+ and complete (commands, frameworks, env names, pitfalls).
153
+
154
+ ## Contributing
155
+
156
+ PRs welcome! Keep it cross-platform, add tests, preserve the zero-dependency
157
+ promise, and never introduce network calls or credential collection.
158
+
159
+ ## License
160
+
161
+ MIT
@@ -0,0 +1,128 @@
1
+ # Project Oracle 🧠
2
+
3
+ [![CI](https://github.com/iruzen-dono/hermes-project-oracle/actions/workflows/ci.yml/badge.svg)](https://github.com/iruzen-dono/hermes-project-oracle/actions/workflows/ci.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/hermes-project-oracle.svg)](https://pypi.org/project/hermes-project-oracle/)
5
+ [![Python](https://img.shields.io/pypi/pyversions/hermes-project-oracle.svg)](https://pypi.org/project/hermes-project-oracle/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+
8
+ **Deep project scanner that generates agent-ready context files.**
9
+
10
+ Scan any codebase and produce `AGENTS.md`, `CLAUDE.md`, or an Obsidian project
11
+ note so a coding agent — Claude Code, Cursor, Codex CLI, OpenClaw, Gemini, or
12
+ Hermes — understands the stack, the real commands, the conventions, and the
13
+ landmines instantly. **Zero dependencies**: pure Python 3.11+ standard library,
14
+ cross-platform (Windows, Linux, macOS).
15
+
16
+ Unlike a plain generator, Project Oracle also captures **human knowledge a scan
17
+ cannot see**. It interviews you for the project's intent and known pitfalls, then
18
+ embeds both in the generated file — so the agent reads the landmines before it
19
+ touches code.
20
+
21
+ ## Features
22
+
23
+ - **Every framework, not just the first** — a Next.js + Express + Socket.IO + React project lists all four
24
+ - **Real, runnable commands** — npm scripts captured with their actual shell command, not just the name
25
+ - **Environment variable names** — read from `.env.example`; values are never copied and the real `.env` is never opened
26
+ - **Secret-safe git context** — remote URLs are credential-masked (`https://***@host/...`) and de-duplicated
27
+ - **28 languages detected** — Python, Java, Kotlin, TypeScript, Go, Rust, PHP, C#, Ruby, and more
28
+ - **Build system + test detection** — Maven, Gradle, npm/yarn/pnpm/bun, uv/pip, Cargo, Go modules, Composer; Jest, Vitest, pytest, JUnit, and test-file counts
29
+ - **Monorepo aware** — nested manifests discovered up to 2 levels deep
30
+ - **Intent + pitfalls interview** — embeds project purpose and known landmines
31
+ - **Safe regeneration** — an existing file is never clobbered silently: content
32
+ between `<!-- oracle:start/end -->` markers is refreshed in place (your edits
33
+ outside survive), anything else requires `--force` and keeps a `.bak` backup
34
+ - **Multi-template output** — AGENTS.md, CLAUDE.md, Obsidian note, or all in one pass
35
+ - **Cross-platform** — `pathlib` everywhere, no platform-specific code
36
+
37
+ ## Install
38
+
39
+ **As a CLI** — one command, nothing to clone:
40
+
41
+ ```bash
42
+ pipx install hermes-project-oracle
43
+ # or
44
+ uv tool install hermes-project-oracle
45
+ ```
46
+
47
+ Three commands land on your `PATH`: **`oracle-scan`**, **`oracle-generate`**,
48
+ **`oracle-vault`**.
49
+
50
+ **As a skill** — for Claude Code, Cursor, Codex, Hermes. The zip carries only
51
+ what the skill needs (`SKILL.md`, `scripts/`, `references/`), no `.git/`, tests
52
+ or build artifacts:
53
+
54
+ ```bash
55
+ git clone https://github.com/iruzen-dono/hermes-project-oracle.git
56
+ cd hermes-project-oracle
57
+ python package_skill.py # builds hermes-project-oracle.zip + validates it
58
+
59
+ # Claude Code / generic SKILL.md agents
60
+ unzip hermes-project-oracle.zip -d ~/.claude/skills/
61
+
62
+ # Hermes Agent
63
+ unzip hermes-project-oracle.zip -d ~/.hermes/skills/
64
+ ```
65
+
66
+ On Windows (PowerShell): `Expand-Archive hermes-project-oracle.zip -DestinationPath $HOME\.claude\skills\`
67
+
68
+ ## Quick start
69
+
70
+ ```bash
71
+ # 1. Scan a project (writes <project>/.oracle/scan-report.json,
72
+ # and adds .oracle/ to the project's .gitignore when missing)
73
+ oracle-scan --path /path/to/project --output /path/to/project/.oracle/
74
+
75
+ # 2. Generate AGENTS.md, embedding the interview answers
76
+ oracle-generate \
77
+ --scan .oracle/scan-report.json \
78
+ --template agents-md \
79
+ --output /path/to/project/AGENTS.md \
80
+ --intent-file .oracle/intent.json
81
+
82
+ # 3. (Optional) push a note into your Obsidian vault
83
+ oracle-vault --scan .oracle/scan-report.json --vault ~/Documents/"Obsidian Vault"
84
+ ```
85
+
86
+ Running from a skill install instead? Prefix with `python $SKILL/scripts/`
87
+ (`SKILL=~/.claude/skills/hermes-project-oracle`) — the flags are identical.
88
+
89
+ `--output` accepts a directory (`.oracle/` or `.oracle`) or an explicit JSON
90
+ file path. Run any script with `--help` for all flags.
91
+
92
+ ## Scripts
93
+
94
+ | Script | Purpose |
95
+ |--------|---------|
96
+ | `scripts/oracle_scan.py` | Deep project scan → JSON report (28 languages, credential-safe) |
97
+ | `scripts/oracle_generate.py` | Report → context files (4 templates + optional intent file) |
98
+ | `scripts/oracle_vault.py` | Push a structured note into an Obsidian vault |
99
+
100
+ ## Docs
101
+
102
+ - Full skill instructions: [`SKILL.md`](SKILL.md)
103
+ - Interview script (intent + pitfalls): [`references/interview-script.md`](references/interview-script.md)
104
+ - Example intent file: [`references/intent-example.json`](references/intent-example.json)
105
+ - Example generated output: [`references/agents-md-example.md`](references/agents-md-example.md)
106
+
107
+ ## Development
108
+
109
+ ```bash
110
+ pip install -e ".[dev]"
111
+ ruff check . # lint (deterministic via ruff.toml)
112
+ mypy scripts/ --ignore-missing-imports
113
+ pytest tests/ -v # unit + end-to-end (scan → generate → vault)
114
+ pytest tests/ --cov=scripts # coverage (currently 77%)
115
+ ```
116
+
117
+ The end-to-end test builds a fixture Node project, runs the full pipeline, and
118
+ asserts the output is safe (no leaked tokens, no env values, no absolute paths)
119
+ and complete (commands, frameworks, env names, pitfalls).
120
+
121
+ ## Contributing
122
+
123
+ PRs welcome! Keep it cross-platform, add tests, preserve the zero-dependency
124
+ promise, and never introduce network calls or credential collection.
125
+
126
+ ## License
127
+
128
+ MIT
@@ -0,0 +1,73 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "hermes-project-oracle"
7
+ dynamic = ["version"]
8
+ description = "Deep project scanner that generates agent-ready context files — AGENTS.md, CLAUDE.md, Obsidian notes."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Jules Zhou", email = "juleszhou01@gmail.com" }]
14
+ keywords = [
15
+ "ai-agents",
16
+ "agents-md",
17
+ "claude-code",
18
+ "cursor",
19
+ "codex",
20
+ "context-engineering",
21
+ "developer-tools",
22
+ "code-scanner",
23
+ "obsidian",
24
+ ]
25
+ classifiers = [
26
+ "Development Status :: 5 - Production/Stable",
27
+ "Environment :: Console",
28
+ "Intended Audience :: Developers",
29
+ "Operating System :: OS Independent",
30
+ "Programming Language :: Python :: 3",
31
+ "Programming Language :: Python :: 3.11",
32
+ "Programming Language :: Python :: 3.12",
33
+ "Programming Language :: Python :: 3.13",
34
+ "Topic :: Software Development :: Documentation",
35
+ "Topic :: Software Development :: Quality Assurance",
36
+ "Typing :: Typed",
37
+ ]
38
+ dependencies = []
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "pytest>=8",
43
+ "pytest-cov>=5",
44
+ "ruff>=0.6",
45
+ "mypy>=1.11",
46
+ "pyyaml>=6",
47
+ ]
48
+
49
+ [project.urls]
50
+ Homepage = "https://github.com/iruzen-dono/hermes-project-oracle"
51
+ Repository = "https://github.com/iruzen-dono/hermes-project-oracle"
52
+ Issues = "https://github.com/iruzen-dono/hermes-project-oracle/issues"
53
+ Changelog = "https://github.com/iruzen-dono/hermes-project-oracle/blob/main/CHANGELOG.md"
54
+
55
+ [project.scripts]
56
+ oracle-scan = "oracle_scan:main"
57
+ oracle-generate = "oracle_generate:main"
58
+ oracle-vault = "oracle_vault:main"
59
+
60
+ [tool.setuptools]
61
+ package-dir = { "" = "scripts" }
62
+ py-modules = ["oracle_scan", "oracle_generate", "oracle_vault", "safe_io", "version"]
63
+ packages = ["oracle_scan_lib"]
64
+
65
+ [tool.setuptools.dynamic]
66
+ version = { attr = "version.__version__" }
67
+
68
+ [tool.pytest.ini_options]
69
+ testpaths = ["tests"]
70
+
71
+ [tool.mypy]
72
+ python_version = "3.11"
73
+ ignore_missing_imports = true
@@ -0,0 +1,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: hermes-project-oracle
3
+ Version: 2.1.0
4
+ Summary: Deep project scanner that generates agent-ready context files — AGENTS.md, CLAUDE.md, Obsidian notes.
5
+ Author-email: Jules Zhou <juleszhou01@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/iruzen-dono/hermes-project-oracle
8
+ Project-URL: Repository, https://github.com/iruzen-dono/hermes-project-oracle
9
+ Project-URL: Issues, https://github.com/iruzen-dono/hermes-project-oracle/issues
10
+ Project-URL: Changelog, https://github.com/iruzen-dono/hermes-project-oracle/blob/main/CHANGELOG.md
11
+ Keywords: ai-agents,agents-md,claude-code,cursor,codex,context-engineering,developer-tools,code-scanner,obsidian
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Documentation
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=8; extra == "dev"
28
+ Requires-Dist: pytest-cov>=5; extra == "dev"
29
+ Requires-Dist: ruff>=0.6; extra == "dev"
30
+ Requires-Dist: mypy>=1.11; extra == "dev"
31
+ Requires-Dist: pyyaml>=6; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # Project Oracle 🧠
35
+
36
+ [![CI](https://github.com/iruzen-dono/hermes-project-oracle/actions/workflows/ci.yml/badge.svg)](https://github.com/iruzen-dono/hermes-project-oracle/actions/workflows/ci.yml)
37
+ [![PyPI](https://img.shields.io/pypi/v/hermes-project-oracle.svg)](https://pypi.org/project/hermes-project-oracle/)
38
+ [![Python](https://img.shields.io/pypi/pyversions/hermes-project-oracle.svg)](https://pypi.org/project/hermes-project-oracle/)
39
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
40
+
41
+ **Deep project scanner that generates agent-ready context files.**
42
+
43
+ Scan any codebase and produce `AGENTS.md`, `CLAUDE.md`, or an Obsidian project
44
+ note so a coding agent — Claude Code, Cursor, Codex CLI, OpenClaw, Gemini, or
45
+ Hermes — understands the stack, the real commands, the conventions, and the
46
+ landmines instantly. **Zero dependencies**: pure Python 3.11+ standard library,
47
+ cross-platform (Windows, Linux, macOS).
48
+
49
+ Unlike a plain generator, Project Oracle also captures **human knowledge a scan
50
+ cannot see**. It interviews you for the project's intent and known pitfalls, then
51
+ embeds both in the generated file — so the agent reads the landmines before it
52
+ touches code.
53
+
54
+ ## Features
55
+
56
+ - **Every framework, not just the first** — a Next.js + Express + Socket.IO + React project lists all four
57
+ - **Real, runnable commands** — npm scripts captured with their actual shell command, not just the name
58
+ - **Environment variable names** — read from `.env.example`; values are never copied and the real `.env` is never opened
59
+ - **Secret-safe git context** — remote URLs are credential-masked (`https://***@host/...`) and de-duplicated
60
+ - **28 languages detected** — Python, Java, Kotlin, TypeScript, Go, Rust, PHP, C#, Ruby, and more
61
+ - **Build system + test detection** — Maven, Gradle, npm/yarn/pnpm/bun, uv/pip, Cargo, Go modules, Composer; Jest, Vitest, pytest, JUnit, and test-file counts
62
+ - **Monorepo aware** — nested manifests discovered up to 2 levels deep
63
+ - **Intent + pitfalls interview** — embeds project purpose and known landmines
64
+ - **Safe regeneration** — an existing file is never clobbered silently: content
65
+ between `<!-- oracle:start/end -->` markers is refreshed in place (your edits
66
+ outside survive), anything else requires `--force` and keeps a `.bak` backup
67
+ - **Multi-template output** — AGENTS.md, CLAUDE.md, Obsidian note, or all in one pass
68
+ - **Cross-platform** — `pathlib` everywhere, no platform-specific code
69
+
70
+ ## Install
71
+
72
+ **As a CLI** — one command, nothing to clone:
73
+
74
+ ```bash
75
+ pipx install hermes-project-oracle
76
+ # or
77
+ uv tool install hermes-project-oracle
78
+ ```
79
+
80
+ Three commands land on your `PATH`: **`oracle-scan`**, **`oracle-generate`**,
81
+ **`oracle-vault`**.
82
+
83
+ **As a skill** — for Claude Code, Cursor, Codex, Hermes. The zip carries only
84
+ what the skill needs (`SKILL.md`, `scripts/`, `references/`), no `.git/`, tests
85
+ or build artifacts:
86
+
87
+ ```bash
88
+ git clone https://github.com/iruzen-dono/hermes-project-oracle.git
89
+ cd hermes-project-oracle
90
+ python package_skill.py # builds hermes-project-oracle.zip + validates it
91
+
92
+ # Claude Code / generic SKILL.md agents
93
+ unzip hermes-project-oracle.zip -d ~/.claude/skills/
94
+
95
+ # Hermes Agent
96
+ unzip hermes-project-oracle.zip -d ~/.hermes/skills/
97
+ ```
98
+
99
+ On Windows (PowerShell): `Expand-Archive hermes-project-oracle.zip -DestinationPath $HOME\.claude\skills\`
100
+
101
+ ## Quick start
102
+
103
+ ```bash
104
+ # 1. Scan a project (writes <project>/.oracle/scan-report.json,
105
+ # and adds .oracle/ to the project's .gitignore when missing)
106
+ oracle-scan --path /path/to/project --output /path/to/project/.oracle/
107
+
108
+ # 2. Generate AGENTS.md, embedding the interview answers
109
+ oracle-generate \
110
+ --scan .oracle/scan-report.json \
111
+ --template agents-md \
112
+ --output /path/to/project/AGENTS.md \
113
+ --intent-file .oracle/intent.json
114
+
115
+ # 3. (Optional) push a note into your Obsidian vault
116
+ oracle-vault --scan .oracle/scan-report.json --vault ~/Documents/"Obsidian Vault"
117
+ ```
118
+
119
+ Running from a skill install instead? Prefix with `python $SKILL/scripts/`
120
+ (`SKILL=~/.claude/skills/hermes-project-oracle`) — the flags are identical.
121
+
122
+ `--output` accepts a directory (`.oracle/` or `.oracle`) or an explicit JSON
123
+ file path. Run any script with `--help` for all flags.
124
+
125
+ ## Scripts
126
+
127
+ | Script | Purpose |
128
+ |--------|---------|
129
+ | `scripts/oracle_scan.py` | Deep project scan → JSON report (28 languages, credential-safe) |
130
+ | `scripts/oracle_generate.py` | Report → context files (4 templates + optional intent file) |
131
+ | `scripts/oracle_vault.py` | Push a structured note into an Obsidian vault |
132
+
133
+ ## Docs
134
+
135
+ - Full skill instructions: [`SKILL.md`](SKILL.md)
136
+ - Interview script (intent + pitfalls): [`references/interview-script.md`](references/interview-script.md)
137
+ - Example intent file: [`references/intent-example.json`](references/intent-example.json)
138
+ - Example generated output: [`references/agents-md-example.md`](references/agents-md-example.md)
139
+
140
+ ## Development
141
+
142
+ ```bash
143
+ pip install -e ".[dev]"
144
+ ruff check . # lint (deterministic via ruff.toml)
145
+ mypy scripts/ --ignore-missing-imports
146
+ pytest tests/ -v # unit + end-to-end (scan → generate → vault)
147
+ pytest tests/ --cov=scripts # coverage (currently 77%)
148
+ ```
149
+
150
+ The end-to-end test builds a fixture Node project, runs the full pipeline, and
151
+ asserts the output is safe (no leaked tokens, no env values, no absolute paths)
152
+ and complete (commands, frameworks, env names, pitfalls).
153
+
154
+ ## Contributing
155
+
156
+ PRs welcome! Keep it cross-platform, add tests, preserve the zero-dependency
157
+ promise, and never introduce network calls or credential collection.
158
+
159
+ ## License
160
+
161
+ MIT
@@ -0,0 +1,25 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ scripts/oracle_generate.py
5
+ scripts/oracle_scan.py
6
+ scripts/oracle_vault.py
7
+ scripts/safe_io.py
8
+ scripts/version.py
9
+ scripts/hermes_project_oracle.egg-info/PKG-INFO
10
+ scripts/hermes_project_oracle.egg-info/SOURCES.txt
11
+ scripts/hermes_project_oracle.egg-info/dependency_links.txt
12
+ scripts/hermes_project_oracle.egg-info/entry_points.txt
13
+ scripts/hermes_project_oracle.egg-info/requires.txt
14
+ scripts/hermes_project_oracle.egg-info/top_level.txt
15
+ scripts/oracle_scan_lib/__init__.py
16
+ scripts/oracle_scan_lib/constants.py
17
+ scripts/oracle_scan_lib/conventions.py
18
+ scripts/oracle_scan_lib/detectors.py
19
+ scripts/oracle_scan_lib/io.py
20
+ scripts/oracle_scan_lib/misc.py
21
+ scripts/oracle_scan_lib/structure.py
22
+ scripts/oracle_scan_lib/vcs.py
23
+ tests/test_oracle.py
24
+ tests/test_oracle_hardening.py
25
+ tests/test_oracle_lib.py
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ oracle-generate = oracle_generate:main
3
+ oracle-scan = oracle_scan:main
4
+ oracle-vault = oracle_vault:main
@@ -0,0 +1,7 @@
1
+
2
+ [dev]
3
+ pytest>=8
4
+ pytest-cov>=5
5
+ ruff>=0.6
6
+ mypy>=1.11
7
+ pyyaml>=6
@@ -0,0 +1,6 @@
1
+ oracle_generate
2
+ oracle_scan
3
+ oracle_scan_lib
4
+ oracle_vault
5
+ safe_io
6
+ version