Skip to content

Add LLM-focused developer commands - #43

Merged
erikdubbelboer merged 37 commits into
mainfrom
add-llm-focused-commands
Nov 11, 2026
Merged

erikdubbelboer merged 37 commits into
mainfrom
add-llm-focused-commands

Conversation

@erikdubbelboer

Copy link
Copy Markdown
Member

Expand the CLI with structured commands for games, versions, playtests, analytics, and related developer workflows. Add machine-readable help, safer API handling, release tooling, and comprehensive tests while preserving legacy compatibility.

Comment thread .github/workflows/ci.yml Fixed
@erikdubbelboer
erikdubbelboer force-pushed the add-llm-focused-commands branch 2 times, most recently from 43b94c8 to 94783d2 Compare August 17, 2026 20:42
Comment thread scripts/verify-package.mjs Dismissed
@erikdubbelboer
erikdubbelboer force-pushed the add-llm-focused-commands branch 3 times, most recently from 33f83d9 to af0ac06 Compare August 23, 2026 10:51
@erikdubbelboer
erikdubbelboer force-pushed the add-llm-focused-commands branch from c67b63d to 1a0b8b1 Compare September 1, 2026 07:18
Expand the CLI with structured commands for games, versions,
playtests, analytics, and related developer workflows. Add
machine-readable help, safer API handling, release tooling,
and comprehensive tests while preserving legacy compatibility.
- Don't fail if we can't persist the new access token after refresh.
  Just use it for this single invocation.
- Improve documentation and LLM understanding around `poki auth login`.
Automatically look up source refresh timestamps for structured analytics
queries and attach matching developer event descriptions when game scope
and event identity are unambiguous. Preserve query results when metadata
lookups fail and report non-blocking warnings.

Clarify that result completeness does not establish ingestion completeness
and current descriptions do not verify historical behavior. Include
descriptions in default event listings and correct the lifecycle completion
example to use an empty label and completion counters.
```
% poki media-kit
notice:
  code: MISSING_ACTION
  message: No action supplied for poki media-kit; showing group help.
command: poki media-kit
usage: "poki media-kit <action> [options]"
summary: Manage Media Kit assets.
behavior[3	]: Use types for current upload requirements. Older orientation-specific assets remain readable, downloadable, and deletable.	Processing status is uploading, ready, or error. Upload acceptance does not mean storage processing has finished.	Normalized asset_type is the backend attributes.type category; normalized type remains marketing_assets. Raw output preserves the backend document.
commands[10	]{path	summary}:
  poki media-kit types	Describe current upload types, enforced requirements, and frontend recommendations.
  poki media-kit list	List all Media Kit assets for a game.
  poki media-kit get	Inspect an asset, optionally waiting for completion.
  poki media-kit upload	Upload one or more files of one current asset type.
  poki media-kit delete	Permanently delete an asset and its stored file.
  poki media-kit preview-url	Return an absolute signed preview URL.
  poki media-kit download-url	Return an absolute signed download URL.
  poki media-kit download	Stream an asset or ZIP to a local file.
  poki media-kit fields	List the offline Media Kit asset field index.
  poki media-kit field	Return one complete Media Kit asset field definition.
help:
  command: poki help <group> <action>
  manifest: poki help --all
  search: poki help --search TEXT
  permissions: poki help permissions
  formats: poki help formats
  shapes: poki help shapes
  workflows: poki help workflows
```
We always want this to be a manual action in P4D.
- Add --test-version and repeatable --device-category options, defaulting to v2.
- Validate device selections against the chosen methodology.
- Create tests with a fixed target_count of 500 gameplays or pageviews.
- Update result summaries and discovery docs for quotas, progress, and metrics.
- Cover methodology defaults and device selections in command tests.
Add poki realtime users, errors, and c2p for live user estimates,
version error counts, and pageview conversion metrics.

Route requests through the realtime service using saved OAuth
credentials. Include structured help, permission metadata,
production and acceptance URLs, and mocked tests.
@erikdubbelboer
erikdubbelboer force-pushed the add-llm-focused-commands branch from f0027fd to 186968a Compare October 6, 2026 15:37
@erikdubbelboer
erikdubbelboer force-pushed the add-llm-focused-commands branch from 9acb7c9 to a3ab9d5 Compare October 7, 2026 02:05
Fix C2P response handling and recording states. Update readiness checks for game approval, release status and archived games.

Add archive and favorite settings, store URL changes and thumbnail updates from AB test winners. Expose planned release metadata and Dialog usage, and update funnel defaults and eligibility docs.

