grift-cli 0.5.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 (65) hide show
  1. grift_cli-0.5.0/.github/workflows/ci.yml +45 -0
  2. grift_cli-0.5.0/.github/workflows/publish.yml +41 -0
  3. grift_cli-0.5.0/.gitignore +18 -0
  4. grift_cli-0.5.0/CHANGELOG.md +38 -0
  5. grift_cli-0.5.0/LICENSE +21 -0
  6. grift_cli-0.5.0/PKG-INFO +97 -0
  7. grift_cli-0.5.0/README.en.md +76 -0
  8. grift_cli-0.5.0/README.md +74 -0
  9. grift_cli-0.5.0/corpus/DISCRIMINANT-v2026.09.md +130 -0
  10. grift_cli-0.5.0/corpus/pins-v2026.09.toml +374 -0
  11. grift_cli-0.5.0/docs/corpus-protocol.md +116 -0
  12. grift_cli-0.5.0/docs/identity-schema.md +14 -0
  13. grift_cli-0.5.0/golden/README.md +13 -0
  14. grift_cli-0.5.0/golden/expected/G1-click.json +96 -0
  15. grift_cli-0.5.0/golden/expected/G2-gitignore.json +55 -0
  16. grift_cli-0.5.0/golden/expected/G3-spoon-knife.json +51 -0
  17. grift_cli-0.5.0/golden/expected/G4-express.json +53 -0
  18. grift_cli-0.5.0/golden/expected/G5-typer.json +57 -0
  19. grift_cli-0.5.0/golden/identity/G1-click.toml +10 -0
  20. grift_cli-0.5.0/golden/identity/example.toml +10 -0
  21. grift_cli-0.5.0/golden/pins.toml +47 -0
  22. grift_cli-0.5.0/pyproject.toml +51 -0
  23. grift_cli-0.5.0/scripts/build_distributions.py +96 -0
  24. grift_cli-0.5.0/scripts/check_forbidden_vocab.py +62 -0
  25. grift_cli-0.5.0/scripts/corpus_ad_pilot.py +168 -0
  26. grift_cli-0.5.0/scripts/corpus_run.py +125 -0
  27. grift_cli-0.5.0/scripts/discriminant_v2026.py +139 -0
  28. grift_cli-0.5.0/scripts/hygiene_grep.py +77 -0
  29. grift_cli-0.5.0/src/tep_cli/__init__.py +1 -0
  30. grift_cli-0.5.0/src/tep_cli/__main__.py +146 -0
  31. grift_cli-0.5.0/src/tep_core/__init__.py +14 -0
  32. grift_cli-0.5.0/src/tep_core/activity.py +55 -0
  33. grift_cli-0.5.0/src/tep_core/analyze.py +123 -0
  34. grift_cli-0.5.0/src/tep_core/cochange.py +102 -0
  35. grift_cli-0.5.0/src/tep_core/core_period.py +78 -0
  36. grift_cli-0.5.0/src/tep_core/data/v2026.09/distributions.json +110 -0
  37. grift_cli-0.5.0/src/tep_core/gitutil.py +112 -0
  38. grift_cli-0.5.0/src/tep_core/identity.py +109 -0
  39. grift_cli-0.5.0/src/tep_core/lineage.py +22 -0
  40. grift_cli-0.5.0/src/tep_core/observation.py +34 -0
  41. grift_cli-0.5.0/src/tep_core/origin.py +158 -0
  42. grift_cli-0.5.0/src/tep_core/paths.py +48 -0
  43. grift_cli-0.5.0/src/tep_core/reference.py +76 -0
  44. grift_cli-0.5.0/src/tep_core/report.py +219 -0
  45. grift_cli-0.5.0/src/tep_core/rework.py +117 -0
  46. grift_cli-0.5.0/src/tep_core/scope.py +38 -0
  47. grift_cli-0.5.0/src/tep_core/survival.py +73 -0
  48. grift_cli-0.5.0/src/tep_core/tests_observed.py +102 -0
  49. grift_cli-0.5.0/src/tep_core/version.py +6 -0
  50. grift_cli-0.5.0/tests/conftest.py +23 -0
  51. grift_cli-0.5.0/tests/git_fixture.py +77 -0
  52. grift_cli-0.5.0/tests/test_activity.py +42 -0
  53. grift_cli-0.5.0/tests/test_cli.py +57 -0
  54. grift_cli-0.5.0/tests/test_cochange.py +102 -0
  55. grift_cli-0.5.0/tests/test_forbidden_vocab.py +41 -0
  56. grift_cli-0.5.0/tests/test_gitutil.py +43 -0
  57. grift_cli-0.5.0/tests/test_golden.py +68 -0
  58. grift_cli-0.5.0/tests/test_h5_swarm.py +180 -0
  59. grift_cli-0.5.0/tests/test_hygiene.py +85 -0
  60. grift_cli-0.5.0/tests/test_not_observed.py +36 -0
  61. grift_cli-0.5.0/tests/test_origin.py +205 -0
  62. grift_cli-0.5.0/tests/test_report.py +62 -0
  63. grift_cli-0.5.0/tests/test_rework.py +87 -0
  64. grift_cli-0.5.0/tests/test_scope.py +88 -0
  65. grift_cli-0.5.0/tests/test_survival.py +37 -0
