github-task-protocol 1.0.1__tar.gz → 1.0.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.
Files changed (87) hide show
  1. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/DECISIONS.md +189 -0
  2. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/GTP.md +16 -3
  3. github-task-protocol-1.0.2/PKG-INFO +117 -0
  4. github-task-protocol-1.0.2/README.md +107 -0
  5. github-task-protocol-1.0.2/acceptance/explicit-setup-install/delivery.json +70 -0
  6. github-task-protocol-1.0.2/acceptance/explicit-setup-install/run.json +145 -0
  7. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/legacy/v1.0.0/v1.0.0.json +0 -5
  8. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level1/README.md +4 -1
  9. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level1/run.json +18 -0
  10. github-task-protocol-1.0.2/acceptance/level1/stdout/current-done.txt +41 -0
  11. github-task-protocol-1.0.2/acceptance/pr-snapshot-binding-run.json +72 -0
  12. github-task-protocol-1.0.2/acceptance/public-release-v1.0.1.json +143 -0
  13. github-task-protocol-1.0.2/acceptance/purpose-alignment/run.json +79 -0
  14. github-task-protocol-1.0.2/acceptance/purpose-alignment/walking-skeleton.json +43 -0
  15. github-task-protocol-1.0.2/acceptance/purpose-safety-run.json +69 -0
  16. github-task-protocol-1.0.2/acceptance/release-notes-v1.0.2.md +26 -0
  17. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/release.json +2 -1
  18. github-task-protocol-1.0.2/acceptance/stop-time-boundary-run.json +102 -0
  19. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/build_backend.py +1 -1
  20. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/pyproject.toml +1 -1
  21. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/__init__.py +1 -1
  22. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/github.py +4 -7
  23. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/presentation.py +36 -12
  24. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/status.py +362 -62
  25. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/cli/status-matrix.json +1 -1
  26. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/http/done-success.json +15 -3
  27. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/http/live-binding-matrix.json +18 -2
  28. github-task-protocol-1.0.2/tests/fixtures/http/purpose-alignment-walking-skeleton.json +98 -0
  29. github-task-protocol-1.0.2/tests/fixtures/http/purpose-safety-walking-skeleton.json +81 -0
  30. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/http/walking-skeleton.json +11 -1
  31. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_build_backend.py +6 -1
  32. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_cli.py +104 -10
  33. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_github.py +9 -0
  34. github-task-protocol-1.0.2/tests/test_release_surface.py +289 -0
  35. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_status.py +368 -6
  36. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_v1_conformance.py +6 -1
  37. github-task-protocol-1.0.1/PKG-INFO +0 -88
  38. github-task-protocol-1.0.1/README.md +0 -78
  39. github-task-protocol-1.0.1/src/.DS_Store +0 -0
  40. github-task-protocol-1.0.1/src/gtp/__pycache__/__init__.cpython-312.pyc +0 -0
  41. github-task-protocol-1.0.1/src/gtp/__pycache__/__main__.cpython-312.pyc +0 -0
  42. github-task-protocol-1.0.1/src/gtp/__pycache__/carrier.cpython-312.pyc +0 -0
  43. github-task-protocol-1.0.1/src/gtp/__pycache__/cli.cpython-312.pyc +0 -0
  44. github-task-protocol-1.0.1/src/gtp/__pycache__/github.cpython-312.pyc +0 -0
  45. github-task-protocol-1.0.1/src/gtp/__pycache__/model.cpython-312.pyc +0 -0
  46. github-task-protocol-1.0.1/src/gtp/__pycache__/presentation.cpython-312.pyc +0 -0
  47. github-task-protocol-1.0.1/src/gtp/__pycache__/reducer.cpython-312.pyc +0 -0
  48. github-task-protocol-1.0.1/src/gtp/__pycache__/schema.cpython-312.pyc +0 -0
  49. github-task-protocol-1.0.1/src/gtp/__pycache__/status.cpython-312.pyc +0 -0
  50. github-task-protocol-1.0.1/src/gtp/__pycache__/urls.cpython-312.pyc +0 -0
  51. github-task-protocol-1.0.1/tests/__pycache__/test_carrier.cpython-312.pyc +0 -0
  52. github-task-protocol-1.0.1/tests/__pycache__/test_schema.cpython-312.pyc +0 -0
  53. github-task-protocol-1.0.1/tests/test_release_surface.py +0 -86
  54. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/LICENSE +0 -0
  55. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/legacy/issue-1/README.md +0 -0
  56. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/legacy/issue-1/run.json +0 -0
  57. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/legacy/v1.0.0/STATUS.md +0 -0
  58. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level0/README.md +0 -0
  59. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level0/run.json +0 -0
  60. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level1/human-probe.md +0 -0
  61. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level1/stdout/done.txt +0 -0
  62. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level1/stdout/halt.txt +0 -0
  63. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/level1/stdout/stopped.txt +0 -0
  64. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/acceptance/release-notes-v1.0.1.md +0 -0
  65. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/__main__.py +0 -0
  66. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/carrier.py +0 -0
  67. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/cli.py +0 -0
  68. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/model.py +0 -0
  69. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/reducer.py +0 -0
  70. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/schema.py +0 -0
  71. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/src/gtp/urls.py +0 -0
  72. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/adr-conformance.json +0 -0
  73. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/carriers/contract-valid.md +0 -0
  74. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/carriers/done-valid.md +0 -0
  75. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/carriers/start-valid.md +0 -0
  76. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/carriers/stop-valid.md +0 -0
  77. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/cli/prune-report.txt +0 -0
  78. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/http/prune-report.txt +0 -0
  79. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/prune-report.txt +0 -0
  80. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/reducer-truth-table.json +0 -0
  81. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/release/prune-report.txt +0 -0
  82. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/release/surface.json +0 -0
  83. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/fixtures/schema-conformance.json +0 -0
  84. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_adr_coverage.py +0 -0
  85. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_carrier.py +0 -0
  86. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_reducer.py +0 -0
  87. {github-task-protocol-1.0.1 → github-task-protocol-1.0.2}/tests/test_schema.py +0 -0
@@ -1530,3 +1530,192 @@ protocol coreは次の4領域へ限定する。
1530
1530
  - 取得不能時にstateを推測せず、`state: null`と`acquisition: incomplete`を返せる。
1531
1531
  - GitHubへのwrite path、GraphQL、webhook、cache、database、fork、GHESを追加せず、Issue #10のlive binding規則を検証できる。
1532
1532
  - live HTTP matrixとprune reportをimmutable Done Evidenceとして利用できる。
