M0 — Project scaffold & config #1

Closed
opened 2026-07-24 00:53:29 +00:00 by david · 0 comments
Owner

Goal: a runnable TS CLI skeleton with config loading, linting, and a test runner.

Tasks

  • npm init + TypeScript setup: Node.js ≥ 22.19.0, ESM ("type": "module"), tsconfig.json, tsx for the CLI entrypoint.
  • Add dependency @earendil-works/pi-coding-agent.
  • ESLint flat config (eslint.config.js): typescript-eslint recommended + @eslint/js, Airbnb-style rule block from CODING_STANDARDS.md §2, eslint-config-prettier last. Add lint script.
  • Prettier (defaults) + format script.
  • vitest + test script and e2e script gated by PILOOP_E2E.
  • package.json scripts consistent with AGENTS.md: build, lint, format, test, e2e, start.
  • CLI entrypoint npm start -- <JIRA-KEY> (arg parsing + --help); no --repo arg, operates on process.cwd().
  • Config loader (env only in v1, behind EnvSource seam): Jira, GitLab, write-back, per-stage skill paths, model keys.
  • Structured logging (per-stage prefixes) to console + run.log.
  • Run-directory helper: compute run-id, create .pi-loop/runs/<run-id>/, ensure .pi-loop/ in .git/info/exclude.

Depends on: none.

Validation: npm start -- ABC-1 parses the key, prints resolved config (secrets masked), creates the run dir, ensures the git-exclude entry, exits cleanly. npm run lint, npm run format (check), and npm test succeed. Config-loader + git-exclude unit tests pass.

**Goal:** a runnable TS CLI skeleton with config loading, linting, and a test runner. ### Tasks - [ ] `npm init` + TypeScript setup: Node.js ≥ 22.19.0, ESM (`"type": "module"`), `tsconfig.json`, `tsx` for the CLI entrypoint. - [ ] Add dependency `@earendil-works/pi-coding-agent`. - [ ] ESLint flat config (`eslint.config.js`): typescript-eslint recommended + `@eslint/js`, Airbnb-style rule block from `CODING_STANDARDS.md §2`, `eslint-config-prettier` last. Add `lint` script. - [ ] Prettier (defaults) + `format` script. - [ ] vitest + `test` script and `e2e` script gated by `PILOOP_E2E`. - [ ] `package.json` scripts consistent with `AGENTS.md`: `build`, `lint`, `format`, `test`, `e2e`, `start`. - [ ] CLI entrypoint `npm start -- <JIRA-KEY>` (arg parsing + `--help`); no `--repo` arg, operates on `process.cwd()`. - [ ] Config loader (env only in v1, behind `EnvSource` seam): Jira, GitLab, write-back, per-stage skill paths, model keys. - [ ] Structured logging (per-stage prefixes) to console + `run.log`. - [ ] Run-directory helper: compute `run-id`, create `.pi-loop/runs/<run-id>/`, ensure `.pi-loop/` in `.git/info/exclude`. **Depends on:** none. **Validation:** `npm start -- ABC-1` parses the key, prints resolved config (secrets masked), creates the run dir, ensures the git-exclude entry, exits cleanly. `npm run lint`, `npm run format` (check), and `npm test` succeed. Config-loader + git-exclude unit tests pass.
david closed this issue 2026-07-24 01:28:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-loop#1
No description provided.