From 205d9ec282f493e9863bc7735369ee447d340042 Mon Sep 17 00:00:00 2001 From: Samuel Paluba Date: Sun, 15 Nov 2026 13:31:14 +0100 Subject: [PATCH] Require active GitHub workflows and chronological issue updates --- .codex-plugin/plugin.json | 2 +- .github/ISSUE_TEMPLATE/bug.yml | 1 + .github/ISSUE_TEMPLATE/feature.yml | 1 + CHANGELOG.md | 8 ++ GITHUB.md | 9 ++ README.md | 13 ++ docs/DECISIONS.md | 7 + docs/VERIFICATION.md | 12 ++ .../2026-11-15-active-github-workflow.md | 30 +++++ scripts/audit.py | 42 +++++- scripts/check_completion.py | 96 ++++++++++++++ scripts/validate.py | 2 +- skills/full-github/SKILL.md | 10 +- .../references/collaboration-options.md | 2 +- skills/full-github/references/completion.md | 28 ++++ .../references/history-interaction.md | 4 + .../full-github/references/issue-lifecycle.md | 83 ++++++++++++ skills/full-github/references/workflows.md | 2 +- tests/test_audit.py | 41 ++++++ tests/test_completion.py | 121 ++++++++++++++++++ wiki/Home.md | 2 +- wiki/Verification.md | 12 ++ wiki/Workflow.md | 13 ++ wiki/_Footer.md | 3 + wiki/_Sidebar.md | 2 + 25 files changed, 538 insertions(+), 8 deletions(-) create mode 100644 docs/superpowers/plans/2026-11-15-active-github-workflow.md create mode 100644 scripts/check_completion.py create mode 100644 skills/full-github/references/completion.md create mode 100644 skills/full-github/references/issue-lifecycle.md create mode 100644 tests/test_completion.py create mode 100644 wiki/Workflow.md create mode 100644 wiki/_Footer.md diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 57aade1..b8f6d3e 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "full-github", - "version": "0.3.1", + "version": "0.4.0", "description": "Source-backed GitHub capability discovery and execution for Codex, including repository, organization and enterprise workflows.", "author": { "name": "ThinkHome", diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index a72397d..e041d22 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -1,6 +1,7 @@ name: Bug description: Report a broken GitHub workflow labels: [bug] +type: Bug body: - type: textarea id: expected diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index a8be0f7..000ef85 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,6 +1,7 @@ name: Workflow improvement description: Propose a GitHub capability labels: [enhancement] +type: Feature body: - type: textarea id: goal diff --git a/CHANGELOG.md b/CHANGELOG.md index b570ff5..da36550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.4.0 + +- Require active feature reconciliation and new chronological issue comments during delivery; preserve descriptions and independent worker comments. +- Add issue-level audit for metadata, comments, timeline, shared fields, Projects, parent/children, blockers and artifacts. +- Add a full-catalog completion gate rejecting incomplete, unverified or missing decisions. +- Document screenshot issue controls, native menu operations and CLI/API/UI fallbacks; assign native types on issue forms. +- Reconcile real child work, dependency, fields, Project instructions/status updates and Wiki footer/navigation. Preserve restricted field visibility and historical dates. + ## 0.3.1 — 2026-11-15 - Bind packaged and published artifacts to the peeled release-tag commit and protect release tags from update/deletion. diff --git a/GITHUB.md b/GITHUB.md index cdf2124..e75f722 100644 --- a/GITHUB.md +++ b/GITHUB.md @@ -52,3 +52,12 @@ The release environment permits matching v* tags. Build verifies the tagged comm This repository enables native release immutability. Future published tags/assets are frozen, and corrections are issued as a new release. Release tags matching v* have an active no-bypass ruleset blocking updates and deletion before publication. Packaging checks the peeled local tag against HEAD, and publication compares the artifact comment and peeled remote tag with the build job commit. Reviewed release notes are supplied explicitly. Review pre-existing drafts created outside this workflow for required delivery information before using them; the publisher preserves their existing prose. + + +## Active full-profile delivery + +Read skills/full-github/references/issue-lifecycle.md. Append new issue comments for kickoff, material findings/decisions, review and final delivery. A body edit or local journal entry cannot replace that native conversation. Independent workers must not edit a shared first comment. Read back comment IDs and reconcile uncertain posts before retrying. + +Native child issues 15/16 decompose work tracked in 14. Use sub-issues for independently accepted work and dependencies for actual ordering. Read native type, labels, assignee, shared values, Project status/priority, milestone and development links. Preserve organization-only issue field visibility and existing Project views. The public Project-local Priority remains visible without exposing restricted owner fields. Start dates are observations; target dates are explicitly best-effort estimates. + +Use scripts/audit.py OWNER/REPO --issue NUMBER for issue-level evidence. For full setup/audit use scripts/check_completion.py LEDGER.json with every catalog capability; resolve unfinished rows before claiming full completion. The check validates evidence claims, so linked live state must still be inspected. Ordinary fixes assess all relevant controls without manufacturing irrelevant objects. diff --git a/README.md b/README.md index dfb3b02..ab2b2da 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,19 @@ REST execution records append-only local attempt/result events with host and tar People can use [Q&A](https://github.com/thinkhome-org/full-github/discussions/categories/q-a), [Ideas](https://github.com/thinkhome-org/full-github/discussions/categories/ideas), issue forms and PR reviews. The [pinned welcome discussion](https://github.com/thinkhome-org/full-github/discussions/10) explains participation. See [community workflow](docs/COMMUNITY.md), [changelog](CHANGELOG.md) and [recorded decisions](docs/DECISIONS.md). +## Active use and chronological issues + +Full GitHub requires agents using the skill to inspect relevant native controls, reconcile useful features and explain unavailable/inapplicable ones. Progress is posted as new issue comments at material checkpoints. The issue body remains the current specification; parallel workers must not overwrite a shared first comment. Issues use chronological comments and quote links; Discussions and PR reviews provide nested replies. + +```sh +python3 scripts/audit.py thinkhome-org/full-github --organization --project 5 --issue 14 +python3 scripts/check_completion.py coverage-ledger.json +``` + +The first command inspects issue metadata, comments, timeline, shared fields, Project membership, parent/children, dependencies and artifacts alongside repository probes. Attention prompts need a real decision, rather than artificial dates or relationships. The second checks every catalog capability for a complete, evidence-linked final decision during full setup/audit; incomplete ledgers fail. It validates submitted claims, so inspect linked live evidence separately. See the [issue lifecycle](skills/full-github/references/issue-lifecycle.md) and [completion contract](skills/full-github/references/completion.md). + +The skill provides required behavior and executable checks when loaded. Codex controls skill invocation; a plugin cannot globally intercept unrelated agents or guarantee compliance outside its active workflow. + ## Coverage The 2026-11-15 inventory contains **261 capability families**, **1,281 published REST operations**, **32 GraphQL queries**, **285 GraphQL mutations** and **1,881 GraphQL types**. The configuration layer contains 459 concrete option decisions across 82 groups. Deprecated and retired operations are identified separately. Eighteen confirmed retired operations are blocked by the REST executor. diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index ee633f1..8fd7df6 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -35,3 +35,10 @@ Repository release immutability is enabled for future publications. The native G A fresh three-domain review reproduced gaps in publication identity, source portability, generated Wiki checks and configuration guidance. Release refs now prohibit update/deletion through an active no-bypass repository ruleset. The publisher binds ZIP/source/tag identities before creating or resuming a draft and immediately before publishing. The build job passes its peeled checked-out commit explicitly. Reviewed release notes accompany generated change history on new drafts. Existing human-written draft prose is preserved and requires review if it originated outside this workflow. Marketplace validation checks portable declared sources, identities and supported policy shape. The generated Wiki catalogs share the same rendering/check gate as repository catalogs. + + +## 2026-11-15 — Active use and chronological delivery + +Issue 14 supersedes the assumption that catalog support and PR history sufficiently demonstrate actual use. Existing work issues had zero comments. New comments are required at material events; existing descriptions retain current scope. Retrospective delivery links are explicitly dated as new comments rather than invented past dialogue. Native sub-issues 15/16 separate deliverables; 16 depends on accepting the gate in 15. + +Full setup/audit claims require the complete ledger gate plus live evidence inspection. A gate validates claims and cannot make source evidence truthful or force unloaded skills. Relevant controls must be actively assessed in ordinary tasks. Organization-only fields retain their access boundaries; public Project Priority remains distinct. Missing arbitrary dates, destructive moderation or unrelated personal/billing objects are not reasons to manufacture state. diff --git a/docs/VERIFICATION.md b/docs/VERIFICATION.md index 14794e8..fca5d0a 100644 --- a/docs/VERIFICATION.md +++ b/docs/VERIFICATION.md @@ -1,5 +1,17 @@ # Verification record +## Version 0.4.0 + +The reported conversation gap was reproduced in the live API and browser. All five prior work issues had zero comments. New comments explicitly add retrospective delivery references without recreating a fictional timeline. Current work in issue 14 uses chronological kickoff/findings/review/delivery entries, native children 15/16, a real blocker relationship and attached plan artifact 1. Shared field visibility is preserved. + +- The regression suite covers complete/malformed/incomplete ledgers, all catalog IDs, safe evidence links and issue-level inspection with unknown read failures. The final installed count is recorded in the release receipt. +- The completion gate rejects unfinished or missing decisions. It validates submitted evidence claims, not live truth; no fabricated 261-row repository ledger was created. +- Issue-level audit reads actual metadata, comments, timeline, parent/children, dependencies, shared fields, artifacts and paginated Project memberships. Attention prompts do not require invented relationships or dates. +- Native Project README and an actual status update were published and read back. Existing four views and organization-only fields remain intact. Overview now shows native Type, Milestone and public Priority alongside its original fields. Reloading the canonical saved view verified persistence. GraphQL still omits the rendered built-in Type column, so this evidence came from the UI. +- New issue forms select native Bug/Feature types. Wiki adds Workflow and a useful native footer. Final publication/rendered read-back and immutable release evidence are recorded in the release-specific Wiki receipt. + +This is behavioral guidance plus executable acceptance checks when the skill is loaded. Host selection and agent compliance cannot be globally intercepted by a skill. Nested issue-comment threads are not a supported API feature; chronological comments, quote links, Discussion replies and PR review threads remain distinct. + ## Version 0.3.1 Three fresh review agents examined runtime correctness, option/procedure coverage and publication/installation. The runtime reviewer found no actionable defect in the assigned execution/history scope. Twelve concrete review findings were corrected and verified, including two additional portability/policy cases from rechecking the first fixes. diff --git a/docs/superpowers/plans/2026-11-15-active-github-workflow.md b/docs/superpowers/plans/2026-11-15-active-github-workflow.md new file mode 100644 index 0000000..69c323b --- /dev/null +++ b/docs/superpowers/plans/2026-11-15-active-github-workflow.md @@ -0,0 +1,30 @@ +# Active GitHub workflow implementation plan + +> For agentic workers use the existing scoped agent assignments. Continue authorized autonomous execution. + +**Goal** Make full-profile decisions and native issue conversations observable and required during delivery. + +**Architecture** Keep the existing skill, gh executor and catalog. Add one read-only ledger gate and extend the existing audit to issue-level objects. Use native comment creation for chronology rather than introducing a second posting client. Preserve descriptions, existing views and restricted fields. + +**Tech stack** Python standard library, gh, Git, native GitHub APIs and UI. + +**User specification** Existing autonomous Full GitHub request plus screenshots of issue metadata/actions, comments and Wiki footer. All eligible capabilities must be actively assessed; missing rights and inapplicability remain explicit decisions. + +## Tasks + +- [x] Inspect current repository and official issue/Wiki procedures, reproduce absent comments. +- [x] Require kickoff, changed findings/decisions, verification and release comments; document concurrency, retry and no overwrite semantics. +- [x] Add failing tests then issue-level audit probes and metadata/conversation attention checks. Preserve unknown permission failures. +- [x] Add tested full-profile completion gate rejecting missing or unfinished capability decisions. +- [x] Reconcile actual issue types, shared vs Project fields, parent/subissues, real dependency, priority, dates and Project README/status update without fabricating history or deadlines. +- [x] Add issue-form native types, Wiki lifecycle page/footer and links from the skill and installed user documentation. +- [x] Review changes, run all regression/registry/generated checks and exercise live issue comments and inspection. +- [ ] Merge via linked PR, publish and install a new version, verify provenance/bytes and document final release evidence in native comments and Wiki. + +## Review focus + +- Failed reads never mean absent settings. +- Comments are new chronological entries; independent workers never replace a shared comment. +- Newer CLI commands have API/UI fallback on installed gh2.96. +- Full-profile gate validates evidence claims; actual read-back remains required. +- Private shared fields and personal views never become public merely to fill a UI slot. diff --git a/scripts/audit.py b/scripts/audit.py index dccf10d..32c0a29 100644 --- a/scripts/audit.py +++ b/scripts/audit.py @@ -58,11 +58,13 @@ def read_probe(command, run): return {"status": "unknown", "error": str(error)} -def audit(repo, run=subprocess.run, organization=False, project=None): +def audit(repo, run=subprocess.run, organization=False, project=None, issue=None): if not re.fullmatch(r"[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+", repo) or any(part in (".", "..") for part in repo.split("/")): raise ValueError("Expected OWNER/REPO") if project is not None and (not isinstance(project, int) or project < 1): raise ValueError("Project number must be positive") + if issue is not None and (type(issue) is not int or issue < 1): + raise ValueError("Issue number must be positive") endpoints = { "repository": f"repos/{repo}", "labels": f"repos/{repo}/labels", @@ -104,6 +106,41 @@ def audit(repo, run=subprocess.run, organization=False, project=None): if not project_owner or project_owner.get("projectV2") is None: result[key]["status"] = "unknown" result[key]["error"] = "Project is absent or inaccessible" + if issue is not None: + base = f"repos/{repo}/issues/{issue}" + paths = {"issue": "", "issue_comments": "/comments", "issue_timeline": "/timeline", + "issue_sub_issues": "/sub_issues", "issue_parent": "/parent", + "issue_blocked_by": "/dependencies/blocked_by", "issue_blocking": "/dependencies/blocking", + "issue_artifacts": "/artifacts", "issue_fields": "/issue-field-values"} + for key, path in paths.items(): + result[key] = read_probe(["gh", "api", "--paginate", "--slurp", base + path], run) + query = ("query($owner:String!,$name:String!,$number:Int!,$endCursor:String){repository(owner:$owner,name:$name){" + "issue(number:$number){projectItems(first:100,after:$endCursor){nodes{id isArchived project{id title url}}" + "pageInfo{hasNextPage endCursor}}}}}") + result["issue_projects"] = read_probe(["gh", "api", "graphql", "--paginate", "--slurp", "-f", "query=" + query, + "-F", "owner=" + owner, "-F", "name=" + repo.split("/")[1], + "-F", "number=" + str(issue)], run) + project_pages = result["issue_projects"].get("pages") + try: + if not isinstance(project_pages, list) or not project_pages: + raise ValueError("Missing project membership pages") + for page in project_pages: + connection = page["data"]["repository"]["issue"]["projectItems"] + if not isinstance(connection["nodes"], list) or not isinstance(connection["pageInfo"]["hasNextPage"], bool): + raise ValueError("Invalid project membership connection") + except (TypeError, KeyError, ValueError): + result["issue_projects"]["status"] = "unknown" + result["issue_projects"]["error"] = "Issue Project membership is absent, inaccessible or malformed" + pages = result["issue"].get("pages") + if result["issue"]["status"] != "observed" or not isinstance(pages, list) or len(pages) != 1 or not isinstance(pages[0], dict) or pages[0].get("number") != issue: + result["issue"]["status"] = "unknown" + result["issue_attention"] = ["Issue state could not be read; reconcile permissions before evaluating metadata"] + else: + item = pages[0] + result["issue_attention"] = [key for key in ("type", "labels", "assignees", "milestone") if not item.get(key)] + if item.get("comments") == 0: + result["issue_attention"].append("conversation") + # These are attention prompts, not a universal requirement to invent relationships or dates. return result @@ -112,9 +149,10 @@ def audit(repo, run=subprocess.run, organization=False, project=None): parser.add_argument("repository") parser.add_argument("--organization", action="store_true", help="Also inspect repository owner's organization configuration") parser.add_argument("--project", type=int, help="Inspect an owner Project's fields, items and views") + parser.add_argument("--issue", type=int, help="Inspect one issue conversation, metadata, relationships and artifacts") args = parser.parse_args() try: - snapshot = audit(args.repository, organization=args.organization, project=args.project) + snapshot = audit(args.repository, organization=args.organization, project=args.project, issue=args.issue) except (ValueError, subprocess.TimeoutExpired, OSError) as error: parser.exit(2, f"{error}\n") print(json.dumps(snapshot, indent=2)) diff --git a/scripts/check_completion.py b/scripts/check_completion.py new file mode 100644 index 0000000..45e52c8 --- /dev/null +++ b/scripts/check_completion.py @@ -0,0 +1,96 @@ +"""Check a full-profile coverage ledger; this validates claims, not live GitHub state.""" +import argparse +import json +from pathlib import Path +import re +import sys +from urllib.parse import urlsplit + +from execution_history import validate_reference + + +CAPABILITY_IDS = {row['id'] for row in json.loads( + (Path(__file__).resolve().parents[1] / 'skills/full-github/data/capabilities.json').read_text())['capabilities']} +FINAL_STATES = {'configured': 'matched', 'unavailable': 'gate-confirmed', + 'not-applicable': 'context-confirmed'} +PLACEHOLDERS = {'unknown', 'todo', 'tbd', 'n/a', 'not-applicable', 'unavailable'} + + +def check(ledger): + """Return complete/checked/gaps for repository and all catalog capability rows. + + Each row needs id, state, desired, observed, action, gate, evidence (HTTPS + links), and verification. Unavailable/inapplicable rows also need a reason. + Explicit verification distinguishes read-back from command success; observed + objects may contain extra metadata, so values are not compared structurally. + """ + gaps = [] + def gap(field, message): + gaps.append({'field': field, 'message': message}) + + if not isinstance(ledger, dict): + return {'complete': False, 'checked': 0, + 'gaps': [{'field': 'ledger', 'message': 'Expected a JSON object'}]} + repository = ledger.get('repository') + if not isinstance(repository, str) or not re.fullmatch(r'[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+', repository) or any( + part in ('.', '..') for part in repository.split('/')): + gap('repository', 'Expected OWNER/REPO') + rows = ledger.get('capabilities') + if not isinstance(rows, list): + gap('capabilities', 'Expected the full catalog as an array of rows') + rows = [] + seen = set() + for index, row in enumerate(rows): + prefix = f'capabilities[{index}]' + if not isinstance(row, dict): + gap(prefix, 'Expected a capability object') + continue + capability_id = row.get('id') + if not isinstance(capability_id, str) or capability_id not in CAPABILITY_IDS: + gap(prefix + '.id', 'Unknown capability ID') + continue + if capability_id in seen: + gap(prefix + '.id', 'Duplicate capability ID') + seen.add(capability_id) + state = row.get('state') + if not isinstance(state, str) or state not in FINAL_STATES: + gap(prefix + '.state', 'Unfinished or invalid state; reconcile before completion') + elif row.get('verification') != FINAL_STATES[state]: + gap(prefix + '.verification', f'Expected {FINAL_STATES[state]} after inspecting evidence') + for field in ('desired', 'observed', 'action', 'gate'): + value = row.get(field) + if (field in ('action', 'gate') and not isinstance(value, str)) or value is None or value == '' or value == [] or value == {} or ( + isinstance(value, str) and (not value.strip() or value.strip().lower() in PLACEHOLDERS)): + gap(prefix + '.' + field, 'Provide the concrete configuration, action or access gate') + if state in ('unavailable', 'not-applicable'): + reason = row.get('reason') + if not isinstance(reason, str) or not reason.strip() or reason.strip().lower() in PLACEHOLDERS: + gap(prefix + '.reason', 'Provide a concrete target-specific reason') + evidence = row.get('evidence') + if not isinstance(evidence, list) or not evidence: + gap(prefix + '.evidence', 'Provide at least one HTTPS evidence link') + else: + for link in evidence: + try: + if not isinstance(link, str) or not link or any(c.isspace() or ord(c) < 32 or ord(c) == 127 for c in link): + raise ValueError('Invalid evidence link') + validate_reference(link) + urlsplit(link).port + except ValueError: + gap(prefix + '.evidence', 'Evidence must be HTTPS without credentials, whitespace or query parameters') + for capability_id in sorted(CAPABILITY_IDS - seen): + gap('capabilities.' + capability_id, 'Missing catalog capability') + return {'complete': not gaps, 'checked': len(seen), 'gaps': gaps} + + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('ledger', type=Path, help='JSON object with repository and capabilities rows') + args = parser.parse_args() + try: + result = check(json.loads(args.ledger.read_text())) + except (OSError, UnicodeError, json.JSONDecodeError): + result = {'complete': False, 'checked': 0, + 'gaps': [{'field': 'ledger', 'message': 'Cannot read a valid UTF-8 JSON ledger'}]} + print(json.dumps(result, indent=2)) + sys.exit(0 if result['complete'] else 1) diff --git a/scripts/validate.py b/scripts/validate.py index 252758d..e1575ef 100644 --- a/scripts/validate.py +++ b/scripts/validate.py @@ -30,7 +30,7 @@ products = policy.get("products") assert products is None or (isinstance(products, list) and all( product in ("chatgpt", "codex", "atlas", "CHATGPT", "CODEX", "ATLAS") for product in products)), "Unsupported product restrictions" -for reference in ("features.md", "workflows.md", "operations.md", "collaboration.md", "delivery-security.md", "administration.md", "collaboration-options.md", "delivery-options.md", "administration-options.md", "history-interaction.md"): +for reference in ("features.md", "workflows.md", "operations.md", "collaboration.md", "delivery-security.md", "administration.md", "collaboration-options.md", "delivery-options.md", "administration-options.md", "history-interaction.md", "issue-lifecycle.md", "completion.md"): assert (root / "skills/full-github/references" / reference).is_file() assert (root / "skills/full-github/SKILL.md").read_text().startswith("---\n") data = root / "skills/full-github/data" diff --git a/skills/full-github/SKILL.md b/skills/full-github/SKILL.md index 94a8917..49e0aa2 100644 --- a/skills/full-github/SKILL.md +++ b/skills/full-github/SKILL.md @@ -5,7 +5,7 @@ description: Use GitHub throughout repository setup, audit, development, plannin # Full GitHub -Use the full profile by default. Start with references/features.md and references/operations.md. The catalog enumerates individual capabilities, their actual operation routes, source documentation, permission gates and required verification. +Use the full profile by default for every GitHub task, including ongoing work. Start with references/features.md and references/operations.md. Read references/issue-lifecycle.md before tracked work. Do not wait for the user to name missing features. The catalog enumerates individual capabilities, their actual operation routes, source documentation, permission gates and required verification. ## Discover the complete surface @@ -16,6 +16,14 @@ Use the full profile by default. Start with references/features.md and reference 5. Maintain one coverage ledger row per applicable capability ID, with desired configuration, observed configuration, action, permission/plan gate, evidence URL/object ID and final state. Use configured, available-unconfigured, unavailable, not-applicable or unknown. Record a concrete reason for each unavailable or inapplicable row. A successful API read is evidence of observation, not configuration correctness. 6. With agent tools available, delegate independent collaboration, delivery/security and administration discovery to agents. Give each its exact catalog scope and require official sources and evidence. Consolidate their findings and inspect unresolved gaps before finishing. +## Required execution contract + +Discovering a capability is not using it. At task start inspect the actual repository and relevant owner objects, then actively reconcile every applicable control. Never silently omit type, structured fields, Project/status, priority, milestone, relationships, development links, conversation, review, documentation or delivery evidence. Preserve explicit reasons where a control does not serve this work. Inspect the rendered repository/issue/Project/Wiki through available browser tools when UI-only settings or observed behavior cannot be established by API; record the exact remaining step if access is unavailable. + +For full setup or a full audit, maintain the complete catalog ledger and run `python3 /scripts/check_completion.py LEDGER.json` before claiming completion. All catalog IDs must occur once with concrete desired/observed/action/gate/evidence and a verified final state. Missing, unknown or available-unconfigured rows fail. Read references/completion.md for the schema. This validates recorded claims; independently inspect the linked live evidence and current policies. A failed gate means unfinished work, not permission to relabel gaps. Continue authorized recovery; report genuine external gates honestly. + +For delivery tasks inspect the complete relevant issue lifecycle, update native state and read it back. Run `python3 /scripts/audit.py OWNER/REPO --issue NUMBER` with applicable `--organization`/`--project` arguments. Resolve attention prompts or explain applicability. Append new comments when work starts, findings/decisions change, review is ready and delivery is verified. Preserve the issue body as scope and acceptance criteria. Never use repeated body/first-comment replacement, `--edit-last`, or shared comment upserts as the progress conversation. Separate workers post independent meaningful comments and link the comment they answer; read back before retrying an uncertain post. See references/issue-lifecycle.md. + ## Full setup Full setup considers the whole catalog. Enable and configure eligible capabilities serving this project, including advanced fields, views, automation, review rules, security controls and documentation. Evaluate newer API features and owner-level integrations rather than silently stopping at a baseline. Determine applicability from the actual project and document the reason. diff --git a/skills/full-github/references/collaboration-options.md b/skills/full-github/references/collaboration-options.md index 559c941..79d1770 100644 --- a/skills/full-github/references/collaboration-options.md +++ b/skills/full-github/references/collaboration-options.md @@ -14,7 +14,7 @@ Choose applicability from the real workflow: a single-maintainer library can hav 1. **Before work:** read instructions, issue body, relevant complete timeline/comments and linked decisions; search for duplicates; inspect Project status, ownership, blockers and any existing PR. Record current IDs and SHAs. 2. **Triage:** reuse existing native type/labels/fields; agree what completion means; preserve reporter evidence. Distinguish an actionable defect, unanswered question, early design discussion and declined proposal. Reopen the same unfinished work rather than fragmenting its history. -3. **While implementing:** keep scope and current evidence accurate in the issue/PR description; preserve the chronology of material decisions in authorized progress messages. Follow the project's actual status transitions and notify only relevant people when authorized. +3. **While implementing:** add new chronological issue comments for meaningful progress, changed decisions, blockers, review readiness and delivery. Keep the description as current scope/acceptance criteria; description edits or repeatedly updating the first comment never replace progress comments. Follow the project's actual status transitions and notify only relevant people when authorized. Use [issue-lifecycle.md](issue-lifecycle.md) for mandatory checkpoints, sidebar reconciliation and native relationship/artifact procedures. 4. **Review:** read summary and inline threads, including outdated/resolved threads when relevant. Reply at the original finding with the implementing commit, reasoned disagreement or a linked follow-up. Submit pending reviews intentionally. Resolve only addressed/agreed findings and re-request review when appropriate and authorized. 5. **Delivery:** compare reviewed/current head; satisfy effective checks/review/queue rules; wait for actual merge and inspect resulting commit, issue closure and Project automations. A green enqueue or closed issue does not establish release/deployment. 6. **After delivery:** publish affected docs/Wiki only through the configured publication path, verify the remote rendered result, and retain issue→PR→commit→release/documentation links. Report partial/gated work precisely and retain previous decisions and unsuccessful attempts when they explain the final state. diff --git a/skills/full-github/references/completion.md b/skills/full-github/references/completion.md new file mode 100644 index 0000000..4aac1b2 --- /dev/null +++ b/skills/full-github/references/completion.md @@ -0,0 +1,28 @@ +# Full-profile completion gate + +A full setup/audit must evaluate every catalog capability, actively configure eligible useful features and preserve reasons for unavailable or inapplicable ones. Defaulting every feature off or listing supported endpoints is insufficient. Ordinary delivery tasks follow the relevant controls in [issue-lifecycle.md](issue-lifecycle.md). + +Run `python3 /scripts/check_completion.py LEDGER.json`. Exit zero means the submitted ledger is structurally complete and claims verified final decisions for every catalog ID. It does not fetch evidence or establish its truth. Inspect live read-back, permission and project-context evidence separately. The host must load and follow this skill; a plugin cannot globally force an unrelated agent's tool calls. + +The JSON object has repository `OWNER/REPO` and a `capabilities` array containing each catalog ID exactly once. Each row uses this shape. + +```json +{ + "id": "repository-lifecycle", + "state": "configured", + "desired": {"visibility": "public"}, + "observed": {"visibility": "public", "id": 123}, + "action": "Retained the approved public repository configuration", + "gate": "Existing repository administration authorization", + "evidence": ["https://github.com/OWNER/REPO/issues/NUMBER#issuecomment-ID"], + "verification": "matched" +} +``` + +This is one example row, not a complete ledger or observed evidence. Use the actual desired configuration and read-back facts, including false/zero values where valid. Fields `action` and `gate` must be concrete text. Evidence must be nonempty HTTPS links without embedded credentials, query parameters, whitespace or control characters. Keep sensitive owner evidence in an appropriately restricted record. + +Final states are `configured` with `verification: matched`, `unavailable` with `verification: gate-confirmed` and a target-specific `reason`, or `not-applicable` with `verification: context-confirmed` and a project-specific `reason`. Every state retains desired/observed/action/gate/evidence. An unavailable operation needs actual gate evidence; a feature that does not serve the project needs a contextual decision. Never invent absence, rights, entitlement or author approval to obtain a passing result. + +`unknown`, `available-unconfigured`, duplicates, missing or unknown IDs and missing evidence fail. Preserve unfinished rows and continue meaningful work. A genuinely blocked feature remains an explicit limitation; do not call a failed gate a completed full setup. + +Keep the ledger current after configuration changes and link it from the owning issue. Review representative customized and newly created objects after reconciliation. Preserve content, IDs, historical discussion and authorized access. Finishing the relevant code change is distinct from claiming every possible tenant operation was executed. diff --git a/skills/full-github/references/history-interaction.md b/skills/full-github/references/history-interaction.md index 2ebcd2f..afb5a49 100644 --- a/skills/full-github/references/history-interaction.md +++ b/skills/full-github/references/history-interaction.md @@ -8,6 +8,10 @@ Identify the actual repository and people affected. Read current configuration a Use the configuration option groups to distinguish provider defaults from a recommendation for this project. Check nested enum, type, required, cardinality and nullable constraints using the full schema inspector and current official documentation. Read operational errata before applying a generated schema literally. +## Conversation is chronological + +Follow [issue-lifecycle.md](issue-lifecycle.md). Create new issue comments at material work checkpoints and read back their IDs, authors and content. Body edits maintain the current specification and never replace progress discussion. Parallel workers must not overwrite a shared comment. Quote/link an earlier comment when replying; nested replies belong to Discussions or PR review threads. Keep real final release/verification comments even when automatic PR closure already occurred. + ## Native history - Git commits, branches, reviews and PR conversations explain implementation and acceptance. Preserve review threads and authorship. Add a comment explaining changed intent instead of replacing the historical discussion. diff --git a/skills/full-github/references/issue-lifecycle.md b/skills/full-github/references/issue-lifecycle.md new file mode 100644 index 0000000..04181c9 --- /dev/null +++ b/skills/full-github/references/issue-lifecycle.md @@ -0,0 +1,83 @@ +# Issues as an ongoing collaboration record + +Reviewed against GitHub.com documentation on 2026-11-15. Read this before creating or updating tracked work, together with [history-interaction.md](history-interaction.md) and [collaboration-options.md](collaboration-options.md). A catalog entry proves discovery; it does not prove this workflow was followed. + +## Required operating behavior + +Use a live issue for substantial work. Read its description, all relevant comments and complete timeline before acting. Preserve the reporter's words, evidence, authorship and existing links. Inspect current owner/type/labels, shared field values, Project items/status, milestone, parent/children, dependencies, artifacts and linked development before filling gaps. Read every page or record the inventory as incomplete. + +Keep the description as the current scope and acceptance criteria. **Add a new comment for each material progress checkpoint, changed decision, blocker, review response and delivery result. Do not repeatedly replace the issue body or the first comment to simulate a conversation.** A summary edit can accompany a comment, but cannot replace it. Fix small typos in your own text when useful; preserve consequential changes with a new explanation and source link. Never edit another person's comment as routine progress reporting. + +Use these checkpoints when their event occurs; combine adjacent events into one useful update instead of posting empty heartbeat comments. + +| Event | New timeline comment must contain | +| --- | --- | +| Work starts | Agreed scope, proposed steps, ownership and intended acceptance evidence. | +| Material finding or scope change | What was observed, its evidence, consequence and superseded decision if any. | +| Blocked or needing a human decision | Exact blocker, attempted recovery, focused question and independently continuing work. | +| Ready for review | Linked PR/commit, tests, remaining limits and what reviewers should inspect. | +| Delivered | Actual merged commit/release/deployment/docs links, verification result and unfinished work. | + +Use `issues/create-comment` with a JSON body file containing `body`, or `gh issue comment ISSUE --body-file FILE`. Read back the returned comment ID/body/author/URL. After a timeout, look for the attempted comment before retrying. Do not use `issues/update-comment`, `gh issue comment --edit-last`, or an upserted bot summary for progress checkpoints. Stable bot summaries may coexist only when separately identified and chronological updates remain intact. [REST issue comments](https://docs.github.com/en/rest/issues/comments). + +Issue comments are a chronological conversation; the issue-comment API has no nested `reply_to` or thread-parent argument. Link the exact comment being answered and quote only the relevant sentence. Use a separate linked issue for independently owned work, a Discussion with replies for open-ended topics, and PR review threads for line-specific review. Preserve their links in the issue. Do not claim nested issue reply threads were configured. [Comment API](https://docs.github.com/en/rest/issues/comments), [Discussion participation](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions). + +## Reconcile every sidebar control + +For every row, use it when it serves this work; otherwise retain an explicit reason in the work's applicability record. Blank controls alone do not prove an omission, but an unexamined control cannot be marked complete. Do not invent dates, severity, ownership or relationships to make a sidebar look full. + +| Control | Required decision and read-back | +| --- | --- | +| Assignees | Identify the actual accountable actor; use only assignable users and verify returned logins. Delegated agent execution does not imply assigning unrelated humans. | +| Labels and type | Read available owner/repository taxonomy. Set the appropriate native type in addition to relevant labels; a bug label is not an issue type. Preserve unrelated labels and existing type choices unless correcting them with a reason. | +| Shared issue fields | Read definitions/options and existing issue values; choose valid native Priority/Effort/date values when the work provides a basis. Use field IDs and exact option names for REST, node/option IDs for GraphQL as the schema requires. Record a genuine unknown instead of inventing a commitment. | +| Projects | Add the actual issue to the intended owner Project; read its item ID and field values, then maintain Status with real progress. A repository Project tab and issue open/closed state are separate. | +| Milestone | Use an existing delivery milestone when a real release/scope exists. Verify the issue's milestone number and target; do not fabricate a release/date for unplanned intake. | +| Relationships | Check parent, children, blocking and blocked-by separately. Add native relationships for actual decomposition/order. A mention or checklist is not a configured relationship. | +| Development | Link an issue branch and closing/reference PR as appropriate; read `linkedBranches`, actual ref SHA and PR linkage. A branch-name convention alone is not native issue linkage. | +| Notifications | Preserve viewer subscriptions. Use relevant mentions only when necessary within authorized collaboration; do not subscribe users or generate notification spam to demonstrate a feature. | + +Shared issue fields and Project-local fields have different storage and visibility. Read both before choosing a source of truth; do not accidentally maintain two contradictory Priority fields. Values cannot currently be prefilled by issue templates or URL query parameters. Use the issue sidebar/API or a supported automation and read back. [Issue field values](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/adding-and-managing-issue-fields), [field administration](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/managing-issue-fields). + +Use `issues/list-issue-field-values-for-issue` and `issues/add-issue-field-values` for a targeted change. Read the full schema before `issues/set-issue-field-values`: replacement must preserve unrelated values. Do not delete shared field definitions or options as routine issue completion. Check restricted/public visibility as the intended reader. [REST field values](https://docs.github.com/en/rest/issues/issue-field-values). + +## Native sub-issues and dependency ordering + +Break independent deliverables into native children with their own acceptance criteria, type, ownership and timeline. Reuse an existing matching issue rather than duplicating it. Inventory the existing parent and child list first, including cross-repository visibility. Limits documented for GitHub.com are 100 sub-issues per parent and eight nesting levels; permission/host limits still apply. [Sub-issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/adding-sub-issues). + +- Create an ordinary issue, read its global numeric `id`, then call `issues/add-sub-issue` on the parent with `sub_issue_id`. The payload ID is not the repository issue number. Inspect `replace_parent` before moving a child; do not silently detach existing work. +- Use `issues/get-parent` and `issues/list-sub-issues` to verify both directions. `issues/reprioritize-sub-issue` accepts a child ID plus `before_id` or `after_id`; use observed sibling IDs and verify resulting order. +- A parent/child relationship describes decomposition. An issue dependency describes required ordering. If B is blocked by A, call `issues/add-blocked-by-dependency` on B with A's global numeric `issue_id`; read both `issues/list-dependencies-blocked-by` and `issues/list-dependencies-blocking`. Reject self/cyclic intent and reconcile provider errors rather than creating reciprocal blockers. +- Remove only an obsolete relationship, with a timeline explanation when consequential. Removing a child relation does not delete or complete the child. Parent progress does not establish release delivery. + +The exact indexed REST routes are documented by [sub-issue endpoints](https://docs.github.com/en/rest/issues/sub-issues) and [dependency endpoints](https://docs.github.com/en/rest/issues/issue-dependencies). Current GitHub CLI also documents `--parent`, `--add-sub-issue`, `--blocked-by` and `--blocking`; first inspect installed `gh issue create/edit --help`. Older CLI versions can use the REST executor instead of inventing unsupported flags. [Dependency usage](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-issue-dependencies). + +## Artifacts, plans and evidence + +Use a native issue artifact for a substantial implementation plan, research/decision document or useful prototype; a comment links the artifact and explains the decision. Keep artifacts distinct from Actions workflow artifacts and release assets. Discover current list and names before creation. Supported issue types include `plan`, `generic`, `link` and `embedded_html`; inspect current endpoint schema before choosing the payload. Create/read/update through `issues/*-issue-artifact` operations and verify the actual artifact number, type, name, content and URL. + +An edit creates another artifact version; keep this intentional version history while comments preserve progress chronology. Deleting an artifact also deletes its history and is not routine cleanup. HTML previews execute provided code; inspect trusted source before rendering. `gh issue artifact` requires CLI 2.103.0 or newer; older clients can use the indexed REST API where the target host permits it. [Artifacts with issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/using-artifacts-with-issues). + +## Completion and the issue menu + +| Operation | Procedure and proof | +| --- | --- | +| Completed | Add delivery evidence, then close according to project policy or verify the closing PR's merge automation. Read `state` and `state_reason`; completion must satisfy acceptance criteria. | +| Not planned | Explain the actual disposition and alternatives in a comment; use `state: closed`, `state_reason: not_planned`. Do not classify an unresolved implementation failure as completed. | +| Duplicate | Confirm the canonical target and preserve unique evidence by linking it. On supported REST use `state: closed`, `state_reason: duplicate`, `duplicate_issue_id` with the canonical global numeric ID. GraphQL `closeIssue` takes node IDs. Inspect live schema/host, then verify closure reason and canonical timeline relation. A duplicate label alone is insufficient. | +| Reopen | Explain remaining scope, reopen the same work when appropriate and reconcile Project status and any duplicate relation. Do not create a new issue solely to conceal an unsuccessful attempt. | +| Clone | Use the native Clone issue UI for a separate similar task. Check the draft before creation; verify target metadata, new URL and unchanged original. Manual API recreation must be described as recreation, since native cloning has special notification/prefill behavior. | +| Transfer | Use `gh issue transfer` or GraphQL `transferIssue` after checking destination access and owner compatibility. Verify new URL, old redirect, comments and retained/missing metadata; record affected notification/access implications. | +| Convert to Discussion | Use the native UI when the work is an open-ended question/proposal. Select the appropriate category, preserve original references, then verify destination content/comments and source state. Do not copy/delete the issue and call it a native conversion. | +| Pin/unpin | Use `gh issue pin/unpin` or GraphQL `pinIssue/unpinIssue` for a real repository entry point. Preserve existing pins and read the list afterward. Pinning a comment uses a separate comment endpoint/node. | +| Lock/unlock | Use `issues/lock` or `issues/unlock` only for an actual authorized moderation need; read lock state/reason and affected participation. Completion alone is not a reason to prevent follow-up. | +| Delete | Permanent deletion is destructive and removes history. Keep completed/rejected work closed and searchable; deletion needs an explicit valid reason and applicable authorization. | +| Open in Copilot / reactions / feedback | These are optional handoff, personal reaction and product feedback actions. A handoff requires account/tool eligibility and approved scope; reactions are not acceptance evidence. Do not trigger them merely to fill a coverage row. | + +[Closing](https://docs.github.com/en/issues/tracking-your-work-with-issues/administering-issues/closing-an-issue), [REST update schema](https://docs.github.com/en/rest/issues/issues#update-an-issue), [duplicate reference events](https://docs.github.com/en/issues/tracking-your-work-with-issues/administering-issues/marking-issues-or-pull-requests-as-a-duplicate), [native cloning](https://docs.github.com/en/issues/tracking-your-work-with-issues/administering-issues/cloning-an-issue), [transfer constraints](https://docs.github.com/en/issues/tracking-your-work-with-issues/administering-issues/transferring-an-issue-to-another-repository), [Discussion conversion](https://docs.github.com/en/discussions/managing-discussions-for-your-community/moderating-discussions). + +## Views and final acceptance + +Inspect repository Issues filters, personal dashboard saved Views and owner Project views separately. The same label in the navigation does not imply shared settings. Use meaningful filters for untriaged, blocked, active, review and completed work where relevant; verify the saved query as its actual audience. Personal dashboard views are viewer-specific UI state. Share useful query links or Project views for team workflows; do not claim a personal saved view configures everyone's dashboard. [Issue filters](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests), [dashboard saved views](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/viewing-all-of-your-issues-and-pull-requests). + +Before completion, verify the new chronological comments and preserved earlier comments, actual type/labels/shared values, Project item/status, milestone, native relationships, development links, artifact and acceptance evidence. Record unavailable controls with host/permission evidence and unused controls with a concrete applicability reason. Re-read representative rendered issue and linked destinations. Never report a supported endpoint as proof that the issue was populated correctly. diff --git a/skills/full-github/references/workflows.md b/skills/full-github/references/workflows.md index 070b7e3..81321f8 100644 --- a/skills/full-github/references/workflows.md +++ b/skills/full-github/references/workflows.md @@ -28,7 +28,7 @@ Use the repo's branch convention, or codex/ when none exists. Create ## Wiki -Enable Wiki only within authorized setup. GitHub may require creating the first page through the UI before its .wiki.git remote exists. Clone https://github.com/OWNER/REPO.wiki.git into a separate temporary directory. Pull before editing. Preserve unrelated pages, commit only intended pages, push, and read the remote back. Keep Home.md and _Sidebar.md navigation valid. Do not claim source files under wiki/ are already published. +Enable Wiki only within authorized setup. GitHub may require creating the first page through the UI before its .wiki.git remote exists. Clone https://github.com/OWNER/REPO.wiki.git into a separate temporary directory. Pull before editing. Preserve unrelated pages, commit only intended pages, push, and read the remote back. Keep Home.md, _Sidebar.md and _Footer.md navigation valid. Use a useful footer linking contribution/help routes, releases and verification; inspect the rendered result after publication. Do not claim source files under wiki/ are already published. ## Security and releases diff --git a/tests/test_audit.py b/tests/test_audit.py index ddffba4..6838618 100644 --- a/tests/test_audit.py +++ b/tests/test_audit.py @@ -1,3 +1,4 @@ +import json import importlib.util import subprocess import unittest @@ -73,6 +74,46 @@ def run(argv, **kwargs): self.assertEqual(result["project_views"]["status"], "unknown") self.assertIn("inaccessible", result["project_views"]["error"]) + def test_issue_audit_reads_conversation_relations_and_metadata(self): + calls = [] + def run(argv, **kwargs): + calls.append(argv) + if argv[-1] == "repos/owner/repo/issues/7": + body = '[{"number":7,"labels":[],"assignees":[],"milestone":null,"type":null,"comments":0}]' + else: + body = '[[]]' + return subprocess.CompletedProcess(argv, 0, body, "") + result = module.audit("owner/repo", run, issue=7) + for suffix in ("comments", "timeline", "sub_issues", "parent", "dependencies/blocked_by", "dependencies/blocking", "artifacts", "issue-field-values"): + self.assertTrue(any(argv[-1].startswith("repos/owner/repo/issues/7/" + suffix) for argv in calls), suffix) + self.assertIn("conversation", result["issue_attention"]) + self.assertIn("type", result["issue_attention"]) + self.assertIn("milestone", result["issue_attention"]) + self.assertEqual(result["issue_comments"]["status"], "observed") + + def test_issue_unknown_is_not_reported_as_empty(self): + result = module.audit("owner/repo", lambda *a, **k: subprocess.CompletedProcess(a, 1, "", "HTTP403"), issue=7) + self.assertEqual(result["issue"]["status"], "unknown") + self.assertEqual(result["issue_attention"], ["Issue state could not be read; reconcile permissions before evaluating metadata"]) + + def test_issue_malformed_envelope_remains_unknown(self): + for body in ('{"message":"bad envelope"}', 'null', '1', '[null]', '[{"message":"bad object"}]'): + result = module.audit("owner/repo", lambda *a, **k: subprocess.CompletedProcess(a, 0, body, ""), issue=7) + self.assertEqual(result["issue"]["status"], "unknown") + self.assertIn("could not be read", result["issue_attention"][0]) + + def test_issue_project_null_or_missing_connections_remain_unknown(self): + for data in ({"repository":None}, {"repository":{"issue":None}}, {"repository":{"issue":{"projectItems":None}}}, {"repository":{"issue":{"projectItems":{"nodes":[],"pageInfo":{"hasNextPage":False}}}}}): + body = json.dumps([{"data": data}]) + result = module.audit("owner/repo", lambda *a, **k: subprocess.CompletedProcess(a, 0, body, ""), issue=7) + expected = "observed" if data.get("repository") and data["repository"].get("issue") and data["repository"]["issue"].get("projectItems") else "unknown" + self.assertEqual(result["issue_projects"]["status"], expected) + + def test_invalid_issue_never_executes(self): + for issue in (0, -1, True, "1"): + with self.assertRaises(ValueError): + module.audit("owner/repo", lambda *a, **k: self.fail("executed"), issue=issue) + def test_paginated_response_is_preserved(self): def run(argv, **kwargs): self.assertIn("--paginate", argv) diff --git a/tests/test_completion.py b/tests/test_completion.py new file mode 100644 index 0000000..f18733a --- /dev/null +++ b/tests/test_completion.py @@ -0,0 +1,121 @@ +import copy +import importlib.util +import json +from pathlib import Path +import subprocess +import sys +import tempfile +import unittest + + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / 'scripts')) +spec = importlib.util.spec_from_file_location('check_completion', ROOT / 'scripts/check_completion.py') +module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(module) + + +class CompletionTests(unittest.TestCase): + def setUp(self): + self.ledger = {'repository': 'example/repository', 'capabilities': [ + {'id': capability_id, 'state': 'configured', 'desired': {'enabled': False}, + 'observed': {'enabled': False, 'id': 1}, 'action': 'Retained reviewed configuration', + 'gate': 'Existing repository write permission', + 'evidence': ['https://github.com/example/repository/issues/1#issuecomment-1'], + 'verification': 'matched'} for capability_id in sorted(module.CAPABILITY_IDS)]} + + def test_all_catalog_capabilities_with_verified_configuration_pass(self): + result = module.check(self.ledger) + self.assertTrue(result['complete'], result) + self.assertEqual(result['checked'], len(module.CAPABILITY_IDS)) + self.assertFalse(result['gaps']) + + def test_missing_duplicate_and_unknown_ids_fail(self): + cases = [self.ledger['capabilities'][:-1], + self.ledger['capabilities'] + [copy.deepcopy(self.ledger['capabilities'][0])], + self.ledger['capabilities'] + [dict(self.ledger['capabilities'][0], id='invented-feature')]] + for rows in cases: + with self.subTest(rows=len(rows)): + self.assertFalse(module.check(dict(self.ledger, capabilities=rows))['complete']) + + def test_unfinished_and_invalid_states_fail(self): + for state in ('unknown', 'available-unconfigured', 'done', None, []): + with self.subTest(state=state): + self.ledger['capabilities'][0]['state'] = state + result = module.check(self.ledger) + self.assertFalse(result['complete']) + self.assertTrue(result['gaps']) + + def test_configured_requires_readback_claim_and_complete_values(self): + for key in ('verification', 'desired', 'observed', 'action', 'gate', 'evidence'): + with self.subTest(key=key): + ledger = copy.deepcopy(self.ledger) + del ledger['capabilities'][0][key] + self.assertFalse(module.check(ledger)['complete']) + for field in ('action', 'gate'): + ledger = copy.deepcopy(self.ledger) + ledger['capabilities'][0][field] = True + self.assertFalse(module.check(ledger)['complete']) + self.ledger['capabilities'][0]['verification'] = 'command_succeeded' + self.assertFalse(module.check(self.ledger)['complete']) + + def test_permission_and_inapplicability_need_specific_reason_and_evidence(self): + for state, verification in (('unavailable', 'gate-confirmed'), ('not-applicable', 'context-confirmed')): + with self.subTest(state=state): + row = self.ledger['capabilities'][0] + row.update(state=state, verification=verification, + reason='Target account has no enterprise entitlement') + self.assertTrue(module.check(self.ledger)['complete']) + for reason in ('', 'unknown', 'not-applicable', None): + row['reason'] = reason + self.assertFalse(module.check(self.ledger)['complete']) + row['reason'] = 'Target account has no enterprise entitlement' + row['evidence'] = [] + self.assertFalse(module.check(self.ledger)['complete']) + row['evidence'] = ['https://github.com/example/repository/issues/1'] + row['verification'] = 'matched' + self.assertFalse(module.check(self.ledger)['complete']) + + def test_evidence_cannot_contain_credentials_or_query_parameters(self): + for evidence in (['http://github.com/example'], ['https://user:secret@github.com/example'], + ['https://github.com/example?token=secret'], ['https://github.com:bad/example'], + ['https://github.com/ex\x00ample'], ['https://gith\x01ub.com/example'], + [''], ['not a URL'], + [None], 'https://github.com/example'): + with self.subTest(evidence=evidence): + self.ledger['capabilities'][0]['evidence'] = evidence + result = module.check(self.ledger) + self.assertFalse(result['complete']) + self.assertNotIn('secret', json.dumps(result)) + + def test_invalid_document_shape_returns_gaps_instead_of_crashing(self): + for ledger in ([], None, {}, {'repository': 'invalid', 'capabilities': []}, + {'repository': 'owner/repo', 'capabilities': {}}, + {'repository': 'owner/repo', 'capabilities': [None, {'id': []}]}): + with self.subTest(ledger=ledger): + self.assertFalse(module.check(ledger)['complete']) + + def test_cli_nonzero_on_incomplete_or_unreadable_ledger(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / 'ledger.json' + path.write_text(json.dumps(self.ledger)) + command = [sys.executable, str(ROOT / 'scripts/check_completion.py'), str(path)] + good = subprocess.run(command, capture_output=True, text=True) + self.assertEqual(good.returncode, 0, good.stderr) + self.assertTrue(json.loads(good.stdout)['complete']) + path.write_text('{"repository":"example/repository","capabilities":[]}') + bad = subprocess.run(command, capture_output=True, text=True) + self.assertNotEqual(bad.returncode, 0) + self.assertFalse(json.loads(bad.stdout)['complete']) + path.write_text('{broken') + malformed = subprocess.run(command, capture_output=True, text=True) + self.assertNotEqual(malformed.returncode, 0) + self.assertFalse(json.loads(malformed.stdout)['complete']) + path.unlink() + missing = subprocess.run(command, capture_output=True, text=True) + self.assertNotEqual(missing.returncode, 0) + self.assertFalse(json.loads(missing.stdout)['complete']) + + +if __name__ == '__main__': + unittest.main() diff --git a/wiki/Home.md b/wiki/Home.md index 1adcfee..4ea4a51 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -6,7 +6,7 @@ Full GitHub brings source-backed GitHub capability discovery and execution into ## Start -Read [[Installation]] and [[Usage]], then browse [[Capabilities]], [[Configuration]] and [[API]]. Read [[History]] for execution/decision records and [[Community]] for real questions, proposals and review. [[Architecture]], [[Permissions]] and [[Verification]] explain how the plugin works and what was tested. +Read [[Installation]] and [[Usage]], then browse [[Capabilities]], [[Configuration]] and [[API]]. Use [[Workflow]] for required active delivery and chronological issue comments. Read [[History]] for execution/decision records and [[Community]] for real questions, proposals and review. [[Architecture]], [[Permissions]] and [[Verification]] explain how the plugin works and what was tested. ## Complete inventory diff --git a/wiki/Verification.md b/wiki/Verification.md index 688762b..9e65698 100644 --- a/wiki/Verification.md +++ b/wiki/Verification.md @@ -1,5 +1,17 @@ # Verification record +## Version 0.4.0 + +The reported conversation gap was reproduced in the live API and browser. All five prior work issues had zero comments. New comments explicitly add retrospective delivery references without recreating a fictional timeline. Current work in issue 14 uses chronological kickoff/findings/review/delivery entries, native children 15/16, a real blocker relationship and attached plan artifact 1. Shared field visibility is preserved. + +- The regression suite covers complete/malformed/incomplete ledgers, all catalog IDs, safe evidence links and issue-level inspection with unknown read failures. The final installed count is recorded in the release receipt. +- The completion gate rejects unfinished or missing decisions. It validates submitted evidence claims, not live truth; no fabricated 261-row repository ledger was created. +- Issue-level audit reads actual metadata, comments, timeline, parent/children, dependencies, shared fields, artifacts and paginated Project memberships. Attention prompts do not require invented relationships or dates. +- Native Project README and an actual status update were published and read back. Existing four views and organization-only fields remain intact. Overview now shows native Type, Milestone and public Priority alongside its original fields. Reloading the canonical saved view verified persistence. GraphQL still omits the rendered built-in Type column, so this evidence came from the UI. +- New issue forms select native Bug/Feature types. Wiki adds Workflow and a useful native footer. Final publication/rendered read-back and immutable release evidence are recorded in the release-specific Wiki receipt. + +This is behavioral guidance plus executable acceptance checks when the skill is loaded. Host selection and agent compliance cannot be globally intercepted by a skill. Nested issue-comment threads are not a supported API feature; chronological comments, quote links, Discussion replies and PR review threads remain distinct. + ## Version 0.3.1 Three fresh review agents examined runtime correctness, option/procedure coverage and publication/installation. The runtime reviewer found no actionable defect in the assigned execution/history scope. Twelve concrete review findings were corrected and verified, including two additional portability/policy cases from rechecking the first fixes. diff --git a/wiki/Workflow.md b/wiki/Workflow.md new file mode 100644 index 0000000..fa8cd42 --- /dev/null +++ b/wiki/Workflow.md @@ -0,0 +1,13 @@ +# Active work and conversations + +Follow the [issue lifecycle runbook](https://github.com/thinkhome-org/full-github/blob/main/skills/full-github/references/issue-lifecycle.md). Every substantial task begins with a real issue and a new kickoff comment. Material findings, changed decisions, review evidence and verified delivery become separate comments in chronological order. Preserve reporter content and earlier comments. Concurrent workers must not replace a shared comment. + +Issues have chronological comments and quote links. For nested topics use Discussion replies or PR review threads; use native child issues for independently accepted work and blockers for real ordering. + +Inspect native type in addition to labels, actual assignment, shared fields, Project membership/status/priority, milestone, parent/sub-issues, dependencies, artifacts and linked branch/PR. Shared owner fields can be restricted while Project-local fields are public; preserve their visibility. Do not fabricate estimates, relationships or approvals. + +The current work in [issue 14](https://github.com/thinkhome-org/full-github/issues/14) demonstrates native children, blocker relation, attached plan, chronological comments and delivery tracking. Earlier completed issues have explicitly retrospective delivery comments, preserving the real posting date. + +For full setup/audit run the [completion gate](https://github.com/thinkhome-org/full-github/blob/main/skills/full-github/references/completion.md) against every catalog capability. It rejects unfinished records and missing evidence; it does not independently establish that evidence is true. Host skill selection and actual credentials remain required. + +See [[History]], [[Community]], [[Configuration]] and [[Verification]]. diff --git a/wiki/_Footer.md b/wiki/_Footer.md new file mode 100644 index 0000000..dc55ef7 --- /dev/null +++ b/wiki/_Footer.md @@ -0,0 +1,3 @@ +[Full GitHub repository](https://github.com/thinkhome-org/full-github) · [Ask a question](https://github.com/thinkhome-org/full-github/discussions/categories/q-a) · [Report a bug](https://github.com/thinkhome-org/full-github/issues/new/choose) · [Releases](https://github.com/thinkhome-org/full-github/releases) · [[Verification]] + +Contributions follow [CONTRIBUTING](https://github.com/thinkhome-org/full-github/blob/main/CONTRIBUTING.md). Report vulnerabilities through the [security policy](https://github.com/thinkhome-org/full-github/security/policy). diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index 8446a73..644c13a 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -4,6 +4,8 @@ [[Usage]] +[[Workflow]] + [[Capabilities]] [[Configuration]]