Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
389 changes: 386 additions & 3 deletions glon/cli.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions project/TICKETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ This file indexes governance tickets without taking ownership of
| **ticket-005** | [`README.md`](./ticket-005/README.md) | [`preprompt.md`](./ticket-005/preprompt.md) | - | [`ai-claude.md`](./ticket-005/ai-claude.md) | [`ai-claude-logs.txt`](./ticket-005/ai-claude-logs.txt) | [`changelog.md`](./ticket-005/changelog.md) |
| **ticket-006** | [`README.md`](./ticket-006/README.md) | [`preprompt.md`](./ticket-006/preprompt.md) | - | [`ai-gemini.md`](./ticket-006/ai-gemini.md) | [`ai-gemini-logs.txt`](./ticket-006/ai-gemini-logs.txt) | [`changelog.md`](./ticket-006/changelog.md) |
| **ticket-007** | [`README.md`](./ticket-007/README.md) | [`preprompt.md`](./ticket-007/preprompt.md) | - | [`ai-antigravity.md`](./ticket-007/ai-antigravity.md) | [`ai-antigravity-logs.txt`](./ticket-007/ai-antigravity-logs.txt) | [`changelog.md`](./ticket-007/changelog.md) |
| **ticket-008** | [`README.md`](./ticket-008/README.md) | [`preprompt.md`](./ticket-008/preprompt.md) | - | [`ai-antigravity.md`](./ticket-008/ai-antigravity.md) | [`ai-antigravity-logs.txt`](./ticket-008/ai-antigravity-logs.txt) | [`changelog.md`](./ticket-008/changelog.md) |
| **ticket-010** | [`README.md`](./ticket-010/README.md) | [`preprompt.md`](./ticket-010/preprompt.md) | - | [`ai-antigravity.md`](./ticket-010/ai-antigravity.md) | [`ai-antigravity-logs.txt`](./ticket-010/ai-antigravity-logs.txt) | [`changelog.md`](./ticket-010/changelog.md) |
<!-- AUTO:TICKET_INDEX:END -->
4 changes: 2 additions & 2 deletions project/ticket-007/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

- **ID**: ticket-007
- **Owner**: agent:antigravity
- **Status**: IN_PROGRESS
- **Workflow state**: EDIT
- **Status**: DONE
- **Workflow state**: DONE
- **Created**: 2026-10-17

## Goal and scope
Expand Down
4 changes: 2 additions & 2 deletions project/ticket-008/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

- **ID**: ticket-008
- **Owner**: agent:antigravity
- **Status**: IN_PROGRESS
- **Workflow state**: EDIT
- **Status**: DONE
- **Workflow state**: DONE
- **Created**: 2026-10-18

