| name | feature-authoring-guard |
| description | Author or refactor features with explicit priority/exclusive/session semantics and boundary-safe common-API usage. Use when requests add/fix feature behavior or session flow. |
Skill: feature-authoring-guard
Trigger Signals
Use this skill when requests include:
- "add feature"
- "refactor feature"
- "priority/exclusive"
- "session behavior"
- "input event -> feature behavior"
Do Not Use When
- Request is only docs updates without feature code changes.
- Request is only visual styling in UI components.
Required Inputs
- Feature intent and user-visible behavior.
- Trigger event(s).
- Related docs:
docs/ai/framework/packages/feature-system.md
docs/ai/apps/asyra-design/rules/feature-authoring.md
docs/ai/apps/asyra-design/API_SURFACES.md
Preflight
- Locate existing feature(s) in
apps/asyra-design/src/features.
- Identify shared logic candidates in
apps/asyra-design/src/common-apis.
- Confirm constants source:
- events from
InputSystemEvents
- feature ids from
FeatureNames
Deterministic Procedure
- Define mode:
execution for one-shot actions
session for start/update/end lifecycle
- Set explicit feature metadata:
- Keep ownership clean:
- feature orchestrates
- common-apis mutate/query
- no deep package internals in feature file
- Implement cancellation semantics:
- explicit end/cancel result
- deterministic conflict behavior with other features
- Update contracts when behavior changes:
- feature doc
- PRD/BDD snippets if behavior contract changed
Validation Matrix
- Deterministic ordering under competing features.
- Session lifecycle is coherent (
onStart/onUpdate/onEnd).
- No mutation path bypasses common-apis boundary.
Required Output Format
Behavior Contract
- what changed for user-visible behavior
Implementation
- affected features and APIs
Validation
- commands and manual checks
Docs Sync
Guardrails
- Do not embed business rules in input mapping files.
- Do not use ad-hoc string literals for feature ids/events.
- Local commits may close completed, validated steps/stages; never push unless
the user explicitly requests the remote operation. Follow
docs/ai/workflows/git-commit-push-policy.md.
Failure Policy
If feature ownership is unclear:
- provide one conservative implementation and one alternative
- ask for owner choice before broad refactor