crtx 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.
- crtx-0.1.0/.claude/settings.local.json +41 -0
- crtx-0.1.0/.github/triad_social_preview.png +0 -0
- crtx-0.1.0/.github/workflows/ci.yml +80 -0
- crtx-0.1.0/.github/workflows/triad-review.yml +85 -0
- crtx-0.1.0/.gitignore +36 -0
- crtx-0.1.0/CHANGELOG.md +99 -0
- crtx-0.1.0/LICENSE +202 -0
- crtx-0.1.0/PKG-INFO +533 -0
- crtx-0.1.0/README.md +501 -0
- crtx-0.1.0/assets/banner.svg +165 -0
- crtx-0.1.0/assets/icon.svg +160 -0
- crtx-0.1.0/assets/logo.svg +204 -0
- crtx-0.1.0/crtx_disclosure_scan.sh +386 -0
- crtx-0.1.0/docs/arbiter.md +349 -0
- crtx-0.1.0/docs/architecture.md +194 -0
- crtx-0.1.0/docs/audit.md +388 -0
- crtx-0.1.0/docs/build-spec.md +346 -0
- crtx-0.1.0/docs/model-agnostic.md +190 -0
- crtx-0.1.0/docs/planner.md +173 -0
- crtx-0.1.0/docs/vision.md +161 -0
- crtx-0.1.0/examples/cli_tool.md +40 -0
- crtx-0.1.0/examples/data_pipeline.md +65 -0
- crtx-0.1.0/examples/refactor_legacy.md +98 -0
- crtx-0.1.0/examples/rest_api.md +40 -0
- crtx-0.1.0/examples/websocket_chat.md +50 -0
- crtx-0.1.0/github-social-preview.png +0 -0
- crtx-0.1.0/pyproject.toml +84 -0
- crtx-0.1.0/tests/__init__.py +0 -0
- crtx-0.1.0/tests/test_apply_conflict.py +166 -0
- crtx-0.1.0/tests/test_apply_diff.py +48 -0
- crtx-0.1.0/tests/test_apply_engine.py +149 -0
- crtx-0.1.0/tests/test_apply_git.py +117 -0
- crtx-0.1.0/tests/test_apply_patcher.py +165 -0
- crtx-0.1.0/tests/test_apply_resolver.py +144 -0
- crtx-0.1.0/tests/test_apply_schemas.py +155 -0
- crtx-0.1.0/tests/test_apply_verify.py +52 -0
- crtx-0.1.0/tests/test_arbiter.py +730 -0
- crtx-0.1.0/tests/test_ci.py +1006 -0
- crtx-0.1.0/tests/test_cli.py +973 -0
- crtx-0.1.0/tests/test_cli_display.py +744 -0
- crtx-0.1.0/tests/test_config_loader.py +221 -0
- crtx-0.1.0/tests/test_consensus.py +747 -0
- crtx-0.1.0/tests/test_context.py +677 -0
- crtx-0.1.0/tests/test_dashboard.py +524 -0
- crtx-0.1.0/tests/test_debate.py +804 -0
- crtx-0.1.0/tests/test_demo.py +367 -0
- crtx-0.1.0/tests/test_litellm_provider.py +747 -0
- crtx-0.1.0/tests/test_orchestrator.py +797 -0
- crtx-0.1.0/tests/test_orchestrator_arbiter.py +569 -0
- crtx-0.1.0/tests/test_output.py +561 -0
- crtx-0.1.0/tests/test_parallel.py +1450 -0
- crtx-0.1.0/tests/test_persistence.py +974 -0
- crtx-0.1.0/tests/test_planner.py +647 -0
- crtx-0.1.0/tests/test_post_run_viewer.py +438 -0
- crtx-0.1.0/tests/test_presets.py +129 -0
- crtx-0.1.0/tests/test_pro_agent.py +189 -0
- crtx-0.1.0/tests/test_prompt_loader.py +81 -0
- crtx-0.1.0/tests/test_provider_base.py +109 -0
- crtx-0.1.0/tests/test_repl.py +300 -0
- crtx-0.1.0/tests/test_review_improve.py +432 -0
- crtx-0.1.0/tests/test_routing.py +733 -0
- crtx-0.1.0/tests/test_schemas_arbiter.py +232 -0
- crtx-0.1.0/tests/test_schemas_messages.py +257 -0
- crtx-0.1.0/tests/test_schemas_pipeline.py +212 -0
- crtx-0.1.0/tests/test_schemas_reconciliation.py +103 -0
- crtx-0.1.0/tests/test_streaming_display.py +604 -0
- crtx-0.1.0/tests/test_streaming_provider.py +142 -0
- crtx-0.1.0/tests/test_streaming_schemas.py +32 -0
- crtx-0.1.0/triad/__init__.py +3 -0
- crtx-0.1.0/triad/apply/__init__.py +10 -0
- crtx-0.1.0/triad/apply/conflict.py +89 -0
- crtx-0.1.0/triad/apply/diff.py +372 -0
- crtx-0.1.0/triad/apply/engine.py +282 -0
- crtx-0.1.0/triad/apply/git.py +175 -0
- crtx-0.1.0/triad/apply/patcher.py +299 -0
- crtx-0.1.0/triad/apply/resolver.py +245 -0
- crtx-0.1.0/triad/apply/verify.py +90 -0
- crtx-0.1.0/triad/arbiter/__init__.py +15 -0
- crtx-0.1.0/triad/arbiter/arbiter.py +252 -0
- crtx-0.1.0/triad/arbiter/feedback.py +75 -0
- crtx-0.1.0/triad/arbiter/reconciler.py +153 -0
- crtx-0.1.0/triad/ci/__init__.py +15 -0
- crtx-0.1.0/triad/ci/formatter.py +157 -0
- crtx-0.1.0/triad/ci/reviewer.py +293 -0
- crtx-0.1.0/triad/cli.py +2740 -0
- crtx-0.1.0/triad/cli_display.py +1017 -0
- crtx-0.1.0/triad/cli_streaming_display.py +624 -0
- crtx-0.1.0/triad/config/defaults.toml +17 -0
- crtx-0.1.0/triad/config/models.toml +222 -0
- crtx-0.1.0/triad/config/routing.toml +19 -0
- crtx-0.1.0/triad/consensus/__init__.py +29 -0
- crtx-0.1.0/triad/consensus/protocol.py +208 -0
- crtx-0.1.0/triad/consensus/suggestions.py +216 -0
- crtx-0.1.0/triad/consensus/voting.py +126 -0
- crtx-0.1.0/triad/context/__init__.py +15 -0
- crtx-0.1.0/triad/context/builder.py +343 -0
- crtx-0.1.0/triad/context/pruner.py +101 -0
- crtx-0.1.0/triad/context/scanner.py +296 -0
- crtx-0.1.0/triad/dashboard/__init__.py +13 -0
- crtx-0.1.0/triad/dashboard/events.py +108 -0
- crtx-0.1.0/triad/dashboard/server.py +318 -0
- crtx-0.1.0/triad/dashboard/static/index.html +1001 -0
- crtx-0.1.0/triad/demo.py +453 -0
- crtx-0.1.0/triad/keys.py +212 -0
- crtx-0.1.0/triad/orchestrator.py +2883 -0
- crtx-0.1.0/triad/output/__init__.py +9 -0
- crtx-0.1.0/triad/output/renderer.py +266 -0
- crtx-0.1.0/triad/output/writer.py +250 -0
- crtx-0.1.0/triad/persistence/__init__.py +17 -0
- crtx-0.1.0/triad/persistence/database.py +107 -0
- crtx-0.1.0/triad/persistence/export.py +133 -0
- crtx-0.1.0/triad/persistence/session.py +421 -0
- crtx-0.1.0/triad/planner.py +245 -0
- crtx-0.1.0/triad/post_run_viewer.py +425 -0
- crtx-0.1.0/triad/presets.py +100 -0
- crtx-0.1.0/triad/pro/__init__.py +1 -0
- crtx-0.1.0/triad/pro/agent.py +146 -0
- crtx-0.1.0/triad/prompts/__init__.py +43 -0
- crtx-0.1.0/triad/prompts/arbiter.md +134 -0
- crtx-0.1.0/triad/prompts/architect.md +99 -0
- crtx-0.1.0/triad/prompts/debate_final.md +45 -0
- crtx-0.1.0/triad/prompts/debate_judge.md +60 -0
- crtx-0.1.0/triad/prompts/debate_propose.md +36 -0
- crtx-0.1.0/triad/prompts/debate_rebuttal.md +58 -0
- crtx-0.1.0/triad/prompts/evaluate_suggestion.md +57 -0
- crtx-0.1.0/triad/prompts/implementer.md +106 -0
- crtx-0.1.0/triad/prompts/implementer_apply.md +89 -0
- crtx-0.1.0/triad/prompts/improve_cross_review.md +61 -0
- crtx-0.1.0/triad/prompts/improve_generate.md +60 -0
- crtx-0.1.0/triad/prompts/improve_synthesize.md +71 -0
- crtx-0.1.0/triad/prompts/parallel_completion.md +51 -0
- crtx-0.1.0/triad/prompts/parallel_generate.md +81 -0
- crtx-0.1.0/triad/prompts/parallel_review.md +57 -0
- crtx-0.1.0/triad/prompts/parallel_synthesis_retry.md +60 -0
- crtx-0.1.0/triad/prompts/parallel_synthesize.md +84 -0
- crtx-0.1.0/triad/prompts/planner.md +57 -0
- crtx-0.1.0/triad/prompts/planner_questions.md +22 -0
- crtx-0.1.0/triad/prompts/reconciler.md +130 -0
- crtx-0.1.0/triad/prompts/refactorer.md +137 -0
- crtx-0.1.0/triad/prompts/refactorer_apply.md +96 -0
- crtx-0.1.0/triad/prompts/review_analyze.md +68 -0
- crtx-0.1.0/triad/prompts/review_cross_review.md +59 -0
- crtx-0.1.0/triad/prompts/review_diff.md +60 -0
- crtx-0.1.0/triad/prompts/review_synthesize.md +71 -0
- crtx-0.1.0/triad/prompts/tiebreak.md +48 -0
- crtx-0.1.0/triad/prompts/verifier.md +208 -0
- crtx-0.1.0/triad/providers/__init__.py +23 -0
- crtx-0.1.0/triad/providers/base.py +169 -0
- crtx-0.1.0/triad/providers/health.py +52 -0
- crtx-0.1.0/triad/providers/litellm_provider.py +580 -0
- crtx-0.1.0/triad/providers/registry.py +132 -0
- crtx-0.1.0/triad/repl.py +617 -0
- crtx-0.1.0/triad/routing/__init__.py +22 -0
- crtx-0.1.0/triad/routing/engine.py +372 -0
- crtx-0.1.0/triad/routing/strategies.py +177 -0
- crtx-0.1.0/triad/schemas/__init__.py +120 -0
- crtx-0.1.0/triad/schemas/apply.py +172 -0
- crtx-0.1.0/triad/schemas/arbiter.py +96 -0
- crtx-0.1.0/triad/schemas/ci.py +125 -0
- crtx-0.1.0/triad/schemas/consensus.py +234 -0
- crtx-0.1.0/triad/schemas/context.py +79 -0
- crtx-0.1.0/triad/schemas/messages.py +125 -0
- crtx-0.1.0/triad/schemas/pipeline.py +255 -0
- crtx-0.1.0/triad/schemas/planner.py +57 -0
- crtx-0.1.0/triad/schemas/reconciliation.py +59 -0
- crtx-0.1.0/triad/schemas/routing.py +62 -0
- crtx-0.1.0/triad/schemas/session.py +105 -0
- crtx-0.1.0/triad/schemas/streaming.py +20 -0
- crtx-0.1.0/triadai-avatar.png +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(python -m pytest:*)",
|
|
5
|
+
"Bash(git commit:*)",
|
|
6
|
+
"Bash(git add:*)",
|
|
7
|
+
"Bash(git push:*)",
|
|
8
|
+
"Bash(python -m ruff check:*)",
|
|
9
|
+
"Bash(.venv/Scripts/python.exe -m pytest tests/ -q --tb=short)",
|
|
10
|
+
"Bash(pip show:*)",
|
|
11
|
+
"Bash(pip install:*)",
|
|
12
|
+
"Bash(find:*)",
|
|
13
|
+
"Bash(test:*)",
|
|
14
|
+
"Bash(npm install:*)",
|
|
15
|
+
"Bash(npx next build:*)",
|
|
16
|
+
"Bash(git stash:*)",
|
|
17
|
+
"Bash(triad:*)",
|
|
18
|
+
"Bash(python -m build:*)",
|
|
19
|
+
"Bash(python -c:*)",
|
|
20
|
+
"Bash(PYTHONUTF8=1 triad run:*)",
|
|
21
|
+
"WebFetch(domain:status.anthropic.com)",
|
|
22
|
+
"WebFetch(domain:status.x.ai)",
|
|
23
|
+
"WebFetch(domain:status.cloud.google.com)",
|
|
24
|
+
"WebFetch(domain:status.claude.com)",
|
|
25
|
+
"Bash(echo:*)",
|
|
26
|
+
"Bash(python -m triad.cli:*)",
|
|
27
|
+
"Bash(dir:*)",
|
|
28
|
+
"Bash(findstr:*)",
|
|
29
|
+
"Bash(bash crtx_disclosure_scan.sh)",
|
|
30
|
+
"Bash(bash -c 'echo hello; git rev-parse --show-toplevel')",
|
|
31
|
+
"Bash(git rm:*)",
|
|
32
|
+
"Bash(npm run build:*)",
|
|
33
|
+
"Bash(while read f)",
|
|
34
|
+
"Bash(do sed -i 's/NexusAI-Holdings/TriadAI/g' \"$f\")",
|
|
35
|
+
"Bash(done)",
|
|
36
|
+
"Bash(ls:*)",
|
|
37
|
+
"Bash(where:*)",
|
|
38
|
+
"Bash(ruff check:*)"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Triad Orchestrator — CI Pipeline
|
|
2
|
+
#
|
|
3
|
+
# Runs on every push to main and all pull requests.
|
|
4
|
+
# Tests across Python 3.12 and 3.13, lints with Ruff,
|
|
5
|
+
# and scans for private-tier keyword leakage.
|
|
6
|
+
|
|
7
|
+
name: CI
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
branches: [main]
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: [main]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
python-version: ["3.12", "3.13"]
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout code
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: pip install -e ".[dev]"
|
|
34
|
+
|
|
35
|
+
- name: Lint with Ruff
|
|
36
|
+
run: ruff check triad/ tests/
|
|
37
|
+
|
|
38
|
+
- name: Run tests
|
|
39
|
+
run: pytest --tb=short -q
|
|
40
|
+
|
|
41
|
+
keyword-scan:
|
|
42
|
+
name: Keyword Scan
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- name: Checkout code
|
|
46
|
+
uses: actions/checkout@v4
|
|
47
|
+
|
|
48
|
+
- name: Scan for private-tier keywords
|
|
49
|
+
run: |
|
|
50
|
+
# Scan source files for private-tier terms that must never appear
|
|
51
|
+
# in the public repo. Uses word-boundary matching (-w) to avoid
|
|
52
|
+
# false positives like "ams" in "streams" or "alias" in AST code.
|
|
53
|
+
# Excludes: docs/vision.md (internal design doc), this CI file.
|
|
54
|
+
MATCHES=$(grep -rnwi \
|
|
55
|
+
"insurance\|underwriting\|broker\|alia\|atlas365" \
|
|
56
|
+
--include="*.py" --include="*.md" --include="*.toml" \
|
|
57
|
+
--include="*.yml" --include="*.html" \
|
|
58
|
+
--exclude-dir=.venv --exclude-dir=node_modules \
|
|
59
|
+
--exclude="ci.yml" --exclude="vision.md" \
|
|
60
|
+
. 2>/dev/null || true)
|
|
61
|
+
|
|
62
|
+
# Also scan for multi-word private terms (substring match is fine
|
|
63
|
+
# for these since they're specific enough to never be generic).
|
|
64
|
+
MATCHES2=$(grep -rni \
|
|
65
|
+
"binding trail\|evidence v2\|connect thread\|THR-[0-9]\|client vault\|renewal workbench\|certificate of insurance" \
|
|
66
|
+
--include="*.py" --include="*.md" --include="*.toml" \
|
|
67
|
+
--include="*.yml" --include="*.html" \
|
|
68
|
+
--exclude-dir=.venv --exclude-dir=node_modules \
|
|
69
|
+
--exclude="ci.yml" \
|
|
70
|
+
. 2>/dev/null || true)
|
|
71
|
+
|
|
72
|
+
ALL="${MATCHES}${MATCHES2}"
|
|
73
|
+
|
|
74
|
+
if [ -n "$ALL" ]; then
|
|
75
|
+
echo "::error::Private-tier keywords detected in source files:"
|
|
76
|
+
echo "$ALL"
|
|
77
|
+
exit 1
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
echo "Keyword scan passed — no private-tier terms found."
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Triad Orchestrator — Multi-Model PR Review
|
|
2
|
+
#
|
|
3
|
+
# Runs parallel code review across multiple LLMs with consensus.
|
|
4
|
+
# Copy this workflow into your repo's .github/workflows/ directory.
|
|
5
|
+
#
|
|
6
|
+
# Required secrets:
|
|
7
|
+
# ANTHROPIC_API_KEY — For Claude models
|
|
8
|
+
# OPENAI_API_KEY — For GPT models
|
|
9
|
+
# GOOGLE_API_KEY — For Gemini models
|
|
10
|
+
# XAI_API_KEY — For Grok models (optional)
|
|
11
|
+
|
|
12
|
+
name: Triad Review
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
pull_request:
|
|
16
|
+
types: [opened, synchronize]
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
pull-requests: write
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
review:
|
|
24
|
+
name: Multi-Model Code Review
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout code
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0 # Full history for diff
|
|
31
|
+
|
|
32
|
+
- name: Set up Python
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.12"
|
|
36
|
+
|
|
37
|
+
- name: Install Triad
|
|
38
|
+
run: pip install triad-orchestrator
|
|
39
|
+
|
|
40
|
+
- name: Generate diff
|
|
41
|
+
id: diff
|
|
42
|
+
run: |
|
|
43
|
+
git diff origin/${{ github.base_ref }}...HEAD > /tmp/pr-diff.txt
|
|
44
|
+
echo "lines=$(wc -l < /tmp/pr-diff.txt)" >> $GITHUB_OUTPUT
|
|
45
|
+
|
|
46
|
+
- name: Run Triad Review
|
|
47
|
+
if: steps.diff.outputs.lines > 0
|
|
48
|
+
env:
|
|
49
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
50
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
51
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
52
|
+
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
|
|
53
|
+
run: |
|
|
54
|
+
triad review \
|
|
55
|
+
--diff /tmp/pr-diff.txt \
|
|
56
|
+
--format json \
|
|
57
|
+
--fail-on critical \
|
|
58
|
+
> /tmp/review-result.json
|
|
59
|
+
|
|
60
|
+
- name: Post review summary
|
|
61
|
+
if: always() && steps.diff.outputs.lines > 0
|
|
62
|
+
env:
|
|
63
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
64
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
65
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
66
|
+
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
|
|
67
|
+
run: |
|
|
68
|
+
triad review \
|
|
69
|
+
--diff /tmp/pr-diff.txt \
|
|
70
|
+
--format summary \
|
|
71
|
+
> /tmp/review-summary.md
|
|
72
|
+
|
|
73
|
+
- name: Comment on PR
|
|
74
|
+
if: always() && steps.diff.outputs.lines > 0
|
|
75
|
+
uses: actions/github-script@v7
|
|
76
|
+
with:
|
|
77
|
+
script: |
|
|
78
|
+
const fs = require('fs');
|
|
79
|
+
const summary = fs.readFileSync('/tmp/review-summary.md', 'utf8');
|
|
80
|
+
await github.rest.issues.createComment({
|
|
81
|
+
owner: context.repo.owner,
|
|
82
|
+
repo: context.repo.repo,
|
|
83
|
+
issue_number: context.issue.number,
|
|
84
|
+
body: summary,
|
|
85
|
+
});
|
crtx-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.venv/
|
|
8
|
+
|
|
9
|
+
# Environment
|
|
10
|
+
.env
|
|
11
|
+
.env.*
|
|
12
|
+
*.env
|
|
13
|
+
|
|
14
|
+
# PRIVATE — domain-specific config NEVER committed
|
|
15
|
+
triad/config/domain/
|
|
16
|
+
config/domain/
|
|
17
|
+
|
|
18
|
+
# IDE
|
|
19
|
+
.vscode/
|
|
20
|
+
.idea/
|
|
21
|
+
|
|
22
|
+
# OS
|
|
23
|
+
.DS_Store
|
|
24
|
+
debug-dump/
|
|
25
|
+
debug-bundle.txt
|
|
26
|
+
|
|
27
|
+
# Pipeline output
|
|
28
|
+
crtx-output/
|
|
29
|
+
triad-output/
|
|
30
|
+
|
|
31
|
+
# Pro / SaaS — not part of open-source release
|
|
32
|
+
api/
|
|
33
|
+
supabase/
|
|
34
|
+
package-lock.json
|
|
35
|
+
crtx-output/
|
|
36
|
+
triad-output/
|
crtx-0.1.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to CRTX will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-02-18
|
|
6
|
+
|
|
7
|
+
### Initial Release
|
|
8
|
+
|
|
9
|
+
CRTX v0.1.0 — multi-model AI pipeline orchestration with adversarial verification.
|
|
10
|
+
|
|
11
|
+
### Pipeline Modes
|
|
12
|
+
|
|
13
|
+
- **Sequential** — Architect → Implement → Refactor → Verify with output chaining between stages
|
|
14
|
+
- **Parallel** — All models solve independently, cross-review, score, and merge the best approach
|
|
15
|
+
- **Debate** — Position papers → rebuttals → final arguments → judgment
|
|
16
|
+
|
|
17
|
+
### Arbiter Layer
|
|
18
|
+
|
|
19
|
+
- Independent adversarial review using a different model than the generator (cross-model enforcement)
|
|
20
|
+
- Four verdicts: APPROVE, FLAG, REJECT, HALT
|
|
21
|
+
- Configurable depth: `--arbiter off|final_only|bookend|full`
|
|
22
|
+
- Structured feedback injection on REJECT with retry budget (max 2)
|
|
23
|
+
- Confidence floor — APPROVE below 0.50 is downgraded to FLAG
|
|
24
|
+
- Implementation Summary Reconciliation via `--reconcile`
|
|
25
|
+
|
|
26
|
+
### Smart Routing
|
|
27
|
+
|
|
28
|
+
- Four strategies: `quality_first`, `cost_optimized`, `speed_first`, `hybrid`
|
|
29
|
+
- Fitness-based model selection per stage from TOML config
|
|
30
|
+
- Cross-stage diversity — max 2 stages per model to prevent monoculture
|
|
31
|
+
- Cost estimation via `crtx estimate`
|
|
32
|
+
|
|
33
|
+
### Auto-Fallback
|
|
34
|
+
|
|
35
|
+
- Automatic model substitution on provider outages (rate limits, timeouts)
|
|
36
|
+
- ProviderHealth tracker with 5-minute cooldown per model
|
|
37
|
+
- Health check before attempting primary model on each stage
|
|
38
|
+
|
|
39
|
+
### Streaming Display
|
|
40
|
+
|
|
41
|
+
- Real-time token-by-token output with syntax-highlighted code blocks
|
|
42
|
+
- Scrolling file headers with pinned status bar (stage progress, cost, tokens)
|
|
43
|
+
- Stage state symbols: ○ pending, ◉ active, ● complete, ⚠ fallback, ✗ failed
|
|
44
|
+
|
|
45
|
+
### Apply Mode
|
|
46
|
+
|
|
47
|
+
- Write generated code to disk with git safety gates
|
|
48
|
+
- File path resolution (exact → basename → fuzzy → create)
|
|
49
|
+
- Interactive diff preview with per-file selection
|
|
50
|
+
- AST-aware structured patching (7 operations)
|
|
51
|
+
- Post-apply test runner with automatic rollback on failure
|
|
52
|
+
- Conflict detection via mtime + SHA-256
|
|
53
|
+
|
|
54
|
+
### Context Injection
|
|
55
|
+
|
|
56
|
+
- AST-aware Python project scanner (classes, functions, imports, docstrings)
|
|
57
|
+
- Dynamic context builder with relevance scoring
|
|
58
|
+
- Configurable token budget (default: 20,000)
|
|
59
|
+
- Respects `.gitignore`
|
|
60
|
+
|
|
61
|
+
### CLI
|
|
62
|
+
|
|
63
|
+
- `crtx run` — main pipeline command (task is a positional argument)
|
|
64
|
+
- `crtx demo` — guided 60-second first-run experience with cross-model generation and review
|
|
65
|
+
- `crtx review-code` — multi-model code review on files or git diffs
|
|
66
|
+
- `crtx improve` — review → improve pipeline with cross-model consensus
|
|
67
|
+
- `crtx repl` — interactive shell with session history
|
|
68
|
+
- `crtx setup` — API key configuration wizard
|
|
69
|
+
- `crtx models` — list registered models with fitness scores
|
|
70
|
+
- `crtx sessions` — session history with short ID support
|
|
71
|
+
- `crtx replay` / `crtx show` — re-run or view past sessions
|
|
72
|
+
- `crtx estimate` — cost estimation before a run
|
|
73
|
+
- `crtx dashboard` — real-time React dashboard with WebSocket
|
|
74
|
+
- Six presets: `balanced`, `fast`, `thorough`, `cheap`, `explore`, `debate`
|
|
75
|
+
|
|
76
|
+
### Post-Run Viewer
|
|
77
|
+
|
|
78
|
+
- Interactive menu: `[s]` Summary, `[c]` Code, `[r]` Reviews, `[d]` Diffs, `[a]` Apply
|
|
79
|
+
- Syntax-highlighted code viewer with file selection
|
|
80
|
+
- Arbiter review display with verdict badges and issue categorization
|
|
81
|
+
- Diff rendering with color-coded additions/deletions
|
|
82
|
+
|
|
83
|
+
### Dashboard
|
|
84
|
+
|
|
85
|
+
- React UI served via FastAPI on `localhost:8420`
|
|
86
|
+
- WebSocket real-time event streaming
|
|
87
|
+
- Cross-process HTTP POST relay (CLI → dashboard bridge)
|
|
88
|
+
- Pipeline view with stage cards and activity feed
|
|
89
|
+
- Session history browser
|
|
90
|
+
|
|
91
|
+
### Infrastructure
|
|
92
|
+
|
|
93
|
+
- 1,045 tests passing
|
|
94
|
+
- SQLite session persistence with full audit trail
|
|
95
|
+
- CI/CD with GitHub Actions (Python 3.12 + 3.13, ruff lint, keyword scan)
|
|
96
|
+
- Pydantic v2 schemas throughout
|
|
97
|
+
- LiteLLM adapter supporting 100+ providers
|
|
98
|
+
- 11 models across 4 providers (Anthropic, OpenAI, Google, xAI)
|
|
99
|
+
- Apache 2.0 license
|
crtx-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 TriadAI
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|