Skip to content
Closed
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
5 changes: 5 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Active tickets

- [ ] [`ticket-033`](project/ticket-033/README.md) — restore communication LLM
prompt resolution after its helper moved one directory deeper. Current
state: `IN_PROGRESS / VALIDATION`; focused tests pass and both targeted
failures are removed, with no test or prompt-content changes.

- [ ] [`ticket-019`](project/ticket-019/README.md) — publish the dependency-free
Python SDK as the root PyPI distribution `todo2code` through `goal -a`, with
one root `pyproject.toml` and SDK-only artifacts. Current state:
Expand Down
1 change: 1 addition & 0 deletions project/TICKETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ of `project/README.md`, which remains a generated technical-analysis artifact.
| **ticket-019** | [`README.md`](./ticket-019/README.md) | [`preprompt.md`](./ticket-019/preprompt.md) | - | [`ai-codex.md`](./ticket-019/ai-codex.md) | [`ai-codex-logs.txt`](./ticket-019/ai-codex-logs.txt) | [`changelog.md`](./ticket-019/changelog.md) |
| **ticket-020** | [`README.md`](./ticket-020/README.md) | [`preprompt.md`](./ticket-020/preprompt.md) | - | [`ai-codex.md`](./ticket-020/ai-codex.md) | [`ai-codex-logs.txt`](./ticket-020/ai-codex-logs.txt) | [`changelog.md`](./ticket-020/changelog.md) |
| **ticket-022** | [`README.md`](./ticket-022/README.md) | [`preprompt.md`](./ticket-022/preprompt.md) | - | [`ai-codex.md`](./ticket-022/ai-codex.md) | [`ai-codex-logs.txt`](./ticket-022/ai-codex-logs.txt) | [`changelog.md`](./ticket-022/changelog.md) |
| **ticket-033** | [`README.md`](./ticket-033/README.md) | [`preprompt.md`](./ticket-033/preprompt.md) | - | [`ai-codex.md`](./ticket-033/ai-codex.md) | [`ai-codex-logs.txt`](./ticket-033/ai-codex-logs.txt) | [`changelog.md`](./ticket-033/changelog.md) |
<!-- AUTO:TICKET_INDEX:END -->
63 changes: 63 additions & 0 deletions project/ticket-033/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Ticket 033: Restore communication prompt resolution after module split

- **ID**: ticket-033
- **Owner**: unresolved:human
- **Status**: IN_PROGRESS
- **Workflow state**: VALIDATION
- **Created**: 2026-08-04

## Goal and scope

Restore runtime resolution of `communication-to-intent.system.md` after the
communication LLM implementation moved one directory deeper. The copied path
logic still climbs three levels, which resolves from
`dist/src/communication/llm` to `dist/prompts`; repository prompts live at the
root `prompts` directory, requiring four levels from the compiled helper.

The repair changes only the relative prompt root in the helper. It will not
copy prompts into `dist`, change provider fallback behavior, weaken
`require-llm`, edit tests or contact a live provider. One production file is
allowed and expected implementation time is under 30 minutes.

## Planned changed paths

- `src/communication/llm/implementation-helpers.ts`: correct the prompt root
for the module's new filesystem depth.
- `project/ticket-033/**`, `TODO.md`, `project/TICKETS.md`: intent and evidence.

## Acceptance criteria

- [x] AC-01: Scope is approved by a human owner.
- [x] AC-02: The communication prompt resolves from both compiled test/runtime
execution without relying on stale artifacts.
- [x] AC-03: Both audited communication enrichment tests pass using their
mocked provider and no live request.
- [x] AC-04: `require-llm` and correction validation behavior remain strict.
- [x] AC-05: Clean build, focused/full tests, diff scope and governance evidence
are recorded without changing tests or prompt contents.

## Participants

- Human participant: unresolved; no user-* file was created by this script.
- Agent participant: [ai-codex.md](ai-codex.md)

## Approval boundary

- Current state: `IN_PROGRESS / VALIDATION` after implementing and testing the
bounded repair.
- Chat approval authorizes this interactive implementation only; trusted merge
evidence must remain independent and bound to the final SHA.

## Validation evidence