1533
+
1534
+ ## ADR-030: CLIを任意validatorとしてPyPIへ公開する
1535
+
1536
+ - Status: Accepted
1537
+ - Date: 2026-07-20
1538
+ - Supersedes: Issue #5完了時のCLI非公開方針
1539
+
1540
+ ### 観測事実
1541
+
1542
+ - [Issue #5の完了コメント](https://github.com/shinya0x00/github-task-protocol/issues/5#issuecomment-5016145451)は、`v1.0.1` tag、GitHub Release、PyPI packageを作成せず、CLI配布方式を未決定とする境界で親Issueを閉じた。
1543
+ - 利用者の新しい判断を受け、Issue #49で1.0.1公開candidateを準備し、Issue #52でsdistの`PKG-INFO`を修復した。
1544
+ - Issue #54では固定candidateからannotated tag、GitHub Release、PyPI公開、public PyPIからのclean install、live `done`/`stopped`再読を行った。
1545
+ - `README.md`は、GTP利用にCLI installは不要であり、使う場合だけ固定versionを指定できると説明している。
1546
+ - 最終公開結果とEvidenceの限界は`acceptance/public-release-v1.0.1.json`が所有する。一方、`acceptance/release.json`は公開前計画の`prepared_not_published`とplaceholderを保持していた。
1547
+
1548
+ ### 推論
1549
+
1550
+ - CLIをPyPIから取得可能にすると、任意validatorを試す利用者の導入負担を下げられるが、GTPの参加条件へCLIを追加する必要はない。
1551
+ - packageの公開factは、Level 0のtoolなし引き継ぎ、人間のnative merge判断、GTPが権限を与えない境界を変更しない。
1552
+ - 公開前計画と最終Evidenceが異なる役割を持つことを明示しなければ、clean readerは`prepared_not_published`を現在状態と誤読できる。
1553
+ - `acceptance/release.json`をrenameすると過去のIssueとPRからのpath参照を壊すため、同じpathでsupersessionを明示する方が履歴を追いやすい。
1554
+
1555
+ ### 決定
1556
+
1557
+ - CLIはGTP利用の必須条件ではないが、任意の参照validatorとしてPyPIへ公開する。
1558
+ - 公開によってRecord、state、halt reason、Level 0の価値、人間の受理権限、GTPが証明する範囲を変更しない。
1559
+ - `acceptance/release.json`は1.0.1公開前計画のhistorical artifactとして残し、statusを`superseded_by_public_release_evidence`とする。
1560
+ - 同fileの`superseded_by`から`acceptance/public-release-v1.0.1.json`へ解決可能な関係を持たせる。最終公開factはsuccessor Evidenceが所有し、公開前placeholderを遡及的な実績値へ書き換えない。
1561
+ - npm公開、自動publish workflow、CLI必須化はこのDecisionへ含めない。
1562
+
1563
+ ### 不採用案
1564
+
1565
+ - CLI非公開方針の維持は、新しい利用者判断と実際の1.0.1公開factに一致しないため採用しない。
1566
+ - `acceptance/release.json`の削除またはrenameは、公開前判断の履歴と既存path参照を弱めるため採用しない。
1567
+ - 公開後の値でplaceholderを全面更新する案は、計画時点の観測と実行後Evidenceのownerを混同するため採用しない。
1568
+
1569
+ ### 結果
1570
+
1571
+ - clean readerは、公開前計画から最終public Evidenceへ一意に移動できる。
1572
+ - 配布方針の理由をIssueとPRの全履歴から再構成せず、Decisionとして読める。
1573
+ - 今後のversion準備、tag、GitHub Release、registry upload、公開後検証は、それぞれのrelease IssueとEvidenceで扱う。
1574
+ - PyPI公開、CI成功、CLI出力は、actor本人性、credential安全性、package品質全体、変更・完了・merge authorityを証明しない。
1575
+
1576
+ ## ADR-031: 目的説明とEvidence binding表示を分離する
1577
+
1578
+ - Status: Accepted
1579
+ - Date: 2026-07-20
1580
+
1581
+ ### 観測事実
1582
+
1583
+ - `GTP.md`はCheck Runのtest十分性とArtifact内容の真実性を証明しないと定義している。
1584
+ - 変更前のCLIは`done`を「このIssueの完了を確認しました」、条件一覧を「確認できた完了条件」と表示し、resource bindingの確認を条件内容の意味評価と読める余地があった。
1585
+ - core schemaはtask固有のunknown fieldを持たず、通常commentは履歴へ影響しない。
1586
+ - reducerは同一ID・同一JSONのsafe retryをLogical Recordへ畳むが、live terminal検査はDone aliasだけを除外していたため、terminal後のContractまたはStart retryを新Recordとして扱っていた。
1587
+ - Level 1のIssue #12はbranch削除後の完了再構成を示す一方、Issue #65はPython 3.11、3.12、3.13の各Done Conditionを個別のexact-head Check Runへ束縛している。
1588
+
1589
+ ### 推論
1590
+
1591
+ - protocol stateの`done`と、人間による条件内容の受理を同じ文面にすると、GTPが証明しないsemantic fulfillmentを過剰claimする。
1592
+ - task固有のunknownをclosed Record schemaへ追加すると、stateへ影響する意味規則が必要になり、最小protocolの境界を越える。通常のIssue本文・commentで人へ引き継ぎ、Done可否に関係するunknownが残るならDoneを提示しない方が一意である。
1593
+ - safe retry aliasは新Logical Recordではないため、Record typeにかかわらずterminal後の違反検査から除外しなければ仕様と実装が一致しない。
1594
+ - current acceptanceは、Done ConditionとEvidenceを一対一に追えるIssue #65を参照した方がclean readerの再検証可能性が高い。
1595
+
1596
+ ### 決定
1597
+
1598
+ - CLIはDone Claim、Evidence binding、native mergeを観測factとして表示し、Done Conditionの自然言語上の充足を自動判定しないことを同じ出力で明示する。
1599
+ - `task_context.not_proven`と`evidence_limits`へsemantic fulfillmentの限界を投影する。task固有のunknown field、state、Record typeは追加しない。
1600
+ - terminal後の同一ID・同一JSON retryはContract、Start、Done、Stopの別なくsafe aliasとして扱う。fresh Recordは従来どおり`terminal_violation`とする。
1601
+ - Level 1のIssue #12を歴史的な完了再構成Evidenceとして保持し、現行のexact-head CI受入はIssue #65を参照する。
1602
+
1603
+ ### 不採用案
1604
+
1605
+ - `done`をsemantic fulfillmentの自動証明として扱う案は、Evidence resourceから内容の十分性を一般に判定できないため採用しない。
1606
+ - unknownをGTP Recordへ追加する案は、closed schemaと4 Recordの最小境界を変えるため採用しない。
1607
+ - terminal検査でDone aliasだけを特別扱いする案は、Logical Recordのidentity規則がRecord typeに依存しないため採用しない。
1608
+ - Issue #12の記録を削除または現在値へ書き換える案は、過去の受入履歴を失うため採用しない。
1609
+
1610
+ ### 結果
1611
+
1612
+ - 人はCLI出力だけで、機械確認できたbindingと、人がEvidenceを読んで判断すべき条件内容を区別できる。
1613
+ - ContractとStartの遅延retryがterminal resultを壊さず、fresh Recordだけが違反になる。
1614
+ - task固有の未確認事項はGitHub上の通常proseへ残り、protocol coreのstate判断へ暗黙に混入しない。
1615
+ - clean readerは歴史的な完了再構成と現行のexact-head CI受入を区別して辿れる。
1616
+
1617
+ ## ADR-032: terminal identityと取得完全性をfail-closedにする
1618
+
1619
+ - Status: Accepted
1620
+ - Date: 2026-07-20
1621
+
1622
+ ### 観測事実
1623
+
1624
+ - Stop後のfresh Recordを`terminal_violation`として検出しても、live statusは`stopped`と`none_stopped`を表示していた。
1625
+ - Stop再読時に同名branchの全PR履歴を対象としていたため、Stop後に別taskが同名branchを再利用してmergeすると、過去Issueが`stopped`から`halt`へ変化した。
1626
+ - GitHub RESTの404はresource不在と権限不足を一意に区別できないが、branch、PR、Check Run、artifact、successor Issueの404をprotocol不適合へ変換していた。
1627
+ - Issueだけを再読していたため、取得中のbranch、PR candidate、merge factの変化を検出しない経路があった。
1628
+ - List Pull Request Filesには取得上限があるが、返却fileを完全なPR差分としてscope判定していた。
1629
+ - Startはrepository default branchも受理し、`continue_work`を提示できた。
1630
+ - sourceは公開1.0.1後にruntime挙動を変更したが、package versionとREADME commandは1.0.1のままだった。
1631
+
1632
+ ### 決定
1633
+
1634
+ - Stop後のfresh Recordはpublic stateを`halt`、reasonを`terminal_violation`とし、最初のfresh comment URLを原因とする。pre-terminal diagnosticを持つvalid Stopの非常口は維持する。
1635
+ - Stop後mergeの対象は、Start以後かつStop以前に作成されたsame-repository・same-branch PRへ限定する。Stop後に作成された同名branch PRは過去Issueへ影響させない。
1636
+ - 汎用404からresource不在を推測せず、十分な取得を証明できない場合はAcquisition Errorとする。
1637
+ - branch、PR candidate collection、Bound PRを再読し、stateを左右するsnapshotが変化した場合はAcquisition Errorとする。
1638
+ - PR detailの`changed_files`と取得したfile数を照合し、完全な差分を取得できない場合はscope適合をClaimしない。
1639
+ - Start branchがrepository default branchと一致する場合は`halt / invalid_binding`とする。valid Stopはこのpre-terminal不適合を安全に閉じられる。
1640
+ - task固有の自由文はIssue本文・通常commentがcanonical ownerであり、CLIはその意味を自動判定しない。開始前から完了判断に必要な不明点はDone Conditionとし、開始後にContract変更が必要ならStopと後継Issueへ移る。CLIはDone提示前の確認先としてIssue URLを表示する。
1641
+ - Record grammarは変更しない。runtime修復candidateのpackage versionを1.0.2とし、公開完了前はpublic packageとして案内しない。
1642
+
1643
+ ### 不採用案
1644
+
1645
+ - unknown専用Recordまたは自由文parserの追加は、4 Recordと決定的reducerの境界を広げるため採用しない。
1646
+ - 404を常にresource不在とする案は、権限不足をprotocol不適合へ変換するため採用しない。
1647
+ - branch名をrepository全体で永久に再利用禁止とする案は、Stop comment時刻でtask対象PRを限定できるため採用しない。
1648
+ - 既に公開済みの1.0.1 tagまたはartifactを移動・置換する案は、immutableなrelease identityを壊すため採用しない。
1649
+
1650
+ ### 結果
1651
+
1652
+ - terminal resultはfresh Recordと将来の無関係なbranch再利用を区別できる。
1653
+ - 取得不能、取得中変化、file一覧打ち切りをprotocol haltと混同しない。
1654
+ - default branchへの作業継続をGTP statusが案内しない。
1655
+ - clean readerはIssue URLからtask固有の未確認事項を確認する必要と、CLIが意味評価しない限界を同時に確認できる。
1656
+ - source candidateと次のpublic package identityを1.0.1から分離できる。
1657
+
1658
+ ## ADR-033: PR snapshotとtask lifecycleのidentity境界を一致させる
1659
+
1660
+ - Status: Accepted; Stopのpre-Start PR判断はADR-034でsupersede
1661
+ - Date: 2026-07-20
1662
+
1663
+ ### 観測事実
1664
+
1665
+ - PR snapshot比較はhead SHAとmerge時刻を含む一方、base ref・base SHA・`changed_files`を含まず、file一覧取得中のbase更新を検出できなかった。
1666
+ - 通常のcandidateとDoneはStart前から存在するsame-branch PRを受理したが、Stop後merge検査はStart以後に作成されたPRだけを対象とし、同じPRのtask identityがlifecycle途中で変わった。
1667
+ - repositoryの`default_branch`はStart拒否を決めるが、最初の取得後に再確認していなかった。
1668
+ - native merge前のDoneはPR headとDone SHAを照合したが、同時に観測したbranch SHAとの一致を要求していなかった。
1669
+ - Issue #64 / PR #67とIssue #73 / PR #74が、異なるruntime内容で同じ未公開version 1.0.2をcandidateとして保持していた。
1670
+
1671
+ ### 決定
1672
+
1673
+ - PR snapshotはbase repository・ref・SHA、head repository・ref・SHA、state、merge時刻、取得可能な`changed_files`を含む。scope判定ではdetail PRをfile一覧の前後に取得し、全snapshotが一致した場合だけfile一覧を使用する。
1674
+ - Startと同時刻以前に作成されたPRはcandidate、Done、Stopの全経路で`invalid_binding`とする。Stop後に作成された同名branch PRは従来どおり元taskの対象外とする。
1675
+ - issue repositoryをstate評価後に再取得し、identityまたは`default_branch`が変化した場合はAcquisition Errorとする。
1676
+ - native merge前のDoneでは、安定したbranch SHA、Bound PR head SHA、Done head SHAの三者一致を要求する。merge後にbranchが削除されても、Issue、Done、PR、merge factから再構成できる既存境界は維持する。
1677
+ - Issue #64とIssue #73をIssue #75へsupersedeし、PR #67とPR #74を未mergeで閉じる。未公開1.0.2のopen delivery laneはIssue #75 / PR #76へ一本化する。
1678
+
1679
+ ### 不採用案
1680
+
1681
+ - PR作成時刻をStop時だけ使う案は、作業中と停止後でtask identityが変わるため採用しない。
1682
+ - base branch名だけを比較する案は、同じbranch名の先端更新を検出できないため採用しない。
1683
+ - merge後もbranch取得を必須にする案は、正常なbranch削除後にhistorical Doneを再構成できなくなるため採用しない。
1684
+ - RecordへPR番号またはbase SHA fieldを追加する案は、GitHub live resourceから取得でき、Record grammarを広げる必要がないため採用しない。
1685
+
1686
+ ### 結果
1687
+
1688
+ - scope判定が使用したfile一覧を、同じbase/head/`changed_files`のdetail PRへ束縛できる。
1689
+ - PRがtaskへ属するかの規則がcandidate、Done、Stopで一致する。
1690
+ - default branch変更とnative merge前のbranch/PR反映差からstateを推測しない。
1691
+ - clean readerはpredecessorから一つのopen 1.0.2 candidate laneへ移動できる。
1692
+
1693
+ ## ADR-034: Stopではpre-Start PRを対象外とし、同一instantを推測しない
1694
+
1695
+ - Status: Accepted
1696
+ - Date: 2026-07-20
1697
+
1698
+ ### 観測事実
1699
+
1700
+ - ADR-033はStartと同時刻以前のPRをcandidate、Done、Stopの全経路で`invalid_binding`とした。
1701
+ - この規則では、古いsame-branch PRが原因でhaltしたIssueへvalid Stopを投稿しても`stopped`へ着地できず、pre-terminalな不適合を安全に放棄するStopの役割と衝突した。
1702
+ - GitHubのPR作成時刻とStop comment時刻が同一instantでも、実装はPRをStop以前の対象として扱い、後日のmergeを`terminal_violation`と断定できた。
1703
+
1704
+ ### 決定
1705
+
1706
+ - candidate探索とDone bindingでは、Startと同時刻以前のPRを従来どおり`invalid_binding`とする。
1707
+ - Stopでは、Startと同時刻以前のPRを現在taskの対象外として除外し、diagnosticへ加えない。
1708
+ - PR作成時刻とStop時刻が同一instantなら、merge有無より先にAcquisition Errorとする。merge時刻とStop時刻の同一instantもAcquisition Errorを維持する。
1709
+ - timestampはtimezone付きdatetimeとしてUTCへ正規化して比較する。Record、state、halt reasonは追加しない。
1710
+
1711
+ ### 不採用案
1712
+
1713
+ - Stopでもpre-Start PRを`invalid_binding`にする案は、valid Stopを非常口として使えなくするため採用しない。
1714
+ - PR作成とStopの同一instantをStop以前とみなす案は、Stop後に作成された別taskのPRを元Issueへ結び付ける可能性があるため採用しない。
1715
+ - branch名を永久に再利用禁止とする案は、Stopの時間窓と後継Issueの新branchでtask identityを分離できるため採用しない。
1716
+
1717
+ ### 結果
1718
+
1719
+ - 作業中に古いPRを誤継承せず、壊れたStartはvalid Stopで`stopped`へ閉じられる。
1720
+ - Stopと同一instantのPR作成から`stopped`または`terminal_violation`を推測しない。
1721
+ - candidate、Done、Stopは同じPR集合を同じ目的で扱うのではなく、作業bindingと安全な放棄という役割に応じた境界を持つ。
@@ -108,6 +108,8 @@ taskの目標、変更範囲、完了条件を確定する。fieldは次だけ
108
108
 
109
109
  `done_conditions`のkeyはcondition IDである。各valueは`text`と`evidence_kind`だけを持つ。`evidence_kind`は`check`または`artifact`である。
110
110
 
111
+ 開始前から完了判断に必要な不明点はDone Conditionとして固定する。task固有の自由文はIssue本文または通常commentが所有し、readerは意味を自動判定しない。開始後にContract変更が必要な不明点が判明した場合は、Stopと後継Issueで新しいContractへ移る。
112
+
111
113
  ### 5.2 `start`
112
114
 
113
115
  有効なContractと唯一の作業branchを束縛する。fieldは次だけである。
@@ -120,6 +122,8 @@ taskの目標、変更範囲、完了条件を確定する。fieldは次だけ
120
122
  | `contract_ref` | string | 同じIssue内の先行Contract comment URL |
121
123
  | `branch` | string | Issue repository内のbranch short name |
122
124
 
125
+ live bindingではrepositoryのdefault branchを拒否する。Start、branch、CLI表示は作業権限を与えない。
126
+
123
127
  ### 5.3 `done`
124
128
 
125
129
  特定source headについて、完了条件ごとのEvidenceを持つDone Claimを示す。Task Completionそのものではない。fieldは次だけである。
@@ -255,7 +259,7 @@ Issue commentはGitHub comment IDの昇順で読む。record内の自己申告
255
259
 
256
260
  同じ`id`かつ構造的に同じJSONの再投稿だけをsafe retry aliasとして1 Logical Recordへ畳む。object key順、JSON whitespace、人向け要約は同一性へ含めない。配列順と値は含める。同じ`id`で異なるJSONは`halt / invalid_record`である。
257
261
 
258
- 通常commentは履歴へ影響しない。Carrierを削除または編集して履歴を修復してはならない。複雑な訂正、Recordのjoin、Recordの置換は定義しない。
262
+ 通常commentはprotocol履歴へ影響しないが、task固有の自由文を引き継ぐGitHub記録である。Done提示前にIssue本文と通常commentを読む。Carrierを削除または編集して履歴を修復してはならない。複雑な訂正、Recordのjoin、Recordの置換は定義しない。
259
263
 
260
264
  ## 8. lifecycleとstate
261
265
 
@@ -287,10 +291,13 @@ valid Doneが指す`head_sha`を、Bound PRがnative mergeし、その後にterm
287
291
 
288
292
  - ContractはStartより前に1件だけ置く。複数Contractは`conflicting_records`である。
289
293
  - Startは先行する唯一のContractを指す。Start後はContractとbranchを凍結する。
294
+ - Start branchはrepositoryのdefault branchではならない。
290
295
  - StartなしのDone、Start後のContract、Record順序違反は`invalid_transition`である。
291
296
  - Start、Done、Stopを複数の異なるLogical Recordとして置かない。
292
297
  - 1 Issue = 1 branch = 1 PRとする。分割、統合、別branchへの移動はStopと新Issueで行う。
293
- - Doneの`head_sha`はBound PRのsource headと一致し、全Evidenceも同じrepositoryとSHAへ束縛される。
298
+ - Startと同時刻以前の`created_at`を持つPRは、そのStartのcandidateまたはDone対象として受理せず`invalid_binding`とする。valid Stopではpre-terminalな不適合を閉じるため、現在taskの対象PRから除外する。
299
+ - PR file一覧を完全取得し、`filename`とrename時の`previous_filename`がすべてContract scope内にあることを確認する。
300
+ - Doneの`head_sha`はBound PRのsource headと一致し、全Evidenceも同じrepositoryとSHAへ束縛される。native merge前はbranch SHAも同じ値でなければならない。
294
301
  - Stop後の新Recordまたは対象PR merge、証明済みDone後のStopや新Recordは`halt / terminal_violation`である。先に成立したterminal resultを別のterminal resultへ書き換えない。
295
302
  - safe retry aliasは新Recordではないため、同一内容ならterminal後でも畳める。
296
303
 
@@ -314,6 +321,8 @@ valid Doneが指す`head_sha`を、Bound PRがnative mergeし、その後にterm
314
321
 
315
322
  `reason: "superseded"`では`successor_ref`へ後継Issueを示す。`reason: "abandoned"`では`successor_ref: null`とする。Stop後は元Issueへ新Recordを投稿しない。
316
323
 
324
+ Stop後mergeの対象は、Startより後かつStopより前に作成されたsame-repository・same-branch PRだけである。Startと同時刻以前のPRとStop後に作成されたPRは元Issueへ影響しない。PR作成またはmergeとStopが同一instantで先後を一意に取得できない場合はAcquisition Errorである。
325
+
317
326
  証明済みDoneは後のStopで`stopped`へ上書きできない。Stop後に対象PRがmergeされた場合も`done`へ変えない。どちらもpublic stateは`halt`、理由は`terminal_violation`とし、先に成立していたterminal resultを`details`へ残す。
318
327
 
319
328
  ## 12. Evidenceとnative merge
@@ -325,13 +334,17 @@ Evidence kindは`check`と`artifact`だけである。
325
334
 
326
335
  Check Runが証明するのはGitHubが指定SHAへsuccessを返したことまでであり、test内容の十分性までは証明しない。Artifactが証明するのは指定commitにfileが存在することまでであり、内容の真実性までは証明しない。
327
336
 
337
+ readerが機械的に判定するのはEvidence resourceとDone Claimのbindingであり、Done Conditionの自然言語上の充足ではない。条件内容の受理は人間がEvidenceを読んで判断する。
338
+
328
339
  人間の最終受理はGitHub native PR mergeへ一本化する。Done ClaimとEvidenceだけではTask Completionにならない。
329
340
 
330
341
  ## 13. Acquisition Error
331
342
 
332
343
  state決定に必要なIssue comments、branch、PR、Check Run、artifact、merge factを完全に取得できない場合、stateを出してはならない。これは`halt`ではなくAcquisition Errorである。
333
344
 
334
- network、authentication、rate limit、pagination途中失敗をprotocol不適合と推測しない。取得できたresourceの不一致と、resourceを取得できないことを分離する。
345
+ network、authentication、rate limit、pagination途中失敗をprotocol不適合と推測しない。404だけではresource不在を確定しない。PRの`changed_files`と取得file数が一致しない場合もstateを出さない。取得できたresourceの不一致と、resourceを取得できないことを分離する。
346
+
347
+ stateを左右するrepository、Issue、branch、PR候補、Bound PRは取得前後を比較し、変化したsnapshotからstateを出さない。repositoryはidentityと`default_branch`を比較する。PRは少なくともbase repository・ref・SHA、head repository・ref・SHA、state、merge時刻、取得可能な`changed_files`を比較し、file一覧取得の前後ではdetail PRの全項目を固定する。
335
348
 
336
349
  ## 14. Level 0とLevel 1
337
350
 
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: github-task-protocol
3
+ Version: 1.0.2
4
+ Summary: Reconstruct AI coding task state from GitHub Issue records
5
+ Requires-Python: >=3.11
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Project-URL: Repository, https://github.com/shinya0x00/github-task-protocol
9
+ Description-Content-Type: text/markdown
10
+
11
+ # GitHub Task Protocol
12
+
13
+ GTPは、AIへ実装を任せても、人間が目的・変更範囲・現在地・根拠を理解し、停止・再開・やり直し・mergeの判断を手放さないための小さなprotocolです。
14
+
15
+ > 作業はAIに任せる。判断は手放さない。
16
+
17
+ AIの説明だけを信じるのではなく、GitHub Issue上のRecordと、実際のbranch・PR・commit・Check Runからtask stateを再構成します。GTP自身は変更、完了、mergeの権限を与えません。
18
+
19
+ task固有の未確認事項は、通常のIssue本文やcommentへ人が読める形で残します。開始前から完了判断に必要な不明点はDone Conditionにし、開始後にContract変更が必要になった場合はStopと後継Issueへ移ります。GTP Recordは自由文の意味を自動評価しないため、`status`はDone提示前にIssueを確認するURLを表示します。
20
+
21
+ ## 推奨: 明示的にsetupを依頼
22
+
23
+ bare GTP repository URLだけではsetup依頼にもrepository変更のauthorizationにもなりません。URLだけを受け取ったagentは、説明または目的確認に留まり、現在のrepositoryを変更しません。
24
+
25
+ 導入先repositoryを操作中のclean agentへ、変更対象とDraft setup PR作成を明示して依頼します。
26
+
27
+ ```text
28
+ このrepositoryへGTPを導入するDraft setup PRを作ってください。
29
+ GTP repository: https://github.com/shinya0x00/github-task-protocol
30
+ ```
31
+
32
+ この明示依頼を受けたagentは、次の順序でsetupします。
33
+
34
+ agentが手順を理解できることと、実行中ずっと意図の境界内に留まり続けることは別の能力です。この手順はbranch-first順序で境界逸脱のriskを下げます。GTP単独の強制力はこの手順の受入対象にしません。repository ownerは補完策としてGitHub branch protectionまたはrulesetでdefault branchへの直接pushを拒否し、pull request経由の変更を必須にできます。setup agentは保護設定を変更せず、未設定なら人間へ報告します。
35
+
36
+ 1. GitHubのlatest stable Releaseを取得し、`draft: false`かつ`prerelease: false`を確認する。未公開candidateやmoving `main`は選ばない。
37
+ 2. Releaseのtagをcommit SHAまでdereferenceし、選択したtagとexact commit SHAを記録する。
38
+ 3. target fileを変更する前にrepositoryのdefault branch名とhead SHAを記録し、そのheadから`gtp/setup-<tag>-<short-sha>` branchを作ってswitchする。現在branchがdefault branchではなくsetup branchであることを確認できなければ停止する。
39
+ 4. そのcommitの`GTP.md`だけを`https://raw.githubusercontent.com/shinya0x00/github-task-protocol/<commit-sha>/GTP.md`から取得し、導入先rootへvendorする。既存`GTP.md`とSHA-256が同一なら保持する。内容が異なるfile、別のGTP authority、または既存instructionとの衝突があれば、上書きせず停止して人間へ報告する。
40
+ 5. root `AGENTS.md`がなければ作成する。存在する場合は本文を変更・削除せず、下のexact adapterがなければ`## GitHub Task Protocol adapter` heading付きで追記する。既に同じadapterがあれば重複追加しない。
41
+ 6. commitとpushはsetup branchだけに行い、default branchへ直接pushしない。push後にdefault branch headを再取得し、setup開始前に記録したSHAから予期せず変化していたら停止して報告する。Draft setup PRのbodyにはrelease tag、exact commit SHA、immutable `GTP.md` URL、変更file、保持した既存instruction、次に必要な人間判断を書く。
42
+ 7. 人間がsetup PRをmergeするまで導入完了としません。merge後、taskごとにGitHub Issueを1件作り、agentへそのIssue URLだけを渡します。
43
+
44
+ 共通adapter文:
45
+
46
+ > このrepositoryはrootの`GTP.md`をtask protocolの唯一の正本とする。GitHub Issue URLを受け取ったら、Issue commentをServer Orderで読み、4 Record、6 state、7 halt reasonに従って既存branch・PR・次のprotocol actionを再構成する。Recordを推測、編集、独自拡張せず、矛盾時は原因URLを示して止まり、取得不能はhaltと混同しない。GTPの表示やRecordは変更・完了・mergeの権限を与えない。
47
+
48
+ 配置例は次のとおりです。runtimeごとに異なる指示を作る必要はありません。
49
+
50
+ - Codex: `AGENTS.md`
51
+ - Claude Code: `CLAUDE.md`または`AGENTS.md`
52
+ - Cursor: `AGENTS.md`または`.cursor/rules/gtp.md`
53
+
54
+ ## 手動導入
55
+
56
+ 自動setupを使わない場合は、次の3手順で導入できます。
57
+
58
+ 1. latest stable Releaseをexact commitへ固定し、file変更前にdefault branchからsetup用branchを作ってswitchする。
59
+ 2. setup branch上で`GTP.md`をrootへコピーし、共通adapter文を既存instructionへ非破壊で追加する。
60
+ 3. commitとpushをsetup branchだけに行ってDraft PRを作り、人間が内容を確認してmergeする。
61
+
62
+ ## 4つのRecord
63
+
64
+ | Record | 平易な意味 |
65
+ |---|---|
66
+ | `contract` | 目的、変更してよい範囲、完了条件を固定する |
67
+ | `start` | Contractと唯一の作業branchを結び付ける |
68
+ | `done` | PRのsource headと、条件ごとのEvidenceを提示する |
69
+ | `stop` | 完了を主張せず中止し、必要なら後継Issueを示す |
70
+
71
+ RecordはIssue commentへ人向け要約を先に、機械用JSONを折りたたんで記録します。1 Issue = 1 branch = 1 PRです。
72
+ Start branchへrepositoryのdefault branchは指定できません。
73
+ Startより前から存在するPRは、そのtaskのcandidateやDoneとして引き継げません。誤ったStartをStopする場合は、古いPRを対象外として安全に閉じます。
74
+
75
+ ## 6つのstate
76
+
77
+ | state | 平易な意味 |
78
+ |---|---|
79
+ | `unmanaged` | 有効なContractがない |
80
+ | `ready` | ContractはあるがStart前 |
81
+ | `in_progress` | 作業中、またはDone提示後のmerge待ち |
82
+ | `halt` | 特定transitionを矛盾や不適合のため進められない |
83
+ | `done` | Doneのsource headへEvidence resourceが結び付き、そのPRがnative mergeされた。条件内容の十分性は人がEvidenceを読んで判断する |
84
+ | `stopped` | Stopにより、このIssueでの作業を終了した |
85
+
86
+ GitHub情報を完全に取得できない場合はstateを推測しません。404だけではresource不在と権限不足を区別できないため、これは`halt`ではなくAcquisition Errorです。
87
+
88
+ ## CLIは任意の検証器
89
+
90
+ 人間がGTPを使うためにCLIをinstallする必要はありません。`gtp`はagentや自動検査がRecordと現在stateを確認するための、runtime dependency 0の任意toolです。
91
+
92
+ CLIはPyPI公開後、固定versionを指定して実行できます。現在のsource candidateは`1.0.2`であり、公開確認前です。公開済み`1.0.1`はこのcandidateと挙動が異なるため、下記commandは`1.0.2`の公開Evidence取得後に使用します。GTPを使うだけならCLIのinstallは不要です。
93
+
94
+ ```console
95
+ uvx --from github-task-protocol==1.0.2 gtp status <issue-url>
96
+ uvx --from github-task-protocol==1.0.2 gtp check <comment.md>
97
+ ```
98
+
99
+ - `status`はGitHubへGETだけを行い、日本語6項目の後にmachine JSONを出します。Evidenceの存在・種類・状態・source headとの結び付きを検査しますが、完了条件の自然言語上の充足までは自動判定しません。
100
+ - `check`は投稿前のMarkdown comment全文をoffline検査します。Issue上でもvalidだとは主張しません。
101
+ - exit code、緑色のCheck Run、Evidence URLは、変更やmergeの許可ではありません。
102
+
103
+ ## 仕様と判断記録
104
+
105
+ protocolの唯一の正本は400行以内の[`GTP.md`](GTP.md)です。Record作成やstate判断に、他の文書は必要ありません。
106
+
107
+ [`DECISIONS.md`](DECISIONS.md)は、設計変更の理由と履歴です。`GTP.md`と意味が衝突する場合は`GTP.md`を優先します。
108
+
109
+ 実GitHubで観測した引き継ぎ結果は[`acceptance/level0/`](acceptance/level0/)にあります。これは仕様の代わりではありません。
110
+
111
+ ## GTPが証明しないこと
112
+
113
+ GTPは、actor本人性、credential安全性、コード品質そのもの、Evidence内容の真実性を証明しません。filesystem削除や本番database操作を物理的に防ぐものでもありません。
114
+
115
+ サンドボックス、最小権限、不可逆操作前の確認、reviewと組み合わせてください。最終的な受理は、人間がPRとEvidenceを読み、GitHubのnative mergeで判断します。
116
+
117
+ License: [MIT](LICENSE)
@@ -0,0 +1,107 @@
1
+ # GitHub Task Protocol
2
+
3
+ GTPは、AIへ実装を任せても、人間が目的・変更範囲・現在地・根拠を理解し、停止・再開・やり直し・mergeの判断を手放さないための小さなprotocolです。
4
+
5
+ > 作業はAIに任せる。判断は手放さない。
6
+
7
+ AIの説明だけを信じるのではなく、GitHub Issue上のRecordと、実際のbranch・PR・commit・Check Runからtask stateを再構成します。GTP自身は変更、完了、mergeの権限を与えません。
8
+
9
+ task固有の未確認事項は、通常のIssue本文やcommentへ人が読める形で残します。開始前から完了判断に必要な不明点はDone Conditionにし、開始後にContract変更が必要になった場合はStopと後継Issueへ移ります。GTP Recordは自由文の意味を自動評価しないため、`status`はDone提示前にIssueを確認するURLを表示します。
10
+
11
+ ## 推奨: 明示的にsetupを依頼
12
+
13
+ bare GTP repository URLだけではsetup依頼にもrepository変更のauthorizationにもなりません。URLだけを受け取ったagentは、説明または目的確認に留まり、現在のrepositoryを変更しません。
14
+
15
+ 導入先repositoryを操作中のclean agentへ、変更対象とDraft setup PR作成を明示して依頼します。
16
+
17
+ ```text
18
+ このrepositoryへGTPを導入するDraft setup PRを作ってください。
19
+ GTP repository: https://github.com/shinya0x00/github-task-protocol
20
+ ```
21
+
22
+ この明示依頼を受けたagentは、次の順序でsetupします。
23
+
24
+ agentが手順を理解できることと、実行中ずっと意図の境界内に留まり続けることは別の能力です。この手順はbranch-first順序で境界逸脱のriskを下げます。GTP単独の強制力はこの手順の受入対象にしません。repository ownerは補完策としてGitHub branch protectionまたはrulesetでdefault branchへの直接pushを拒否し、pull request経由の変更を必須にできます。setup agentは保護設定を変更せず、未設定なら人間へ報告します。
25
+
26
+ 1. GitHubのlatest stable Releaseを取得し、`draft: false`かつ`prerelease: false`を確認する。未公開candidateやmoving `main`は選ばない。
27
+ 2. Releaseのtagをcommit SHAまでdereferenceし、選択したtagとexact commit SHAを記録する。
28
+ 3. target fileを変更する前にrepositoryのdefault branch名とhead SHAを記録し、そのheadから`gtp/setup-<tag>-<short-sha>` branchを作ってswitchする。現在branchがdefault branchではなくsetup branchであることを確認できなければ停止する。
29
+ 4. そのcommitの`GTP.md`だけを`https://raw.githubusercontent.com/shinya0x00/github-task-protocol/<commit-sha>/GTP.md`から取得し、導入先rootへvendorする。既存`GTP.md`とSHA-256が同一なら保持する。内容が異なるfile、別のGTP authority、または既存instructionとの衝突があれば、上書きせず停止して人間へ報告する。
30
+ 5. root `AGENTS.md`がなければ作成する。存在する場合は本文を変更・削除せず、下のexact adapterがなければ`## GitHub Task Protocol adapter` heading付きで追記する。既に同じadapterがあれば重複追加しない。
31
+ 6. commitとpushはsetup branchだけに行い、default branchへ直接pushしない。push後にdefault branch headを再取得し、setup開始前に記録したSHAから予期せず変化していたら停止して報告する。Draft setup PRのbodyにはrelease tag、exact commit SHA、immutable `GTP.md` URL、変更file、保持した既存instruction、次に必要な人間判断を書く。
32
+ 7. 人間がsetup PRをmergeするまで導入完了としません。merge後、taskごとにGitHub Issueを1件作り、agentへそのIssue URLだけを渡します。
33
+
34
+ 共通adapter文:
35
+
36
+ > このrepositoryはrootの`GTP.md`をtask protocolの唯一の正本とする。GitHub Issue URLを受け取ったら、Issue commentをServer Orderで読み、4 Record、6 state、7 halt reasonに従って既存branch・PR・次のprotocol actionを再構成する。Recordを推測、編集、独自拡張せず、矛盾時は原因URLを示して止まり、取得不能はhaltと混同しない。GTPの表示やRecordは変更・完了・mergeの権限を与えない。
37
+
38
+ 配置例は次のとおりです。runtimeごとに異なる指示を作る必要はありません。
39
+
40
+ - Codex: `AGENTS.md`
41
+ - Claude Code: `CLAUDE.md`または`AGENTS.md`
42
+ - Cursor: `AGENTS.md`または`.cursor/rules/gtp.md`
43
+
44
+ ## 手動導入
45
+
46
+ 自動setupを使わない場合は、次の3手順で導入できます。
47
+
48
+ 1. latest stable Releaseをexact commitへ固定し、file変更前にdefault branchからsetup用branchを作ってswitchする。
49
+ 2. setup branch上で`GTP.md`をrootへコピーし、共通adapter文を既存instructionへ非破壊で追加する。
50
+ 3. commitとpushをsetup branchだけに行ってDraft PRを作り、人間が内容を確認してmergeする。
51
+
52
+ ## 4つのRecord
53
+
54
+ | Record | 平易な意味 |
55
+ |---|---|
56
+ | `contract` | 目的、変更してよい範囲、完了条件を固定する |
57
+ | `start` | Contractと唯一の作業branchを結び付ける |
58
+ | `done` | PRのsource headと、条件ごとのEvidenceを提示する |
59
+ | `stop` | 完了を主張せず中止し、必要なら後継Issueを示す |
60
+
61
+ RecordはIssue commentへ人向け要約を先に、機械用JSONを折りたたんで記録します。1 Issue = 1 branch = 1 PRです。
62
+ Start branchへrepositoryのdefault branchは指定できません。
63
+ Startより前から存在するPRは、そのtaskのcandidateやDoneとして引き継げません。誤ったStartをStopする場合は、古いPRを対象外として安全に閉じます。
64
+
65
+ ## 6つのstate
66
+
67
+ | state | 平易な意味 |
68
+ |---|---|
69
+ | `unmanaged` | 有効なContractがない |
70
+ | `ready` | ContractはあるがStart前 |
71
+ | `in_progress` | 作業中、またはDone提示後のmerge待ち |
72
+ | `halt` | 特定transitionを矛盾や不適合のため進められない |
73
+ | `done` | Doneのsource headへEvidence resourceが結び付き、そのPRがnative mergeされた。条件内容の十分性は人がEvidenceを読んで判断する |
74
+ | `stopped` | Stopにより、このIssueでの作業を終了した |
75
+
76
+ GitHub情報を完全に取得できない場合はstateを推測しません。404だけではresource不在と権限不足を区別できないため、これは`halt`ではなくAcquisition Errorです。
77
+
78
+ ## CLIは任意の検証器
79
+
80
+ 人間がGTPを使うためにCLIをinstallする必要はありません。`gtp`はagentや自動検査がRecordと現在stateを確認するための、runtime dependency 0の任意toolです。
81
+
82
+ CLIはPyPI公開後、固定versionを指定して実行できます。現在のsource candidateは`1.0.2`であり、公開確認前です。公開済み`1.0.1`はこのcandidateと挙動が異なるため、下記commandは`1.0.2`の公開Evidence取得後に使用します。GTPを使うだけならCLIのinstallは不要です。
83
+
84
+ ```console
85
+ uvx --from github-task-protocol==1.0.2 gtp status <issue-url>
86
+ uvx --from github-task-protocol==1.0.2 gtp check <comment.md>
87
+ ```
88
+
89
+ - `status`はGitHubへGETだけを行い、日本語6項目の後にmachine JSONを出します。Evidenceの存在・種類・状態・source headとの結び付きを検査しますが、完了条件の自然言語上の充足までは自動判定しません。
90
+ - `check`は投稿前のMarkdown comment全文をoffline検査します。Issue上でもvalidだとは主張しません。
91
+ - exit code、緑色のCheck Run、Evidence URLは、変更やmergeの許可ではありません。
92
+
93
+ ## 仕様と判断記録
94
+
95
+ protocolの唯一の正本は400行以内の[`GTP.md`](GTP.md)です。Record作成やstate判断に、他の文書は必要ありません。
96
+
97
+ [`DECISIONS.md`](DECISIONS.md)は、設計変更の理由と履歴です。`GTP.md`と意味が衝突する場合は`GTP.md`を優先します。
98
+
99
+ 実GitHubで観測した引き継ぎ結果は[`acceptance/level0/`](acceptance/level0/)にあります。これは仕様の代わりではありません。
100
+
101
+ ## GTPが証明しないこと
102
+
103
+ GTPは、actor本人性、credential安全性、コード品質そのもの、Evidence内容の真実性を証明しません。filesystem削除や本番database操作を物理的に防ぐものでもありません。
104
+
105
+ サンドボックス、最小権限、不可逆操作前の確認、reviewと組み合わせてください。最終的な受理は、人間がPRとEvidenceを読み、GitHubのnative mergeで判断します。
106
+
107
+ License: [MIT](LICENSE)
@@ -0,0 +1,70 @@
1
+ {
2
+ "schema": "github-task-protocol-explicit-setup-delivery/v1",
3
+ "status": "delivery_candidate_pending_merge",
4
+ "source_issue": "https://github.com/shinya0x00/github-task-protocol/issues/85",
5
+ "supersession": [
6
+ {
7
+ "issue": "https://github.com/shinya0x00/github-task-protocol/issues/81",
8
+ "pull_request": "https://github.com/shinya0x00/github-task-protocol/pull/82",
9
+ "reason": "bare repository URL is not mutation authorization"
10
+ },
11
+ {
12
+ "issue": "https://github.com/shinya0x00/github-task-protocol/issues/83",
13
+ "pull_request": "https://github.com/shinya0x00/github-task-protocol/pull/84",
14
+ "reason": "unmerged instructions cannot be externally accepted from the default branch"
15
+ }
16
+ ],
17
+ "input_boundary": {
18
+ "bare_repository_url": "explain_or_request_purpose_without_repository_mutation",
19
+ "setup_request": "explicit_target_setup_request_plus_gtp_repository_url",
20
+ "setup_effect_limit": "draft_pull_request_pending_human_merge",
21
+ "task_after_setup": "target_issue_url_only"
22
+ },
23
+ "delivery_boundary": {
24
+ "done_evidence": [
25
+ "README and static release-surface tests",
26
+ "source head bound Python 3.11, 3.12, and 3.13 PR Check Runs",
27
+ "this delivery artifact"
28
+ ],
29
+ "external_acceptance_required_for_delivery_done": false,
30
+ "external_acceptance_activation": "after native merge in a separate Issue and pull request"
31
+ },
32
+ "observed_probes": [
33
+ {
34
+ "input": "bare GTP repository URL only",
35
+ "result": "description_only_no_repository_mutation",
36
+ "interpretation": "expected_safe_behavior"
37
+ },
38
+ {
39
+ "input": "explicit setup request plus GTP repository URL",
40
+ "result": "draft_setup_pull_request_created_with_moving_main_spec",
41
+ "interpretation": "activation succeeded but stable Release selection failed because candidate instructions were not on the default branch"
42
+ }
43
+ ],
44
+ "external_acceptance": {
45
+ "status": "pending_after_delivery_merge",
46
+ "executor": "user_with_separate_provider_and_repository",
47
+ "dedicated_acceptance_repository": false,
48
+ "required_evidence": [
49
+ "explicit setup input and target repository context",
50
+ "stable tag, dereferenced commit SHA, and vendored GTP.md SHA-256",
51
+ "Draft setup PR URL, non-destructive diff, and human merge SHA",
52
+ "separate clean agent receiving only the target Issue URL",
53
+ "reconstructed state, first action, referenced Contract, Start, and PR",
54
+ "existing branch and PR reuse without duplicates",
55
+ "Evidence disclosure boundary and remaining verification limits"
56
+ ]
57
+ },
58
+ "claim_boundary": {
59
+ "external_setup_success": false,
60
+ "version_1_0_2_published": false,
61
+ "merge_authority": false
62
+ },
63
+ "evidence_limits": [
64
+ "delivery tests do not prove behavior of an external clean agent",
65
+ "the prior explicit-setup probe used a private target and cannot be independently reproduced from public URLs",
66
+ "native merge and default-branch discoverability are not established by this artifact",
67
+ "this artifact does not authorize merge or publication"
68
+ ],
69
+ "next_action": "human reviews and natively merges the delivery pull request, then a successor acceptance lane reruns the explicit setup probe"
70
+ }