Skip to content

Commit 717e275

Browse files
authored
feat: implement Next Steam Achievement Picker feature — Completionist (#2)
* feat: env-based config loading, picker skip logic, vanity URL resolve; ci: add GitHub Actions; tests: add unit tests * feat: update ESLint config to ignore dist folder - add new schemas for user, game, and achievement; enhance Steam service with schema validation - improve config handling with Sury - add tests for history and pick commands - clean up unused imports and comments. * docs: add Completionist keyword in README and package metadata * docs: clarify target audience in README and update CLI command usage
1 parent 1b94cca commit 717e275

59 files changed

Lines changed: 7605 additions & 44 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/commands/constitution.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
description: Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
3+
# (No scripts section: constitution edits are manual authoring assisted by the agent)
4+
---
5+
6+
You are updating the project constitution at `.specify/memory/constitution.md`. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. `[PROJECT_NAME]`, `[PRINCIPLE_1_NAME]`). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.
7+
8+
Follow this execution flow:
9+
10+
1. Load the existing constitution template at `.specify/memory/constitution.md`.
11+
- Identify every placeholder token of the form `[ALL_CAPS_IDENTIFIER]`.
12+
**IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
13+
14+
2. Collect/derive values for placeholders:
15+
- If user input (conversation) supplies a value, use it.
16+
- Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
17+
- For governance dates: `RATIFICATION_DATE` is the original adoption date (if unknown ask or mark TODO), `LAST_AMENDED_DATE` is today if changes are made, otherwise keep previous.
18+
- `CONSTITUTION_VERSION` must increment according to semantic versioning rules:
19+
- MAJOR: Backward incompatible governance/principle removals or redefinitions.
20+
- MINOR: New principle/section added or materially expanded guidance.
21+
- PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
22+
- If version bump type ambiguous, propose reasoning before finalizing.
23+
24+
3. Draft the updated constitution content:
25+
- Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
26+
- Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
27+
- Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
28+
- Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
29+
30+
4. Consistency propagation checklist (convert prior checklist into active validations):
31+
- Read `.specify/templates/plan-template.md` and ensure any "Constitution Check" or rules align with updated principles.
32+
- Read `.specify/templates/spec-template.md` for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints.
33+
- Read `.specify/templates/tasks-template.md` and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline).
34+
- Read each command file in `.specify/templates/commands/*.md` (including this one) to verify no outdated references (agent-specific names like CLAUDE only) remain when generic guidance is required.
35+
- Read any runtime guidance docs (e.g., `README.md`, `docs/quickstart.md`, or agent-specific guidance files if present). Update references to principles changed.
36+
37+
5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
38+
- Version change: old → new
39+
- List of modified principles (old title → new title if renamed)
40+
- Added sections
41+
- Removed sections
42+
- Templates requiring updates (✅ updated / ⚠ pending) with file paths
43+
- Follow-up TODOs if any placeholders intentionally deferred.
44+
45+
6. Validation before final output:
46+
- No remaining unexplained bracket tokens.
47+
- Version line matches report.
48+
- Dates ISO format YYYY-MM-DD.
49+
- Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
50+
51+
7. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).
52+
53+
8. Output a final summary to the user with:
54+
- New version and bump rationale.
55+
- Any files flagged for manual follow-up.
56+
- Suggested commit message (e.g., `docs: amend constitution to vX.Y.Z (principle additions + governance update)`).
57+
58+
Formatting & Style Requirements:
59+
60+
- Use Markdown headings exactly as in the template (do not demote/promote levels).
61+
- Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
62+
- Keep a single blank line between sections.
63+
- Avoid trailing whitespace.
64+
65+
If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.
66+
67+
If critical info missing (e.g., ratification date truly unknown), insert `TODO(<FIELD_NAME>): explanation` and include in the Sync Impact Report under deferred items.
68+
69+
Do not create a new template; always operate on the existing `.specify/memory/constitution.md` file.

