Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
37d1140
refactor(ai): make contextual orchestrator the product runtime
seonghobae Sep 1, 2026
ac32b6c
refactor(ai): remove direct provider from product composition
seonghobae Sep 1, 2026
c238ce9
test(ai): require orchestrator product composition
seonghobae Sep 1, 2026
a4d2064
test(ai): pin orchestrator free contract
seonghobae Sep 1, 2026
52cdeb8
test(ddd): bind default interpreter to orchestration ACL
seonghobae Sep 1, 2026
d615485
docs(ai): expose orchestrator-only runtime configuration
seonghobae Sep 1, 2026
bae85b9
docs(adr): make orchestrator free the product LLM boundary
seonghobae Sep 1, 2026
b63a746
test(architecture): enforce orchestrator free boundary
seonghobae Sep 1, 2026
44ba49e
docs(ddd): replace provider-specific operations guide
seonghobae Sep 1, 2026
6584d2e
test(docs): require orchestration boundary documentation
seonghobae Sep 1, 2026
f682ccd
docs(traceability): align controls to orchestrator free runtime
seonghobae Sep 1, 2026
e8573d7
test(ai): rename live marker for orchestrator free
seonghobae Sep 1, 2026
8e8db08
test(ai): add orchestrator free live smoke
seonghobae Sep 1, 2026
2871d72
test(ai): evaluate reports through orchestrator free
seonghobae Sep 1, 2026
f55d351
ci(ai): evaluate orchestrator free without provider secrets
seonghobae Sep 1, 2026
de5dc01
test(ai): remove direct provider live smoke
seonghobae Sep 1, 2026
2ca42d4
test(ai): remove direct provider evaluation script
seonghobae Sep 1, 2026
01fae97
ci(ai): remove direct provider evaluation workflow
seonghobae Sep 1, 2026
504a2f3
ci(ai): retire repository-specific direct-provider writer
seonghobae Sep 1, 2026
d7ef516
test(ai): remove retired direct-provider writer contract
seonghobae Sep 1, 2026
b8bad49
test(ai): remove obsolete NIM writer hardening suite
seonghobae Sep 1, 2026
fea218f
docs(ai): retire direct-provider autonomous loop guide
seonghobae Sep 1, 2026
f14de19
docs(ai): retire direct-provider writer doctoring
seonghobae Sep 1, 2026
cda6ab4
docs(ai): document orchestrator-only LLM boundary
seonghobae Sep 1, 2026
1d2e0c3
docs(ops): share autonomous development with organization loop
seonghobae Sep 1, 2026
fadb7e9
docs(ddd): remove provider-specific operations path
seonghobae Sep 1, 2026
5a12efd
docs(ddd): make orchestration an anti-corruption layer
seonghobae Sep 1, 2026
cce7528
docs(api): remove direct-provider backend selection
seonghobae Sep 1, 2026
b133a45
ci(ai): exclude only orchestrator live tests
seonghobae Sep 1, 2026
a899d20
ci(ai): exclude orchestrator live lane from release gate
seonghobae Sep 1, 2026
47aa5a2
test(ci): align release gate with orchestrator live marker
seonghobae Sep 1, 2026
9bf49ee
test(ci): align hourly gate with orchestration boundary
seonghobae Sep 1, 2026
10b4f60
docs(uml): show orchestration ACL as the only product LLM path
seonghobae Sep 1, 2026
5aa54a8
docs(uml): remove provider client from product domain view
seonghobae Sep 1, 2026
6091cd4
docs(ops): make gateway failure the only LLM incident path
seonghobae Sep 1, 2026
29248f6
docs(trd): assign provider routing to orchestration context
seonghobae Sep 1, 2026
536ded8
docs(architecture): centralize model routing in contextual orchestrator
seonghobae Sep 1, 2026
63ad82e
security(ai): omit raw model content from live eval logs
seonghobae Sep 1, 2026
d7a171c
docs(adr): supersede direct NIM runtime decision
seonghobae Sep 1, 2026
61c19b9
docs(adr): supersede optional gateway backend decision
seonghobae Sep 1, 2026
59729b6
docs(changelog): record orchestrator free runtime boundary
seonghobae Sep 1, 2026
3fa42b9
docs(agent): require contextual orchestrator for LLM work
seonghobae Sep 1, 2026
aa6f8d5
docs(agent): align coding contract to shared orchestration
seonghobae Sep 1, 2026
05a30ad
docs(security): remove provider credentials from product boundary
seonghobae Sep 1, 2026
5e9e400
docs(verification): test orchestrator free instead of direct provider
seonghobae Sep 1, 2026
f2eb174
ci(cleanup): remove retired autonomous-writer parser
seonghobae Sep 1, 2026
5da1ffe
docs(prd): make contextual orchestrator the required LLM route
seonghobae Sep 1, 2026
ecaeaf7
refactor(ai): remove direct provider interpreter adapter
seonghobae Sep 1, 2026
b1f9421
refactor(api): remove direct provider interpreter export
seonghobae Sep 1, 2026
8849d3f
refactor(ddd): introduce infrastructure namespace
seonghobae Sep 1, 2026
352d2e9
refactor(ddd): expose orchestration infrastructure boundary
seonghobae Sep 1, 2026
50e46b7
refactor(ddd): move shared model transport to orchestration infrastru…
seonghobae Sep 1, 2026
9e74d19
refactor(ddd): move contextual orchestrator client under infrastructure
seonghobae Sep 1, 2026
3ca42af
refactor(ddd): keep contextual orchestrator compatibility import
seonghobae Sep 1, 2026
dd66885
refactor(ddd): remove provider-native runtime settings
seonghobae Sep 1, 2026
b78b6f6
test(ddd): use provider-neutral generation trace
seonghobae Sep 1, 2026
c032939
test(ddd): remove provider-specific trace alias
seonghobae Sep 1, 2026
ba18f14
test(ddd): cover provider-neutral orchestration transport
seonghobae Sep 1, 2026
7d07b57
test(ai): remove direct provider hardening path
seonghobae Sep 1, 2026
24575d1
test(ddd): patch provider-neutral transport retry clock
seonghobae Sep 1, 2026
4bba6d8
test(ai): remove direct NIM transport suite
seonghobae Sep 1, 2026
dfb3463
test(ai): remove direct NIM error suite
seonghobae Sep 1, 2026
fc74201
test(ai): remove direct NIM coverage harness
seonghobae Sep 1, 2026
997ae65
refactor(ddd): remove provider-specific transport module
seonghobae Sep 1, 2026
9cbb7f1
docs(adr): accept orchestration bounded-context decision
seonghobae Sep 1, 2026
e976535
docs(api): explain contextual orchestrator compatibility export
seonghobae Sep 1, 2026
a394032
docs(adr): close transitional direct-provider allowance
seonghobae Sep 1, 2026
2bc99f7
test(architecture): forbid direct provider runtime regression
seonghobae Sep 1, 2026
826f8f9
docs(ddd): document completed orchestration namespace move
seonghobae Sep 1, 2026
4d917a8
docs(architecture): record completed orchestration path migration
seonghobae Sep 1, 2026
1fd25f8
docs(metadata): add Ask DeepWiki badge
seonghobae Sep 1, 2026
647ee66
docs(metadata): add public documentation landing page
seonghobae Sep 1, 2026
8233e3e
fix(ci): sort orchestration architecture imports
seonghobae Sep 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,11 @@ DATABASE_URL=sqlite:///artifacts/jobs.sqlite3
REPORT_RETENTION_DAYS=30
API_KEY_SHA256=

