Skip to content

Commit b175aa8

Browse files
committed
Update README and add documentation files for agent skills, issue tracking, and MVP details
1 parent 77e7ec9 commit b175aa8

10 files changed

Lines changed: 481 additions & 2 deletions

AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Agent skills
2+
3+
### Issue tracker
4+
5+
Issues and PRDs are tracked in GitHub Issues for `armoutihansen/choicekit`. See `docs/agents/issue-tracker.md`.
6+
7+
### Triage labels
8+
9+
Uses the default five-label triage vocabulary. See `docs/agents/triage-labels.md`.
10+
11+
### Domain docs
12+
13+
Single-context repo: root `CONTEXT.md` plus root `docs/adr/`. See `docs/agents/domain.md`.

CONTEXT.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# choicekit
2+
3+
choicekit is a Python package context for modeling choices from long-format random utility data. Its language distinguishes the row shape of the data from the statistical decision instances being modeled.
4+
5+
## Language
6+
7+
**Choice Set**:
8+
One observed decision instance containing two or more alternatives, exactly one of which is chosen.
9+
_Avoid_: Case, choice situation, group, sample
10+
11+
**Alternative Row**:
12+
One long-format row representing a candidate alternative within a Choice Set.
13+
_Avoid_: Sample, observation
14+
15+
**Alternative**:
16+
The real-world option identified within a Choice Set, which may appear across many Choice Sets.
17+
_Avoid_: Class, label
18+
19+
**Chosen Alternative**:
20+
The Alternative Row marked as selected within a Choice Set.
21+
_Avoid_: Positive class
22+
23+
**Individual**:
24+
An optional entity associated with one or more Choice Sets.
25+
_Avoid_: Person, customer, panel unit
26+
27+
**Long-Format Choice Data**:
28+
Tabular data where rows are Alternative Rows and Choice Sets are represented by metadata.
29+
_Avoid_: Wide choice matrix
30+
31+
## Relationships
32+
33+
- A **Choice Set** contains two or more **Alternative Rows**.
34+
- A **Choice Set** has exactly one **Chosen Alternative**.
35+
- An **Alternative Row** refers to exactly one **Alternative**.
36+
- An **Individual** may be associated with zero or more **Choice Sets**.
37+
- **Long-Format Choice Data** represents **Choice Sets** as collections of **Alternative Rows**.
38+
39+
## Example Dialogue
40+
41+
> **Dev:** "Should `predict_proba` return probabilities per sample?"
42+
> **Domain expert:** "In this context, the rows are **Alternative Rows**. Return one probability per **Alternative Row**, normalized within each **Choice Set**."
43+
44+
## Flagged Ambiguities
45+
46+
- "sample" is ambiguous between a scikit-learn row and a statistical decision instance; resolved: use **Alternative Row** for rows and **Choice Set** for decision instances.
47+
- "class" is ambiguous with classifier labels; resolved: use **Alternative** for choice options.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# ChoiceKit
1+
# choicekit
22

3-
ChoiceKit is an early-stage Python package for choice modelling.
3+
choicekit is an early-stage Python package for choice modeling.
44

55
## Public interface
66

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Estimator compatibility over full scikit-learn integration
2+
3+
choicekit's MVP targets scikit-learn estimator compatibility rather than full compatibility with every scikit-learn model-selection utility. `ConditionalLogit` should follow the estimator protocol through constructor parameters, cloning, learned trailing-underscore attributes, and familiar `fit`, `predict`, `predict_proba`, and `score` methods, while preserving Choice Set semantics through explicit metadata arguments. Direct `GridSearchCV` and `cross_val_score` support are deferred because forcing long-format choice data into row-wise classifier conventions would obscure the model's grouped likelihood and prediction semantics.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Row-aligned predicted probabilities
2+
3+
choicekit's MVP returns one probability per Alternative Row from `predict_proba`, aligned exactly to the input row order and normalized within each Choice Set. This deliberately deviates from scikit-learn's usual classifier shape of `(n_samples, n_classes)` because long-format choice data can have unbalanced Choice Sets, Alternatives are not ordinary classifier classes, and the natural prediction target is the probability that each Alternative Row is the Chosen Alternative.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Metadata arguments for choice structure
2+
3+
choicekit's MVP represents Choice Set, Alternative, and Individual identifiers as explicit metadata arguments rather than feature columns in `X` or a public dataset object. This keeps model features compatible with scikit-learn-style preprocessing while preventing identifiers from being accidentally estimated as numeric variables, and it leaves room for a private normalized data representation without committing to a public `ChoiceDataset` API before the core estimator semantics are proven.

docs/agents/domain.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Domain Docs
2+
3+
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
4+
5+
## Before exploring, read these
6+
7+
- **`CONTEXT.md`** at the repo root, or
8+
- **`CONTEXT-MAP.md`** at the repo root if it exists — it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
9+
- **`docs/adr/`** — read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
10+
11+
If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The producer skill (`/grill-with-docs`) creates them lazily when terms or decisions actually get resolved.
12+
13+
## File structure
14+
15+
Single-context repo (most repos):
16+
17+
```
18+
/
19+
├── CONTEXT.md
20+
├── docs/adr/
21+
│ ├── 0001-event-sourced-orders.md
22+
│ └── 0002-postgres-for-write-model.md
23+
└── src/
24+
```
25+
26+
Multi-context repo (presence of `CONTEXT-MAP.md` at the root):
27+
28+
```
29+
/
30+
├── CONTEXT-MAP.md
31+
├── docs/adr/ ← system-wide decisions
32+
└── src/
33+
├── ordering/
34+
│ ├── CONTEXT.md
35+
│ └── docs/adr/ ← context-specific decisions
36+
└── billing/
37+
├── CONTEXT.md
38+
└── docs/adr/
39+
```
40+
41+
## Use the glossary's vocabulary
42+
43+
When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
44+
45+
If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/grill-with-docs`).
46+
47+
## Flag ADR conflicts
48+
49+
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
50+
51+
> _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_

docs/agents/issue-tracker.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Issue tracker: GitHub
2+
3+
Issues and PRDs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
4+
5+
## Conventions
6+
7+
- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
8+
- **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
9+
- **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
10+
- **Comment on an issue**: `gh issue comment <number> --body "..."`
11+
- **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
12+
- **Close**: `gh issue close <number> --comment "..."`
13+
14+
Infer the repo from `git remote -v``gh` does this automatically when run inside a clone.
15+
16+
## When a skill says "publish to the issue tracker"
17+
18+
Create a GitHub issue.
19+
20+
## When a skill says "fetch the relevant ticket"
21+
22+
Run `gh issue view <number> --comments`.

docs/agents/triage-labels.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Triage Labels
2+
3+
The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4+
5+
| Label in mattpocock/skills | Label in our tracker | Meaning |
6+
| -------------------------- | -------------------- | ---------------------------------------- |
7+
| `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8+
| `needs-info` | `needs-info` | Waiting on reporter for more information |
9+
| `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10+
| `ready-for-human` | `ready-for-human` | Requires human implementation |
11+
| `wontfix` | `wontfix` | Will not be actioned |
12+
13+
When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14+
15+
Edit the right-hand column to match whatever vocabulary you actually use.

0 commit comments

Comments
 (0)