Add regression tests for the updated API contracts.
# Conflicts:
#	.github/workflows/lint.yml
Add game and thumbnail A/B test lifecycles and Web Fit requests, with explicit permission requirements in command help.

Fix Player Fit payloads, restrict immutable event fields, align list capabilities, and tighten analytics query validation. Delegate content validation and event normalization to the backend while retaining request-shape and storage guards.

Update resource documentation and regression coverage. Validated with 500 passing tests, lint, typecheck, and build.
Add categories list using the authenticated /categories endpoint and point
category discovery guidance to current API titles. Keep the bundled audience
snapshot for test-targeting eligibility, which the endpoint does not expose.

Explain content-moderation-required errors and include moderation blockers
in game readiness for activation, Playtests, and Player Fit. Preserve the
approved-game exemption and document that ordinary uploads remain available.

Add regression coverage and require commit message lines to stay within
80 characters in AGENTS.md.

Implements the API contracts proposed in mothership PRs #6141 and #6142.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved defects can silently export incomplete CSV data, overwrite another writer’s file without --force, and discard recovery details after successful creation, potentially prompting duplicate uploads or resource creation.

5 open issues
What changed in this PR

Expands the Poki CLI beyond legacy uploads with structured developer commands and machine-readable contracts for automated workflows.

Changes:

  • Adds resource management, discovery, testing, and realtime command surfaces with structured help.
  • Introduces shared validation, output formatting, polling, transfer handling, and recovery utilities.
  • Adds regression tests, cross-platform CI, and release validation tooling.
