A member whose account has not accepted the terms in force now gets one dialog on the action they attempted instead of a dead-end refusal. The client handler is the single TermsGate, wired into every Http POST helper so the four optimistic controllers cannot swallow the gate into an error flash, and the original request is replayed once the acceptance is recorded. Reading the site and deleting an account stay unblocked. apple.md is the source brief the compliance research documents reference. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
description, argument-hint, allowed-tools
| description | argument-hint | allowed-tools |
|---|---|---|
| Add a background BaseService - the service class with config_fields and run_once, registration in main.py, init_db columns if it stores state, and docs. | <what the service should do> | Read, Grep, Edit, Write, Bash(python *) |
Add a background service: $ARGUMENTS
Mirror an existing service - read devplacepy/services/base.py (BaseService) and NewsService first.
- Create
devplacepy/services/<name>_service.pyextendingBaseService: declareconfig_fields(theConfigFieldspecs are rendered on/admin/services), and implementasync def run_once(self) -> Nonewith extensive INFO and DEBUG logging and specific (not bare) exception handling. Full type hints; no comments or docstrings. - If it stores state, ensure the table columns and indexes in
init_db()(dataset auto-syncs the schema;CREATE INDEX IF NOT EXISTS; if the table is soft-deletable, write born-livedeleted_at/deleted_byon insert and add the index). - Register it in
main.pystartup:service_manager.register(YourService()), under the sameDEVPLACE_DISABLE_SERVICESguard as the others. It then auto-appears on/admin/services. - If it calls an LLM, default its endpoint to
config.INTERNAL_GATEWAY_URLand authenticate with the internal gateway key, like the other AI consumers. - Emit audit events via
record_systemfor any state change it makes. - Document it in
devplacepy/services/CLAUDE.md(Background services base machinery section, or the service's own nestedCLAUDE.mdif it has one) and inREADME.mdif user-visible. - Validate the touched files with the per-language checks (
python -m py_compile+pyflakesfor Python,node --checkfor JS, brace balance for CSS, tag and{% %}balance for templates) andpython -c "from devplacepy.main import app".