# Standalone default: direct hosted NVIDIA NIM.
INTERPRETATION_BACKEND=nvidia_nim
NVIDIA_NIM_API_KEY=
NIM_BASE_URL=https://integrate.api.nvidia.com/v1
NIM_MODEL=nvidia/llama-3.3-nemotron-super-49b-v1.5
NIM_EVAL_MODEL=nvidia/llama-3.3-nemotron-super-49b-v1.5
NIM_TIMEOUT_SECONDS=120
NIM_MAX_RETRIES=3
NIM_MAX_SCHEMA_REPAIRS=1

# Optional organization gateway. Use INTERPRETATION_BACKEND=contextual_orchestrator.
# Product LLM path: Contextual Orchestrator only.
INTERPRETATION_BACKEND=contextual_orchestrator
CONTEXTUAL_ORCHESTRATOR_BASE_URL=http://127.0.0.1:8100/v1
CONTEXTUAL_ORCHESTRATOR_TOKEN=
CONTEXTUAL_ORCHESTRATOR_MODEL=contextual-orchestrator
CONTEXTUAL_ORCHESTRATOR_MODEL=orchestrator/free
# auto allocates between one-agent routing and deeper conduct; route/conduct force a bounded mode.
CONTEXTUAL_ORCHESTRATOR_MODE=auto
CONTEXTUAL_ORCHESTRATOR_TIMEOUT_SECONDS=120
Expand Down
547 changes: 0 additions & 547 deletions .github/workflows/hourly-nim-product-development.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/hourly-product-loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
run_gate 'Python compilation' python -m compileall -q src tests scripts
run_gate 'Project documents' python scripts/check_docs.py
run_gate 'Versioned prompts' python scripts/check_prompts.py
run_gate 'Offline tests and 100% coverage' pytest -m 'not nim_live' -W error::ResourceWarning --cov=four_pillars --cov-report=term-missing
run_gate 'Offline tests and 100% coverage' pytest -m 'not orchestrator_live' -W error::ResourceWarning --cov=four_pillars --cov-report=term-missing
run_gate 'Distribution build' python -m build --no-isolation

