# v0.3.3-alpha.0 Release Notes

## Version

`v0.3.3-alpha.0`

## Dist Tag

`alpha`

Published with the `alpha` dist-tag. `latest` remains on `0.3.2-alpha.3` for now.

## npm Package

`persona-harness@0.3.3-alpha.0`

Published package check:

```bash
npm view persona-harness@0.3.3-alpha.0 version
npm view persona-harness dist-tags --json
```

Observed registry state:

- `persona-harness@0.3.3-alpha.0` exists.
- `alpha`: `0.3.3-alpha.0`.
- `latest`: `0.3.2-alpha.3`.

## Summary

This alpha adds Existing Project Adaptation Mode. Persona Harness now separates new-project generation from existing-project work:

- empty Java/Spring projects receive greenfield `0% -> 80%` baseline guidance;
- non-empty Java/Spring projects receive existing-code discovery and should follow the current package/layer/style first.

## What Changed

- `ph plan` now records `Project Mode`.
- Empty projects are marked `Mode: greenfield`.
- Projects with existing `src/main/java` or `src/test/java` Java files are marked `Mode: existing-code`.
- Existing-code plans include detected source count, package root, and layer/style hints.
- Plan-only prompts, implementation prompts, and `ph workflow implement` now state:
  - existing code wins over greenfield guidance;
  - current package/layer/naming/repository/DTO/domain style should be discovered before implementation.
- Java Role Read Follow-up now asks the agent to read representative files by role instead of every discovered Java file.
- `ph workflow finish implement` can infer README read coverage from `.persona/evidence` when report ranges are missing.
- `ph workflow finish implement` no longer blocks only because template raw-shell checklist text remains, when final verification was rerun through `npx ph bearshell`.

## Existing Project Smoke

Smoke setup:

- local tarball install into a repo-external temporary project;
- `npx ph init`;
- `npx ph plan --auto-accept`;
- existing Java package flow:
  - `com.acme.todo.web`;
  - `com.acme.todo.service`;
  - `com.acme.todo.repository`;
  - `com.acme.todo.dto`;
  - `com.acme.todo.domain`;
- OpenCode `1.17.7`;
- model: `openai/gpt-5.4-mini-fast`;
- prompt: `README.md 보고 구현해줘`.

Observed:

- `ph plan` detected `Mode: existing-code`.
- package root was detected as `com.acme.todo`.
- layer/style hints were detected as `domain, dto, repository, service, web`.
- OpenCode eventually ran `npx ph workflow implement`.
- Generated code stayed in the existing `web/service/repository/dto/domain` flow instead of forcing `presentation/application/domain/infrastructure`.
- Java role discovery evidence covered Controller, Service, Repository, DTO, Domain, and Test files.
- Gradle test/build passed.
- HTTP smoke for create todo, add tag, and query by tag passed.

## Supported Scope

- Java/Spring backend MVP.
- Greenfield backend baseline guidance.
- Existing Java/Spring backend project adaptation guidance.
- OpenCode plugin workflow.
- AI-facing profile/plan/workflow rails.
- Report-only workflow diagnostics and evidence.

## Not Supported

- Generated app product-quality certification.
- Rule compliance enforcement.
- AST/linter/build-failure gates for rule compliance.
- Frontend, infra, desktop, or full TDD workflow productization.
- Automatic completion of long README sequences.

## Verification

Pre-publish commands:

```bash
npm test
npm run typecheck
npm run build
npm run report:rules
npm run check:scope:strict
npm run check:injection-value
npm pack --dry-run
```

Result:

- `npm test`: PASS, 36 test files / 238 tests.
- `npm run typecheck`: PASS.
- `npm run build`: PASS.
- `npm run report:rules`: PASS, rule diagnostics count `0`.
- `npm run check:scope:strict`: PASS, scope diagnostics count `0`.
- `npm run check:injection-value`: PASS, current window `3/3`, decision `continue-java-mvp`.
- `npm pack --dry-run`: PASS, `persona-harness-0.3.3-alpha.0.tgz`, 229 files, 245.3 kB package size.
- Existing-project smoke recheck: PASS for `ph workflow finish implement` after final verification rerun through `npx ph bearshell`.

## Package Contents Notes

- Includes Java/Spring backend `.persona/rules`.
- Includes Java shared-skill reference.
- Includes `docs/current/release`.
- Keeps frontend/infra/desktop productization out of the supported alpha scope.

## Known Gaps

- OpenCode may still inspect package metadata such as `node_modules/persona-harness/package.json` before settling into the workflow rail.
- Agents may still perform an initial raw shell probe before rerunning final verification through `npx ph bearshell`.
- Workflow finish still relies on report/evidence text, not generated app quality certification.
- Continuation workflow for long README implementations remains the next likely P0.

## Next

- Ask external testers to rerun existing-project and clean-project smoke with:

```bash
npm install -D persona-harness@alpha
npx ph init
npx ph bootstrap backend
npx ph plan --auto-accept
```

- Next feature candidate: continuation workflow for long README completion.