.cursor/commands/implement.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
description: Execute the implementation plan by processing and executing all tasks defined in tasks.md
3+
---
4+
5+
Given the current feature context, do this:
6+
7+
1. Run `.specify/scripts/bash/check-implementation-prerequisites.sh --json` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute.
8+
9+
2. Load and analyze the implementation context:
10+
- **REQUIRED**: Read tasks.md for the complete task list and execution plan
11+
- **REQUIRED**: Read plan.md for tech stack, architecture, and file structure
12+
- **IF EXISTS**: Read data-model.md for entities and relationships
13+
- **IF EXISTS**: Read contracts/ for API specifications and test requirements
14+
- **IF EXISTS**: Read research.md for technical decisions and constraints
15+
- **IF EXISTS**: Read quickstart.md for integration scenarios
16+
17+
3. Parse tasks.md structure and extract:
18+
- **Task phases**: Setup, Tests, Core, Integration, Polish
19+
- **Task dependencies**: Sequential vs parallel execution rules
20+
- **Task details**: ID, description, file paths, parallel markers [P]
21+
- **Execution flow**: Order and dependency requirements
22+
23+
4. Execute implementation following the task plan:
24+
- **Phase-by-phase execution**: Complete each phase before moving to the next
25+
- **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
26+
- **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
27+
- **File-based coordination**: Tasks affecting the same files must run sequentially
28+
- **Validation checkpoints**: Verify each phase completion before proceeding
29+
30+
5. Implementation execution rules:
31+
- **Setup first**: Initialize project structure, dependencies, configuration
32+
- **Tests before code**: If you need to write tests for contracts, entities, and integration scenarios
33+
- **Core development**: Implement models, services, CLI commands, endpoints
34+
- **Integration work**: Database connections, middleware, logging, external services
35+
- **Polish and validation**: Unit tests, performance optimization, documentation
36+
37+
6. Progress tracking and error handling:
38+
- Report progress after each completed task
39+
- Halt execution if any non-parallel task fails
40+
- For parallel tasks [P], continue with successful tasks, report failed ones
41+
- Provide clear error messages with context for debugging
42+
- Suggest next steps if implementation cannot proceed
43+
- **IMPORTANT** For completed tasks, make sure to mark the task off as [X] in the tasks file.
44+
45+
7. Completion validation:
46+
- Verify all required tasks are completed
47+
- Check that implemented features match the original specification
48+
- Validate that tests pass and coverage meets requirements
49+
- Confirm the implementation follows the technical plan
50+
- Report final status with summary of completed work
51+
52+
Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `/tasks` first to regenerate the task list.

.cursor/commands/plan.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
description: Execute the implementation planning workflow using the plan template to generate design artifacts.
3+
---
4+
5+
Given the implementation details provided as an argument, do this:
6+
7+
1. Run `.specify/scripts/bash/setup-plan.sh --json` from the repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. All future file paths must be absolute.
8+
2. Read and analyze the feature specification to understand:
9+
- The feature requirements and user stories
10+
- Functional and non-functional requirements
11+
- Success criteria and acceptance criteria
12+
- Any technical constraints or dependencies mentioned
13+
14+
3. Read the constitution at `.specify/memory/constitution.md` to understand constitutional requirements.
15+
16+
4. Execute the implementation plan template:
17+
- Load `.specify/templates/plan-template.md` (already copied to IMPL_PLAN path)
18+
- Set Input path to FEATURE_SPEC
19+
- Run the Execution Flow (main) function steps 1-9
20+
- The template is self-contained and executable
21+
- Follow error handling and gate checks as specified
22+
- Let the template guide artifact generation in $SPECS_DIR:
23+
- Phase 0 generates research.md
24+
- Phase 1 generates data-model.md, contracts/, quickstart.md
25+
- Phase 2 generates tasks.md
26+
- Incorporate user-provided details from arguments into Technical Context: $ARGUMENTS
27+
- Update Progress Tracking as you complete each phase
28+
29+
5. Verify execution completed:
30+
- Check Progress Tracking shows all phases complete
31+
- Ensure all required artifacts were generated
32+
- Confirm no ERROR states in execution
33+
34+
6. Report results with branch name, file paths, and generated artifacts.
35+
36+
Use absolute paths with the repository root for all file operations to avoid path issues.

.cursor/commands/specify.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
description: Create or update the feature specification from a natural language feature description.
3+
---
4+
5+
Given the feature description provided as an argument, do this:
6+
7+
1. Run the script `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS"` from repo root and parse its JSON output for BRANCH_NAME and SPEC_FILE. All file paths must be absolute.
8+
**IMPORTANT** You must only ever run this script once. The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for.
9+
2. Load `.specify/templates/spec-template.md` to understand required sections.
10+
3. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
11+
4. Report completion with branch name, spec file path, and readiness for the next phase.
12+
13+
Note: The script creates and checks out the new branch and initializes the spec file before writing.

