Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Must have rt (return type) pointing to target state
Naming Conventions
Type
Prefix
Example
Safe transition
go
goToHome, goProductList, goSearchProducts
Unsafe transition
do
doCreateUser, doAddToCart, doLogin
Idempotent transition
do
doUpdateUser, doDeleteItem, doRemoveFromCart
State/Page
PascalCase
HomePage, ProductDetail, ShoppingCart
Semantic field
camelCase
userId, productName, createdAt
Safe Transition Naming Rule
IMPORTANT: Safe transitions (go*) MUST include the target state name in their id.
rt="#ProductList" → id must be goProductList (or goToProductList)
rt="#UserProfile" → id must be goUserProfile (or goToUserProfile)
Invalid examples:
goStart with rt="#ProductList" - Wrong! Should be goProductList
goNext with rt="#Checkout" - Wrong! Should be goCheckout
This rule ensures consistency and makes the diagram self-documenting. When a transition has no source state (entry point), it will be displayed as originating from UnknownState in the diagram.
States: What user sees, available actions, when this state is shown
Example: {"id": "BlogPost", "doc": {"value": "User-created article. Visible to all users after publication."}}
Transitions: Behavior, side effects, preconditions, error cases
Example: {"id": "doPublishBlogPost", "doc": {"value": "Publish article. Sets publishedAt to current time."}}
Use def to link to schema.org definitions for standard concepts
Rule of thumb: If someone unfamiliar with the app would ask "what does this do?" or "what format?", add doc
Add Tags for Organization
Output Format
Generate XML format by default. Use JSON only if explicitly requested.
XML Format (default):
Use XML comments to mark blocks: <!-- Ontology -->, <!-- Taxonomy -->, <!-- Choreography -->
One descriptor per line for simple elements
Multi-line for nested structures
Clear hierarchical structure makes maintenance easy
<?xml version="1.0" encoding="UTF-8"?><alpsversion="1.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="https://alps-io.github.io/schemas/alps.xsd"><title>Application Title</title><doc>Description of the application</doc><!-- Ontology --><descriptorid="fieldName"title="Human Title"><doc>Description</doc></descriptor><descriptorid="otherField"title="Other Field"/><!-- Taxonomy --><descriptorid="StateName"title="State Title"><descriptorhref="#fieldName"/><descriptorhref="#transitionName"/></descriptor><!-- Choreography --><descriptor = = = =/>
JSON Format (when explicitly requested):
Simple descriptors (few attributes, no nesting): Write on a single line
Complex descriptors (with nesting or long doc): Use multiple lines with "descriptor": [ at end of first line
Block separation: Add ONE blank line between Ontology/Taxonomy/Choreography blocks
No other blank lines: Keep descriptors within the same block compact
{"$schema":"https://alps-io.github.io/schemas/alps.json","alps":{"title":"Application Title","doc":{"value":"Description of the application"},"descriptor":[{"id":"fieldName","title":"Human Title","doc":{"value":"Description"}},{"id":"otherField","title":"Other Field"},{"id":"StateName","title":
E011: Tag must be a string (space-separated), not an array
Warning Codes (W)
W001: Missing title
W002: Safe transition naming (should start with 'go')
W003: Unsafe/idempotent naming (should start with 'do')
W004: Orphan descriptor
W005: Safe transition id does not match rt target (e.g., goStart with rt="#ProductList" should be goProductList)
W006: Tag contains comma - may be confused with space-separated format
Suggestion Codes (S)
S001: Missing doc on transition
S002: Missing ALPS title
S003: Missing ALPS doc
Example: Blog Application
Input: "Create an ALPS for a simple blog with posts and comments"
Output (XML - default):
<?xml version="1.0" encoding="UTF-8"?><alpsversion="1.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="https://alps-io.github.io/schemas/alps.xsd"><title>Simple Blog</title><doc>ALPS profile for a blog application with posts and comments</doc><!-- Ontology --><descriptorid="postId"title="Post ID"def="https://schema.org/identifier"><doc>Unique identifier for blog post</doc></descriptor><descriptorid="title"title="Post Title"def="https://schema.org/headline"><doc>Article title. Maximum 100 characters.</doc></descriptor><descriptorid="body"title="Post Body"def="https://schema.org/articleBody">
Article content. Markdown format supported.
Publication date and time. ISO 8601 format.
Unique identifier for comment
Comment content. Maximum 500 characters.
Blog home page. Shows navigation to post list.
List of blog posts. Shows latest 10 posts with title and author.
Single post view. Shows full content and comments. Allows adding new comments.
User comment on a post. Can be deleted by comment author or post author.
Navigate to blog home page.
Display list of blog posts. Shows latest 10 posts.
Display full post content with comments.
Create new blog post. Post is immediately published.
Update existing post content. Only post author can update.
Delete post and all associated comments. Only post author can delete.
Add comment to post. Comment is immediately visible.
Delete comment. Comment author or post author can delete.
Integration with app-state-diagram
Generated ALPS profiles can be visualized using app-state-diagram:
For simple descriptions, use plain text in doc.value. When you need structured content (lists, definitions, tables), use HTML format:
{"id":"doCheckout","type":"unsafe","rt":"#OrderConfirmation","title":"Complete Checkout","doc":{"format":"html","value":"<dl><dt>Behavior</dt><dd>Processes payment, reserves inventory, sends confirmation email</dd><dt>Preconditions</dt><dd>Valid cart with items, payment method configured</dd><dt>Errors</dt><dd>Returns 400 if payment fails or items out of stock</dd></dl>"}}
Format support levels (per ALPS spec):
text: Required (default if not specified)
html: Recommended
markdown: Optional
asciidoc: Optional
Links to Related Resources
Use link elements to reference external documentation, schemas, or related resources:
{"id":"BlogPost","def":"https://schema.org/BlogPosting","title":"Blog Post","doc":{"value":"User-created article visible to all after publication"},"link":[{"rel":"help","href":"https://example.com/docs/blog-api.html","title":"Blog API Documentation"},{"rel":"related","href":"https://example.com/schemas/post.json","title":"JSON Schema"}]}
Link attributes:
rel (required): Relationship type - use IANA Link Relations (help, related, profile, etc.)
href (required): URL to the related resource
title (optional): Human-readable description of the link
tag (optional): Classification tags
Tips for Better ALPS
Start with user journeys - Map the happy path first, then add alternatives
Be consistent - Use the same naming pattern throughout
Document transitions - Explain what each action does and when it's available
Use schema.org - Link to standard definitions for interoperability
Think about errors - Add error states and recovery transitions
Consider pagination - List states should support pagination
Tag descriptors - Use tag attribute to group related descriptors