- `npm run build`: PASS.
- Focused communication LLM suite: 3 passed, 0 failed; mocked provider only.
- Full fresh suite on isolated base: 338 tests, 328 passed, 9 failed and one
skipped. Both prompt failures are removed. The remaining failures correspond
exactly to independent tickets 030, 031 and 032.
- `git diff --check`: PASS.
- `make governance`: only four inherited ticket-018/ticket-019 diagnostics;
no ticket-033 scope or workstream finding.
- Ephemeral integration of implementation commits `9c25942`, `bbd236f`,
`c5db5fb` and `f96c0a8` over base `caf6551`: clean build PASS; full suite
338 tests, 337 passed, 0 failed and one environment-dependent JDK skip.
14 changes: 14 additions & 0 deletions project/ticket-033/ai-codex-logs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
2026-08-04 planning
- Fresh base `caf6551`: two communication LLM tests fail because the split
helper resolves the prompt under nonexistent `dist/prompts`.
- No production source edited; state remains `WAIT_FOR_APPROVAL`.
- Human response `kontynuuj` authorized ticket-033; transitioned to
`IN_PROGRESS / EDIT`.
- `npm run build`: PASS.
- `node --test dist/test/communication-llm.test.js`: PASS (3/3), mocked provider.
- Fresh full suite: 338 total, 328 pass, 9 fail, 1 skip; both ticket-033 prompt
failures removed, remaining failures belong to tickets 030/031/032.
- `git diff --check`: PASS.
- `make governance`: four inherited ticket-018/ticket-019 errors, no ticket-033 finding.
- Combined implementation-only integration on `caf6551`: build PASS; full suite
PASS (338 total, 337 pass, 0 fail, 1 JDK skip).
45 changes: 45 additions & 0 deletions project/ticket-033/ai-codex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
participant-id: agent:codex
participant: codex
role: agent
ticket: ticket-033
---
# Participant: codex (AI agent)

## Understanding

The old implementation lived at `src/communication/llm.ts`; its compiled
module needed three parent traversals to reach repository-root `prompts`.
`loadCommunicationPrompt` now lives in
`src/communication/llm/implementation-helpers.ts`, one directory deeper, but
retained the old traversal. The error therefore names nonexistent
`dist/prompts/communication-to-intent.system.md`. This explains exactly two
tests and does not indicate provider or schema failure.

## Execution plan

1. Wait for explicit human approval before editing source.
2. Correct the relative prompt root by one directory in the owning helper.
3. Run build and focused communication LLM tests with their mocked provider.
4. Run the full fresh suite and verify both prompt failures disappear.
5. Record diff/scope and governance evidence; do not change tests or prompts.

## Actual changes

- The human explicitly approved ticket-033 by replying `kontynuuj`; the
interactive implementation may enter `EDIT`.
- Corrected the prompt traversal by one directory in the owning helper. No
prompt content, provider behavior, schema or test changed.
- Clean build and all three focused communication LLM tests pass, including
correction retry and strict require-mode behavior. The isolated full suite
no longer contains either prompt-resolution failure.
- Verified the four sibling implementation commits together in a detached,
uncommitted integration worktree: build passes and all 337 runnable tests
pass. This is test evidence, not merge approval.

## Blockers

- Tickets 030, 031 and 032 remain independent sibling repairs and are not
absorbed into this diff.
- Four inherited ticket-018/ticket-019 governance errors remain outside scope.
- Trusted merge approval for the final head SHA is still required.
18 changes: 18 additions & 0 deletions project/ticket-033/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ticket Changelog (ticket-033)

## [0.1.0] - 2026-08-04

- Initial governance scaffold created.
- No human participant identity or content was generated.
- Renumbered the unpublished scaffold from 023 to 033 because remote PR #3
already owns ticket-023.
- Documented the bounded prompt-resolution regression repair.

## [0.2.0] - 2026-08-04

- Corrected communication prompt resolution for the helper's post-refactor
directory depth without changing prompt contents or LLM policy.
- Focused communication LLM tests pass 3/3 and the two targeted full-suite
failures are removed.
- Combined tickets 030-033 implementation verification passes all 337 runnable
tests on a clean build.
17 changes: 17 additions & 0 deletions project/ticket-033/intent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"schema": "new-project.intent/v2",
"ticket": "ticket-033",
"summary": "Restore communication prompt resolution after module split",
"workstream": "interfaces",
"allowedPaths": [
"src/communication/llm/implementation-helpers.ts",
"project/ticket-033/**",
"TODO.md",
"project/TICKETS.md"
],
"forbiddenPaths": ["project/ticket-*/user-*.md"],
"stacks": ["node"],
"dependsOn": [],
"conflictsWith": [],
"integrationTicket": null
}
8 changes: 8 additions & 0 deletions project/ticket-033/preprompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ticket preprompt

- **Task ID**: ticket-033
- **Task title**: Restore communication prompt resolution after module split
- **Created**: 2026-08-04T12:22:18Z

Keep executable implementation outside this governance/evidence directory.
Read a human-owned user-*.md file only when one exists.
2 changes: 1 addition & 1 deletion src/communication/llm/implementation-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export function audit(
}

export async function readPrompt(): Promise<string> {
const promptPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../prompts', 'communication-to-intent.system.md');
const promptPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../prompts', 'communication-to-intent.system.md');
if (!(await pathExists(promptPath))) throw new Error(`Prompt not found: ${promptPath}`);
return fs.readFile(promptPath, 'utf8');
}
Expand Down
Loading