Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 33 additions & 47 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,33 @@
# airconsole-appengine/static/api

This subtree is the AppEngine-served copy of the public AirConsole JavaScript API bundle.

## Verification Entry Points

- Browser regression harness: serve this subtree statically and open a versioned runner in `tests/`.
- Playwright verification: in `ci/`, use `npm run server` and `npm test`.

## Local Invariants

- Keep versioned root bundles backward compatible.
- Stage upcoming releases in `beta/` before promotion.
- Do not remove `deprecated/` assets.
- Never call `rm`, use `safe-rm` instead (brew install safe-rm).

## Read Next

- `tests/AGENTS.md`
- `ci/AGENTS.md`

## Memory Management

Always use the **Kratos MCP** to manage memory across sessions:

- Store relevant context, decisions, and learnings via `kratos_memory_save` before ending a session.
- Retrieve prior context at the start of a new session using `kratos_memory_search` or `kratos_memory_get_recent`.
- Use `kratos_memory_ask` for natural language queries against accumulated memory.
- Never rely solely on in-context state for information that should persist across sessions.

## Code Access

Always use the **Serena MCP** for reading and writing code:

- Use `serena_find_symbol`, `serena_get_symbols_overview`, and `serena_search_for_pattern` to navigate and understand code.
- Use `serena_find_referencing_symbols` to find all callers/references before refactoring, and `serena_rename_symbol` to rename a symbol consistently across the codebase.
- Use `serena_replace_symbol_body`, `serena_replace_content`, `serena_insert_after_symbol`, and `serena_insert_before_symbol` to make code changes.
- Prefer symbol-level tools over raw text replacement when the target is a named code entity.
- Always call `serena_check_onboarding_performed` after activating a project.

## Syntax and API Verification

Always use the **Context7 MCP** to verify correct syntax and API usage before writing or modifying code that depends on external libraries:

- Call `context7_resolve-library-id` first to obtain the correct library ID for any framework or package.
- Call `context7_query-docs` with a specific query to retrieve up-to-date documentation and code examples.
- Use Context7 before writing code that depends on external library APIs to avoid outdated or hallucinated usage patterns.
# AirConsole JavaScript API Guidelines

## Scope

This repository contains the public AirConsole browser API bundles. AppEngine
checks it out as a submodule and serves it through the `static/api` symlink.

Read the nearest child guide before changing the browser regression harness in
`tests/` or the Playwright harness in `ci/`.

## Compatibility rules

- Treat the released `airconsole-<version>.js` files as public, versioned APIs.
Preserve backward compatibility unless the task explicitly changes a supported
version contract.
- Stage the next release in `beta/`; do not overwrite the current released bundle
as part of unrelated work.
- Keep `deprecated/` bundles and old versioned test runners. Existing games may
still depend on them.
- Update `CHANGELOG.md`, version-specific specs, documentation workflow inputs,
and every internal reference together when promoting or renaming a bundle.
- Preserve the browser compatibility and coding style of the bundle being edited.
Do not add a new build system or dependency for a focused API change.

## Verification

- Extend the matching Jasmine spec and open its versioned HTML runner under
`tests/` using a static server.
- From `ci/`, run `npm test`. Playwright starts the port 9000 static server through
`playwright.config.js`; `npm run server` is available for manual runner checks.
- Verify both the changed API behavior and compatibility with unchanged public
methods. A generated documentation build does not replace browser regression
coverage.