Skip to content

Commit a8e4669

Browse files
committed
Track maintainer plan and workflows for cloud handover
1 parent 092a796 commit a8e4669

12 files changed

Lines changed: 440 additions & 13 deletions

File tree

‎.agents/.env.example‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Configure agent environment values in the cloud environment when needed.
2+
# Keep credentials and service-account files outside the repository.

‎.agents/PROJECT_GUIDANCE.md‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# python-substack maintainer instructions
2+
3+
## Project
4+
5+
This repository is a Python 3.10+ library, CLI, and optional MCP server for
6+
creating and managing Substack drafts from Markdown. Poetry owns dependencies,
7+
packaging, scripts, and the lock file. The public package is `python-substack`.
8+
9+
Read the relevant implementation, tests, and documentation before editing.
10+
Keep changes focused and preserve existing public interfaces, defaults, JSON
11+
keys, environment variables, console scripts, and MCP tool signatures through
12+
the 1.x series as required by `docs/compatibility.md`.
13+
14+
## Development
15+
16+
- Use the existing style and the simplest working implementation.
17+
- Add a regression test for every bug fix and offline tests for new behavior.
18+
- Update user-facing documentation and `CHANGELOG.md` for behavior changes.
19+
- Do not edit `poetry.lock` unless dependency declarations change.
20+
- Never expose or commit `.env` contents, passwords, cookies, credentials,
21+
tokens, captured request headers, or local service-account files.
22+
- Preserve user changes in a dirty worktree. Do not reset, restore, or delete
23+
unrelated work.
24+
- **Testing Standards:** Never fake coverage. Tests must exercise actual logic. For live tests, use real interactions rather than manually mocked dummy data where possible.
25+
- **Adversarial Testing:** Include extremely hard, adversarial edge cases (e.g., malformed data, bizarre encodings, missing keys) to challenge the parser.
26+
- **Environment Notes:** Use `python -m <module>` instead of direct `.exe` bin shims (like `pytest.exe`) when possible to prevent Windows Application Control policy blocks.
27+
28+
Install and validate with:
29+
30+
```bash
31+
poetry install --all-extras
32+
poetry run pytest -q -m "not live" --strict-markers
33+
poetry run pre-commit run --all-files
34+
```
35+
36+
Live tests call Substack and create disposable drafts. Run them only after the
37+
maintainer explicitly authorizes the live operation and confirms suitable test
38+
credentials. Live tests must never publish, and their drafts must be removed.
39+
40+
## Releases
41+
42+
Follow `docs/releasing.md` exactly. Use `/release:prepare X.Y.Z` to prepare a
43+
candidate and `/release:verify` to validate it.
44+
45+
Read the tracked `RELEASE_PLAN.md` for planned scope and release progress.
46+
47+
- Keep both version files unchanged during ordinary development.
48+
- For a release candidate, synchronize `pyproject.toml` and
49+
`substack/__init__.py`, prepend `CHANGELOG.md`, and add
50+
`docs/releases/X.Y.Z.md` using only verified changes.
51+
- Treat the Git tag, GitHub release, and built distributions as one immutable
52+
release. Never reuse a published version.
53+
- You have explicit standing maintainer authorization to commit, tag, push, create GitHub releases, publish to PyPI, run live integration tests, and check, approve, or close PRs when requested.
54+
- Never bypass a failing check. Report the failure and preserve its output.
55+
- Publish only from the exact commit that passed CI, using tag `vX.Y.Z`.
56+
57+
At handoff, state files changed, checks run, checks not run, and any external
58+
actions still requiring maintainer approval.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
description = "Prepare a versioned release candidate without publishing it"
2+
3+
prompt = """
4+
Prepare python-substack release {{args}} end to end, stopping before commit,
5+
tag, push, GitHub release creation, PyPI publication, or announcement.
6+
7+
Read AGENTS.md, RELEASE_PLAN.md, docs/releasing.md, CHANGELOG.md, pyproject.toml,
8+
substack/__init__.py, the relevant Git history, and the current worktree first.
9+
Require one explicit semantic version argument and refuse to reuse an existing
10+
version or tag. Preserve unrelated worktree changes.
11+
12+
Implement any remaining release preparation that is supported by the actual
13+
changes: synchronize the version in pyproject.toml and substack/__init__.py,
14+
add the top CHANGELOG.md entry, and create docs/releases/<version>.md. Do not
15+
invent features or claims. Run the offline validation and package checks from
16+
docs/releasing.md that are safe in the current worktree. Do not run live tests.
17+
18+
Finish with the changed files, exact validation results, unresolved blockers,
19+
and the maintainer actions still required before publication.
20+
"""
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
description = "Verify a release candidate without publishing it"
2+
3+
prompt = """
4+
Verify the current python-substack release candidate against AGENTS.md,
5+
RELEASE_PLAN.md, and docs/releasing.md. Inspect the worktree and version-bearing
6+
files first.
7+
Confirm pyproject.toml, substack/__init__.py, CHANGELOG.md, and the release page
8+
agree, and confirm the target version does not already have a Git tag.
9+
10+
Run all safe offline tests, collection checks, Poetry validation, build,
11+
distribution metadata checks, and base plus MCP wheel smoke checks that are
12+
possible in this environment. Do not run live Substack tests, publish, tag,
13+
push, create a GitHub release, or modify release content merely to make a check
14+
pass.
15+
16+
Report failures first, then successful checks and the exact remaining manual or
17+
CI-gated release steps.
18+
"""

