research-vault 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.
- research_vault-0.1.0/.githooks/commit-msg +9 -0
- research_vault-0.1.0/.githooks/pre-commit +15 -0
- research_vault-0.1.0/.github/workflows/ci.yml +149 -0
- research_vault-0.1.0/.github/workflows/publish.yml +60 -0
- research_vault-0.1.0/.gitignore +52 -0
- research_vault-0.1.0/CONTRIBUTING.md +110 -0
- research_vault-0.1.0/DEVLOG.md +2733 -0
- research_vault-0.1.0/LICENSE +21 -0
- research_vault-0.1.0/PKG-INFO +420 -0
- research_vault-0.1.0/README.md +338 -0
- research_vault-0.1.0/RELEASING.md +114 -0
- research_vault-0.1.0/assets/hero-banner.png +0 -0
- research_vault-0.1.0/control/acme.md +18 -0
- research_vault-0.1.0/pyproject.toml +146 -0
- research_vault-0.1.0/scripts/leakage_scan.sh +429 -0
- research_vault-0.1.0/src/research_vault/__init__.py +3 -0
- research_vault-0.1.0/src/research_vault/adapters/__init__.py +69 -0
- research_vault-0.1.0/src/research_vault/adapters/base.py +459 -0
- research_vault-0.1.0/src/research_vault/adapters/github_ci.py +293 -0
- research_vault-0.1.0/src/research_vault/adapters/model_client.py +286 -0
- research_vault-0.1.0/src/research_vault/adapters/observability.py +589 -0
- research_vault-0.1.0/src/research_vault/adapters/remote.py +588 -0
- research_vault-0.1.0/src/research_vault/adapters/secret_forward.py +224 -0
- research_vault-0.1.0/src/research_vault/approval.py +474 -0
- research_vault-0.1.0/src/research_vault/bootstrap.py +362 -0
- research_vault-0.1.0/src/research_vault/build_agents.py +423 -0
- research_vault-0.1.0/src/research_vault/check.py +698 -0
- research_vault-0.1.0/src/research_vault/cite.py +553 -0
- research_vault-0.1.0/src/research_vault/cli.py +1116 -0
- research_vault-0.1.0/src/research_vault/compute.py +864 -0
- research_vault-0.1.0/src/research_vault/compute_wizard.py +443 -0
- research_vault-0.1.0/src/research_vault/config.py +312 -0
- research_vault-0.1.0/src/research_vault/control.py +1218 -0
- research_vault-0.1.0/src/research_vault/controllib.py +555 -0
- research_vault-0.1.0/src/research_vault/cross_project.py +345 -0
- research_vault-0.1.0/src/research_vault/dag/__init__.py +26 -0
- research_vault-0.1.0/src/research_vault/dag/approval.py +288 -0
- research_vault-0.1.0/src/research_vault/dag/brief.py +208 -0
- research_vault-0.1.0/src/research_vault/dag/catalog.py +247 -0
- research_vault-0.1.0/src/research_vault/dag/reads.py +334 -0
- research_vault-0.1.0/src/research_vault/dag/schema.py +709 -0
- research_vault-0.1.0/src/research_vault/dag/store.py +288 -0
- research_vault-0.1.0/src/research_vault/dag/verbs.py +1598 -0
- research_vault-0.1.0/src/research_vault/dag/walker.py +280 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/agent-charter.md +213 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/compute-run-recipe.md +157 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/coordination.md +279 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/crew-cannot-self-approve.md +84 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/git-discipline.md +147 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/harness-contract.md +120 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/honesty-gates.md +187 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/memory-management.md +139 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/note-conventions.md +82 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/plan-critic-spec.md +272 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/review-board.md +155 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/roles/alfred.md +111 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/roles/architect.md +135 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/roles/designer.md +107 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/roles/engineer.md +238 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/roles/researcher.md +114 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/roles/reviewer.md +129 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/standards.md +175 -0
- research_vault-0.1.0/src/research_vault/data/doctrine/tooling.md +266 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-litreview/README.md +102 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-litreview/corroborate-judge-fragment.json +93 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-litreview/lit-review-loop.json +72 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-litreview/notes/concepts/_PLACEHOLDER.md +18 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-litreview/notes/literature/_PLACEHOLDER.md +21 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-litreview/notes/mocs/_PLACEHOLDER.md +18 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/README.md +115 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/_PLACEHOLDER.md +22 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/q1-main1-abl-A.md +44 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/q1-main1-cabl-Y.md +45 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/q1-main1.md +47 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/q1-main2-abl-B.md +44 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/q1-main2-cabl-Z.md +45 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/q1-main2.md +41 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/experiments/q1-plan.md +221 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/findings/_PLACEHOLDER.md +19 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/notes/methods/_PLACEHOLDER.md +19 -0
- research_vault-0.1.0/src/research_vault/data/examples/demo-research/research-loop.json +338 -0
- research_vault-0.1.0/src/research_vault/data/templates/CLAUDE.md.tmpl +217 -0
- research_vault-0.1.0/src/research_vault/data/templates/QUICKSTART.md +389 -0
- research_vault-0.1.0/src/research_vault/devlog.py +392 -0
- research_vault-0.1.0/src/research_vault/doctor.py +1820 -0
- research_vault-0.1.0/src/research_vault/experiment.py +966 -0
- research_vault-0.1.0/src/research_vault/experiment_run.py +186 -0
- research_vault-0.1.0/src/research_vault/git_discipline.py +646 -0
- research_vault-0.1.0/src/research_vault/git_health.py +281 -0
- research_vault-0.1.0/src/research_vault/gitlib.py +100 -0
- research_vault-0.1.0/src/research_vault/hashing.py +42 -0
- research_vault-0.1.0/src/research_vault/init.py +579 -0
- research_vault-0.1.0/src/research_vault/keys.py +308 -0
- research_vault-0.1.0/src/research_vault/lint.py +969 -0
- research_vault-0.1.0/src/research_vault/mdstore.py +341 -0
- research_vault-0.1.0/src/research_vault/note.py +1035 -0
- research_vault-0.1.0/src/research_vault/observability_cli.py +154 -0
- research_vault-0.1.0/src/research_vault/onboard.py +404 -0
- research_vault-0.1.0/src/research_vault/plan/__init__.py +11 -0
- research_vault-0.1.0/src/research_vault/plan/check.py +291 -0
- research_vault-0.1.0/src/research_vault/plan/freeze.py +657 -0
- research_vault-0.1.0/src/research_vault/plan/style.py +168 -0
- research_vault-0.1.0/src/research_vault/plan/verbs.py +581 -0
- research_vault-0.1.0/src/research_vault/plugins.py +139 -0
- research_vault-0.1.0/src/research_vault/project.py +1081 -0
- research_vault-0.1.0/src/research_vault/project_edges.py +198 -0
- research_vault-0.1.0/src/research_vault/research.py +915 -0
- research_vault-0.1.0/src/research_vault/result.py +444 -0
- research_vault-0.1.0/src/research_vault/review/__init__.py +852 -0
- research_vault-0.1.0/src/research_vault/review/gap_scan.py +1280 -0
- research_vault-0.1.0/src/research_vault/review/style.py +334 -0
- research_vault-0.1.0/src/research_vault/review/verbs.py +830 -0
- research_vault-0.1.0/src/research_vault/richui.py +870 -0
- research_vault-0.1.0/src/research_vault/role.py +94 -0
- research_vault-0.1.0/src/research_vault/scaffold.py +415 -0
- research_vault-0.1.0/src/research_vault/sshconfig.py +253 -0
- research_vault-0.1.0/src/research_vault/start.py +136 -0
- research_vault-0.1.0/src/research_vault/status.py +857 -0
- research_vault-0.1.0/src/research_vault/task.py +294 -0
- research_vault-0.1.0/src/research_vault/update.py +521 -0
- research_vault-0.1.0/src/research_vault/wait_for.py +1083 -0
- research_vault-0.1.0/src/research_vault/wandb_pull.py +588 -0
- research_vault-0.1.0/src/research_vault/wt.py +362 -0
- research_vault-0.1.0/tests/__init__.py +0 -0
- research_vault-0.1.0/tests/conftest.py +115 -0
- research_vault-0.1.0/tests/fixtures/find_rerank_llm_cultural_values.json +2037 -0
- research_vault-0.1.0/tests/gitutil.py +158 -0
- research_vault-0.1.0/tests/test_adapters.py +273 -0
- research_vault-0.1.0/tests/test_approve_gate.py +731 -0
- research_vault-0.1.0/tests/test_cli.py +236 -0
- research_vault-0.1.0/tests/test_compute_wizard.py +421 -0
- research_vault-0.1.0/tests/test_config.py +145 -0
- research_vault-0.1.0/tests/test_control.py +113 -0
- research_vault-0.1.0/tests/test_corroborate_judge_seam.py +177 -0
- research_vault-0.1.0/tests/test_cross_project.py +631 -0
- research_vault-0.1.0/tests/test_dag.py +1135 -0
- research_vault-0.1.0/tests/test_dag_adopter_fixes.py +785 -0
- research_vault-0.1.0/tests/test_dag_brief.py +1029 -0
- research_vault-0.1.0/tests/test_dag_disp.py +505 -0
- research_vault-0.1.0/tests/test_dag_retry.py +762 -0
- research_vault-0.1.0/tests/test_dag_scope.py +601 -0
- research_vault-0.1.0/tests/test_datasets_note.py +287 -0
- research_vault-0.1.0/tests/test_devlog.py +133 -0
- research_vault-0.1.0/tests/test_dogfood_med_batch.py +476 -0
- research_vault-0.1.0/tests/test_experiment_run.py +236 -0
- research_vault-0.1.0/tests/test_git_discipline.py +461 -0
- research_vault-0.1.0/tests/test_git_health_squash.py +299 -0
- research_vault-0.1.0/tests/test_gitlib.py +74 -0
- research_vault-0.1.0/tests/test_gitutil.py +111 -0
- research_vault-0.1.0/tests/test_init_git_repo.py +302 -0
- research_vault-0.1.0/tests/test_init_richui.py +278 -0
- research_vault-0.1.0/tests/test_instance_resolution.py +373 -0
- research_vault-0.1.0/tests/test_item26_parser_convergence.py +241 -0
- research_vault-0.1.0/tests/test_keys_registry.py +254 -0
- research_vault-0.1.0/tests/test_leakage_scan.py +788 -0
- research_vault-0.1.0/tests/test_lint_rules.py +1728 -0
- research_vault-0.1.0/tests/test_model_client.py +330 -0
- research_vault-0.1.0/tests/test_model_seam_consumption.py +107 -0
- research_vault-0.1.0/tests/test_model_seam_dispatch.py +463 -0
- research_vault-0.1.0/tests/test_model_seam_live.py +221 -0
- research_vault-0.1.0/tests/test_new_verbs.py +427 -0
- research_vault-0.1.0/tests/test_note.py +120 -0
- research_vault-0.1.0/tests/test_observability.py +449 -0
- research_vault-0.1.0/tests/test_onboard_verb.py +603 -0
- research_vault-0.1.0/tests/test_onboarding_check.py +256 -0
- research_vault-0.1.0/tests/test_onboarding_rich.py +142 -0
- research_vault-0.1.0/tests/test_pkg_toolkit.py +830 -0
- research_vault-0.1.0/tests/test_plugin_seam.py +147 -0
- research_vault-0.1.0/tests/test_project.py +571 -0
- research_vault-0.1.0/tests/test_project_edges.py +240 -0
- research_vault-0.1.0/tests/test_project_new.py +587 -0
- research_vault-0.1.0/tests/test_relate_suggest.py +151 -0
- research_vault-0.1.0/tests/test_research_corpus_dedup.py +823 -0
- research_vault-0.1.0/tests/test_research_references.py +300 -0
- research_vault-0.1.0/tests/test_richui_factory.py +136 -0
- research_vault-0.1.0/tests/test_richui_s2.py +173 -0
- research_vault-0.1.0/tests/test_richui_s3_status.py +117 -0
- research_vault-0.1.0/tests/test_richui_s4_bootstrap.py +90 -0
- research_vault-0.1.0/tests/test_secrets_forward.py +475 -0
- research_vault-0.1.0/tests/test_sr5.py +718 -0
- research_vault-0.1.0/tests/test_sr6.py +627 -0
- research_vault-0.1.0/tests/test_sr7.py +1108 -0
- research_vault-0.1.0/tests/test_sr8.py +924 -0
- research_vault-0.1.0/tests/test_sr_ccb.py +972 -0
- research_vault-0.1.0/tests/test_sr_ci.py +276 -0
- research_vault-0.1.0/tests/test_sr_cif.py +914 -0
- research_vault-0.1.0/tests/test_sr_co.py +737 -0
- research_vault-0.1.0/tests/test_sr_co_remote.py +769 -0
- research_vault-0.1.0/tests/test_sr_cp.py +1145 -0
- research_vault-0.1.0/tests/test_sr_doctor_principled.py +959 -0
- research_vault-0.1.0/tests/test_sr_ep_role.py +650 -0
- research_vault-0.1.0/tests/test_sr_exp_repro.py +992 -0
- research_vault-0.1.0/tests/test_sr_find_rerank.py +389 -0
- research_vault-0.1.0/tests/test_sr_freeze_fix.py +658 -0
- research_vault-0.1.0/tests/test_sr_gap_close.py +1357 -0
- research_vault-0.1.0/tests/test_sr_gap_hygiene.py +249 -0
- research_vault-0.1.0/tests/test_sr_gap_route.py +823 -0
- research_vault-0.1.0/tests/test_sr_hardening.py +462 -0
- research_vault-0.1.0/tests/test_sr_harness_p2_s1.py +403 -0
- research_vault-0.1.0/tests/test_sr_harness_p2_s2.py +474 -0
- research_vault-0.1.0/tests/test_sr_harness_p2_s3.py +411 -0
- research_vault-0.1.0/tests/test_sr_hub_dag_rails.py +714 -0
- research_vault-0.1.0/tests/test_sr_lens_rm.py +464 -0
- research_vault-0.1.0/tests/test_sr_lr_1.py +635 -0
- research_vault-0.1.0/tests/test_sr_lr_2.py +760 -0
- research_vault-0.1.0/tests/test_sr_lr_polish_s1.py +244 -0
- research_vault-0.1.0/tests/test_sr_lr_polish_s2.py +151 -0
- research_vault-0.1.0/tests/test_sr_lr_polish_s3.py +228 -0
- research_vault-0.1.0/tests/test_sr_lr_polish_s4.py +329 -0
- research_vault-0.1.0/tests/test_sr_pkg.py +319 -0
- research_vault-0.1.0/tests/test_sr_plan1.py +1170 -0
- research_vault-0.1.0/tests/test_sr_plan2.py +498 -0
- research_vault-0.1.0/tests/test_sr_plan2_remainder.py +704 -0
- research_vault-0.1.0/tests/test_sr_resolve_scope.py +490 -0
- research_vault-0.1.0/tests/test_sr_rv_update.py +525 -0
- research_vault-0.1.0/tests/test_sr_start.py +276 -0
- research_vault-0.1.0/tests/test_sr_wb.py +782 -0
- research_vault-0.1.0/tests/test_sshconfig.py +307 -0
- research_vault-0.1.0/tests/test_task.py +165 -0
- research_vault-0.1.0/tests/test_task22_wheel_audit.py +78 -0
- research_vault-0.1.0/tests/test_wt_project.py +200 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# commit-msg — Research Vault git-discipline hook
|
|
3
|
+
#
|
|
4
|
+
# Enforces conventional-commit format on the commit subject:
|
|
5
|
+
# <type>(<scope>): <description>
|
|
6
|
+
# types: feat|fix|docs|refactor|test|chore|ci|build|perf
|
|
7
|
+
#
|
|
8
|
+
# Install via: rv git-discipline install
|
|
9
|
+
exec rv git-discipline commit-msg "$1"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# pre-commit — Research Vault git-discipline hook
|
|
3
|
+
#
|
|
4
|
+
# Runs cheapest-reject-first:
|
|
5
|
+
# 1. protect-main (branch/path-keyed, identity-free)
|
|
6
|
+
# 2. staged leakage scan (profile-aware: secrets everywhere; private
|
|
7
|
+
# markers framework-repo-only)
|
|
8
|
+
# 3. rv lint (when src/ files are staged)
|
|
9
|
+
#
|
|
10
|
+
# Bypass consciously (never silently):
|
|
11
|
+
# git commit --no-verify — bypass all hooks
|
|
12
|
+
# RV_ALLOW_MAIN_COMMIT=1 — bypass protect-main only
|
|
13
|
+
#
|
|
14
|
+
# Install via: rv git-discipline install
|
|
15
|
+
exec rv git-discipline check --staged
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
# ── Hermetic pytest suite ────────────────────────────────────────────────────
|
|
11
|
+
test:
|
|
12
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.12", "3.13"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v3
|
|
23
|
+
with:
|
|
24
|
+
version: "latest"
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
run: uv python install ${{ matrix.python-version }}
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
# SR-PKG: install Tier-1 defaults + dev deps only.
|
|
31
|
+
# --all-extras would pull [local] (torch/vllm/sglang) which cannot
|
|
32
|
+
# resolve on CPU CI runners. Tier-2 is GPU-only and must stay opt-in.
|
|
33
|
+
run: uv sync
|
|
34
|
+
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: uv run pytest tests/ -v --tb=short
|
|
37
|
+
|
|
38
|
+
# ── Leakage scanner (full teeth — SR-4, broadened SR-PKG) ──────────────────
|
|
39
|
+
# SR-PKG: doctrine/ + examples/ moved into the wheel at
|
|
40
|
+
# src/research_vault/data/doctrine/ + src/research_vault/data/examples/.
|
|
41
|
+
# Coverage broadened to the whole publish-bound tree (whole-tree by default,
|
|
42
|
+
# opt-out by exception — the safe polarity for a public publish).
|
|
43
|
+
# Scans: package data (doctrine/ + examples/), DEVLOG.md, root public-bound
|
|
44
|
+
# files (README.md, QUICKSTART.md, REFERENCES.md, SETUP.md),
|
|
45
|
+
# and src/ for hardcoded private paths — all private marker classes:
|
|
46
|
+
# codenames · identity strings · site URLs · cluster paths ·
|
|
47
|
+
# secret-shaped strings · versioned model IDs · non-template memory slugs
|
|
48
|
+
# Implemented in scripts/leakage_scan.sh (tested hermetically in tests/).
|
|
49
|
+
leakage-scan:
|
|
50
|
+
name: Leakage scan
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Run leakage scanner over src/research_vault/data/doctrine/
|
|
57
|
+
run: bash scripts/leakage_scan.sh src/research_vault/data/doctrine
|
|
58
|
+
|
|
59
|
+
- name: Run leakage scanner over src/research_vault/data/examples/
|
|
60
|
+
run: bash scripts/leakage_scan.sh src/research_vault/data/examples
|
|
61
|
+
|
|
62
|
+
# SR-CCB: CLAUDE.md.tmpl ships in the wheel and gets written to every
|
|
63
|
+
# adopter's instance root — must be leakage-clean (publish-bound).
|
|
64
|
+
- name: Run leakage scanner over src/research_vault/data/templates/
|
|
65
|
+
run: bash scripts/leakage_scan.sh src/research_vault/data/templates
|
|
66
|
+
|
|
67
|
+
- name: Run leakage scanner over DEVLOG.md
|
|
68
|
+
run: bash scripts/leakage_scan.sh DEVLOG.md
|
|
69
|
+
|
|
70
|
+
- name: Run leakage scanner over root public-bound files
|
|
71
|
+
run: |
|
|
72
|
+
# Scan public-bound root files individually.
|
|
73
|
+
# REFERENCES.md and SETUP.md scanned when present (future artifacts).
|
|
74
|
+
# LICENSE + pyproject.toml added (SR-SETUP: ship to PyPI — must be clean).
|
|
75
|
+
for f in README.md QUICKSTART.md REFERENCES.md SETUP.md LICENSE pyproject.toml RELEASING.md; do
|
|
76
|
+
if [ -f "$f" ]; then
|
|
77
|
+
echo "--- scanning $f ---"
|
|
78
|
+
bash scripts/leakage_scan.sh "$f"
|
|
79
|
+
fi
|
|
80
|
+
done
|
|
81
|
+
|
|
82
|
+
- name: Check for hardcoded private paths in src/
|
|
83
|
+
run: |
|
|
84
|
+
echo "=== Hardcoded path scan (src/) ==="
|
|
85
|
+
if grep -rn --include="*.py" \
|
|
86
|
+
-E "(/juice2/|/scr2/|phoongkz|phoongkhangzhie)" \
|
|
87
|
+
src/ 2>/dev/null; then
|
|
88
|
+
echo "FAIL: hardcoded private paths found in src/"
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
91
|
+
echo "OK: no hardcoded private paths in src/"
|
|
92
|
+
|
|
93
|
+
# Hygiene-batch: class 10 crew narrative-names in Python source.
|
|
94
|
+
# Catches session-narrative attributions (Ada/Wren/Mason/Argus/Iris/Atlas)
|
|
95
|
+
# in shipped .py files. Runs leakage_scan.sh over src/ — the _grep_py_word
|
|
96
|
+
# helper in class 10 restricts matches to .py files only, so role docs
|
|
97
|
+
# (*.md in data/doctrine/roles/) are not flagged.
|
|
98
|
+
- name: Check for crew narrative-names in src/ Python source
|
|
99
|
+
run: bash scripts/leakage_scan.sh src/research_vault
|
|
100
|
+
|
|
101
|
+
# ── help --check gate ───────────────────────────────────────────────────────
|
|
102
|
+
help-check:
|
|
103
|
+
name: rv help --check
|
|
104
|
+
runs-on: ubuntu-latest
|
|
105
|
+
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
|
|
109
|
+
- name: Install uv
|
|
110
|
+
uses: astral-sh/setup-uv@v3
|
|
111
|
+
with:
|
|
112
|
+
version: "latest"
|
|
113
|
+
|
|
114
|
+
- name: Set up Python
|
|
115
|
+
run: uv python install 3.12
|
|
116
|
+
|
|
117
|
+
- name: Install package
|
|
118
|
+
# SR-PKG: Tier-1 defaults only — Tier-2 [local] is GPU-only, not for CI.
|
|
119
|
+
run: uv sync
|
|
120
|
+
|
|
121
|
+
- name: Verify all verbs have when_to_use docstrings
|
|
122
|
+
run: uv run rv help --check
|
|
123
|
+
|
|
124
|
+
# ── rv lint gate ────────────────────────────────────────────────────────────
|
|
125
|
+
# Runs the project linter over the whole repo: leakage scan + config schema +
|
|
126
|
+
# verb docstring gate + test-hygiene rules (vacuous assertions, unpinned git
|
|
127
|
+
# init) + F811 redefined-while-unused check (catches shadowed def/class names
|
|
128
|
+
# in src/research_vault/ — the SR-MS-2 duplicate check_manuscript gap).
|
|
129
|
+
rv-lint:
|
|
130
|
+
name: rv lint
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
|
|
133
|
+
steps:
|
|
134
|
+
- uses: actions/checkout@v4
|
|
135
|
+
|
|
136
|
+
- name: Install uv
|
|
137
|
+
uses: astral-sh/setup-uv@v3
|
|
138
|
+
with:
|
|
139
|
+
version: "latest"
|
|
140
|
+
|
|
141
|
+
- name: Set up Python
|
|
142
|
+
run: uv python install 3.12
|
|
143
|
+
|
|
144
|
+
- name: Install package
|
|
145
|
+
# SR-PKG: Tier-1 defaults only — Tier-2 [local] is GPU-only, not for CI.
|
|
146
|
+
run: uv sync
|
|
147
|
+
|
|
148
|
+
- name: Run rv lint (full repo)
|
|
149
|
+
run: uv run rv lint
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Trigger: a version tag pushed manually by the maintainer.
|
|
4
|
+
# Usage: git tag v0.1.0 && git push origin v0.1.0
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
tags:
|
|
8
|
+
- "v*.*.*"
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build distribution
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v3
|
|
20
|
+
with:
|
|
21
|
+
version: "latest"
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
run: uv python install 3.12
|
|
25
|
+
|
|
26
|
+
- name: Build sdist and wheel
|
|
27
|
+
run: uv build
|
|
28
|
+
|
|
29
|
+
- name: Check distribution metadata
|
|
30
|
+
run: uvx twine check dist/*
|
|
31
|
+
|
|
32
|
+
- name: Upload built artifacts
|
|
33
|
+
uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: dist
|
|
36
|
+
path: dist/
|
|
37
|
+
|
|
38
|
+
publish:
|
|
39
|
+
name: Publish to PyPI
|
|
40
|
+
needs: build
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
environment:
|
|
43
|
+
name: pypi
|
|
44
|
+
url: https://pypi.org/project/research-vault/
|
|
45
|
+
|
|
46
|
+
# PyPI Trusted Publishing (OIDC) — no PYPI_TOKEN secret required.
|
|
47
|
+
# The pending publisher must be registered on PyPI before the first release.
|
|
48
|
+
# See RELEASING.md for the exact registration steps.
|
|
49
|
+
permissions:
|
|
50
|
+
id-token: write
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- name: Download built artifacts
|
|
54
|
+
uses: actions/download-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: dist
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
- name: Publish to PyPI
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
*.egg
|
|
8
|
+
*.egg-info/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
.eggs/
|
|
12
|
+
*.whl
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
.env
|
|
17
|
+
.python-version
|
|
18
|
+
|
|
19
|
+
# uv
|
|
20
|
+
.uv/
|
|
21
|
+
uv.lock
|
|
22
|
+
|
|
23
|
+
# pytest
|
|
24
|
+
.pytest_cache/
|
|
25
|
+
.cache/
|
|
26
|
+
|
|
27
|
+
# State directory (instance data — never committed in the framework repo)
|
|
28
|
+
state/
|
|
29
|
+
*.state/
|
|
30
|
+
|
|
31
|
+
# Editor
|
|
32
|
+
.DS_Store
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
*.swp
|
|
36
|
+
*.swo
|
|
37
|
+
|
|
38
|
+
# Instance secrets / dotfiles
|
|
39
|
+
.secrets
|
|
40
|
+
*.secret
|
|
41
|
+
.keyring/
|
|
42
|
+
|
|
43
|
+
# Local-only maintenance aids (private ~/vault path structure — not for the public repo)
|
|
44
|
+
doctrine/drift-watch.md
|
|
45
|
+
|
|
46
|
+
# Worktrees
|
|
47
|
+
.worktrees/
|
|
48
|
+
|
|
49
|
+
# Stray local dirs / OS cruft (not part of the OSS repo)
|
|
50
|
+
tasks/
|
|
51
|
+
.DS_Store
|
|
52
|
+
**/.DS_Store
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Contributing to Research Vault
|
|
2
|
+
|
|
3
|
+
Thanks for your interest. Research Vault is a young project with a strong point of
|
|
4
|
+
view: **the discipline is the product.** Contributions are welcome, but the bar is
|
|
5
|
+
that a change must *keep the disciplines honest* — a feature that makes fabrication
|
|
6
|
+
easier, or lets a gate be waved through, will be declined no matter how convenient.
|
|
7
|
+
|
|
8
|
+
## The doctrine-first ethos
|
|
9
|
+
|
|
10
|
+
The disciplines (anti-fabrication, every-outcome-is-a-finding, verify-the-artifact,
|
|
11
|
+
pre-registration, human-only approval, crew-cannot-self-approve) live in
|
|
12
|
+
`src/research_vault/data/doctrine/`. They are shipped as package data and read by
|
|
13
|
+
the agents at work time.
|
|
14
|
+
|
|
15
|
+
**A change to a discipline is a doctrine change.** If your PR alters how a gate
|
|
16
|
+
behaves, what a role may do, or what counts as "verified," update the doctrine in
|
|
17
|
+
the same change and say so explicitly in the PR description. Do not route around a
|
|
18
|
+
discipline in code while leaving the doctrine stating the old rule — that drift is
|
|
19
|
+
exactly what the project exists to prevent.
|
|
20
|
+
|
|
21
|
+
## Development setup
|
|
22
|
+
|
|
23
|
+
Research Vault targets **Python 3.12+** and uses [uv](https://docs.astral.sh/uv/).
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/phoongkhangzhie/research-vault.git
|
|
27
|
+
cd research-vault
|
|
28
|
+
uv sync # create the environment + install dev deps (pytest)
|
|
29
|
+
uv run rv --help # confirm the CLI resolves
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If you are working from a bare install and need the research toolkit:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
rv bootstrap # creates an isolated .venv and installs the toolkit
|
|
36
|
+
rv check # verify the tier coverage matrix
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## The test suite
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
uv run pytest # the full suite
|
|
43
|
+
uv run pytest -m slow # isolated wheel build+install+run smoke tests (slower)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Test discipline (enforced by `rv lint`, see below — the project is strict about it):
|
|
47
|
+
|
|
48
|
+
- **No vacuous assertions.** `assert True` / `or True` are flagged — a tautology
|
|
49
|
+
that always passes masks the bug it was meant to catch.
|
|
50
|
+
- **Stress the code, not the docstring.** Asserting against `inspect.getsource(fn)`
|
|
51
|
+
is flagged — it passes even when the live code is broken, because the symbol may
|
|
52
|
+
survive only in a comment.
|
|
53
|
+
- **Pin your branch in test git-inits.** `git init` without `--initial-branch` is
|
|
54
|
+
flagged — it passes locally and fails on master-default runners.
|
|
55
|
+
|
|
56
|
+
New behavior needs a test that *and* stress-tests it. An LLM-judged gate needs a
|
|
57
|
+
blind-judge canary (a known-outcome probe) so a mis-calibrated judge can't silently
|
|
58
|
+
rubber-stamp — see `data/doctrine/honesty-gates.md`.
|
|
59
|
+
|
|
60
|
+
## The lint / leakage gates
|
|
61
|
+
|
|
62
|
+
Before opening a PR, run:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
rv lint # leakage scan + config schema + test-hygiene + doc links
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`rv lint` runs the **leakage gate** — the most important check for a public repo.
|
|
69
|
+
The package must contain **zero private markers**: no absolute home-directory paths,
|
|
70
|
+
no personal names, no internal codenames, no secrets. The forbidden-pattern list is
|
|
71
|
+
config-driven, not compiled in. A leak is a blocking failure, not a footnote.
|
|
72
|
+
|
|
73
|
+
> **Note on CI.** Automated CI/Actions may be disabled on this repo at times. When
|
|
74
|
+
> it is, `rv lint` + the leakage scan + `uv run pytest` are the gates you run
|
|
75
|
+
> **locally before every PR** — treat a red local gate exactly as you would a red
|
|
76
|
+
> CI: fix it first, do not build on top of it.
|
|
77
|
+
|
|
78
|
+
## Commit & PR conventions
|
|
79
|
+
|
|
80
|
+
- **Conventional commits.** Use `type: summary` (`feat:`, `fix:`, `docs:`,
|
|
81
|
+
`refactor:`, `test:`, …). The git-discipline hooks (`rv git-discipline install`)
|
|
82
|
+
enforce the format, protect `main`, and run a leakage scan on commit.
|
|
83
|
+
- **Commit as you go.** Commit incrementally as work lands — do not hold a large
|
|
84
|
+
uncommitted working tree hostage to one final commit. Work is recoverable only
|
|
85
|
+
once it is committed.
|
|
86
|
+
- **Work on a branch / worktree, never on `main`.** `rv wt add <task>` creates an
|
|
87
|
+
isolated worktree on `feat/<task>`.
|
|
88
|
+
- **Keep the change scoped.** One concern per PR. Update the `DEVLOG.md` with the
|
|
89
|
+
decisions you made, not just what you did.
|
|
90
|
+
|
|
91
|
+
## The review discipline
|
|
92
|
+
|
|
93
|
+
Research Vault distinguishes two merge classes, and **nobody merges on their own
|
|
94
|
+
authority**:
|
|
95
|
+
|
|
96
|
+
- **reviewer-gate** — a change is merged only after an independent reviewer verdict
|
|
97
|
+
*and* a green local gate.
|
|
98
|
+
- **human-go** — stack-wide / cross-project / public-facing changes require a human
|
|
99
|
+
operator's explicit go, in addition to review.
|
|
100
|
+
|
|
101
|
+
**Crew agents cannot self-approve.** In an agent-driven workflow, the human is the
|
|
102
|
+
second party — an approval an agent could not obtain from a person must never be
|
|
103
|
+
tunneled through another agent. This is enforced mechanically: the approval gate
|
|
104
|
+
keys on an interactive terminal, and a dispatched agent has none.
|
|
105
|
+
|
|
106
|
+
## Reporting issues
|
|
107
|
+
|
|
108
|
+
File issues with a minimal reproduction and the output of `rv check`. For anything
|
|
109
|
+
touching a discipline or a gate, describe the *honesty property* you believe is at
|
|
110
|
+
risk — that framing helps triage faster than a feature label.
|