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
12 changes: 7 additions & 5 deletions packages/container/src/core/templates/dockerfile-prelude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,23 @@ RUN cargo install --git https://github.com/ProverCoderAI/rust-browser-connection
RUN printf "%s\\n" "ALL ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/zz-all \
&& chmod 0440 /etc/sudoers.d/zz-all`

const planToGitRevision = "4e58e315d3a06db3f9e75682455be315cd29d7c8"
const planToGitBranch = "main"
const planToGitCommitMetadataUrl = `https://api.github.com/repos/ProverCoderAI/plan-to-git/commits/${planToGitBranch}`

// CHANGE: install plan-to-git in generated project containers.
// WHY: issue #397 requires multi-agent plan capture, Claude Code hooks, temp-backed state, and explicit PR sync.
// QUOTE(ТЗ): "подключение новое версии plan-to-git и настройки hooks для claude code и настройки что бы всё уходило на гитхаб автоматически"
// REF: issue-397
// SOURCE: https://github.com/ProverCoderAI/plan-to-git/tree/4e58e315d3a06db3f9e75682455be315cd29d7c8
// SOURCE: https://github.com/ProverCoderAI/plan-to-git/tree/main
// FORMAT THEOREM: image_build_success -> executable(/usr/local/bin/plan-to-git)
// PURITY: SHELL
// EFFECT: Docker build downloads and installs a pinned Rust CLI from GitHub.
// INVARIANT: plan-to-git is available on PATH with Claude hooks and sync --pr before agent hooks or git post-push actions run.
// EFFECT: Docker build downloads and installs the current main branch Rust CLI from GitHub.
// INVARIANT: plan-to-git is available on PATH with Claude hooks and sync --pr before agent hooks or git post-push actions run; moving main changes the remote ADD input and invalidates the install layer.
// COMPLEXITY: O(network + cargo_build)
const renderDockerfilePlanToGit = (): string =>
`# Install plan-to-git for multi-agent plan capture and explicit PR sync (issue #397)
RUN cargo install --git https://github.com/ProverCoderAI/plan-to-git --rev ${planToGitRevision} --locked --bins --root /usr/local \
ADD ${planToGitCommitMetadataUrl} /tmp/docker-git-plan-to-git-main.json
RUN cargo install --git https://github.com/ProverCoderAI/plan-to-git --branch ${planToGitBranch} --locked --bins --root /usr/local \
&& /usr/local/bin/plan-to-git --help >/dev/null \
&& /usr/local/bin/plan-to-git --help | grep -q -- "--repo" \
&& /usr/local/bin/plan-to-git hook --help | grep -q -- "claude" \
Expand Down
3 changes: 2 additions & 1 deletion packages/container/tests/core/templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ describe("renderDockerfile", () => {
"rtk --version",
"rtk gain >/dev/null 2>&1 || true",
"# Install plan-to-git for multi-agent plan capture and explicit PR sync (issue #397)",
"cargo install --git https://github.com/ProverCoderAI/plan-to-git --rev 4e58e315d3a06db3f9e75682455be315cd29d7c8 --locked --bins --root /usr/local",
"ADD https://api.github.com/repos/ProverCoderAI/plan-to-git/commits/main /tmp/docker-git-plan-to-git-main.json",
"cargo install --git https://github.com/ProverCoderAI/plan-to-git --branch main --locked --bins --root /usr/local",
"/usr/local/bin/plan-to-git --help >/dev/null",
'/usr/local/bin/plan-to-git --help | grep -q -- "--repo"',
'/usr/local/bin/plan-to-git hook --help | grep -q -- "claude"',
Expand Down