grift-cli 0.5.0__tar.gz → 0.5.2__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.
Potentially problematic release.
This version of grift-cli might be problematic. Click here for more details.
- grift_cli-0.5.2/.github/workflows/kpi-monthly.yml +107 -0
- grift_cli-0.5.2/.github/workflows/publish-testpypi.yml +30 -0
- grift_cli-0.5.2/CHANGELOG.md +83 -0
- grift_cli-0.5.2/PKG-INFO +135 -0
- grift_cli-0.5.2/README.en.md +110 -0
- grift_cli-0.5.2/README.md +112 -0
- grift_cli-0.5.2/action.yml +78 -0
- grift_cli-0.5.2/corpus/AD-PILOT-20260822.md +34 -0
- grift_cli-0.5.2/corpus/DISCRIMINANT-v2026.11.md +35 -0
- grift_cli-0.5.2/corpus/ad-pilot.json +127 -0
- grift_cli-0.5.0/golden/pins.toml → grift_cli-0.5.2/corpus/manifest.toml +36 -18
- grift_cli-0.5.2/corpus/pins-v2026.11.toml +710 -0
- grift_cli-0.5.2/corpus/v2026.11/distributions.json +65 -0
- grift_cli-0.5.2/docs/coverage-map.md +35 -0
- grift_cli-0.5.2/docs/export-schema.md +127 -0
- grift_cli-0.5.2/docs/identity-schema.md +32 -0
- grift_cli-0.5.2/docs/norms.md +98 -0
- grift_cli-0.5.2/docs/persona-answers.md +168 -0
- grift_cli-0.5.2/docs/report-schema.md +164 -0
- grift_cli-0.5.2/golden/coverage.md +69 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/expected/G1-click.json +8 -1
- grift_cli-0.5.2/golden/expected/G10-scvi-tools.json +138 -0
- grift_cli-0.5.2/golden/expected/G11-kilo.json +131 -0
- grift_cli-0.5.2/golden/expected/G12-httpx.json +138 -0
- grift_cli-0.5.2/golden/expected/G13-voicevox.json +139 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/expected/G2-gitignore.json +1 -1
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/expected/G3-spoon-knife.json +1 -1
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/expected/G4-express.json +1 -1
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/expected/G5-typer.json +1 -1
- grift_cli-0.5.2/golden/expected/G6-claude-code.json +131 -0
- grift_cli-0.5.2/golden/expected/G7-axios.json +139 -0
- grift_cli-0.5.2/golden/expected/G8-co.json +138 -0
- grift_cli-0.5.2/golden/expected/G9-pyscript.json +131 -0
- grift_cli-0.5.2/golden/pins.toml +203 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/pyproject.toml +2 -1
- grift_cli-0.5.2/scripts/admission_v2026_11.py +163 -0
- grift_cli-0.5.2/scripts/build_dist_v2026_11.py +172 -0
- grift_cli-0.5.2/scripts/discriminant_v2026_11.py +162 -0
- grift_cli-0.5.2/scripts/gen_coverage_table.py +100 -0
- grift_cli-0.5.2/scripts/gen_golden_expected.py +95 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/scripts/hygiene_grep.py +2 -0
- grift_cli-0.5.2/src/tep_cli/__main__.py +336 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/analyze.py +43 -22
- grift_cli-0.5.2/src/tep_core/context_profile.py +351 -0
- grift_cli-0.5.2/src/tep_core/contribute.py +117 -0
- grift_cli-0.5.2/src/tep_core/data/v2026.09/distributions.json +110 -0
- grift_cli-0.5.2/src/tep_core/data/v2026.11/distributions.json +65 -0
- grift_cli-0.5.2/src/tep_core/export.py +220 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/identity.py +33 -1
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/reference.py +40 -9
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/report.py +76 -0
- grift_cli-0.5.2/src/tep_core/schema.py +543 -0
- grift_cli-0.5.2/src/tep_core/verify.py +133 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/version.py +3 -2
- grift_cli-0.5.2/tests/coverage_matrix.py +215 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_cli.py +1 -1
- grift_cli-0.5.2/tests/test_context_profile.py +177 -0
- grift_cli-0.5.2/tests/test_contribute.py +173 -0
- grift_cli-0.5.2/tests/test_coverage.py +93 -0
- grift_cli-0.5.2/tests/test_discriminant_claims.py +86 -0
- grift_cli-0.5.2/tests/test_export.py +352 -0
- grift_cli-0.5.2/tests/test_export_recipe.py +127 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_hygiene.py +15 -1
- grift_cli-0.5.2/tests/test_identity_validation.py +205 -0
- grift_cli-0.5.2/tests/test_lifecycle_v2.py +99 -0
- grift_cli-0.5.2/tests/test_persona_answers.py +136 -0
- grift_cli-0.5.2/tests/test_release_gate.py +72 -0
- grift_cli-0.5.2/tests/test_schema.py +146 -0
- grift_cli-0.5.2/tests/test_shared_block.py +119 -0
- grift_cli-0.5.2/tests/test_verify.py +156 -0
- grift_cli-0.5.0/CHANGELOG.md +0 -38
- grift_cli-0.5.0/PKG-INFO +0 -97
- grift_cli-0.5.0/README.en.md +0 -76
- grift_cli-0.5.0/README.md +0 -74
- grift_cli-0.5.0/docs/identity-schema.md +0 -14
- grift_cli-0.5.0/src/tep_cli/__main__.py +0 -146
- {grift_cli-0.5.0 → grift_cli-0.5.2}/.github/workflows/ci.yml +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/.github/workflows/publish.yml +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/.gitignore +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/LICENSE +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/corpus/DISCRIMINANT-v2026.09.md +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/corpus/pins-v2026.09.toml +0 -0
- {grift_cli-0.5.0/src/tep_core/data → grift_cli-0.5.2/corpus}/v2026.09/distributions.json +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/docs/corpus-protocol.md +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/README.md +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/identity/G1-click.toml +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/golden/identity/example.toml +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/scripts/build_distributions.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/scripts/check_forbidden_vocab.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/scripts/corpus_ad_pilot.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/scripts/corpus_run.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/scripts/discriminant_v2026.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_cli/__init__.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/__init__.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/activity.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/cochange.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/core_period.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/gitutil.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/lineage.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/observation.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/origin.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/paths.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/rework.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/scope.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/survival.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/src/tep_core/tests_observed.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/conftest.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/git_fixture.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_activity.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_cochange.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_forbidden_vocab.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_gitutil.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_golden.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_h5_swarm.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_not_observed.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_origin.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_report.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_rework.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_scope.py +0 -0
- {grift_cli-0.5.0 → grift_cli-0.5.2}/tests/test_survival.py +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
name: kpi-monthly
|
|
2
|
+
|
|
3
|
+
# 月初 00:00 UTC = 09:00 JST。直 push せず docs-only PR を開く。
|
|
4
|
+
# workflow_dispatch は default 枝にこのファイルが載ってから有効。
|
|
5
|
+
# pull_request は merge 前のスイープ試走専用(docs-only PR は作らない)。
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 0 1 * *"
|
|
9
|
+
pull_request:
|
|
10
|
+
paths:
|
|
11
|
+
- ".github/workflows/kpi-monthly.yml"
|
|
12
|
+
- "docs/kpi/kpi_sweep.py"
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
inputs:
|
|
15
|
+
note:
|
|
16
|
+
description: "KPI-LOG の note 欄"
|
|
17
|
+
required: false
|
|
18
|
+
default: "monthly"
|
|
19
|
+
create_pr:
|
|
20
|
+
description: "差分があれば docs-only PR を作る"
|
|
21
|
+
type: boolean
|
|
22
|
+
default: true
|
|
23
|
+
|
|
24
|
+
permissions:
|
|
25
|
+
contents: write
|
|
26
|
+
pull-requests: write
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
sweep:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- name: Run KPI sweep
|
|
35
|
+
env:
|
|
36
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
run: |
|
|
38
|
+
set -euo pipefail
|
|
39
|
+
note="${{ github.event.inputs.note }}"
|
|
40
|
+
if [ -z "$note" ]; then
|
|
41
|
+
note="monthly"
|
|
42
|
+
fi
|
|
43
|
+
line="$(python3 docs/kpi/kpi_sweep.py --append --note "$note")"
|
|
44
|
+
echo "$line"
|
|
45
|
+
{
|
|
46
|
+
echo "## KPI sweep"
|
|
47
|
+
echo ""
|
|
48
|
+
echo '```'
|
|
49
|
+
echo "$line"
|
|
50
|
+
echo '```'
|
|
51
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
52
|
+
|
|
53
|
+
- name: Open docs-only PR
|
|
54
|
+
if: github.event_name == 'schedule' || inputs.create_pr
|
|
55
|
+
env:
|
|
56
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
57
|
+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
58
|
+
run: |
|
|
59
|
+
set -euo pipefail
|
|
60
|
+
if git diff --quiet -- docs/kpi/KPI-LOG.md; then
|
|
61
|
+
echo "KPI-LOG.md unchanged; skip PR"
|
|
62
|
+
echo "KPI-LOG unchanged — PR skipped" >> "$GITHUB_STEP_SUMMARY"
|
|
63
|
+
exit 0
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
default_branch="${DEFAULT_BRANCH:-main}"
|
|
67
|
+
stamp="$(date -u +%Y-%m)"
|
|
68
|
+
head_branch="chore/kpi-monthly-${stamp}"
|
|
69
|
+
|
|
70
|
+
case "$head_branch" in
|
|
71
|
+
main|master|develop|"$default_branch")
|
|
72
|
+
echo "refusing protected branch name: $head_branch" >&2
|
|
73
|
+
exit 1
|
|
74
|
+
;;
|
|
75
|
+
esac
|
|
76
|
+
|
|
77
|
+
tmp="$(mktemp)"
|
|
78
|
+
cp docs/kpi/KPI-LOG.md "$tmp"
|
|
79
|
+
git fetch origin "$default_branch"
|
|
80
|
+
git switch -C "$head_branch" "origin/${default_branch}"
|
|
81
|
+
mkdir -p docs/kpi
|
|
82
|
+
cp "$tmp" docs/kpi/KPI-LOG.md
|
|
83
|
+
rm -f "$tmp"
|
|
84
|
+
|
|
85
|
+
git add docs/kpi/KPI-LOG.md
|
|
86
|
+
if git diff --cached --quiet; then
|
|
87
|
+
echo "no commit vs ${default_branch}"
|
|
88
|
+
exit 0
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
git config user.name "github-actions[bot]"
|
|
92
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
93
|
+
git commit -m "docs(kpi): ${stamp} の月次KPIを追記"
|
|
94
|
+
|
|
95
|
+
# 保護ブランチへは押さない。head は chore/kpi-monthly-* のみ。
|
|
96
|
+
git push -u origin "refs/heads/${head_branch}:refs/heads/${head_branch}"
|
|
97
|
+
|
|
98
|
+
existing="$(gh pr list --head "$head_branch" --base "$default_branch" --json number --jq '.[0].number // empty')"
|
|
99
|
+
if [ -n "$existing" ]; then
|
|
100
|
+
echo "PR #${existing} already open"
|
|
101
|
+
echo "Existing PR #${existing}" >> "$GITHUB_STEP_SUMMARY"
|
|
102
|
+
exit 0
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
gh pr create --base "$default_branch" --head "$head_branch" \
|
|
106
|
+
--title "docs(kpi): ${stamp} 月次KPIログ" \
|
|
107
|
+
--body "docs-only: KPI-LOG.md の月次追記。公開件数と統計のみ。main への直 push はしない。"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: publish-testpypi
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment: testpypi
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- name: Build
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --upgrade pip build
|
|
23
|
+
python -m build
|
|
24
|
+
- name: Publish to TestPyPI
|
|
25
|
+
env:
|
|
26
|
+
TWINE_USERNAME: __token__
|
|
27
|
+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install twine
|
|
30
|
+
python -m twine upload --repository testpypi dist/*
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
形式は [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/)。バージョンは SemVer。
|
|
4
|
+
|
|
5
|
+
タグ・PyPI・リポ public 化は本ファイルの記載対象外(人間ゲート)。
|
|
6
|
+
|
|
7
|
+
## [0.5.2] — 2026-08-23
|
|
8
|
+
|
|
9
|
+
基準の憲法(norms / reader's guide / verify)+ 文脈層(context_profile v2・lifecycle-v2)+ corpus v2026.11 + contribute。
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **norms.md v1**(7条 ja/en + 保持・削除条項): 「TEP 準拠」の使用条件を定義。README 日英からリンク
|
|
14
|
+
- **reader's guide**: 全 report.md 末尾に「この数値でしてはいけない判断」節を自動同梱(テンプレート固定・LLM 不使用)
|
|
15
|
+
- **`grift verify`**: report.json を記録 provenance で再計算し全フィールド突合(VERIFIED / MISMATCH / CANNOT_VERIFY・exit 0/1/2)。改ざん検出の反証テストつき
|
|
16
|
+
- **context_profile v2**(裁定 §4/§5): 16観測(collaboration_class / language_composition / dependency_manifests 等・定義版管理)。`resolved_human_actors` は bot・upstream 除外後の定義(push-copy fork 反証テストで上流混入排除を実証)
|
|
17
|
+
- **lifecycle-v2**(密度基準): 一次出力 = `days_since_last_human_commit` + `active_days_180d`(クラスに常に併記)。帯 dormant≤2 / maintained 3-11 / active≥12。informed-by-pilot-1 を開示。180日沈黙+直近1日 fixture の反証テスト
|
|
18
|
+
- **共有ブロック**(`shared_block`): report.md 冒頭に 3-5 行のコピペ要約(norms 1 行版つき)
|
|
19
|
+
- **`grift report`**: 既存 JSON から md を再レンダリング(再分析なし)
|
|
20
|
+
- **GitHub Action**(観測のみ): `grift-cli` ピン install → STEP_SUMMARY に共有ブロック・artifact upload・PR コメントは明示 opt-in のみ。action-dogfood で自リポ動作保証
|
|
21
|
+
- **`grift contribute`**: 明示的 opt-in 提出 payload 組み立て(repo スコープ集計 + context クラス級 + 定義版のみ。canonical_id/メール/パス/repo 名/activity は構造的除外)。**CLI は何も送信しない(7禁止⑦)**。F-C1: 非 TTY + `--yes` なしは exit 2 で拒否・`--yes` でも開示文 + payload 全文表示(同意の痕跡)
|
|
22
|
+
- **corpus v2026.11**: admission 70 件(C33/D29/B8・narratable は機械実測で C=14/D=14 — 目標 30 に対する不足を逐語記録)。分布 test co-change n=68 / corrective n=101(deciles 収録・values 非同梱)。層別は active n=34 のみ発行・他は `context_stratum_too_small`
|
|
23
|
+
- `docs/coverage-map.md`(21問→観測の表)・`docs/persona-answers.md` 判別引用更新・`--reference-version`(旧 v2026.09 は不変で選択可能)
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- README 日英の判別節を v2026.11 逐語へ全面更新: **A vs D separated(δ=0.9198)を筆頭に、A vs C は fail_tier2 に転回**(基準 5f2665e 不変・転回をそのまま公開)。旧 separated 根拠の残存 0 を CI が機械強制
|
|
28
|
+
- CLI 既定の参照分布を v2026.11 に
|
|
29
|
+
|
|
30
|
+
## [0.5.1] — 2026-08-22
|
|
31
|
+
|
|
32
|
+
WP-P1e 二層契約 + Golden v2 第1波。Grift 本体統合(WP-G1)の unblock マイルストーン。
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- export-v1(`--export <dir>`・opt-in): commits.ndjson / actors.json / export-meta.json。生メール・生 author 文字列ゼロ出力。per-actor 品質指標は恒久禁止(`docs/export-schema.md`)
|
|
37
|
+
- `docs/report-schema.md`: report-v1 凍結(追加互換)・純stdlib検証器 `tep_core.schema.validate_report`
|
|
38
|
+
- golden G6〜G13 増設(計13本・上限内): AI共著(claude-code)・引き継ぎ(axios)・dormant(co)・polyglot(pyscript)・テンプレ派生(scvi-tools)・solo(kilo)・founder(httpx)・日本語圏(voicevox)
|
|
39
|
+
- `golden/coverage.md` カバレッジ行列 + HOLE 機械検出(issue 紐付け強制)
|
|
40
|
+
- `docs/persona-answers.md`: 敵対レビュー21問の実数値実演集(転記数値は CI が golden 期待値と機械突合)
|
|
41
|
+
- パリティ検算レシピ(export-schema.md)+ 逐語実行テスト
|
|
42
|
+
- 終了コードと stdout 純度規約(README 日英)
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- F-P10-3: identity loader が空・@含有・重複 canonical_id を受理し生メールが export に漏れる producer gap を修正。`CANONICAL_ID_PATTERN`(`^[a-z0-9][a-z0-9._-]{0,63}$`・版管理)で `IdentityValidationError`(CLI は exit 2・export 未書き出し)。schema 文書と実装は逐語一致テストで固定。性質テスト「exit 0 ⇒ export 内 `@` 0 バイト」
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- `schema_version` を `tep-report-v1` から `report-v1` へ改名(凍結前の最後の変更)
|
|
51
|
+
|
|
52
|
+
## [0.5.0] — 2026-08-22
|
|
53
|
+
|
|
54
|
+
定義Bの節目(`--scope`・参照分布 v2026.09・解釈層)。行レベル rework は v0.6 予約のまま。
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- `--scope tenant|repo`。tenant は証拠、repo はプロセス観測と参照分布。混ぜると `ScopeMismatchError`
|
|
59
|
+
- 参照分布 v2026.09(repo スコープ)。n<30 の指標は位置を出さない
|
|
60
|
+
- survival(`--survival`、τ=180日)。参照分布は v2027 予定
|
|
61
|
+
- 公開コーパス pin(A/B/C/D、SHA 固定)。リーグテーブルは同梱しない
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- `corrective_rework_rate` を evidence_claim から観測専用へ降格(件名規約依存の交絡)
|
|
66
|
+
- git log の非 UTF-8 を `errors="replace"` で落とさない
|
|
67
|
+
- コマンド名を `grift` に確定(method=TEP / tool=grift)。旧 `tep` エントリは置かない
|
|
68
|
+
- PyPI 配布名を `grift-cli` に確定(公開操作は人間ゲート)
|
|
69
|
+
- H-5: 母数<20 では ratio と十分位を両方出さない(`insufficient_population`、件数の生表示のみ)
|
|
70
|
+
|
|
71
|
+
### Discriminant (verbatim from `corpus/DISCRIMINANT-v2026.09.md` Run 2)
|
|
72
|
+
|
|
73
|
+
- `test_cochange A vs D` → `inconclusive_small_n`
|
|
74
|
+
- `test_cochange A vs C` → `separated`
|
|
75
|
+
- `corrective_rework A vs C` → `fail_tier2`
|
|
76
|
+
|
|
77
|
+
## [0.1.1] — 2026-08-22
|
|
78
|
+
|
|
79
|
+
origin 語彙の P0 修正(検収合格 SHA `e954b16`)。ローカルタグ `v0.1.1` は未 push。v0.5.0 に一本化するかは代表判断。
|
|
80
|
+
|
|
81
|
+
## [0.1.0] — 2026-08-21
|
|
82
|
+
|
|
83
|
+
origin / activity の決定論的レポート。ゴールデン G1–G5。LLM なし。
|
grift_cli-0.5.2/PKG-INFO
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: grift-cli
|
|
3
|
+
Version: 0.5.2
|
|
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
|
+
## 利用規範(norms)
|
|
34
|
+
|
|
35
|
+
「TEP 準拠」を名乗る利用の条件を [docs/norms.md](docs/norms.md) に定める(不在を負に読まない・単独足切り禁止・申告を負に読まない・同意なき第三者プロファイリング禁止・監視転用非準拠・選択性の明示・重み付け禁止の7条・日英併記)。**本規範への適合を「TEP」の名の使用条件とする。**
|
|
36
|
+
|
|
37
|
+
コミット数・行数・「活動量」は、エージェントと生成コードの時代に簡単に膨らむ。grift は git だけから、TEP の帰属(誰の仕事か)と検証層(test co-change ほか)を**決定論的に**出す。LLM は使わない。合成スコアも等級語彙も出さない。
|
|
38
|
+
|
|
39
|
+
## 5分で始める
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pipx install grift-cli
|
|
43
|
+
grift analyze ./my-repo --scope repo
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- `--scope tenant`(既定): `.tep/identity.toml` に載った人の仕事 = **証拠用**
|
|
47
|
+
- `--scope repo`: bot 以外の全人間コミット = **プロセス観測・参照分布用**
|
|
48
|
+
|
|
49
|
+
参照分布 v2026.09 は **repo スコープ同士**でのみ照合する。tenant の値を repo 分布に載せない(混ぜたら分布が嘘になる)。
|
|
50
|
+
|
|
51
|
+
## 実レポート例
|
|
52
|
+
|
|
53
|
+
自リポで `grift analyze . --format md` を実行する。各数値に単位と provenance(method=TEP・tool=grift・定義版・分析 SHA・`analysis_scope`)が付く。
|
|
54
|
+
|
|
55
|
+
## 終了コードと stdout / stderr 規約
|
|
56
|
+
|
|
57
|
+
| 終了コード | 意味 |
|
|
58
|
+
|---|---|
|
|
59
|
+
| 0 | 成功 |
|
|
60
|
+
| 2 | 使用法エラー、または指定パスが git リポジトリでない |
|
|
61
|
+
| 1 | その他の予期しない失敗(詳細は stderr) |
|
|
62
|
+
|
|
63
|
+
`--format json` の stdout は **JSON 1 件のみ**(機械消費向けの純度保証)。`--format md` は markdown のみ、`--format both` は markdown → 空行 → JSON の順。診断とエラーは常に stderr。`--out DIR` を使っても stdout 規約は変わらない(`report.md` / `report.json` の追記のみ)。
|
|
64
|
+
|
|
65
|
+
report.json の全フィールド定義は [docs/report-schema.md](docs/report-schema.md)(schema `report-v1`・凍結済み・追加互換)。
|
|
66
|
+
|
|
67
|
+
## 機械取込用 export(opt-in)
|
|
68
|
+
|
|
69
|
+
`grift analyze <repo> --export <dir>` で commits.ndjson(1行=1コミット・origin/actor/cochange)・actors.json(canonical_id ごとの帰属と活動)・export-meta.json(`config_digest` つき)を書く。**生メールアドレス・生 author 文字列は一切出力しない**。顧客向け叙述に載る数値は report.json の集計値が正。詳細は [docs/export-schema.md](docs/export-schema.md)。
|
|
70
|
+
|
|
71
|
+
## データ提出(grift contribute・明示的 opt-in)
|
|
72
|
+
|
|
73
|
+
`grift contribute <repo-scopeのreport.json> --out contribution.json` は **TEP Report 集計と参照分布 vNext** への提出 payload を組み立てる。**CLI は何も送信しない(自動送信は恒久禁止)** — payload 全文を表示し、「この提出は公開リポジトリに載る」ことを明示した上で、提出はあなた自身が PR で行う。payload は repo スコープ集計値 + context_profile(クラス級)+ 定義版のみで、canonical_id・メール・パス・repo 名・tenant スコープ値は含まない(`docs/norms.md` 保持・削除条項参照)。
|
|
74
|
+
|
|
75
|
+
例(click、tenant スコープ。ゴールデン G1):
|
|
76
|
+
|
|
77
|
+
- test co-change: 0.2664 ratio(73 of 274)
|
|
78
|
+
- corrective rework: 0.0109 ratio(3 of 274)— 観測値。証拠主張ではない
|
|
79
|
+
- path retouch: 0.573 ratio — 観測のみ
|
|
80
|
+
|
|
81
|
+
母数 20 未満では率も分布位置も出さない(`insufficient_population`。件数の生表示のみ)。
|
|
82
|
+
|
|
83
|
+
## 指標と限界
|
|
84
|
+
|
|
85
|
+
| 指標 | 何の証拠か | 限界 |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| origin / 帰属 | 誰の仕事か | identity 未設定は unresolved。Cor 実メールは同梱しない |
|
|
88
|
+
| test co-change | 本番変更にテストが伴うか | テスト基盤なしは not_observed。母数<20 は率も十分位も出さない(`insufficient_population`) |
|
|
89
|
+
| corrective rework | 件名が fix/revert の直近パス回帰(観測) | **証拠主張から降格**。件名規約依存の交絡あり。バグ件数ではない。再挑戦は v0.6 行レベル |
|
|
90
|
+
| path retouch | 同一ファイル再接触 | 観測のみ。証拠主張に使わない |
|
|
91
|
+
| survival (τ=180d) | 行の残り方 | `--survival` のみ。参照分布は **v2027 予定**。今回の公開分布には含めない |
|
|
92
|
+
|
|
93
|
+
参照位置は「第N十分位」の1行だけ。n<30 の指標は位置を出さない(`reference_too_small`)。現行 v2026.11 の観測 n: test co-change 68 / corrective rework 101(観測)/ survival 0(v2027 予定)。旧 v2026.09 は不変のまま `--reference-version` で選択可能。
|
|
94
|
+
|
|
95
|
+
## 判別力の現況(repo スコープ・基準 `5f2665e`)
|
|
96
|
+
|
|
97
|
+
出典: `corpus/DISCRIMINANT-v2026.11.md`(n=117・v2026.09 全行 + v2026.11 admission 70 件)。verdict はファイルから逐語。
|
|
98
|
+
|
|
99
|
+
- `test_cochange A vs D` → `separated`(median_A 0.2379, median_other 0.0718, gap 0.1661, Cliff δ 0.9198, n 18/18)— **初めて n が立った分離**。「量は誰でも作れる」テーゼの最初の強い実証
|
|
100
|
+
- `test_cochange A vs C` → `fail_tier2`(median_A 0.2379, median_other 0.0769, gap 0.161, Cliff δ 0.291, n 18/21)— v2026.09 では `separated`(δ 0.7143)だったが、C 群が「tests を持つ AI 駆動 repo」に広がり分離が低下。**登録済み基準は下げず転回をそのまま公開する**
|
|
101
|
+
- `corrective_rework A vs C / A vs D` → 方向要件なし(観測専用・v0.5.0 から不変)。A vs C δ -0.8333 / A vs D δ 0.0139
|
|
102
|
+
- 母数の正直な記録: C narratable = 14(目標 30 に不足・admission 実測で訂正)/ D total 29(目標 20 達成)
|
|
103
|
+
- survival: 参照分布は v2027 予定
|
|
104
|
+
|
|
105
|
+
v2026.09 の記録(Run 2: A vs C `separated` ほか)は `corpus/DISCRIMINANT-v2026.09.md` に履歴として残してある。
|
|
106
|
+
|
|
107
|
+
## GitHub Action(観測のみ)
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
uses: Cor-Incorporated/grift-cli@v0.5.1
|
|
111
|
+
with:
|
|
112
|
+
scope: repo
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
- `grift analyze` を実行し、**$GITHUB_STEP_SUMMARY に共有ブロック**を出力、report.md / report.json を artifact に upload
|
|
116
|
+
- **合否・閾値・fail は実装しない**(観測のみ・ゲート化は恒久にしない)
|
|
117
|
+
- PR コメント投稿は `comment: true` の明示オプトインのみ(既定 off)
|
|
118
|
+
- permissions は最小限(`contents: read` を推奨。`comment: true` のみ `pull-requests: write` が必要)
|
|
119
|
+
|
|
120
|
+
## 倫理
|
|
121
|
+
|
|
122
|
+
- 実在個人のスコアカード・順位表は公開も内部共有も禁止
|
|
123
|
+
- 等級語彙(シニア/ジュニア/素晴らしい)を出さない
|
|
124
|
+
- コーパスの manifest(リポ名+SHA)は再現用に公開してよい。**個別リポ値のリーグテーブルは公開しない**
|
|
125
|
+
- 対照群 E(私的 ground truth)はこのリポに入れない
|
|
126
|
+
|
|
127
|
+
## 公開状態
|
|
128
|
+
|
|
129
|
+
- 公開リポ: https://github.com/Cor-Incorporated/grift-cli
|
|
130
|
+
- コマンド名: **`grift`**(方法論名 TEP はレポートに残す)
|
|
131
|
+
- PyPI: 配布名 **`grift-cli`**。本公開は別ゲート(未了ならソースから `pipx install .`)
|
|
132
|
+
|
|
133
|
+
## License
|
|
134
|
+
|
|
135
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
## Usage norms
|
|
11
|
+
|
|
12
|
+
The conditions for calling a use "TEP-compliant" are defined in [docs/norms.md](docs/norms.md) (seven articles, JA/EN: do not read absence as negative; no single-metric cutoffs; do not read AI declaration as negative; no third-party profiling without consent; surveillance use is non-compliant; disclose selectivity; no weighting or conversion). **Compliance with these norms is a condition of using the TEP name.**
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
## Start in five minutes
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pipx install grift-cli
|
|
20
|
+
grift analyze ./my-repo --scope repo
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If the package is not on PyPI yet: `pipx install .`
|
|
24
|
+
|
|
25
|
+
- `--scope tenant` (default): work matched in `.tep/identity.toml` = **evidence**
|
|
26
|
+
- `--scope repo`: all non-bot human commits = **process observation and reference distributions**
|
|
27
|
+
|
|
28
|
+
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).
|
|
29
|
+
|
|
30
|
+
## Example report
|
|
31
|
+
|
|
32
|
+
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`).
|
|
33
|
+
|
|
34
|
+
Example (click, tenant scope, golden G1):
|
|
35
|
+
|
|
36
|
+
- test co-change: 0.2664 ratio (73 of 274)
|
|
37
|
+
- corrective rework: 0.0109 ratio (3 of 274) — observational; not an evidence claim
|
|
38
|
+
- path retouch: 0.573 ratio — observational only
|
|
39
|
+
|
|
40
|
+
Below population 20, neither the rate nor a distribution position is shown (`insufficient_population`; raw counts only).
|
|
41
|
+
|
|
42
|
+
## Exit codes and stdout / stderr contract
|
|
43
|
+
|
|
44
|
+
| Exit code | Meaning |
|
|
45
|
+
|---|---|
|
|
46
|
+
| 0 | success |
|
|
47
|
+
| 2 | usage error, or the given path is not a git repository |
|
|
48
|
+
| 1 | any other unexpected failure (details on stderr) |
|
|
49
|
+
|
|
50
|
+
With `--format json`, stdout is **exactly one JSON document** (purity guarantee for machine consumption). `--format md` writes markdown only; `--format both` writes markdown, a blank line, then JSON. Diagnostics and errors always go to stderr. `--out DIR` does not change the stdout contract (it additionally writes `report.md` / `report.json`).
|
|
51
|
+
|
|
52
|
+
The full field-by-field definition of report.json lives in [docs/report-schema.md](docs/report-schema.md) (schema `report-v1`, frozen, additive-only).
|
|
53
|
+
|
|
54
|
+
## Machine ingestion export (opt-in)
|
|
55
|
+
|
|
56
|
+
`grift analyze <repo> --export <dir>` writes commits.ndjson (one row per commit: origin / actor / cochange), actors.json (attribution and engagement per canonical_id), and export-meta.json (with `config_digest`). **No raw emails or author strings are ever exported.** Aggregates in report.json remain authoritative for narrative. Details: [docs/export-schema.md](docs/export-schema.md).
|
|
57
|
+
|
|
58
|
+
## Metrics and limits
|
|
59
|
+
|
|
60
|
+
| Metric | What it is evidence of | Limit |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| origin / attribution | whose work | unset identity → unresolved. Real tenant emails are not shipped |
|
|
63
|
+
| test co-change | whether production changes came with tests | no test substrate → `not_observed`. population < 20 → no rate and no decile (`insufficient_population`) |
|
|
64
|
+
| 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 |
|
|
65
|
+
| path retouch | same-file re-touch | observational only. not an evidence claim |
|
|
66
|
+
| survival (τ=180d) | whether lines remain | `--survival` only. reference distribution planned for **v2027**. not in this public distribution |
|
|
67
|
+
|
|
68
|
+
Reference position is a single “decile N” line. Metrics with n<30 omit position (`reference_too_small`). Current v2026.11 measured n: test co-change 68 / corrective rework 101 (observational) / survival 0 (planned for v2027). The older v2026.09 stays immutable and selectable via `--reference-version`.
|
|
69
|
+
|
|
70
|
+
## Discriminatory power (repo scope, criteria `5f2665e`)
|
|
71
|
+
|
|
72
|
+
Source: `corpus/DISCRIMINANT-v2026.11.md` (n=117: all v2026.09 rows + 70 v2026.11 admissions). Verdicts copied **verbatim** from the file.
|
|
73
|
+
|
|
74
|
+
- `test_cochange A vs D` → `separated` (median_A 0.2379, median_other 0.0718, gap 0.1661, Cliff δ 0.9198, n 18/18) — **first separation with a standing n**; the first strong evidence for the "anyone can produce volume" thesis
|
|
75
|
+
- `test_cochange A vs C` → `fail_tier2` (median_A 0.2379, median_other 0.0769, gap 0.161, Cliff δ 0.291, n 18/21) — was `separated` in v2026.09 (δ 0.7143), but the grown C pool (AI-driven repos WITH tests) reduced the separation. **The registered criteria were not lowered; the reversal is published as-is**
|
|
76
|
+
- `corrective_rework A vs C / A vs D` → no required direction (observational only, unchanged since v0.5.0). A vs C δ -0.8333 / A vs D δ 0.0139
|
|
77
|
+
- Honest population note: C narratable = 14 (short of the 30 target, corrected by machine-verified admission) / D total 29 (target 20 met)
|
|
78
|
+
- survival: reference distribution planned for v2027
|
|
79
|
+
|
|
80
|
+
The v2026.09 record (Run 2: A vs C `separated` etc.) remains as history in `corpus/DISCRIMINANT-v2026.09.md`.
|
|
81
|
+
|
|
82
|
+
## GitHub Action (observation only)
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
uses: Cor-Incorporated/grift-cli@v0.5.1
|
|
86
|
+
with:
|
|
87
|
+
scope: repo
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- Runs `grift analyze`, prints the **shared block to $GITHUB_STEP_SUMMARY**, and uploads report.md / report.json as artifacts
|
|
91
|
+
- **No pass/fail, no thresholds, no failure exit — observation only, permanently**
|
|
92
|
+
- PR comment requires explicit opt-in (`comment: true`, default off)
|
|
93
|
+
- Minimal permissions recommended (`contents: read`; `pull-requests: write` only when `comment: true`)
|
|
94
|
+
|
|
95
|
+
## Ethics
|
|
96
|
+
|
|
97
|
+
- Named-person scorecards and league tables are forbidden, publicly and internally
|
|
98
|
+
- Do not emit skill-rank labels (senior / junior / “excellent”)
|
|
99
|
+
- Corpus manifests (repo name + SHA) may be published for reproduction. **Per-repo value league tables are not published**
|
|
100
|
+
- Control group E (private ground truth) is not in this repository
|
|
101
|
+
|
|
102
|
+
## Status
|
|
103
|
+
|
|
104
|
+
- Public repository: https://github.com/Cor-Incorporated/grift-cli
|
|
105
|
+
- Command name: **`grift`** (methodology name TEP remains on reports)
|
|
106
|
+
- PyPI: distribution name **`grift-cli`**. Publishing is a separate human gate (until then, `pipx install .`)
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
## 利用規範(norms)
|
|
11
|
+
|
|
12
|
+
「TEP 準拠」を名乗る利用の条件を [docs/norms.md](docs/norms.md) に定める(不在を負に読まない・単独足切り禁止・申告を負に読まない・同意なき第三者プロファイリング禁止・監視転用非準拠・選択性の明示・重み付け禁止の7条・日英併記)。**本規範への適合を「TEP」の名の使用条件とする。**
|
|
13
|
+
|
|
14
|
+
コミット数・行数・「活動量」は、エージェントと生成コードの時代に簡単に膨らむ。grift は git だけから、TEP の帰属(誰の仕事か)と検証層(test co-change ほか)を**決定論的に**出す。LLM は使わない。合成スコアも等級語彙も出さない。
|
|
15
|
+
|
|
16
|
+
## 5分で始める
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pipx install grift-cli
|
|
20
|
+
grift analyze ./my-repo --scope repo
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `--scope tenant`(既定): `.tep/identity.toml` に載った人の仕事 = **証拠用**
|
|
24
|
+
- `--scope repo`: bot 以外の全人間コミット = **プロセス観測・参照分布用**
|
|
25
|
+
|
|
26
|
+
参照分布 v2026.09 は **repo スコープ同士**でのみ照合する。tenant の値を repo 分布に載せない(混ぜたら分布が嘘になる)。
|
|
27
|
+
|
|
28
|
+
## 実レポート例
|
|
29
|
+
|
|
30
|
+
自リポで `grift analyze . --format md` を実行する。各数値に単位と provenance(method=TEP・tool=grift・定義版・分析 SHA・`analysis_scope`)が付く。
|
|
31
|
+
|
|
32
|
+
## 終了コードと stdout / stderr 規約
|
|
33
|
+
|
|
34
|
+
| 終了コード | 意味 |
|
|
35
|
+
|---|---|
|
|
36
|
+
| 0 | 成功 |
|
|
37
|
+
| 2 | 使用法エラー、または指定パスが git リポジトリでない |
|
|
38
|
+
| 1 | その他の予期しない失敗(詳細は stderr) |
|
|
39
|
+
|
|
40
|
+
`--format json` の stdout は **JSON 1 件のみ**(機械消費向けの純度保証)。`--format md` は markdown のみ、`--format both` は markdown → 空行 → JSON の順。診断とエラーは常に stderr。`--out DIR` を使っても stdout 規約は変わらない(`report.md` / `report.json` の追記のみ)。
|
|
41
|
+
|
|
42
|
+
report.json の全フィールド定義は [docs/report-schema.md](docs/report-schema.md)(schema `report-v1`・凍結済み・追加互換)。
|
|
43
|
+
|
|
44
|
+
## 機械取込用 export(opt-in)
|
|
45
|
+
|
|
46
|
+
`grift analyze <repo> --export <dir>` で commits.ndjson(1行=1コミット・origin/actor/cochange)・actors.json(canonical_id ごとの帰属と活動)・export-meta.json(`config_digest` つき)を書く。**生メールアドレス・生 author 文字列は一切出力しない**。顧客向け叙述に載る数値は report.json の集計値が正。詳細は [docs/export-schema.md](docs/export-schema.md)。
|
|
47
|
+
|
|
48
|
+
## データ提出(grift contribute・明示的 opt-in)
|
|
49
|
+
|
|
50
|
+
`grift contribute <repo-scopeのreport.json> --out contribution.json` は **TEP Report 集計と参照分布 vNext** への提出 payload を組み立てる。**CLI は何も送信しない(自動送信は恒久禁止)** — payload 全文を表示し、「この提出は公開リポジトリに載る」ことを明示した上で、提出はあなた自身が PR で行う。payload は repo スコープ集計値 + context_profile(クラス級)+ 定義版のみで、canonical_id・メール・パス・repo 名・tenant スコープ値は含まない(`docs/norms.md` 保持・削除条項参照)。
|
|
51
|
+
|
|
52
|
+
例(click、tenant スコープ。ゴールデン G1):
|
|
53
|
+
|
|
54
|
+
- test co-change: 0.2664 ratio(73 of 274)
|
|
55
|
+
- corrective rework: 0.0109 ratio(3 of 274)— 観測値。証拠主張ではない
|
|
56
|
+
- path retouch: 0.573 ratio — 観測のみ
|
|
57
|
+
|
|
58
|
+
母数 20 未満では率も分布位置も出さない(`insufficient_population`。件数の生表示のみ)。
|
|
59
|
+
|
|
60
|
+
## 指標と限界
|
|
61
|
+
|
|
62
|
+
| 指標 | 何の証拠か | 限界 |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| origin / 帰属 | 誰の仕事か | identity 未設定は unresolved。Cor 実メールは同梱しない |
|
|
65
|
+
| test co-change | 本番変更にテストが伴うか | テスト基盤なしは not_observed。母数<20 は率も十分位も出さない(`insufficient_population`) |
|
|
66
|
+
| corrective rework | 件名が fix/revert の直近パス回帰(観測) | **証拠主張から降格**。件名規約依存の交絡あり。バグ件数ではない。再挑戦は v0.6 行レベル |
|
|
67
|
+
| path retouch | 同一ファイル再接触 | 観測のみ。証拠主張に使わない |
|
|
68
|
+
| survival (τ=180d) | 行の残り方 | `--survival` のみ。参照分布は **v2027 予定**。今回の公開分布には含めない |
|
|
69
|
+
|
|
70
|
+
参照位置は「第N十分位」の1行だけ。n<30 の指標は位置を出さない(`reference_too_small`)。現行 v2026.11 の観測 n: test co-change 68 / corrective rework 101(観測)/ survival 0(v2027 予定)。旧 v2026.09 は不変のまま `--reference-version` で選択可能。
|
|
71
|
+
|
|
72
|
+
## 判別力の現況(repo スコープ・基準 `5f2665e`)
|
|
73
|
+
|
|
74
|
+
出典: `corpus/DISCRIMINANT-v2026.11.md`(n=117・v2026.09 全行 + v2026.11 admission 70 件)。verdict はファイルから逐語。
|
|
75
|
+
|
|
76
|
+
- `test_cochange A vs D` → `separated`(median_A 0.2379, median_other 0.0718, gap 0.1661, Cliff δ 0.9198, n 18/18)— **初めて n が立った分離**。「量は誰でも作れる」テーゼの最初の強い実証
|
|
77
|
+
- `test_cochange A vs C` → `fail_tier2`(median_A 0.2379, median_other 0.0769, gap 0.161, Cliff δ 0.291, n 18/21)— v2026.09 では `separated`(δ 0.7143)だったが、C 群が「tests を持つ AI 駆動 repo」に広がり分離が低下。**登録済み基準は下げず転回をそのまま公開する**
|
|
78
|
+
- `corrective_rework A vs C / A vs D` → 方向要件なし(観測専用・v0.5.0 から不変)。A vs C δ -0.8333 / A vs D δ 0.0139
|
|
79
|
+
- 母数の正直な記録: C narratable = 14(目標 30 に不足・admission 実測で訂正)/ D total 29(目標 20 達成)
|
|
80
|
+
- survival: 参照分布は v2027 予定
|
|
81
|
+
|
|
82
|
+
v2026.09 の記録(Run 2: A vs C `separated` ほか)は `corpus/DISCRIMINANT-v2026.09.md` に履歴として残してある。
|
|
83
|
+
|
|
84
|
+
## GitHub Action(観測のみ)
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
uses: Cor-Incorporated/grift-cli@v0.5.1
|
|
88
|
+
with:
|
|
89
|
+
scope: repo
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
- `grift analyze` を実行し、**$GITHUB_STEP_SUMMARY に共有ブロック**を出力、report.md / report.json を artifact に upload
|
|
93
|
+
- **合否・閾値・fail は実装しない**(観測のみ・ゲート化は恒久にしない)
|
|
94
|
+
- PR コメント投稿は `comment: true` の明示オプトインのみ(既定 off)
|
|
95
|
+
- permissions は最小限(`contents: read` を推奨。`comment: true` のみ `pull-requests: write` が必要)
|
|
96
|
+
|
|
97
|
+
## 倫理
|
|
98
|
+
|
|
99
|
+
- 実在個人のスコアカード・順位表は公開も内部共有も禁止
|
|
100
|
+
- 等級語彙(シニア/ジュニア/素晴らしい)を出さない
|
|
101
|
+
- コーパスの manifest(リポ名+SHA)は再現用に公開してよい。**個別リポ値のリーグテーブルは公開しない**
|
|
102
|
+
- 対照群 E(私的 ground truth)はこのリポに入れない
|
|
103
|
+
|
|
104
|
+
## 公開状態
|
|
105
|
+
|
|
106
|
+
- 公開リポ: https://github.com/Cor-Incorporated/grift-cli
|
|
107
|
+
- コマンド名: **`grift`**(方法論名 TEP はレポートに残す)
|
|
108
|
+
- PyPI: 配布名 **`grift-cli`**。本公開は別ゲート(未了ならソースから `pipx install .`)
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: "grift TEP analysis (observation only)"
|
|
2
|
+
description: >-
|
|
3
|
+
Deterministic TEP evidence metrics from a git repository. Observation
|
|
4
|
+
only: no pass/fail gates, no thresholds, no ranking labels. Outputs the
|
|
5
|
+
shared block to the job step summary and uploads report artifacts.
|
|
6
|
+
|
|
7
|
+
branding:
|
|
8
|
+
icon: "search"
|
|
9
|
+
color: "blue"
|
|
10
|
+
|
|
11
|
+
inputs:
|
|
12
|
+
scope:
|
|
13
|
+
description: "Analysis scope: tenant (identity-matched evidence) or repo (all human commits — reference distribution)"
|
|
14
|
+
required: false
|
|
15
|
+
default: "repo"
|
|
16
|
+
version:
|
|
17
|
+
description: "grift-cli version to install (pinned)"
|
|
18
|
+
required: false
|
|
19
|
+
default: "0.5.1"
|
|
20
|
+
comment:
|
|
21
|
+
description: "Opt-in: post the shared block as a PR comment (default off)"
|
|
22
|
+
required: false
|
|
23
|
+
default: "false"
|
|
24
|
+
|
|
25
|
+
runs:
|
|
26
|
+
using: "composite"
|
|
27
|
+
steps:
|
|
28
|
+
- name: Install grift-cli (pinned)
|
|
29
|
+
shell: bash
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --no-input "grift-cli==${{ inputs.version }}"
|
|
32
|
+
|
|
33
|
+
- name: Run grift analyze (observation only)
|
|
34
|
+
shell: bash
|
|
35
|
+
env:
|
|
36
|
+
GRIFT_SCOPE: ${{ inputs.scope }}
|
|
37
|
+
run: |
|
|
38
|
+
set -euo pipefail
|
|
39
|
+
mkdir -p .grift-out
|
|
40
|
+
grift analyze . --scope "$GRIFT_SCOPE" --format both --out .grift-out
|
|
41
|
+
# Shared block = the copy-pasteable summary section of report.md.
|
|
42
|
+
# Extract from '## Shared block' to the next '## ' heading.
|
|
43
|
+
awk '/^## Shared block/{flag=1;next}/^## /{flag=0}flag' .grift-out/report.md > .grift-out/shared-block.md
|
|
44
|
+
cat .grift-out/shared-block.md >> "$GITHUB_STEP_SUMMARY"
|
|
45
|
+
{
|
|
46
|
+
echo "### grift (observation only — no pass/fail)"
|
|
47
|
+
echo '```'
|
|
48
|
+
cat .grift-out/shared-block.md
|
|
49
|
+
echo '```'
|
|
50
|
+
echo "_読み方: 本レポートは証拠であり判定ではない(TEP norms 参照: https://github.com/Cor-Incorporated/grift-cli/blob/main/docs/norms.md)_"
|
|
51
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
52
|
+
|
|
53
|
+
- name: Upload reports
|
|
54
|
+
uses: actions/upload-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: grift-report
|
|
57
|
+
path: .grift-out/
|
|
58
|
+
retention-days: 30
|
|
59
|
+
|
|
60
|
+
- name: Post PR comment (explicit opt-in only)
|
|
61
|
+
if: ${{ inputs.comment == 'true' && github.event_name == 'pull_request' }}
|
|
62
|
+
uses: actions/github-script@v7
|
|
63
|
+
with:
|
|
64
|
+
script: |
|
|
65
|
+
const fs = require('fs');
|
|
66
|
+
const body = [
|
|
67
|
+
'### grift (observation only — no pass/fail)',
|
|
68
|
+
'```',
|
|
69
|
+
fs.readFileSync('.grift-out/shared-block.md', 'utf8').trim(),
|
|
70
|
+
'```',
|
|
71
|
+
'_読み方: 本レポートは証拠であり判定ではない(TEP norms 参照)_'
|
|
72
|
+
].join('\n');
|
|
73
|
+
await github.rest.issues.createComment({
|
|
74
|
+
owner: context.repo.owner,
|
|
75
|
+
repo: context.repo.repo,
|
|
76
|
+
issue_number: context.issue.number,
|
|
77
|
+
body,
|
|
78
|
+
});
|