.cursor/commands/tasks.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
3+
---
4+
5+
Given the context provided as an argument, do this:
6+
7+
1. Run `.specify/scripts/bash/check-task-prerequisites.sh --json` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute.
8+
2. Load and analyze available design documents:
9+
- Always read plan.md for tech stack and libraries
10+
- IF EXISTS: Read data-model.md for entities
11+
- IF EXISTS: Read contracts/ for API endpoints
12+
- IF EXISTS: Read research.md for technical decisions
13+
- IF EXISTS: Read quickstart.md for test scenarios
14+
15+
Note: Not all projects have all documents. For example:
16+
- CLI tools might not have contracts/
17+
- Simple libraries might not need data-model.md
18+
- Generate tasks based on what's available
19+
20+
3. Generate tasks following the template:
21+
- Use `.specify/templates/tasks-template.md` as the base
22+
- Replace example tasks with actual tasks based on:
23+
- **Setup tasks**: Project init, dependencies, linting
24+
- **Test tasks [P]**: One per contract, one per integration scenario
25+
- **Core tasks**: One per entity, service, CLI command, endpoint
26+
- **Integration tasks**: DB connections, middleware, logging
27+
- **Polish tasks [P]**: Unit tests, performance, docs
28+
29+
4. Task generation rules:
30+
- Each contract file → contract test task marked [P]
31+
- Each entity in data-model → model creation task marked [P]
32+
- Each endpoint → implementation task (not parallel if shared files)
33+
- Each user story → integration test marked [P]
34+
- Different files = can be parallel [P]
35+
- Same file = sequential (no [P])
36+
37+
5. Order tasks by dependencies:
38+
- Setup before everything
39+
- Tests before implementation (TDD)
40+
- Models before services
41+
- Services before endpoints
42+
- Core before integration
43+
- Everything before polish
44+
45+
6. Include parallel execution examples:
46+
- Group [P] tasks that can run together
47+
- Show actual Task agent commands
48+
49+
7. Create FEATURE_DIR/tasks.md with:
50+
- Correct feature name from implementation plan
51+
- Numbered tasks (T001, T002, etc.)
52+
- Clear file paths for each task
53+
- Dependency notes
54+
- Parallel execution guidance
55+
56+
Context for task generation: $ARGUMENTS
57+
58+
The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context.

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
STEAM_ID=
2+
STEAM_API_KEY=
3+
OPENROUTER_API_KEY=

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
pull_request:
7+
branches: ['**']
8+
9+
jobs:
10+
build-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: 'pnpm'
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 10.14.0
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Lint
31+
run: pnpm lint
32+
33+
- name: Run tests
34+
run: pnpm test -- --run
35+
36+
- name: Type-check
37+
run: pnpm build --noEmit

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
*.local.*
3+
*.local
4+
.local/*
5+
*.db
6+
dist/
7+
.env

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default {
2+
semi: true,
3+
trailingComma: 'all',
4+
singleQuote: true,
5+
printWidth: 120,
6+
tabWidth: 2,
7+
};

.specify/memory/constitution.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,25 @@ Sync Impact Report:
1313
- ✅ .specify/templates/tasks-template.md
1414
- Follow-up TODOs: None
1515
-->
16+
1617
# NeStA-Picker Constitution
1718

1819
## Core Principles
1920

2021
### I. Code Quality
22+
2123
All code must be clear, maintainable, and well-documented. Code should adhere to established style guides and best practices. All new code must be reviewed and approved by at least one other developer before being merged.
2224

2325
### II. Testing Standards
26+
2427
All new features must be accompanied by a comprehensive suite of unit and integration tests. A minimum of 80% code coverage is required for all new code. All tests must pass before a feature can be deployed.
2528

2629
### III. User Experience Consistency
30+
2731
The user interface and experience shall be consistent across the entire application. All new UI components must adhere to the established design system and style guide.
2832

2933
### IV. Performance Requirements
34+
3035
The application must meet defined performance benchmarks. All new features must be tested for performance impact and optimized to ensure they do not degrade the user experience.
3136

3237
## Development Workflow

0 commit comments

Comments
 (0)