cat "$report" >> "$GITHUB_STEP_SUMMARY"
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/nim-eval.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/orchestrator-eval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Contextual Orchestrator Free Evaluation

on:
workflow_dispatch:

permissions:
contents: read

env:
PYTHONPATH: src
PIP_DISABLE_PIP_VERSION_CHECK: '1'

jobs:
evaluate:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: '3.12'
cache: pip
cache-dependency-path: requirements/ci.txt
- name: Install the immutable evaluation environment
run: python -m pip install --require-hashes -r requirements/ci.txt
- run: python -m pip check
- name: Require the orchestration gateway contract
env:
CONTEXTUAL_ORCHESTRATOR_TOKEN: ${{ secrets.CONTEXTUAL_ORCHESTRATOR_TOKEN }}
CONTEXTUAL_ORCHESTRATOR_BASE_URL: ${{ vars.CONTEXTUAL_ORCHESTRATOR_BASE_URL }}
run: |
if [ -z "$CONTEXTUAL_ORCHESTRATOR_TOKEN" ]; then
echo '::error::CONTEXTUAL_ORCHESTRATOR_TOKEN is required.'
exit 1
fi
if [ -z "$CONTEXTUAL_ORCHESTRATOR_BASE_URL" ]; then
echo '::error::CONTEXTUAL_ORCHESTRATOR_BASE_URL repository variable is required.'
exit 1
fi
- name: orchestrator/free smoke test
env:
INTERPRETATION_BACKEND: contextual_orchestrator
CONTEXTUAL_ORCHESTRATOR_TOKEN: ${{ secrets.CONTEXTUAL_ORCHESTRATOR_TOKEN }}
CONTEXTUAL_ORCHESTRATOR_BASE_URL: ${{ vars.CONTEXTUAL_ORCHESTRATOR_BASE_URL }}
CONTEXTUAL_ORCHESTRATOR_MODEL: orchestrator/free
CONTEXTUAL_ORCHESTRATOR_MODE: auto
run: pytest -m orchestrator_live -vv
- name: orchestrator/free judge fixture
env:
INTERPRETATION_BACKEND: contextual_orchestrator
CONTEXTUAL_ORCHESTRATOR_TOKEN: ${{ secrets.CONTEXTUAL_ORCHESTRATOR_TOKEN }}
CONTEXTUAL_ORCHESTRATOR_BASE_URL: ${{ vars.CONTEXTUAL_ORCHESTRATOR_BASE_URL }}
CONTEXTUAL_ORCHESTRATOR_MODEL: orchestrator/free
CONTEXTUAL_ORCHESTRATOR_MODE: auto
run: python scripts/orchestrator_eval.py
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- run: python -m compileall -q src tests scripts
- run: python scripts/check_docs.py
- run: python scripts/check_prompts.py
- run: pytest -m 'not nim_live' -W error::ResourceWarning --cov=four_pillars --cov-report=term-missing
- run: pytest -m 'not orchestrator_live' -W error::ResourceWarning --cov=four_pillars --cov-report=term-missing
- run: python -m build --no-isolation
- name: Build the pinned runtime container
run: docker build --tag four-pillars:release .
Expand Down
37 changes: 12 additions & 25 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,31 @@