@@ -0,0 +1,45 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ schedule:
8
+ - cron: "0 6 * * 1"
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.11", "3.12"]
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Install
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ python -m pip install -e ".[dev]"
26
+ - name: Unit tests
27
+ run: python -m pytest tests -m "not golden"
28
+
29
+ golden:
30
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
31
+ runs-on: ubuntu-latest
32
+ needs: test
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ - uses: actions/setup-python@v5
36
+ with:
37
+ python-version: "3.12"
38
+ - name: Install
39
+ run: |
40
+ python -m pip install --upgrade pip
41
+ python -m pip install -e ".[dev]"
42
+ - name: Golden corpus
43
+ env:
44
+ TEP_GOLDEN: "1"
45
+ run: python -m pytest tests/test_golden.py -m golden
@@ -0,0 +1,41 @@
1
+ name: publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-python@v5
14
+ with:
15
+ python-version: "3.12"
16
+ - name: Install
17
+ run: |
18
+ python -m pip install --upgrade pip
19
+ python -m pip install -e ".[dev]"
20
+ - name: Unit tests
21
+ run: python -m pytest tests -m "not golden"
22
+
23
+ publish:
24
+ needs: test
25
+ if: github.repository == 'Cor-Incorporated/grift-cli'
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ contents: read
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: actions/setup-python@v5
32
+ with:
33
+ python-version: "3.12"
34
+ - name: Build
35
+ run: |
36
+ python -m pip install --upgrade pip build
37
+ python -m build
38
+ - name: Publish to PyPI
39
+ uses: pypa/gh-action-pypi-publish@release/v1
40
+ with:
41
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,18 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .eggs/
5
+ dist/
6
+ build/
7
+ .venv/
8
+ venv/
9
+ .pytest_cache/
10
+ .coverage
11
+ htmlcov/
12
+ .golden-cache/
13
+ .corpus-cache/
14
+ corpus/runs/results.jsonl
15
+ .ruff_cache/
16
+ *.whl
17
+ .DS_Store
18
+ .hygiene-needles.txt
@@ -0,0 +1,38 @@
1
+ # Changelog
2
+
3
+ 形式は [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/)。バージョンは SemVer。
4
+
5
+ タグ・PyPI・リポ public 化は本ファイルの記載対象外(人間ゲート)。
6
+
7
+ ## [0.5.0] — 2026-08-22
8
+
9
+ 定義Bの節目(`--scope`・参照分布 v2026.09・解釈層)。行レベル rework は v0.6 予約のまま。
10
+
11
+ ### Added
12
+
13
+ - `--scope tenant|repo`。tenant は証拠、repo はプロセス観測と参照分布。混ぜると `ScopeMismatchError`
14
+ - 参照分布 v2026.09(repo スコープ)。n<30 の指標は位置を出さない
15
+ - survival(`--survival`、τ=180日)。参照分布は v2027 予定
16
+ - 公開コーパス pin(A/B/C/D、SHA 固定)。リーグテーブルは同梱しない
17
+
18
+ ### Changed
19
+
20
+ - `corrective_rework_rate` を evidence_claim から観測専用へ降格(件名規約依存の交絡)
21
+ - git log の非 UTF-8 を `errors="replace"` で落とさない
22
+ - コマンド名を `grift` に確定(method=TEP / tool=grift)。旧 `tep` エントリは置かない
23
+ - PyPI 配布名を `grift-cli` に確定(公開操作は人間ゲート)
24
+ - H-5: 母数<20 では ratio と十分位を両方出さない(`insufficient_population`、件数の生表示のみ)
25
+
26
+ ### Discriminant (verbatim from `corpus/DISCRIMINANT-v2026.09.md` Run 2)
27
+
28
+ - `test_cochange A vs D` → `inconclusive_small_n`
29
+ - `test_cochange A vs C` → `separated`
30
+ - `corrective_rework A vs C` → `fail_tier2`
31
+
32
+ ## [0.1.1] — 2026-08-22
33
+
34
+ origin 語彙の P0 修正(検収合格 SHA `e954b16`)。ローカルタグ `v0.1.1` は未 push。v0.5.0 に一本化するかは代表判断。
35
+
36
+ ## [0.1.0] — 2026-08-21
37
+
38
+ origin / activity の決定論的レポート。ゴールデン G1–G5。LLM なし。
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TEP contributors
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,97 @@
1
+ Metadata-Version: 2.5
2
+ Name: grift-cli
3
+ Version: 0.5.0
4
+ Summary: Deterministic TEP evidence metrics from a single git repository. No LLM.
5
+ Project-URL: Homepage, https://github.com/Cor-Incorporated/grift-cli
6
+ Author: TEP contributors
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Keywords: evidence,git,origin,provenance,tep
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Quality Assurance
18
+ Requires-Python: >=3.11
19
+ Provides-Extra: dev
20
+ Requires-Dist: build>=1.2; extra == 'dev'
21
+ Requires-Dist: pytest>=8.0; extra == 'dev'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # grift — AI時代に痩せない証拠
25
+
26
+ **日本語** | [English](README.en.md)
27
+
28
+ Method = **TEP** / Tool = **grift**(CodeScene 型の二層。方法論名は TEP、コマンドは `grift`)。
29
+ Named after the Grift product line.
30
+
31
+ 量は誰でも作れる。残るものと、検証が伴った変更を測る。技量スコアではない。
32
+
33
+ コミット数・行数・「活動量」は、エージェントと生成コードの時代に簡単に膨らむ。grift は git だけから、TEP の帰属(誰の仕事か)と検証層(test co-change ほか)を**決定論的に**出す。LLM は使わない。合成スコアも等級語彙も出さない。
34
+
35
+ ## 5分で始める
36
+
37
+ ```bash
38
+ pipx install grift-cli
39
+ grift analyze ./my-repo --scope repo
40
+ ```
41
+
42
+ - `--scope tenant`(既定): `.tep/identity.toml` に載った人の仕事 = **証拠用**
43
+ - `--scope repo`: bot 以外の全人間コミット = **プロセス観測・参照分布用**
44
+
45
+ 参照分布 v2026.09 は **repo スコープ同士**でのみ照合する。tenant の値を repo 分布に載せない(混ぜたら分布が嘘になる)。
46
+
47
+ ## 実レポート例
48
+
49
+ 自リポで `grift analyze . --format md` を実行する。各数値に単位と provenance(method=TEP・tool=grift・定義版・分析 SHA・`analysis_scope`)が付く。
50
+
51
+ 例(click、tenant スコープ。ゴールデン G1):
52
+
53
+ - test co-change: 0.2664 ratio(73 of 274)
54
+ - corrective rework: 0.0109 ratio(3 of 274)— 観測値。証拠主張ではない
55
+ - path retouch: 0.573 ratio — 観測のみ
56
+
57
+ 母数 20 未満では率も分布位置も出さない(`insufficient_population`。件数の生表示のみ)。
58
+
59
+ ## 指標と限界
60
+
61
+ | 指標 | 何の証拠か | 限界 |
62
+ |---|---|---|
63
+ | origin / 帰属 | 誰の仕事か | identity 未設定は unresolved。Cor 実メールは同梱しない |
64
+ | test co-change | 本番変更にテストが伴うか | テスト基盤なしは not_observed。母数<20 は率も十分位も出さない(`insufficient_population`) |
65
+ | corrective rework | 件名が fix/revert の直近パス回帰(観測) | **証拠主張から降格**。件名規約依存の交絡あり。バグ件数ではない。再挑戦は v0.6 行レベル |
66
+ | path retouch | 同一ファイル再接触 | 観測のみ。証拠主張に使わない |
67
+ | survival (τ=180d) | 行の残り方 | `--survival` のみ。参照分布は **v2027 予定**。今回の公開分布には含めない |
68
+
69
+ 参照位置は「第N十分位」の1行だけ。n<30 の指標は位置を出さない(`reference_too_small`)。v2026.09 の観測 n: test co-change 33 / corrective rework 42(観測)/ survival 0。
70
+
71
+ ## 判別力の現況(repo スコープ・基準 `5f2665e`)
72
+
73
+ 出典: `corpus/DISCRIMINANT-v2026.09.md` Run 2。verdict はファイルから逐語。
74
+
75
+ - `test_cochange A vs C` → `separated`(median_A 0.2379, median_other 0.0306, gap 0.2073, Cliff δ 0.7143, n 18/7)
76
+ - `test_cochange A vs D` → `inconclusive_small_n`(n 18/1。D の narratable 観測が 1)
77
+ - `corrective_rework A vs C` → `fail_tier2`(median_A 0.0522, median_other 0.1063, gap -0.0541, Cliff δ -0.7083, n 18/8)。観測診断のみ。証拠主張には使わない
78
+ - survival: 本コーパスでは未計測。参照分布は v2027 予定
79
+
80
+ WP4 Run 1 の記録(`separated` / `inconclusive_small_n` / `fail_tier2`)は同ファイルに履歴として残してある。
81
+
82
+ ## 倫理
83
+
84
+ - 実在個人のスコアカード・順位表は公開も内部共有も禁止
85
+ - 等級語彙(シニア/ジュニア/素晴らしい)を出さない
86
+ - コーパスの manifest(リポ名+SHA)は再現用に公開してよい。**個別リポ値のリーグテーブルは公開しない**
87
+ - 対照群 E(私的 ground truth)はこのリポに入れない
88
+
89
+ ## 公開状態
90
+
91
+ - 公開リポ: https://github.com/Cor-Incorporated/grift-cli
92
+ - コマンド名: **`grift`**(方法論名 TEP はレポートに残す)
93
+ - PyPI: 配布名 **`grift-cli`**。本公開は別ゲート(未了ならソースから `pipx install .`)
94
+
95
+ ## License
96
+
97
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,76 @@
1
+ # grift — evidence that does not inflate in the AI era
2
+
3
+ [日本語](README.md) | **English**
4
+
5
+ Method = **TEP** / Tool = **grift** (two-layer naming, CodeScene-style: the methodology stays TEP; the command is `grift`).
6
+ Named after the Grift product line.
7
+
8
+ Anyone can produce volume. This tool measures what remains, and which changes came with verification. It is not a skill score.
9
+
10
+ Commit counts, line counts, and “activity” inflate easily once agents and generated code are in the loop. grift reads git only and emits TEP provenance (whose work) and a verification layer (test co-change and related metrics) **deterministically**. No LLM. No composite score. No skill-rank labels.
11
+
12
+ ## Start in five minutes
13
+
14
+ ```bash
15
+ pipx install grift-cli
16
+ grift analyze ./my-repo --scope repo
17
+ ```
18
+
19
+ If the package is not on PyPI yet: `pipx install .`
20
+
21
+ - `--scope tenant` (default): work matched in `.tep/identity.toml` = **evidence**
22
+ - `--scope repo`: all non-bot human commits = **process observation and reference distributions**
23
+
24
+ Reference distribution v2026.09 is compared **only at repo scope**. Do not plot tenant values on the repo distribution (mixing scopes makes the distribution a lie).
25
+
26
+ ## Example report
27
+
28
+ Run `grift analyze . --format md` on your own repository. Every number carries a unit and provenance (method=TEP, tool=grift, definition version, analyzed SHA, `analysis_scope`).
29
+
30
+ Example (click, tenant scope, golden G1):
31
+
32
+ - test co-change: 0.2664 ratio (73 of 274)
33
+ - corrective rework: 0.0109 ratio (3 of 274) — observational; not an evidence claim
34
+ - path retouch: 0.573 ratio — observational only
35
+
36
+ Below population 20, neither the rate nor a distribution position is shown (`insufficient_population`; raw counts only).
37
+
38
+ ## Metrics and limits
39
+
40
+ | Metric | What it is evidence of | Limit |
41
+ |---|---|---|
42
+ | origin / attribution | whose work | unset identity → unresolved. Real tenant emails are not shipped |
43
+ | test co-change | whether production changes came with tests | no test substrate → `not_observed`. population &lt; 20 → no rate and no decile (`insufficient_population`) |
44
+ | corrective rework | recent-path return with a fix/revert subject (observational) | **demoted from evidence claim**. confounded by subject conventions. not a bug count. line-level retry is v0.6 |
45
+ | path retouch | same-file re-touch | observational only. not an evidence claim |
46
+ | survival (τ=180d) | whether lines remain | `--survival` only. reference distribution planned for **v2027**. not in this public distribution |
47
+
48
+ Reference position is a single “decile N” line. Metrics with n&lt;30 omit position (`reference_too_small`). v2026.09 measured n: test co-change 33 / corrective rework 42 (observational) / survival 0.
49
+
50
+ ## Discriminatory power (repo scope, criteria `5f2665e`)
51
+
52
+ Source: `corpus/DISCRIMINANT-v2026.09.md` Run 2. Verdicts copied **verbatim** from the file.
53
+
54
+ - `test_cochange A vs C` → `separated` (median_A 0.2379, median_other 0.0306, gap 0.2073, Cliff δ 0.7143, n 18/7)
55
+ - `test_cochange A vs D` → `inconclusive_small_n` (n 18/1; D has 1 narratable observation)
56
+ - `corrective_rework A vs C` → `fail_tier2` (median_A 0.0522, median_other 0.1063, gap -0.0541, Cliff δ -0.7083, n 18/8). diagnostic only; not an evidence claim
57
+ - survival: not measured in this corpus. reference distribution planned for v2027
58
+
59
+ WP4 Run 1 (`separated` / `inconclusive_small_n` / `fail_tier2`) is kept as history in the same file.
60
+
61
+ ## Ethics
62
+
63
+ - Named-person scorecards and league tables are forbidden, publicly and internally
64
+ - Do not emit skill-rank labels (senior / junior / “excellent”)
65
+ - Corpus manifests (repo name + SHA) may be published for reproduction. **Per-repo value league tables are not published**
66
+ - Control group E (private ground truth) is not in this repository
67
+
68
+ ## Status
69
+
70
+ - Public repository: https://github.com/Cor-Incorporated/grift-cli
71
+ - Command name: **`grift`** (methodology name TEP remains on reports)
72
+ - PyPI: distribution name **`grift-cli`**. Publishing is a separate human gate (until then, `pipx install .`)
73
+
74
+ ## License
75
+
76
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,74 @@
1
+ # grift — AI時代に痩せない証拠
2
+
3
+ **日本語** | [English](README.en.md)
4
+
5
+ Method = **TEP** / Tool = **grift**(CodeScene 型の二層。方法論名は TEP、コマンドは `grift`)。
6
+ Named after the Grift product line.
7
+
8
+ 量は誰でも作れる。残るものと、検証が伴った変更を測る。技量スコアではない。
9
+
10
+ コミット数・行数・「活動量」は、エージェントと生成コードの時代に簡単に膨らむ。grift は git だけから、TEP の帰属(誰の仕事か)と検証層(test co-change ほか)を**決定論的に**出す。LLM は使わない。合成スコアも等級語彙も出さない。
11
+
12
+ ## 5分で始める
13
+
14
+ ```bash
15
+ pipx install grift-cli
16
+ grift analyze ./my-repo --scope repo
17
+ ```
18
+
19
+ - `--scope tenant`(既定): `.tep/identity.toml` に載った人の仕事 = **証拠用**
20
+ - `--scope repo`: bot 以外の全人間コミット = **プロセス観測・参照分布用**
21
+
22
+ 参照分布 v2026.09 は **repo スコープ同士**でのみ照合する。tenant の値を repo 分布に載せない(混ぜたら分布が嘘になる)。
23
+
24
+ ## 実レポート例
25
+
26
+ 自リポで `grift analyze . --format md` を実行する。各数値に単位と provenance(method=TEP・tool=grift・定義版・分析 SHA・`analysis_scope`)が付く。
27
+
28
+ 例(click、tenant スコープ。ゴールデン G1):
29
+
30
+ - test co-change: 0.2664 ratio(73 of 274)
31
+ - corrective rework: 0.0109 ratio(3 of 274)— 観測値。証拠主張ではない
32
+ - path retouch: 0.573 ratio — 観測のみ
33
+
34
+ 母数 20 未満では率も分布位置も出さない(`insufficient_population`。件数の生表示のみ)。
35
+
36
+ ## 指標と限界
37
+
38
+ | 指標 | 何の証拠か | 限界 |
39
+ |---|---|---|
40
+ | origin / 帰属 | 誰の仕事か | identity 未設定は unresolved。Cor 実メールは同梱しない |
41
+ | test co-change | 本番変更にテストが伴うか | テスト基盤なしは not_observed。母数<20 は率も十分位も出さない(`insufficient_population`) |
42
+ | corrective rework | 件名が fix/revert の直近パス回帰(観測) | **証拠主張から降格**。件名規約依存の交絡あり。バグ件数ではない。再挑戦は v0.6 行レベル |
43
+ | path retouch | 同一ファイル再接触 | 観測のみ。証拠主張に使わない |
44
+ | survival (τ=180d) | 行の残り方 | `--survival` のみ。参照分布は **v2027 予定**。今回の公開分布には含めない |
45
+
46
+ 参照位置は「第N十分位」の1行だけ。n<30 の指標は位置を出さない(`reference_too_small`)。v2026.09 の観測 n: test co-change 33 / corrective rework 42(観測)/ survival 0。
47
+
48
+ ## 判別力の現況(repo スコープ・基準 `5f2665e`)
49
+
50
+ 出典: `corpus/DISCRIMINANT-v2026.09.md` Run 2。verdict はファイルから逐語。
51
+
52
+ - `test_cochange A vs C` → `separated`(median_A 0.2379, median_other 0.0306, gap 0.2073, Cliff δ 0.7143, n 18/7)
53
+ - `test_cochange A vs D` → `inconclusive_small_n`(n 18/1。D の narratable 観測が 1)
54
+ - `corrective_rework A vs C` → `fail_tier2`(median_A 0.0522, median_other 0.1063, gap -0.0541, Cliff δ -0.7083, n 18/8)。観測診断のみ。証拠主張には使わない
55
+ - survival: 本コーパスでは未計測。参照分布は v2027 予定
56
+
57
+ WP4 Run 1 の記録(`separated` / `inconclusive_small_n` / `fail_tier2`)は同ファイルに履歴として残してある。
58
+
59
+ ## 倫理
60
+
61
+ - 実在個人のスコアカード・順位表は公開も内部共有も禁止
62
+ - 等級語彙(シニア/ジュニア/素晴らしい)を出さない
63
+ - コーパスの manifest(リポ名+SHA)は再現用に公開してよい。**個別リポ値のリーグテーブルは公開しない**
64
+ - 対照群 E(私的 ground truth)はこのリポに入れない
65
+
66
+ ## 公開状態
67
+
68
+ - 公開リポ: https://github.com/Cor-Incorporated/grift-cli
69
+ - コマンド名: **`grift`**(方法論名 TEP はレポートに残す)
70
+ - PyPI: 配布名 **`grift-cli`**。本公開は別ゲート(未了ならソースから `pipx install .`)
71
+
72
+ ## License
73
+
74
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,130 @@
1
+ # Discriminant v2026.09 (repo scope)
2
+
3
+ Criteria: `docs/corpus-protocol.md` (registered `5f2665e`) plus WP4 A vs C.
4
+ No per-repo league table. reverse direction → kill.
5
+ Historical runs are kept below; they are not rewritten.
6
+
7
+ ## Run 2 (WP1b-4, 2026-08-22)
8
+
9
+ - ok rows: 47 (failures: 0)
10
+ - groups: A=22, B=7, C=11, D=7
11
+ - analysis_scope: repo (all rows)
12
+ - WP1b-1: `corrective_rework` is observational (not an evidence claim). The
13
+ comparison is retained as a diagnostic, not as a promotion criterion.
14
+
15
+ | comparison | verdict | n | gap | Cliff δ |
16
+ |---|---|---|---|---|
17
+ | test_cochange A vs D | inconclusive_small_n | 18/1 | None | None |
18
+ | test_cochange A vs C | separated | 18/7 | 0.2073 | 0.7143 |
19
+ | corrective_rework A vs C | fail_tier2 | 18/8 | -0.0541 | -0.7083 |
20
+
21
+ ```json
22
+ [
23
+ {
24
+ "metric": "test_cochange A vs D",
25
+ "verdict": "inconclusive_small_n",
26
+ "n_A": 18,
27
+ "n_other": 1
28
+ },
29
+ {
30
+ "metric": "test_cochange A vs C",
31
+ "verdict": "separated",
32
+ "median_A": 0.2379,
33
+ "median_other": 0.0306,
34
+ "gap": 0.2073,
35
+ "range_A": [
36
+ 0.1113,
37
+ 0.4964
38
+ ],
39
+ "range_other": [
40
+ 0.0,
41
+ 0.4154
42
+ ],
43
+ "contained": false,
44
+ "cliffs_delta": 0.7143,
45
+ "n_A": 18,
46
+ "n_other": 7
47
+ },
48
+ {
49
+ "metric": "corrective_rework A vs C",
50
+ "verdict": "fail_tier2",
51
+ "median_A": 0.0522,
52
+ "median_other": 0.1063,
53
+ "gap": -0.0541,
54
+ "range_A": [
55
+ 0.0,
56
+ 0.1499
57
+ ],
58
+ "range_other": [
59
+ 0.047,
60
+ 0.1971
61
+ ],
62
+ "contained": false,
63
+ "cliffs_delta": -0.7083,
64
+ "n_A": 18,
65
+ "n_other": 8
66
+ }
67
+ ]
68
+ ```
69
+
70
+ ## Run 1 (WP4, 2026-08-21) — historical, not overwritten
71
+
72
+ - ok rows: 31
73
+ - groups: A=9, B=7, C=8, D=7
74
+
75
+ | comparison | verdict | n | gap | Cliff δ |
76
+ |---|---|---|---|---|
77
+ | test_cochange A vs D | inconclusive_small_n | 8/1 | None | None |
78
+ | test_cochange A vs C | separated | 8/4 | 0.1609 | 1.0 |
79
+ | corrective_rework A vs C | fail_tier2 | 8/5 | -0.0345 | -0.6 |
80
+
81
+ corrective_rework 低 ≠ バグが少ない(fresh-work stability)。
82
+
83
+ ```json
84
+ [
85
+ {
86
+ "metric": "test_cochange A vs D",
87
+ "verdict": "inconclusive_small_n",
88
+ "n_A": 8,
89
+ "n_other": 1
90
+ },
91
+ {
92
+ "metric": "test_cochange A vs C",
93
+ "verdict": "separated",
94
+ "median_A": 0.1683,
95
+ "median_other": 0.0075,
96
+ "gap": 0.1609,
97
+ "range_A": [
98
+ 0.1113,
99
+ 0.4964
100
+ ],
101
+ "range_other": [
102
+ 0.0,
103
+ 0.0369
104
+ ],
105
+ "contained": false,
106
+ "cliffs_delta": 1.0,
107
+ "n_A": 8,
108
+ "n_other": 4
109
+ },
110
+ {
111
+ "metric": "corrective_rework A vs C",
112
+ "verdict": "fail_tier2",
113
+ "median_A": 0.0581,
114
+ "median_other": 0.0926,
115
+ "gap": -0.0345,
116
+ "range_A": [
117
+ 0.0,
118
+ 0.1063
119
+ ],
120
+ "range_other": [
121
+ 0.047,
122
+ 0.1951
123
+ ],
124
+ "contained": false,
125
+ "cliffs_delta": -0.6,
126
+ "n_A": 8,
127
+ "n_other": 5
128
+ }
129
+ ]
130
+ ```