3.0 KiB
3.0 KiB
Repository Agent Guidance
User-story-driven development
The design/ directory is the OKF v0.1 product record for this repository. Use user stories to plan, implement, verify, and track all behavior.
Before changing behavior:
- Read
design/index.mdand every story related to the requested behavior. - Draft updates to an existing story or create a new
design/user-stories/us-NNN-short-name.mdstory before implementation. - Define observable acceptance criteria using user or operator language.
- Present the relevant new or updated stories and acceptance criteria to the user for review, and wait for explicit confirmation before changing implementation code.
- Incorporate requested story changes before proceeding.
- Set story status to
in-progresswhile approved implementation is incomplete.
While implementing:
- Work in vertical slices against the documented acceptance criteria.
- Add tests for important behavior before implementation when practical.
- Keep implementation references and related-story links current.
- Do not mark an acceptance criterion complete until the behavior exists and has been validated.
Before completing or committing:
- Set a completed story status to
doneonly when all acceptance criteria are complete and verified. - Check completed acceptance criteria and record validation evidence where appropriate.
- Update
design/index.mdanddesign/user-stories/index.mdwhenever stories are added, renamed, moved, or materially reclassified. - Add a high-level entry to
design/log.mdunder the verified current date. - Run OKF validation along with relevant Gradle tests, lint checks, and builds.
OKF conventions
- Every non-reserved Markdown file in
design/must have YAML frontmatter with a non-emptytype. - User stories use
type: User Storyand includestatus,title, anddescription. - Allowed story statuses are
backlog,in-progress, anddone. - Every user story includes an acceptance-criteria section using Markdown task-list items.
design/index.mdanddesign/log.mdare reserved OKF files and follow the OKF index/log structures.- Store user stories in
design/user-stories/and keep their catalog current. - Use standard Markdown links and keep repository-local links valid when files move.
- Preserve unknown frontmatter extensions.
Java and Spigot development
- Use the Java version and Spigot API version declared by the Gradle build.
- Treat compiler warnings as errors.
- Prefer test-first development for domain rules and state transitions when practical.
- Run
./gradlew clean check jarbefore completing implementation work. - Keep Bukkit event handlers thin and move testable game rules into focused domain services.
- Do not perform blocking file or network operations on the server tick thread.
Timestamps
Always run date +%Y-%m-%d before adding or updating dates in stories or the design log. Use RFC 3339 UTC timestamps (YYYY-MM-DDTHH:MM:SSZ) when a date-time is required. Never guess dates.