15 KiB
name, description
| name | description |
|---|---|
| webapp-feature | Use when Codex needs to implement one scoped web-application feature or accepted task end-to-end in an existing project, especially across React/frontend, Flask/backend, relational database/migrations, API contracts, tests, and documentation; when the goal is to preserve the existing architecture and behavior outside the requested feature; or when a feature should be delivered as a small validated change rather than a broad refactor. |
Webapp Feature
Version: 2.0.
Implement one agreed web-application feature safely, minimally, and end-to-end. Work with the repository's existing architecture instead of redesigning the application around the task.
This skill is designed to compose with bortstack-context. The context skill owns project/task/decision/handoff semantics; this skill owns the implementation workflow for the feature itself.
Repository workflow
In a BortStack project, use bortstack-context with the applicable repository AGENTS.md before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use bortstack-contributor for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing testtask wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
Core rules
- Read repository instructions first. Obey root and nested
AGENTS.mdfiles and any project-specific engineering rules. - Use repository evidence, not assumptions. Inspect the relevant source, configuration, migrations, tests, and existing neighboring features before deciding how to implement the change.
- Work from one scoped outcome. Prefer one accepted task or one explicit sufficiently-scoped user request. Do not silently expand a feature into a redesign or backlog.
- Preserve unrelated behavior. Make the smallest coherent change that satisfies the acceptance criteria. Avoid unrelated cleanup, renames, dependency churn, style rewrites, or architectural migration.
- Follow existing patterns unless they are the problem being changed. Match established route/model/service/component/state/test conventions when they remain valid.
- Do not invent product behavior. If a material business rule, authorization rule, data constraint, or UX behavior is unresolved, stop at the decision boundary and surface it instead of guessing.
- Treat data changes carefully. Model/schema changes require a migration strategy appropriate to the repository. Never edit production data or run destructive migrations merely to complete a local feature unless explicitly authorized.
- Keep API contracts coherent. Backend validation, authorization, serialization, status codes, frontend expectations, and tests must agree.
- Validate what changed. Run the narrowest useful checks first, then the broader repository-required checks. Never claim a check passed if it was not run.
- Update durable project context after implementation. When the repository uses BortStack, use its task/current-state/decision/handoff rules rather than duplicating them here.
- Do not commit, push, switch branches, deploy, provision infrastructure, or mutate external services unless explicitly requested or required by an already-authorized project workflow.
- Stop when the feature is complete. Do not use spare time/tokens to start the next task.
Preconditions
Before editing, establish:
- the requested outcome;
- the matching accepted task or explicit scoped request;
- acceptance criteria;
- constraints and non-goals;
- relevant durable decisions;
- affected surfaces: database, backend, API, frontend, tests, configuration, external services;
- required validation.
If the project uses BortStack, read the applicable context first. If the user asks to "work on the next task", task selection belongs to bortstack-context before this implementation workflow begins.
If the request is materially ambiguous, do not manufacture acceptance criteria. Record/propose the missing decision or ask only the question needed to unblock implementation.
For design-dependent BortStack work, confirm the approved design reference and version or the recorded explicit override through bortstack-context. Route unresolved concept, approval, or design handoff work to bortstack-design. Use frontend-ui-design for component and interaction details within the approved direction.
For an application feature, identify the authoritative application, real entry point, navigation, auth/state and backend/data needs before editing. Validate the feature through that route in the established development environment and record unverified requirements. Keep a standalone preview within explicitly approved prototype scope.
1. Inspect before planning
Inspect the smallest useful slice of the repository that proves how the feature should fit.
Typical evidence includes:
- neighboring models and migrations;
- route registration and existing endpoints;
- authorization/authentication helpers;
- serializers/schema/validation conventions;
- service/domain modules when present;
- React routing and neighboring pages/components;
- shared API/client/state/context hooks;
- form/error/loading-state conventions;
- relevant tests and fixtures;
- configuration/environment examples when the feature depends on them.
Do not read every file in a large repository merely to appear thorough. Trace the feature through the existing architecture.
Before changing a public or shared contract, search for its consumers.
2. Form a minimal implementation plan
Plan the change in dependency order. A typical cross-stack feature may be:
- durable business/data rule;
- model/schema change and migration;
- backend/domain behavior;
- API validation, authorization, and response contract;
- frontend data integration/state;
- UI and user-visible states;
- targeted tests;
- broader validation;
- context/documentation update.
Not every feature needs every layer. Do not create abstractions, services, endpoints, state stores, or components merely to match this list.
If implementation reveals a decision that would materially change scope or architecture, stop and resolve/record that decision before proceeding.
3. Database and migration work
When persistence changes:
- follow the repository's ORM/schema conventions;
- encode important integrity rules in the strongest appropriate layer rather than relying only on UI checks;
- consider uniqueness, nullability, foreign keys, deletion behavior, indexes, defaults, and concurrency where relevant;
- generate/write a migration using the project's established migration tooling;
- review generated migrations rather than trusting them blindly;
- avoid destructive operations unless they are explicitly required and safely planned;
- keep migrations forward-compatible with the repository's supported deployment process;
- add migration/schema tests when the project convention requires them.
For race-sensitive behavior such as booking, inventory, quotas, or one-time claims, do not assume a frontend availability check prevents concurrent writes. Use database/application guarantees appropriate to the architecture.
4. Backend and API work
For backend behavior:
- enforce authentication and authorization server-side;
- validate untrusted input at the backend boundary;
- keep business invariants out of the frontend-only layer;
- reuse established error and response conventions;
- return deliberate HTTP status codes and safe error bodies;
- avoid leaking internal exceptions, secrets, or sensitive data;
- preserve existing endpoint behavior unless the task explicitly changes it;
- update API consumers/tests when a contract intentionally changes.
Prefer the project's existing structure. Do not introduce a repository/service/domain layer solely because another project uses one.
5. Frontend work
For React/frontend behavior:
- follow existing routing, component, state, styling, and API-client conventions;
- preserve established visual/design-system authority when the repository defines one;
- implement the complete user-visible state, not only the happy path;
- handle loading, empty, success, validation, authorization, and failure states where relevant;
- prevent obvious duplicate submissions or stale UI when the existing architecture supports it;
- keep client-side validation aligned with, but never a substitute for, backend validation;
- avoid redesigning neighboring screens unless required by the accepted feature.
If a requested visual treatment conflicts with a documented canonical design, surface the conflict instead of silently redesigning it.
6. Tests while implementing
Add or update tests close to the behavior being changed.
Prefer tests that prove observable requirements rather than implementation details. Depending on the feature, cover:
- authorized and unauthorized paths;
- valid and invalid input;
- important domain constraints;
- success and failure responses;
- database integrity/concurrency-sensitive behavior where practical;
- frontend rendering and interaction states;
- regression cases for the bug/behavior motivating the change.
Do not delete or weaken a valid test merely to make the new implementation pass unless the accepted behavior intentionally changed; in that case update the test and durable decision/task context accordingly.
7. Validate in layers
Use the repository's own commands as authority. A sensible order is:
- targeted test(s) for changed behavior;
- relevant backend/frontend test suite;
- lint/type/static checks used by the project;
- production build when frontend/build configuration changed;
- migration/configuration validation when applicable;
- browser/visual/runtime verification when the feature has user-facing behavior and the environment/tools support it;
- repository-specific completion gates.
Do not install unrelated tools or change runtime versions merely to force validation. If a check cannot run, report the exact blocker and distinguish fresh validation from historical evidence.
Warnings are not automatically failures, but report material pre-existing or newly introduced warnings honestly. Do not claim the feature is fully verified if a required layer remains untested.
Use references/validation-matrix.md as a checklist when the feature crosses several layers.
8. Scope-control checkpoints
Stop and surface the issue instead of continuing when:
- the requested behavior conflicts with a durable decision;
- implementing the feature requires choosing an unresolved product/business rule;
- a migration would be destructive or require production-data assumptions;
- the apparent fix requires a broad architectural refactor not accepted by the task;
- a security/authorization requirement is unclear;
- an external dependency/credential/infrastructure change is required but not authorized;
- repository evidence contradicts the task enough that acceptance criteria are no longer trustworthy.
A discovered unrelated defect should normally be documented according to the project's context rules, not fixed opportunistically.
9. Finish the feature
Before declaring completion:
- compare the implementation against every acceptance criterion;
- inspect the final diff for unrelated changes, debug artifacts, secrets, generated junk, or accidental dependency churn;
- run
git diff --checkwhen Git is available; - update the maintained records according to the repository workflow;
- do not mark a task Complete when repository-specific rules require manual/user confirmation that has not happened;
- leave the repository ready for the next session, but do not start the next task.
Completion report
Give a concise engineering report containing:
- feature/task implemented;
- important behavior added or changed;
- files/areas materially changed;
- migration/API/UI implications when relevant;
- tests and validation actually run, with results;
- anything not verified and why;
- context/task/decision updates made;
- remaining blocker or required manual verification, if any.
Do not pad the report with every file touched when a short area-level summary is clearer.
When not to use this skill
Do not use this workflow for:
- choosing the next task without implementation — use
bortstack-contextin BortStack or the repository’s own planning workflow; - creating a new application — use
roborto-new-projectas the temporary scaffolding route; - diagnosis where the root cause is unknown — use
webapp-debugfirst; - broad behavior-preserving restructuring — use
safe-refactor; - a review-only request — use
code-revieworproduction-readiness-reviewas appropriate; - deployment-only work — use
deployment-check.
Resources
references/validation-matrix.md— layer-by-layer validation prompts for common feature shapes.references/feature-checklist.md— concise implementation and scope-control checklist.