andreagrandi / andreagrandi/draftomen

Detect draft formats and define format rules

Open
#261 0 comments 0 reactions 0 assignees View on GitHub
draftomen enhancement size: M
Dominant language
Python
Stars
0
Forks
0
Avg merge
1h 18m
Merged PRs (30d)
197

Description

## Problem

`draftomen/events.py` accepts only `QuickDraft_*` event names and hard-codes Quick Draft pack, pick, and completion constants. Real private logs expose distinct Premier, Traditional, and Pick-Two event identifiers and different logical-pick rules. The Traditional corpus contains one format-verified sample without the drafting sequence, so shared human-draft behavior must be separated from Traditional-specific evidence.

## Proposed change

Add an explicit draft-format and rules model covering Quick, Premier, Traditional, and Pick-Two. Detect formats from `EventName`/equivalent metadata before payload heuristics. Use the verified Traditional identifier mapping and the Premier human-draft mechanism only where the observed protocol is shared; do not fabricate Traditional-specific differences. Parse human `Draft.Notify` pack notifications into format-aware events without yet adding pick-submission support.

Keep all full logs under `.git/private/player-logs/`; use hand-authored synthetic parser fixtures only.

## Acceptance Criteria

- [ ] The private corpus retains two Premier logs, two Pick-Two logs, and one metadata-verified Traditional Draft log.
- [ ] Raw logs and copied raw excerpts remain absent from tracked files, issues, and pull requests.
- [ ] A typed format/rules contract defines cards per logical pick and observed pack/pick progression.
- [ ] Explicit event metadata distinguishes Quick, Premier, Traditional, and Pick-Two.
- [ ] `Draft.Notify` pack contents and coordinates parse under the detected rules.
- [ ] Unknown event identifiers and incomplete notifications are handled without corrupting active state.
- [ ] Existing Quick Draft parser tests remain green.
- [ ] Focused parser tests and the changelog cover the new observable contract.

## Scope notes

No pick submissions, persistence migration, ratings propagation, or frontend changes.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in draftomen/events.py and review the existing Quick Draft event handling before defining the format/rules contract. Use only hand-authored synthetic parser fixtures, keeping full logs under .git/private/player-logs/. Done means explicit detection for all four formats, format-aware Draft.Notify parsing, safe handling of unknown or incomplete notifications, green existing Quick Draft tests, focused parser tests, and a changelog entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.