Compare commits

...
2 Commits
Author SHA1 Message Date
kiskaadee 8ae79d9a98 feat(install): register gitea-pr in portable core and update inventory
- Register gitea-pr in ACTIVE_PORTABLE_SKILLS in install.sh
- Add gitea-pr to Portable Core table in README.md (61 lines)
- Extend Canonical Flow 7 to include PR delivery loop
2026-10-31 10:45:20 -05:00
kiskaadee b0f7bdc851 feat(gitea-pr): add pull request lifecycle and evidence synthesis skill
- Add skills/gitea-pr/SKILL.md (61 lines) adhering to skeleton structure
- Add references/pr-lifecycle.md defining PR states, synthesis template, and triage
- Add references/tea-pulls.md documenting verified tea CLI pull request subroutines
2026-10-31 10:45:13 -05:00
5 changed files with 264 additions and 2 deletions

No files matched your search

+2 -1
View File
@@ -73,6 +73,7 @@ Every skill features an explicit **"Your call"** checkpoint where the agent paus
| **[`git-commit`](skills/git-commit/SKILL.md)** | `/git-commit` | Working-tree inspection, atomic slice decomposition, and author-driven message authoring in learning sessions. User approves every commit. | 60 lines | | **[`git-commit`](skills/git-commit/SKILL.md)** | `/git-commit` | Working-tree inspection, atomic slice decomposition, and author-driven message authoring in learning sessions. User approves every commit. | 60 lines |
| **[`git-workspace`](skills/git-workspace/SKILL.md)** | `/git-workspace` | Branch and worktree lifecycle, history integration (rebase/squash/cherry-pick), conflict halts, and evidence-first reflog recovery. | 50 lines | | **[`git-workspace`](skills/git-workspace/SKILL.md)** | `/git-workspace` | Branch and worktree lifecycle, history integration (rebase/squash/cherry-pick), conflict halts, and evidence-first reflog recovery. | 50 lines |
| **[`gitea-plan`](skills/gitea-plan/SKILL.md)** | `/gitea-plan` | Translates technical goals and plans into Gitea milestones and issues with tiered sizing and falsifiable acceptance criteria. | 52 lines | | **[`gitea-plan`](skills/gitea-plan/SKILL.md)** | `/gitea-plan` | Translates technical goals and plans into Gitea milestones and issues with tiered sizing and falsifiable acceptance criteria. | 52 lines |
| **[`gitea-pr`](skills/gitea-pr/SKILL.md)** | `/gitea-pr` | Manages Gitea pull request lifecycle: branch readiness, review/verification synthesis, issue closing, and merge readiness. | 61 lines |
| **[`document`](skills/document/SKILL.md)** | `/document` | Second-order knowledge classifier (Discussion, ADR, Plan, Debug Record, Knowledge, Journal). User confirms type and provides core insight. | 55 lines | | **[`document`](skills/document/SKILL.md)** | `/document` | Second-order knowledge classifier (Discussion, ADR, Plan, Debug Record, Knowledge, Journal). User confirms type and provides core insight. | 55 lines |
| **[`journal-builder`](skills/journal-builder/SKILL.md)** | `/journal-builder` or `/journal` | Two-phase daily engineering review: generates factual skeleton with question blanks, then reviews and calibrates user reasoning. | 58 lines | | **[`journal-builder`](skills/journal-builder/SKILL.md)** | `/journal-builder` or `/journal` | Two-phase daily engineering review: generates factual skeleton with question blanks, then reviews and calibrates user reasoning. | 58 lines |
| **[`reconcile-docs`](skills/reconcile-docs/SKILL.md)** | `/reconcile-docs [path]` | Reconciles historical evidence, present code reality, and future plans into canonical repo docs (README, ARCHITECTURE, ADR, ROADMAP). | 40 lines | | **[`reconcile-docs`](skills/reconcile-docs/SKILL.md)** | `/reconcile-docs [path]` | Reconciles historical evidence, present code reality, and future plans into canonical repo docs (README, ARCHITECTURE, ADR, ROADMAP). | 40 lines |
@@ -112,7 +113,7 @@ Every skill features an explicit **"Your call"** checkpoint where the agent paus
4. **Documentation Reconciliation**: `reconcile-docs` (audit history, code reality, roadmap) -> propose updates to README / ARCHITECTURE / ADRs -> user approves. 4. **Documentation Reconciliation**: `reconcile-docs` (audit history, code reality, roadmap) -> propose updates to README / ARCHITECTURE / ADRs -> user approves.
5. **Skill Design Loop**: `build-skill` (approve spec) -> dogfood run -> minimal mechanism refinement. 5. **Skill Design Loop**: `build-skill` (approve spec) -> dogfood run -> minimal mechanism refinement.
6. **Branch Lifecycle & Integration**: `git-workspace` (branch-before-edits or isolated worktree) -> implementation -> `git-commit` (atomic slice approval) -> `code-review` / `verify-slice` -> `git-workspace` (rebase or integration). 6. **Branch Lifecycle & Integration**: `git-workspace` (branch-before-edits or isolated worktree) -> implementation -> `git-commit` (atomic slice approval) -> `code-review` / `verify-slice` -> `git-workspace` (rebase or integration).
7. **Issue Planning to Execution**: `gitea-plan` (tiered sizing & falsifiable acceptance criteria) -> `git-workspace` (dedicated branch) -> `git-commit` (checkpoint slicing). 7. **Issue Planning to PR Delivery**: `gitea-plan` (tiered sizing & falsifiable acceptance criteria) -> `git-workspace` (dedicated branch) -> `git-commit` (checkpoint slicing) -> `code-review` / `verify-slice` (provenance & runtime ledger) -> `gitea-pr` (PR synthesis, feedback triage, issue closing).
--- ---
+1 -1
View File
@@ -33,7 +33,7 @@ while [[ $# -gt 0 ]]; do
done done
# Active skills to install # Active skills to install
ACTIVE_PORTABLE_SKILLS=(build-skill code-review diagnose document git-commit git-workspace gitea-plan inspect-flake-update journal-builder nix-devshell practice reconcile-docs tdd verify-slice) ACTIVE_PORTABLE_SKILLS=(build-skill code-review diagnose document git-commit git-workspace gitea-plan gitea-pr inspect-flake-update journal-builder nix-devshell practice reconcile-docs tdd verify-slice)
ACTIVE_EXTENSION_SKILLS=(draft-curation) ACTIVE_EXTENSION_SKILLS=(draft-curation)
# Legacy / deprecated skills to clean up or back up if found in target # Legacy / deprecated skills to clean up or back up if found in target
+61
View File
@@ -0,0 +1,61 @@
---
name: gitea-pr
description: >-
Manage pull request lifecycle on Gitea: verify branch readiness, synthesize structured PR
descriptions from code-review and verify-slice evidence packets, link issues, digest review
feedback, and report merge readiness. Not for code inspection: use code-review. Not for
runtime QA: use verify-slice. Not for Git branch or merge mechanics: use git-workspace.
---
# Gitea PR
## Use when
- Opening or updating a pull request on Gitea after implementing an issue or feature.
- Synthesizing static code review and runtime verification evidence into a reviewable PR.
- Tracking review comments, requested changes, and CI checks toward merge readiness.
- Not for static code inspection: use `code-review`.
- Not for runtime behavioral verification: use `verify-slice`.
- Not for branch creation, rebasing, or local history integration: use `git-workspace`.
## Steps
1. **Verify branch readiness.** Confirm the local working tree is clean (`git status --short`),
the branch tracks an upstream remote (`git rev-parse @{u}`), unpushed commits are pushed,
and the target base branch exists on the remote.
2. **Collect review and verification evidence.** Inspect outputs from preceding skills:
- `code-review`: Static provenance, covered commits/diff fingerprint, findings disposition,
and overall recommendation (`Ready`).
- `verify-slice`: Runtime evidence ledger across behavioral, security, and state checks,
confirming zero unhandled `FAIL` outcomes.
If either packet is missing or stale relative to current `HEAD`, stop and run that skill first.
3. **Draft structured PR description.** Compose the PR body following
[references/pr-lifecycle.md](references/pr-lifecycle.md):
- Issue Linkage: `Closes #<issue-index>`.
- Summary of Changes: Problem, solution, and scope boundary.
- Static Review Provenance: Base/head SHAs, diff SHA256, and 4-axis disposition.
- Runtime Verification Ledger: Markdown table of executed checks and outcomes.
- Residual Risks and Rollback: Operational considerations and reversibility.
4. **Present for human approval.** Present the proposed title, target base branch, milestone,
and description body to the user per `profile/AGENTS.md`. Stop for confirmation before
creating or editing the pull request.
5. **Create or update pull request via `tea`.** Run verified commands from
[references/tea-pulls.md](references/tea-pulls.md) (`tea pulls create --description-file -`).
Pass `--draft` if work remains in progress.
6. **Track review feedback and merge readiness.** Inspect incoming review comments
(`tea pulls review-comments <index>`) and mergeability status. Synthesize actionable
feedback. When all checks pass and review feedback is resolved, report `Ready for Merge`.
Release and merge authority belongs exclusively to the human owner: never merge automatically.
## Your call
- **PR title and description approval**: review and approve the draft PR content and issue linkage.
- **Review feedback triage**: decide how to address review comments (rework, clarification, deferral).
- **Merge and release authorization**: decide when to merge the PR into the target base branch.
## Done when
- Pull request is created or updated in Gitea with complete evidence provenance, and its current
review and mergeability status is reported to the user.
## Hands off to
- `code-review`: if the diff changes and needs renewed static inspection.
- `verify-slice`: if new code requires runtime verification.
- `git-commit`: to package review fixes into atomic commits.
- `git-workspace`: to rebase or update the branch against upstream base.
@@ -0,0 +1,89 @@
# Pull Request Lifecycle and Evidence Synthesis
Reference for `gitea-pr`. Defines PR states, evidence synthesis template, and feedback triage workflow.
## 1. Pull Request Lifecycle States
```text
Draft (WIP) -> Review -> Changes Requested -> Ready for Merge -> Merged
| |
+-- [Rework/Fix] ----+
```
1. **Draft (WIP)**: PR opened early for visibility. In Gitea, prefixed with `WIP:` or flagged `--draft`. CI may run; reviews are informal.
2. **Review**: Feature complete, working tree clean, static `code-review` and runtime `verify-slice` evidence packets attached. Ready for formal audit.
3. **Changes Requested**: Reviewer identified defects, missing tests, or security concerns. Agent addresses feedback via `git-commit` and refreshes evidence.
4. **Ready for Merge**: All review threads resolved, static review confirms `Ready`, runtime checks pass, and mergeability is green.
5. **Merged**: Merged into target base branch by the human owner. Associated issues are closed automatically by Gitea.
---
## 2. Standard PR Description Template
Every PR description synthesizes static provenance and runtime evidence into a transparent record:
```markdown
Closes #<issue-index>
## Summary of Changes
<Concise overview of what was built, why, and what architectural decisions were made.>
## Scope & Non-Goals
- **In Scope**: <Itemized list of changes included in this PR>
- **Out of Scope**: <Explicitly deferred items or non-goals>
## Static Review Provenance (`code-review`)
- **Base Commit**: `<base-sha>` -> **Head Commit**: `<head-sha>`
- **Committed Diff Fingerprint**: `sha256:<hash>`
- **Axes Breakdown**:
- Spec & Scope: Pass
- Standards & Smells: Pass
- Seam & Test Integrity: Pass
- Defensive Invariants: Pass
- **Review Status**: `Ready`
## Runtime Verification Ledger (`verify-slice`)
| Check ID | Perspective | Scope | Description | Outcome |
| :--- | :--- | :--- | :--- | :--- |
| RV-01 | Behavioral / Seam | local | Unit & integration suite execution | PASS |
| RV-02 | State & Concurrency | local | Race condition & lock invariant check | PASS |
| RV-03 | Security / Host Boundary | local | Host socket validation boundary | PASS |
## Residual Risks & Operational Considerations
- **Environment Prerequisites**: <Any required environment variables, sockets, or permissions>
- **Reversibility**: <How to cleanly revert this slice if unexpected regressions occur>
```
---
## 3. Review Feedback Triage Workflow
When comments or change requests arrive on a PR:
1. **Extract review comments**:
```sh
tea pulls review-comments <index>
```
2. **Categorize comments**:
- *Defects & Invariants*: Logic errors, broken tests, edge-case crashes (require code fix).
- *Spec & Scope Clarifications*: Questions about intent or architectural fit (require response or doc update).
- *Nits / Polish*: Minor style preferences that do not violate repo standards (human owner decides priority).
3. **Implement fixes on the feature branch**:
- Use `tdd` or direct edits.
- Commit fixes using `git-commit` with conventional commit scope (e.g. `fix(gitea-pr): address review feedback`).
4. **Re-verify after changes**:
- Run `code-review` to confirm the updated diff fingerprint is clean.
- Run `verify-slice` to substantiate runtime assertions.
5. **Reply and resolve threads via `tea`**:
- Reply to comment: `tea pulls reply <index> <comment-id> "Fixed in <sha>"`
- Resolve thread: `tea pulls resolve <comment-id>`
6. **Push updates to remote**:
- `git push origin <branch>`
---
## 4. Release Authority Guardrail
Automated skills and checks inform the human owner; they never make the merge decision independently:
- Neither passing unit tests nor a `Ready` code review implies permission to execute `tea pulls merge`.
- The human owner reviews the consolidated ledger, assesses residual risks, and explicitly authorizes merge execution.
+111
View File
@@ -0,0 +1,111 @@
# Verified Tea CLI Pull Request Subroutines
Reference for `gitea-pr`. Canonical, verified syntax for managing pull requests and review threads via `tea`.
## 1. Inspecting Pull Requests
### List Pull Requests
- List open PRs:
```sh
tea pulls list
```
- List all PRs including closed:
```sh
tea pulls list --state all
```
### View Pull Request Details
- View basic PR details:
```sh
tea pulls <index>
```
- Inspect mergeability and CI status:
```sh
tea pulls <index> --fields index,title,state,mergeable,ci,base,head
```
---
## 2. Creating and Updating Pull Requests
### Create a Pull Request
- Create standard PR with multi-line description via heredoc:
```sh
tea pulls create --title "<title>" --base "<base-branch>" --head "<feature-branch>" --description-file - <<'EOF'
Closes #<issue-index>
## Summary of Changes
...
EOF
```
- Create as a Draft / WIP PR:
```sh
tea pulls create --title "WIP: <title>" --draft --base "<base-branch>" --head "<feature-branch>" --description-file - <<'EOF'
...
EOF
```
- Assign milestone or labels:
```sh
tea pulls create --title "<title>" --base "<base>" --milestone "<milestone-name>" --labels "<label1,label2>" --description-file -
```
### Edit a Pull Request
- Update title or milestone:
```sh
tea pulls edit <index> --title "<new-title>" --milestone "<milestone-name>"
```
---
## 3. Review Comments and Discussions
### List Review Comments
- View all inline review comments:
```sh
tea pulls review-comments <index>
```
- View general PR comments:
```sh
tea comments list <index>
```
### Reply to Review Comments
- Reply to an inline review comment:
```sh
tea pulls reply <index> <comment-id> "<reply-text>"
```
- Add a top-level comment to the PR:
```sh
tea comment <index> "<comment-text>"
```
### Resolve Review Comments
- Mark an inline review comment as resolved:
```sh
tea pulls resolve <comment-id>
```
- Unresolve a comment if follow-up is needed:
```sh
tea pulls unresolve <comment-id>
```
---
## 4. Closing and Merging Pull Requests
### Close or Reopen PR
- Close without merging:
```sh
tea pulls close <index>
```
- Reopen closed PR:
```sh
tea pulls reopen <index>
```
### Merge Pull Request (Human Release Authorization Required)
- Merge using specified merge style (`merge`, `rebase`, `squash`, `rebase-merge`):
```sh
tea pulls merge <index> --style rebase --title "<commit-title>" --message "<commit-body>"
```
- **Operator Safety Rule**: Skills report merge readiness. Only execute `tea pulls merge` when the human owner has explicitly authorized merging.