Skip to content

fix: new artifacts follow the directory their milestone lives in (#70) - #77

Merged
lx-0 merged 7 commits into
mainfrom
fix/70-artifact-write-dir
Nov 15, 2026
Merged

lx-0 merged 7 commits into
mainfrom
fix/70-artifact-write-dir

Conversation

@lx-0

@lx-0 lx-0 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What changed

New artifacts of a milestone now go where that milestone already lives. A milestone whose roadmap (or, failing that, any of its files) sits in .ytstack/milestones/M###/ (or milestones/, backlog/, backlog/<PREFIX>/) gets its next plan, summary, review or retro written there. Flat is still the default, nothing gets moved, and ytstack's own layout stays as it is.

  • hooks/lib/git-ctx.sh: two new functions. yt_artifact_dir <yt_dir> <id> returns the directory (roadmap first, then any <prefix>-* file, flat checked first, else flat). yt_artifact_path <yt_dir> <file> returns one file's path: where it already exists, else inside that directory.
  • Hooks: post-tool-use-bash and task-completed write their summaries (and tick the checkbox) in the milestone's directory. stop, pre-tool-use-edit, session-start, task-created and teammate-idle read from there.
  • Skills: the preambles print ARTIFACT_DIR (and fall back to YT_DIR when the lib is missing). Paths that used to be built flat now go through yt_artifact_path, and the write steps use ARTIFACT_DIR. Skills changed: plan-milestone, slice-milestone, plan-task, summarize-task, reassess-roadmap, retro, plan-ceo-review, plan-eng-review, test-driven-development, verification-before-completion, code-review, finish-branch, ship, spawn-milestone-team, grill and handoff-session. Each one gets a patch bump.
  • plan-milestone now includes moved milestones when it picks the next number. Before, moving the newest milestone would have reused its number.
  • bin/ytstack-risk: M###-* files in those directories now count as process records, the same as flat ones (docs/ux/review-policy-format.md).
  • Gstack-adapted skills that were touched: bin/ytstack-gstack-diff --stat shows no upstream change at v1.99.4.0, so their baseline is unchanged.
  • Docs: spec artifacts.md ("Location and scope") and hooks-and-state.md, a DECISIONS entry, and an Unreleased CHANGELOG entry.

How verified

  • I wrote the new tests first and ran them against the origin/main code (an exported tree with only the new tests copied in). They fail: git-ctx 153 passed, 12 failed, post-tool-use-bash 19 passed, 2 failed, hooks-stop 13 passed, 1 failed, hooks-worktree 24 passed, 4 failed, skill-preambles 665 passed, 26 failed, ytstack-risk 206 passed, 1 failed.
  • With the fix (macOS, bash 3.2): bash tests/run-all.sh gives ALL SUITES PASSED (31 suites). Among them: git-ctx 165 passed, 0 failed, skill-preambles 691 passed, 0 failed, hooks-worktree 28 passed, 0 failed, hooks-stop 14 passed, 0 failed, post-tool-use-bash 21 passed, 0 failed, ytstack-risk 207 passed, 0 failed.
  • python3 bin/ytstack-check gives OK (with 9 warning[s]) (exit 2 means warnings only). bin/ytstack-spec lint gives 6 area file(s), 0 failure(s), 0 warning(s).
  • Linux: ran bash tests/run-all.sh --linux (alpine, bash 5.3.9) on an exported tree of the head commit. Result: ALL SUITES PASSED, 31 suites.

Not changed

  • Loops over every milestone in reconcile, plus the in-progress count in session-start, still only scan flat roadmaps. reconcile is the tool that moves files, and the count is only a hint. Both are left for a separate change.

Closes #70
Closes #86 (the hooks/teammate-idle count fix from the review round)

🤖 Generated with Claude Code

lx-0 and others added 3 commits November 15, 2026 14:31
…70)