## Goal and scope
Expand Down
22 changes: 22 additions & 0 deletions project/ticket-010/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Ticket 010: Publish current github/*/* repo via gh and goal -a

- **ID**: ticket-010
- **Owner**: agent:antigravity
- **Status**: IN_PROGRESS
- **Workflow state**: PUBLICATION
- **Created**: 2026-11-23

## Goal and scope

SESSION_EXECUTION_AUTHORIZATION: Explicit user request in active session to update `semcod/glon` so that when invoked from inside a `github/*/*` directory (`glon`, `glon private`, `glon public`, `glon publish [private|public]`), it publishes the current repository to GitHub via `gh` (defaulting to `--private`) and runs `goal -a` to publish to PyPI and other configured registries.

## Acceptance criteria

- [x] AC-01: Detecting `github/<owner>/<repo>` from `cwd` works for both default `~/github/*/*` and nested subdirectories.
- [x] AC-02: `glon` (no URL arg inside `github/*/*`), `glon private`, and `glon public` initialize Git if needed, publish/update visibility on GitHub via `gh` (default `private`), and run `goal -a`.
- [x] AC-03: `./project/governance-check.sh`, `pytest -q`, and `mypy glon` pass.

## Participants

- Human participant: unresolved; no user-* file was created by this script.
- Agent participant: [ai-antigravity.md](ai-antigravity.md)
5 changes: 5 additions & 0 deletions project/ticket-010/ai-antigravity-logs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
2026-11-23T09:00:00+01:00 ticket-010 verification log
- pytest -q: 68 passed
- mypy --python-version 3.10 glon: pass
- ./project/governance-check.sh: GOV-PASS (0 errors, 0 warnings)
- wellman check --root .: pass
29 changes: 29 additions & 0 deletions project/ticket-010/ai-antigravity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
participant-id: agent:antigravity
participant: antigravity
role: agent
ticket: ticket-010
---
# Participant: antigravity (AI agent)

## Understanding

User requested updating `semcod/glon` so that running `glon`, `glon private`, or `glon public` while inside a `github/<owner>/<repo>` directory publishes the repository to GitHub using `gh` (defaulting to `--private`) and invokes `goal -a` to publish to PyPI and other configured registries.

## Execution plan

1. Close already-merged `ticket-007` and `ticket-008` in this worktree and allocate `ticket-010` via `./project/new-ticket.sh`.
2. Implement `detect_github_repo_from_cwd`, `publish_repository`, `_handle_publish`, and CLI dispatch for `glon`, `glon private`, `glon public`, and `glon publish` in `glon/cli.py`.
3. Add unit tests in `tests/test_cli.py`.
4. Run `pytest -q`, `mypy glon`, `flake8`/`black` (if available), `./project/governance-check.sh`, and `wellman check`.

## Actual changes

- Recorded `SESSION_EXECUTION_AUTHORIZATION` from the user's explicit request.
- Added `github/*/*` directory detection and `gh` + `goal -a` publication workflow in `glon/cli.py`.
- Added unit tests in `tests/test_cli.py`.

## Blockers

- None inside the recorded intent; proceed without a second confirmation.
- New authority remains required for destructive action, secret access, new external coordination, material objective expansion and trusted merge.
5 changes: 5 additions & 0 deletions project/ticket-010/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog for ticket-010

- Added `detect_github_repo_from_cwd` and `publish_repository` in `glon/cli.py` so `glon`, `glon private`, `glon public`, and `glon publish [private|public]` inside a `github/<owner>/<repo>` folder initialize Git if needed, publish/update repository visibility on GitHub via `gh` (default `private`), and invoke `goal -a` for PyPI and other registries.
- Added unit tests in `tests/test_cli.py` covering `github/*/*` detection, `gh` + `goal -a` execution, dry-run mode, and CLI subcommands.
- Closed already-merged `ticket-007` and `ticket-008` in `project/ticket-007/README.md` and `project/ticket-008/README.md`.
84 changes: 84 additions & 0 deletions project/ticket-010/intent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"schema": "new-project.intent/v3",
"ticket": "ticket-010",
"summary": "Publish current github/*/* repo via gh and goal -a",
"workstream": "application",
"classification": {
"kind": "FEATURE",
"priority": "P2",
"origin": "requested"
},
"allowedPaths": [
"project/ticket-010/**",
"project/ticket-007/README.md",
"project/ticket-008/README.md",
"TODO.md",
"project/TICKETS.md",
"glon/cli.py",
"tests/test_cli.py"
],
"forbiddenPaths": [
"project/ticket-*/user-*.md"
],
"stacks": [],
"dependsOn": [],
"conflictsWith": [],
"integrationTicket": null,
"delivery": {
"acceptedBaseSha": "b533de46fc88424faf87f2951fdea7cd354280d8",
"targetBranch": "main",
"outcome": "Allow glon, glon private, and glon public inside github/*/* directories to publish via gh (default private) and goal -a.",
"nonGoals": [
"Add runtime dependencies",
"Modify existing clone/open/list/grab behavior outside github/*/*"
],
"complexity": "S",
"estimatedMinutes": 15,
"budgets": {
"maxImplementationFiles": 2,
"maxAffectedComponents": 1,
"maxPublicInterfaceChanges": 0,
"maxRuntimeDependencies": 0
},
"architecture": {
"status": "accepted",
"decision": "Add cwd github/*/* detection and gh + goal -a publication helpers in glon/cli.py with unit tests in tests/test_cli.py.",
"components": [
{
"name": "glon-cli",
"paths": [
"glon/cli.py",
"tests/test_cli.py"
]
}
],
"responsibilityChanges": false,
"interfaceChanges": [],
"dataChanges": [],
"ui": {
"impact": "none",
"states": [],
"evidence": []
},
"rollback": "Revert commit on ticket/010-publish-github-and-goal."
},
"runtimeDependencies": [],
"validation": [
{
"criterion": "AC-01",
"commands": [
"pytest -q"
],
"evidence": "All CLI unit tests including github/*/* detection and gh/goal publication pass."
},
{
"criterion": "AC-02",
"commands": [
"./project/governance-check.sh",
"mypy glon"
],
"evidence": "Governance check and static type check pass."
}
]
}
}
12 changes: 12 additions & 0 deletions project/ticket-010/preprompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Ticket preprompt

- **Task ID**: ticket-010
- **Task title**: Publish current github/*/* repo via gh and goal -a
- **Created**: 2026-11-23T07:55:48Z

Keep executable implementation outside this governance/evidence directory.
Read a human-owned user-*.md file only when one exists.
The request to execute this work creates SESSION_EXECUTION_AUTHORIZATION;
proceed within the recorded intent without a redundant confirmation prompt.
Require new authority for destructive action, secrets, external coordination,
material objective expansion and trusted merge approval.
Loading