scaffold: add project CI and Docker templates under templates/project/_shared; update proposal and plan to include them
Some checks failed
ci / test (push) Has been cancelled
Some checks failed
ci / test (push) Has been cancelled
This commit is contained in:
@@ -24,7 +24,7 @@ Purpose: Deliver Phase 1 (Crawl) MVP of CodexHelper: subcommands, scaffolding, p
|
|||||||
- Implement creation with intake comments and overwrite safeguards.
|
- Implement creation with intake comments and overwrite safeguards.
|
||||||
|
|
||||||
4) new-project (outside repo) (tests first)
|
4) new-project (outside repo) (tests first)
|
||||||
- Write tests for project directory creation, copying AGENTS.md, prompts, codex.yaml, codex.sh, and `.gitignore` content.
|
- Write tests for project directory creation, copying AGENTS.md, prompts, codex.yaml, codex.sh, `.gitignore` content, and CI/containers artifacts (`.gitea/workflows/ci.yml`, `docker/compose.yml`, `docker/test/Dockerfile`, `scripts/test.docker.sh`).
|
||||||
- Implement scaffolding and read-only copies under `prompts/_mode/`.
|
- Implement scaffolding and read-only copies under `prompts/_mode/`.
|
||||||
|
|
||||||
5) run: compose + invoke (tests first)
|
5) run: compose + invoke (tests first)
|
||||||
@@ -57,7 +57,8 @@ Purpose: Deliver Phase 1 (Crawl) MVP of CodexHelper: subcommands, scaffolding, p
|
|||||||
- Precedence: CLI > env > project > mode > global.
|
- Precedence: CLI > env > project > mode > global.
|
||||||
- `prompts/global/{system.md,system.llm.md}` are present and included in composition.
|
- `prompts/global/{system.md,system.llm.md}` are present and included in composition.
|
||||||
- Running `CodexHelper run` or `new-project` inside this repo errors with guidance.
|
- Running `CodexHelper run` or `new-project` inside this repo errors with guidance.
|
||||||
- Tests: bats test suite covers all CLI paths and guardrails; tests pass locally; test runner script present.
|
- Tests: bats test suite covers all CLI paths and guardrails; tests pass locally; test runner script present.
|
||||||
|
- Project CI: scaffold contains Gitea workflow and Docker artifacts for local parity.
|
||||||
|
|
||||||
## Assumptions/Risks
|
## Assumptions/Risks
|
||||||
- codex-cli flags may vary; we’ll design pass-through and document tested flags.
|
- codex-cli flags may vary; we’ll design pass-through and document tested flags.
|
||||||
|
@@ -32,6 +32,8 @@
|
|||||||
- planning: architecture/module map documented; module implementations follow approved plan with no unplanned refactors
|
- planning: architecture/module map documented; module implementations follow approved plan with no unplanned refactors
|
||||||
- clean root: root remains minimal; scaffolding organizes assets under subdirectories
|
- clean root: root remains minimal; scaffolding organizes assets under subdirectories
|
||||||
- ci/containers: Gitea Actions and local Docker Compose run identical workflows; explicit names and cleanup verified
|
- ci/containers: Gitea Actions and local Docker Compose run identical workflows; explicit names and cleanup verified
|
||||||
|
- project CI: scaffold includes `.gitea/workflows/ci.yml`, `docker/compose.yml`, `docker/test/Dockerfile`, and `scripts/test.docker.sh`
|
||||||
|
- ci/containers: Gitea Actions and local Docker Compose run identical workflows; explicit names and cleanup verified
|
||||||
\n+## Approval — Tick All That Apply
|
\n+## Approval — Tick All That Apply
|
||||||
|
|
||||||
- Subcommands approved: `new-project`, `run`, `new-mode` [ ]
|
- Subcommands approved: `new-project`, `run`, `new-mode` [ ]
|
||||||
|
@@ -52,7 +52,7 @@ Purpose: Implement a bash wrapper (CodexHelper) around codex-cli with “modes
|
|||||||
- `codex.yaml` (project config)
|
- `codex.yaml` (project config)
|
||||||
- `codex.sh` (entrypoint wrapper around codex-cli)
|
- `codex.sh` (entrypoint wrapper around codex-cli)
|
||||||
- `runs/` (created on first run; ignored by VCS)
|
- `runs/` (created on first run; ignored by VCS)
|
||||||
- `.gitea/workflows/` for CI; `docker/` for compose and Dockerfiles; `scripts/` for docker orchestration (tests, ci)
|
- `.gitea/workflows/` for CI; `docker/` for compose and Dockerfiles; `scripts/` for docker orchestration (tests, ci)
|
||||||
|
|
||||||
## Config Details
|
## Config Details
|
||||||
- Format: YAML (`yq` for merging/reading)
|
- Format: YAML (`yq` for merging/reading)
|
||||||
@@ -102,13 +102,14 @@ Purpose: Implement a bash wrapper (CodexHelper) around codex-cli with “modes
|
|||||||
- Inside that project, `CodexHelper run --full-auto` composes prompts and calls the detected `codex` binary. It writes artifacts under `runs/<timestamp>/...`.
|
- Inside that project, `CodexHelper run --full-auto` composes prompts and calls the detected `codex` binary. It writes artifacts under `runs/<timestamp>/...`.
|
||||||
- Precedence works: CLI options override env, which override project config, which override mode defaults.
|
- Precedence works: CLI options override env, which override project config, which override mode defaults.
|
||||||
- Running `CodexHelper run` in this repo prints an error guiding usage.
|
- Running `CodexHelper run` in this repo prints an error guiding usage.
|
||||||
- Project scaffold includes `AGENTS.md` copied from `templates/project/_shared/AGENTS.md`.
|
- Project scaffold includes `AGENTS.md` copied from `templates/project/_shared/AGENTS.md`.
|
||||||
- `prompts/global/{system.md, system.llm.md}` exist and are included in composition.
|
- `prompts/global/{system.md, system.llm.md}` exist and are included in composition.
|
||||||
- Governance/Propagation honored: when norms change, update `prompts/global/` and AGENTS templates; log in DevLog.
|
- Governance/Propagation honored: when norms change, update `prompts/global/` and AGENTS templates; log in DevLog.
|
||||||
- TDD honored: a test suite (bats) covers CLI flows and guardrails; tests pass.
|
- TDD honored: a test suite (bats) covers CLI flows and guardrails; tests pass.
|
||||||
- Zero Debt honored: code, tests, and docs complete; no debt items remain.
|
- Zero Debt honored: code, tests, and docs complete; no debt items remain.
|
||||||
- Clean Root honored: only essential files at root; scaffolding places assets under subdirectories.
|
- Clean Root honored: only essential files at root; scaffolding places assets under subdirectories.
|
||||||
- CI/Containers honored: CI runs in Gitea and locally using the same Docker Compose; containers and networks use explicit names and are cleaned up.
|
- CI/Containers honored: CI runs in Gitea and locally using the same Docker Compose; containers and networks use explicit names and are cleaned up.
|
||||||
|
- Project scaffold includes `.gitea/workflows/ci.yml`, `docker/compose.yml`, `docker/test/Dockerfile`, and `scripts/test.docker.sh` copied from templates.
|
||||||
|
|
||||||
## Open Items for Confirmation
|
## Open Items for Confirmation
|
||||||
- Template coverage: include `prompts/style.md` by default? (we’ll include as optional, empty file)
|
- Template coverage: include `prompts/style.md` by default? (we’ll include as optional, empty file)
|
||||||
|
@@ -181,3 +181,11 @@ This log is concise and structured for quick machine parsing and summarization.
|
|||||||
- Propagated CI/containers rules to system prompts and AGENTS templates; updated proposal
|
- Propagated CI/containers rules to system prompts and AGENTS templates; updated proposal
|
||||||
- next:
|
- next:
|
||||||
- Ensure future features include containerized workflows and CI updates
|
- Ensure future features include containerized workflows and CI updates
|
||||||
|
|
||||||
|
## 2025-09-17T17:00Z
|
||||||
|
- context: Project scaffolding to include Gitea workflow and Docker artifacts
|
||||||
|
- actions:
|
||||||
|
- Added project templates: `.gitea/workflows/ci.yml`, `docker/compose.yml`, `docker/test/Dockerfile`, `scripts/test.docker.sh`
|
||||||
|
- Updated proposal and plan to require these in generated projects
|
||||||
|
- next:
|
||||||
|
- Implement new-project scaffolder to copy these templates
|
||||||
|
17
templates/project/_shared/.gitea/workflows/ci.yml
Normal file
17
templates/project/_shared/.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Build and run tests via Docker
|
||||||
|
run: |
|
||||||
|
docker compose -f docker/compose.yml up --build --abort-on-container-exit --remove-orphans
|
||||||
|
docker compose -f docker/compose.yml down -v --remove-orphans
|
||||||
|
|
19
templates/project/_shared/docker/compose.yml
Normal file
19
templates/project/_shared/docker/compose.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: project
|
||||||
|
|
||||||
|
services:
|
||||||
|
tests:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: docker/test/Dockerfile
|
||||||
|
container_name: project-tests
|
||||||
|
working_dir: /work
|
||||||
|
volumes:
|
||||||
|
- ..:/work:Z
|
||||||
|
command: ["/bin/bash", "-lc", "scripts/test.sh"]
|
||||||
|
networks:
|
||||||
|
- project-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
project-net:
|
||||||
|
name: project-net
|
||||||
|
|
11
templates/project/_shared/docker/test/Dockerfile
Normal file
11
templates/project/_shared/docker/test/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates git bash curl jq yq \
|
||||||
|
bats \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /work
|
||||||
|
|
12
templates/project/_shared/scripts/test.docker.sh
Normal file
12
templates/project/_shared/scripts/test.docker.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
here="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
root="$(cd "$here/.." && pwd)"
|
||||||
|
|
||||||
|
compose_file="$root/docker/compose.yml"
|
||||||
|
|
||||||
|
echo "[docker] Running tests via docker compose"
|
||||||
|
docker compose -f "$compose_file" up --build --abort-on-container-exit --remove-orphans
|
||||||
|
docker compose -f "$compose_file" down -v --remove-orphans
|
||||||
|
|
Reference in New Issue
Block a user