yt_artifact_dir and yt_artifact_path in hooks/lib/git-ctx.sh name the
directory that holds a milestone's roadmap or files (flat first, then
milestones/, milestones/*/, backlog/, backlog/*/), else the flat one.
post-tool-use-bash and task-completed write their summaries there; stop,
pre-tool-use-edit, session-start, task-created and teammate-idle read
there. ytstack-risk counts M### files in those directories as process
records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ves in (#70)

Preambles print ARTIFACT_DIR (fallback YT_DIR without the lib) and find
the milestone's roadmap, slice and task plans and summaries through
yt_artifact_path; the write steps of plan-milestone, slice-milestone,
plan-task, summarize-task, the reviews and retro use ARTIFACT_DIR.
plan-milestone counts moved milestones when it picks the next number.
gstack-adapted skills touched (plan-ceo-review, plan-eng-review, retro,
ship): bin/ytstack-gstack-diff --stat reports no upstream change for them
at v1.99.4.0, so their baseline stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spec areas artifacts and hooks-and-state, a DECISIONS entry and the
Unreleased CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T13:43:56.593062Z 05f9b18 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05f9b18eb8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/plan-eng-review/SKILL.md Resolved
lx-0 and others added 4 commits November 15, 2026 15:02
…l deep (#70)

teammate-idle and task-created read the milestone's slice plans in every
layout (yt_find_artifacts, one per name), so a plan that landed flat
before the milestone moved still counts. teammate-idle no longer sums
"0\n0" for a plan without an open task. ytstack-risk takes a milestone
file in milestones/ or backlog/ as a process record only at most one
directory below them, and no longer a path under a directory that is
named like a milestone file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
)

reassess-roadmap (slice complete, gates, review rounds, slice counts),
retro (summaries, slice plans, CONTEXT) and spawn-milestone-team (slice
plans, overlap) list the milestone's files through yt_find_artifacts,
one per name, so files that landed flat before the milestone moved count.
plan-eng-review finds slice plans under backlog/ and backlog/*/ too
(Codex review). Shell helpers use ${1} and awk `$ 0`, which Kimi does
not expand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
skills: the preambles' artifact directory, the every-layout listing, the
${1} rule for Kimi, ARTIFACT_DIR in the fallback, the new preamble tests.
checks-and-evals: process records in milestones/ and backlog/ one level
deep. hooks-and-state, artifacts: hooks and skills that list a
milestone's files read every layout. dependencies: nothing false. All
five set verified_at to db07481.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lx-0
lx-0 merged commit 2ce5d55 into main Nov 15, 2026
4 checks passed
@lx-0
lx-0 deleted the fix/70-artifact-write-dir branch November 15, 2026 17:01
@lx-0 lx-0 mentioned this pull request Nov 16, 2026
lx-0 added a commit that referenced this pull request Nov 16, 2026
* chore: move the gstack-derived skills' upstream baseline to v1.99.5.0

bin/ytstack-gstack-diff --stat reported office-hours, plan-ceo-review,
retro and ship behind v1.99.5.0. The upstream change only renames
/autoplan to /plan-eng-review in next-step recommendations and examples.
ytstack has no autoplan and already names ytstack:plan-eng-review, so
no method change is folded in; the baseline moves for all six skills
(plan-eng-review and document-release had no upstream change) and each
skill's metadata.version gets a patch bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: release 0.12.0

Manifests (Claude Code, marketplace, Codex, Kimi), README badge and
status, QUICKSTART upgrade line from 0.11.x, CHANGELOG section 0.12.0
with a summary line and compare link. Covers PRs #77, #87-#94 (issues
#70, #72-#76, #78, #81-#86, #91).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: spec areas: skills verified at the gstack v1.99.5.0 baseline; host-adapters verified at the 0.12.0 manifests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: STATE and ROADMAP for 0.12.0: what shipped outside milestones, next action, open issues

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: KNOWLEDGE: eval record for release 0.12.0 (13 cases, all 1.00, $6.37)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant