About add-concept
A skill for adding a concept definition to a `.plain` file. It covers naming, uniqueness, reference order and cycles, then gives a format and checklist for insertion.
Key features
- 01Validate concept-name syntax
- 02Check uniqueness across imports
- 03Verify referenced concepts and ordering
- 04Prevent circular definitions
- 05Insert definitions in the correct section
Use cases
- 01Add a concept to an existing `.plain` file
- 02Check a definition's references before insertion
- 03Avoid duplicate or circular concept definitions
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ plainlang/ plain-forge --skill add-conceptAfter installing, type/add-conceptin Claude Code to confirm it loaded.
Details
From the project READMEAdd Concept
Load the rules first. Before you read, edit, or write any .plain file, invoke the load-plain-reference skill and read the rule files it routes you to. Skip this only if load-plain-reference already ran in this conversation.
Workflow
- Identify the target
.plainfile. If ambiguous, ask the user. - Read the file to understand existing definitions, imports, and concepts.
- Validate the concept name against the syntax rules below.
- Check for uniqueness — the concept name must not already exist in the file or its imports.
- Check referenced concepts — any
:ConceptName:used in the definition must already be defined above it (in this file or viaimport/requires). Concept references must not form cycles (e.g., A references B and B references A). - Check for circular references — if the new concept references
:B:, then:B:must not reference the new concept (directly or indirectly). Example of a circular definition to avoid:
Fix by removing the back-reference:- :Order: is placed by :Customer: and contains :OrderItem: entries. - :Customer: is a user who has placed at least one :Order:.- :Customer: is a user of the system. - :Order: is placed by :Customer: and contains :OrderItem: entries. - Insert the concept into the
***definitions***section, after any concepts it references. - Read the file again to confirm correct placement and syntax.
Concept Syntax Rules
- Wrapped in colons:
:ConceptName: - CamelCase, starting with an uppercase letter
- Valid characters: letters, digits,
+,-,.,_ - Must be globally unique across the spec and all its imports
- Exported concepts from
requiresmodules are not transitive — to reference an ancestor's export, list that ancestor inrequires; if a concept is shared across branches, define it in a common import module instead
Definition Format
A concept definition is a bullet in ***definitions*** that starts with the concept name:
***definitions***
- :ConceptName: is a description of what it represents.
Attributes and constraints are nested sub-bullets:
***definitions***
- :Task: describes an activity that needs to be done by :User:. :Task: has:
- Name - a short description (required)
- Notes - additional details (optional)
- Due Date - completion deadline (optional)
Validation Checklist
- Name uses
:CamelCase:notation - Name is globally unique (not defined elsewhere in the file or imports)
- Definition starts with the concept name
- All referenced concepts (
:OtherConcept:) are already defined above - No circular references between concepts
- Description is clear, concise, and language-agnostic
- Trimmed per
concise-specs.md: one plain sentence, no restatement of the name, no rationale - Placed inside a
***definitions***section
Comments
Markdown supported