## Repository mission

Four Pillars provides deterministic Korean Four Pillars calculation and
schema-validated report generation as both a standalone product and a modular
MSA component.
Four Pillars provides deterministic Korean Four Pillars calculation and schema-validated report generation as both an independently deployable product and a modular MSA component.

## Required agent behavior

- Read `CLAUDE.md`, `ARCHITECTURE.md`, `README.md`, `CHANGELOG.md`, the PRD,
TRD, calculation policy, modularity contract, security policy, operations
guides, and doctoring before changing behavior.
- Read `CLAUDE.md`, `ARCHITECTURE.md`, `README.md`, `CHANGELOG.md`, the PRD, TRD, calculation policy, modularity contract, security policy, operations guides, ADRs, and doctoring before changing behavior.
- Work test-first and preserve explicit RED-to-GREEN evidence.
- Keep deterministic calculations independent from hosted model code.
- Maintain 100% production statement/branch coverage and complete public
docstrings.
- Treat Model Orchestration as an external bounded context. Product-owned LLM work must use the Contextual Orchestrator ACL and `orchestrator/free` unless a higher-level repository contract explicitly requires another virtual route.
- Do not add provider-native credentials, direct provider SDK calls, or silent fallback to Four Pillars product composition.
- Preserve `ReportInterpreter` as the application port; caller-owned MSA injection may replace that port without changing the repository-owned default.
- Maintain 100% production statement/branch coverage and complete public docstrings.
- Use APA 7 references for standards and research decisions.
- Use only `NVIDIA_NIM_API_KEY` for direct NVIDIA NIM.
- Never use `COPILOT_GITHUB_TOKEN` for model execution.
- Do not change existing review-agent credentials or identity.
- Use descriptive two-word-or-longer `snake_case` database object names.
- Update CHANGELOG.md and affected architecture/operations/security documents.
- Do not fabricate customer, revenue, production, attestation, transfer,
acquisition, or scientific-prediction evidence.
- Audit DDD paths whenever responsibilities move. Move implementation, imports, tests, docs, UML, and architecture-fitness rules together; do not leave provider-specific names around a provider-neutral boundary without a tracked migration.
- Update `CHANGELOG.md` and affected architecture/operations/security documents.
- Do not fabricate customer, revenue, production, attestation, transfer, acquisition, or scientific-prediction evidence.

## Pull-request governance

For every open pull request: inspect review submissions and inline threads,
repair actionable findings, rerun exact-head Checks, and merge only the unchanged
green head. Waiting for a review or Check is not permission to weaken the gate;
continue other bounded investigation instead.
For every open pull request: inspect review submissions and inline threads, repair actionable findings, rerun exact-head Checks, and merge only the unchanged green head. Waiting for a review or Check is not permission to weaken the gate; continue other bounded investigation instead.

The hourly NVIDIA NIM OpenCode workflow is proposal-only. Its model runner has
no GitHub write authority. Its publisher may open one pull request after fresh
verification, but it has **no merge**, approval, release, deployment, or reviewer
authority. Existing exact-head review remains mandatory.
Repository-local automation is a model-free quality sentinel. Model-backed autonomous development is owned by the shared ContextualWisdomLab hourly maintainer and must not be duplicated by a second repository-specific provider-credentialed writer. The shared writer may open bounded pull requests but has no authority to waive review, security, exact-head validation, or release policy.

## Code-owner review gates — disabled (on hold)

As of 2026-08-04, code-owner review requirements are disabled across the
ContextualWisdomLab organization because there is one maintainer. Do not
re-enable CODEOWNERS-based merge gates until multiple maintainers can satisfy
them. This exception does not waive automated review, exact-head Checks, security
scanning, or unresolved-thread requirements.
As of 2026-08-04, code-owner review requirements are disabled across the ContextualWisdomLab organization because there is one maintainer. Do not re-enable CODEOWNERS-based merge gates until multiple maintainers can satisfy them. This exception does not waive automated review, exact-head Checks, security scanning, or unresolved-thread requirements.
Loading
Loading