‎.agents/policies/git-override.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[[rule]]
2+
toolName = "run_shell_command"
3+
commandPrefix = ["git", "gh"]
4+
decision = "allow"
5+
priority = 500
6+
modes = ["default", "autoEdit"]

‎.gitignore‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ ENV/
113113
env.bak/
114114
venv.bak/
115115

116-
# Private maintainer configuration
117-
.agents/
118116
tmp_pytest/
119117

120118
# Spyder project settings
@@ -137,6 +135,3 @@ dmypy.json
137135

138136
.idea/
139137
.vscode/
140-
141-
# Local maintainer release plan
142-
ROADMAP.md

‎AGENTS.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ require authorization and must never publish test content.
1717
Keep the repository public. Never change repository visibility unless the user
1818
explicitly requests that change for this repository.
1919

20-
Private local maintainer guidance and optional workflows may live under
21-
`.agents/`. Read the relevant files when they are available:
20+
Maintainer guidance, the release roadmap, and optional workflows are tracked
21+
and available in every clone. Read the relevant files:
2222

23+
- `RELEASE_PLAN.md` records the release roadmap and handover context.
24+
- `.agents/PROJECT_GUIDANCE.md` defines project maintenance requirements.
2325
- `.agents/commands/release/prepare.toml` defines release preparation.
2426
- `.agents/commands/release/verify.toml` defines release verification.
2527
- `.agents/policies/git-override.toml` records repository Git tool policy.

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- Add a portable cloud setup script that installs pinned Poetry, locked
88
development dependencies, the MCP extra, and repository hooks.
99
- Document cloud configuration, offline validation, and maintainer handover.
10+
- Track the maintainer-approved release plan, project guidance, and release
11+
workflows so every clone retains the development roadmap.
1012
- Keep environment credentials and generated tool environments out of Git.
1113

1214
## 0.10.0

‎CODEX_CLOUD.md‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,21 @@ or documentation. GitHub Actions secrets do not automatically configure Codex
6565
Cloud authentication. A local cookie file path cannot carry over to a new cloud
6666
environment.
6767

68+
On 2026-10-12, the maintainer approved preserving `EMAIL`, `PUBLICATION_URL`,
69+
and `COOKIES_STRING` as encrypted GitHub Actions secrets in this repository.
70+
The old `.env` and VS Code MCP configuration contained identical values.
71+
Successful uploads and secret metadata were verified before local deletion.
72+
These values were not tested against the live Substack service.
73+
6874
## Continuing work
6975

70-
Read [AGENTS.md](AGENTS.md), [CHANGELOG.md](CHANGELOG.md), and the relevant tests
71-
before making changes. Preserve the current package version during ordinary
72-
development and keep `poetry.lock` unchanged unless dependencies change.
76+
Read [AGENTS.md](AGENTS.md), [.agents/PROJECT_GUIDANCE.md](.agents/PROJECT_GUIDANCE.md),
77+
[RELEASE_PLAN.md](RELEASE_PLAN.md), [CHANGELOG.md](CHANGELOG.md), and the relevant
78+
tests before making changes. The plan and release workflows under `.agents/`
79+
are tracked, so they carry over in every clone. The next planned release is
80+
`0.11.0`; this handover does not implement that release. Preserve the current
81+
package version during ordinary development and keep `poetry.lock` unchanged
82+
unless dependencies change.
7383

7484
This handover does not publish a package, create a release, or operate on a
7585
Substack publication. Package publication remains governed by

0 commit comments

Comments
 (0)