File Description
tsconfig.json Configures modern TypeScript and includes tests.
test/​views.test.ts Tests resource projections and field validation.
test/​version-activations.test.ts Tests activation history pagination and exports.
test/​uploads.test.ts Tests file-backed uploads and archive cleanup.
test/​timezone.test.ts Tests local-time upload filenames.
test/​test-reporter.test.ts Tests failure reporting and CI annotations.
test/​service-environment.test.ts Tests endpoint selection and environment isolation.
test/​reviews.test.ts Tests review update validation and payloads.
test/​quotas.test.ts Tests quota errors and scope resolution.
test/​project.test.ts Tests project configuration precedence and validation.
test/​private-references.test.ts Checks sources and bundles for private references.
test/​preview-url.test.ts Tests derived preview URLs and raw responses.
test/​polling.test.ts Tests polling deadlines and failure classification.
test/​input.test.ts Tests JSON and TOON input parsing.
test/​contract-parity.test.ts Tests developer API contract compatibility.
test/​confirmation.test.ts Tests destructive-command confirmation gates.
test/​config.test.ts Tests absolute and environment-scoped configuration paths.
test/​cli-entry.ts Provides injectable API services for CLI tests.
test/​categories.test.ts Tests authenticated category discovery.
test/​auth-refresh.test.ts Tests token refresh, replay, and persistence.
test/​audiences.test.ts Tests offline audience discovery.
src/​zipfile.ts Updates archive creation and failure cleanup.
src/​views.ts Defines summary, full, and selected-field views.
src/​version.ts Exposes package version and user agent.
src/​uploads.ts Adds file-backed multipart uploads.
src/​timezones.ts Defines resource and analytics timezone guidance.
src/​timeouts.ts Centralizes timeout defaults and validation.
src/​service-environment.ts Selects service endpoints and configuration scope.
src/​quotas.ts Validates public quota metadata.
src/​query.ts Validates and builds collection queries.
src/​project.ts Resolves and caches project configuration.
src/​process.ts Handles process errors and interrupts.
src/​p4d.ts Adds legacy upload timeout and error classification.
src/​output.ts Serializes TOON, JSON, CSV, and errors.
src/​media-kit.ts Defines asset requirements and upload failure shapes.
src/​list-capabilities.ts Declares endpoint-specific collection capabilities.
src/​json.ts Provides a shared object type guard.
src/​input.ts Parses structured input and validates allowed fields.
src/​index.ts Delegates startup to the process runner.
src/​errors.ts Defines structured errors and interrupt cleanup.
src/​docs/​command-groups/​versions.ts Documents version lifecycle commands.
src/​docs/​command-groups/​version-activations.ts Documents activation history semantics.
src/​docs/​command-groups/​types.ts Defines shared command documentation builders.
src/​docs/​command-groups/​reviews.ts Documents review workflows.
src/​docs/​command-groups/​realtime.ts Documents realtime metric contracts.
src/​docs/​command-groups/​playtest-requests.ts Documents recruitment and replacement recovery.
src/​docs/​command-groups/​playtest-recordings.ts Documents recording management and asset URLs.
src/​docs/​command-groups/​player-fit-tests.ts Documents Player Fit testing.
src/​docs/​command-groups/​player-feedback-questions.ts Documents feedback generation and polling.
src/​docs/​command-groups/​netlib-lobbies.ts Documents lobby queries and sensitive codes.
src/​docs/​command-groups/​media-kit.ts Documents asset transfers and recovery.
src/​docs/​command-groups/​limits.ts Documents testing quotas and usage.
src/​docs/​command-groups/​games.ts Documents game management and readiness.
src/​docs/​command-groups/​game-events.ts Documents event definitions and terminology.
src/​docs/​command-groups/​game-event-funnels.ts Documents ordered event funnels.
src/​docs/​command-groups/​game-change-requests.ts Documents developer game-change requests.
src/​docs/​command-groups/​categories.ts Documents live category discovery.
src/​docs/​command-groups/​auth.ts Documents credential management and sign-in constraints.
src/​docs/​command-groups/​audiences.ts Documents offline audience discovery.
src/​docs/​command-groups/​ab-tests.ts Documents A/B and Web Fit testing.
src/​developer-permissions.ts Defines the public developer permission catalog.
src/​data/​select-expression.ts Adds shared analytics expression traversal.
src/​config.ts Enforces absolute, environment-scoped configuration roots.
src/​commands/​web-fit-tests.ts Adds confirmed Web Fit requests.
src/​commands/​version-activations.ts Adds activation history listing.
src/​commands/​reviews.ts Adds review lifecycle commands.
src/​commands/​resource-docs.ts Adds resource field discovery commands.
src/​commands/​rendering.ts Renders resource views and CSV exports.
src/​commands/​realtime.ts Fetches and validates realtime metrics.
src/​commands/​polling.ts Adds bounded polling and wait metadata.
src/​commands/​player-fit-tests.ts Adds Player Fit lifecycle commands.
src/​commands/​paths.ts Centralizes encoded game-scoped paths.
src/​commands/​netlib-lobbies.ts Adds filtered lobby listing.
src/​commands/​limits.ts Resolves game or team quota queries.
src/​commands/​downloads.ts Streams downloads through temporary files.
src/​commands/​discovery.ts Adds local context and current-user discovery.
src/​commands/​common.ts Re-exports shared command utilities.
src/​commands/​categories.ts Adds live category discovery.
src/​commands/​auth.ts Adds login, status, and confirmed logout.
src/​commands/​audiences.ts Adds offline audience listing.
src/​commands/​audience-input.ts Shares audience defaults and validation.
src/​commands/​async-create.ts Shares post-creation polling and recovery.
scripts/​test.mjs Runs discovered TypeScript test files.
scripts/​release-tag.mjs Validates publication tags and dry-run options.
scripts/​release-git-tag.mjs Coordinates release Git tags and recovery.
scripts/​failures-only-reporter.mjs Reports test failures with CI annotations.
rollup.config.mjs Updates bundling and includes dependency license notices.
package.json Updates dependencies, runtime support, and validation scripts.
AGENTS.md Adds commit-message length guidance.
.github/​workflows/​lint.yml Removes the previous lint workflow.
.github/​workflows/​ci.yml Adds cross-platform, multi-version validation.

Review effort: Balanced

Comment thread src/commands/async-create.ts Resolved
Comment thread src/commands/downloads.ts Resolved
Comment thread src/commands/rendering.ts Resolved
Comment thread src/commands/polling.ts Resolved
Comment thread src/process.ts Resolved
Preserve created resource IDs and emit executable polling recovery commands.
Cancel outstanding API and authentication requests when polling expires.

Reject incomplete numbered-page CSV exports, fail closed when downloads
cannot publish safely, and run cleanup callbacks before stdout error exits.

Add regression coverage and update the command documentation.
Comment thread test/cli.test.ts Fixed
Comment thread test/cli.test.ts Fixed
Use a static preload fixture with explicit TypeScript registration.
Pass paths and error codes as data to remove code-construction alerts.

@Pedr0Rocha Pedr0Rocha left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we fix stuff as we go for this one I guess 🤷‍♂️

@erikdubbelboer
erikdubbelboer merged commit f1d1f6a into main Nov 11, 2026
11 checks passed
@erikdubbelboer
erikdubbelboer deleted the add-llm-focused-commands branch November 11, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants