This is the minimal open-source package of Crucible. It includes core orchestration code and mock-mode execution only.
- This package is currently optimized for Japanese-language, Japan-law workflows.
- Track logic, citation normalization defaults, and prompt assumptions are JP-centric by default.
- Update
config.template.yaml:- set
jurisdiction.primary - set
jurisdiction.language - replace
citation_regex_patterns
- set
- Replace prompts in
subagent_prompts.md:- statute names and citation style
- legal reasoning norms and report language
- Implement/replace adapters as needed:
- law-text API adapter (currently e-Gov oriented)
- local RAG corpus and indexing pipeline for target jurisdiction
- Rebuild evaluation set and regression tests for the target law domain before production use.
- Core package:
crucible/ - CLI entrypoint:
managed_agent_main.py - Compatibility exports:
tools.py - Prompt templates:
subagent_prompts.md - Config template:
config.template.yaml - Build config:
pyproject.toml - License:
LICENSE
- Any local/private config (
config.yaml,.env) - Runtime artifacts (
runs/, caches) - Proprietary or copyrighted corpus data (
RAG READY/,rag_index/)
- Corpus directory: user-provided legal corpus (excluded from repo)
- Vector index directory: locally generated index (excluded from repo)
- Example names in this project:
RAG READY/,rag_index/ - Custom names are fully supported as long as paths are configured correctly.
- Yes, prompt templates are open in this repository.
- This is acceptable for transparent OSS distribution, but prompts are also part of your product IP.
- For stronger commercial control, a common pattern is to keep a minimal public prompt set and maintain an internal/private enhanced prompt pack.
- In this repository,
subagent_prompts.mdis positioned as a baseline public prompt pack.
pip install -e .
python managed_agent_main.py smokeExpected smoke result: SMOKE TEST PASSED.
python managed_agent_main.py run --track A --mockexport ANTHROPIC_API_KEY="..."
export OPENAI_API_KEY="..."
export GOOGLE_API_KEY="..."
cp config.template.yaml config.yaml
python managed_agent_main.py run --track A --contract path/to/contract.txt --assumptions path/to/assumptions.json --config config.yamlLicensed under Apache License 2.0. See LICENSE.
这是 Crucible 的最小开源包,仅包含框架核心与 mock 模式运行能力。
- 当前默认针对日语 + 日本法场景优化。
- 轨道逻辑、引文规范默认值、提示词假设都以日本法为中心。
- 修改
config.template.yaml:- 设置
jurisdiction.primary - 设置
jurisdiction.language - 替换
citation_regex_patterns
- 设置
- 改写
subagent_prompts.md:- 法条名称与引文格式
- 法律论证习惯与报告语言
- 按目标法域替换适配器:
- 法条 API 适配器(当前偏 e-Gov)
- 本地 RAG 语料与索引流水线
- 上线前按目标法域重建评测集与回归测试。
- 核心包:
crucible/ - CLI 入口:
managed_agent_main.py - 兼容导出:
tools.py - 提示词模板:
subagent_prompts.md - 配置模板:
config.template.yaml - 构建配置:
pyproject.toml - 许可证:
LICENSE
- 本地/私密配置(
config.yaml、.env) - 运行产物(
runs/、缓存) - 私有或受版权保护的语料与索引(
RAG READY/、rag_index/)
- 语料目录:用户自备法律语料(不随仓库分发)
- 向量索引目录:本地生成索引(不随仓库分发)
- 本项目示例名:
RAG READY/、rag_index/ - 目录名可自定义,只需在配置里正确指向路径即可。
- 是的,当前仓库里已开源提示词模板。
- 这样做有利于透明开源,但提示词本身也是产品 IP。
- 若需要更强商业控制,常见做法是仅公开最小提示词集合,增强版提示词放在内部私有仓。
- 在本仓库中,
subagent_prompts.md被定位为基础版(baseline)提示词包。
pip install -e .
python managed_agent_main.py smoke预期输出:SMOKE TEST PASSED。
python managed_agent_main.py run --track A --mockexport ANTHROPIC_API_KEY="..."
export OPENAI_API_KEY="..."
export GOOGLE_API_KEY="..."
cp config.template.yaml config.yaml
python managed_agent_main.py run --track A --contract path/to/contract.txt --assumptions path/to/assumptions.json --config config.yaml本项目采用 Apache License 2.0,详见 LICENSE。
これは Crucible の最小オープンソース版です。 フレームワークの中核コードと mock 実行機能のみを含みます。
- 現在は 日本語 + 日本法 ワークフロー向けに最適化されています。
- トラックロジック、引用正規化の既定値、プロンプト前提は日本法中心です。
config.template.yamlを更新:jurisdiction.primaryを設定jurisdiction.languageを設定citation_regex_patternsを差し替え
subagent_prompts.mdを差し替え:- 法令名と引用形式
- 法的推論スタイルとレポート言語
- 必要に応じてアダプターを置換:
- 法令 API アダプター(現状は e-Gov 寄り)
- 対象法域向け RAG コーパスと索引パイプライン
- 本番投入前に対象法域向け評価セット/回帰テストを再構築。
- コアパッケージ:
crucible/ - CLI エントリ:
managed_agent_main.py - 互換エクスポート:
tools.py - プロンプトテンプレート:
subagent_prompts.md - 設定テンプレート:
config.template.yaml - ビルド設定:
pyproject.toml - ライセンス:
LICENSE
- ローカル/機密設定(
config.yaml、.env) - 実行生成物(
runs/、キャッシュ) - 著作権または私有データ(
RAG READY/、rag_index/)
- コーパス用ディレクトリ: ユーザー提供の法務コーパス(リポジトリには含めない)
- ベクトル索引用ディレクトリ: ローカル生成インデックス(リポジトリには含めない)
- 本プロジェクトでの例:
RAG READY/,rag_index/ - ディレクトリ名は任意で、設定ファイルのパスが正しければ問題ありません。
- はい、現状はプロンプトテンプレートを公開しています。
- OSS の透明性には有効ですが、プロンプト自体は製品 IP でもあります。
- 商用コントロールを強める一般的な運用として、公開版は最小テンプレートのみとし、拡張版は社内非公開で管理します。
- 本リポジトリでは、
subagent_prompts.mdをベースライン公開プロンプトパックとして位置付けています。
pip install -e .
python managed_agent_main.py smoke期待される結果: SMOKE TEST PASSED。
python managed_agent_main.py run --track A --mockexport ANTHROPIC_API_KEY="..."
export OPENAI_API_KEY="..."
export GOOGLE_API_KEY="..."
cp config.template.yaml config.yaml
python managed_agent_main.py run --track A --contract path/to/contract.txt --assumptions path/to/assumptions.json --config config.yaml本プロジェクトは Apache License 2.0 で提供されます。詳細は LICENSE を参照してください。