一键导入
sea-context-init
Initialize a new SEA bounded context with proper structure, templates, and governance. Creates complete bounded context scaffolding.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Initialize a new SEA bounded context with proper structure, templates, and governance. Creates complete bounded context scaffolding.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends AI agent capabilities with specialized knowledge, workflows, or tool integrations.
Use when creating, scaffolding, or updating the repository AI harness in VS Code. Trigger on requests to bootstrap or refresh instructions, prompts, agents, hooks, skills, or memory layers while preserving useful existing structure and avoiding monolithic always-on context.
Canonical SEA-Forge release workflow for release preparation, validation, branch promotion, tagging, rollback, and release-gate evidence. Use when preparing a release, promoting dev to stage or stage to main, cutting a version tag, validating release readiness, handling hotfix forward-merges, planning rollback, or executing a full end-to-end release. Prefer existing just recipes and evidence-producing gates over ad hoc deployment steps.
Use when SEA work touches specs, generators, manifests, semantic fixtures, regeneration, `src/gen`, or behavior projected from ADR/PRD/SDS/SEA authority.
Use when a SEA context has valid specs and generated contracts but lacks handwritten logic, runtime wiring, persistence, integration, tests, or executable proof.
Create concise, copy-paste-ready bridge prompts between a repo-aware coding agent and an external strategic reasoning agent such as S1 ArchDevAgent. Use when the user wants to offload architecture, research, large refactor planning, migration design, plan critique, implementation-spec drafting, test-strategy design, whole-repo analysis, or diff review to an external agent while keeping repo inspection and implementation in the coding agent. Also use when the user says "use S1", "ask S1", "make a prompt for S1", "bridge this to my external agent", "prepare a context packet", or "validate this S1 response".
| name | sea-context-init |
| description | Initialize a new SEA bounded context with proper structure, templates, and governance. Creates complete bounded context scaffolding. |
| disable-model-invocation | true |
Initialize a new SEA bounded context with complete project structure, configuration, templates, and governance compliance.
Invoke when:
User invokes with:
A SEA bounded context includes:
apps/{context-name}/
├── src/
│ ├── gen/ # Generated handlers (DO NOT EDIT)
│ ├── domain/ # Domain logic
│ ├── application/ # Application services
│ ├── infrastructure/ # External integrations
│ └── interfaces/ # API interfaces
├── spec/ # Context specification
├── tests/ # Context tests
├── package.json
├── tsconfig.json
└── README.md
# Validate name follows conventions
# - kebab-case
# - 3-30 characters
# - Alphanumeric + hyphens only
# - Must start with letter
CONTEXT_NAME="$1"
if ! echo "$CONTEXT_NAME" | grep -qE '^[a-z][a-z0-9-]{2,29}$'; then
echo "❌ Invalid context name: $CONTEXT_NAME"
echo "Context names must be:"
echo " - kebab-case"
echo " - 3-30 characters"
echo " - Start with a letter"
echo " - Alphanumeric + hyphens only"
exit 1
fi
echo "✅ Context name validated: $CONTEXT_NAME"
# Create context directories
mkdir -p "apps/$CONTEXT_NAME"/{src/{gen,domain,application,infrastructure,interfaces},spec,tests}
echo "✅ Created directory structure"
package.json:
{
"name": "@sea/$CONTEXT_NAME",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsc",
"test": "vitest",
"lint": "eslint src"
},
"dependencies": {
"@sprime01/sea": "workspace:*"
}
}
tsconfig.json:
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"composite": true
},
"include": ["src/**/*"],
"references": []
}
spec/context.yaml:
# SEA Bounded Context Specification
context:
name: $CONTEXT_NAME
version: 0.1.0
status: draft
domain:
# Domain definition
# What bounded problem this context solves
capabilities:
# Business capabilities provided
- name: Example Capability
description: Description of capability
api_surface:
# API contracts
endpoints: []
events: []
schemas: []
boundaries:
# Context boundaries
owns: []
publishes: []
subscribes: []
README.md:
# $CONTEXT_NAME Context
## Purpose
{What this bounded context does}
## Domain
{Domain description}
## Capabilities
- {Capability 1}
- {Capability 2}
## API Surface
{API documentation link}
## Governance
- Spec: [spec/context.yaml](spec/context.yaml)
- Generated code: [src/gen/](src/gen/) - DO NOT EDIT
- Handlers: Regenerate via `just pipeline $CONTEXT_NAME`
## Development
\`\`\`bash
# Install
pnpm install
# Build
pnpm build
# Test
pnpm test
# Lint
pnpm lint
\`\`\`
.SEA-PROTECTED file in src/gen/:
# ⚠️ GENERATED CODE ZONE - DO NOT EDIT ⚠️
#
# All files in this directory are automatically generated
# from the SEA specification (spec/context.yaml).
#
# To modify behavior:
# 1. Edit spec/context.yaml
# 2. Run: just pipeline $CONTEXT_NAME
# 3. Generated handlers will be updated
#
# Manual edits will be overwritten.
# Create initial commit
git add "apps/$CONTEXT_NAME"
git commit -m "feat: initialize $CONTEXT_NAME bounded context"
Update nx.json or workspace configuration:
{
"projects": {
"$CONTEXT_NAME": "apps/$CONTEXT_NAME"
}
}
After initialization, verify:
# Initialize new context
sea-context-init user-management
# Output:
# ✅ Context name validated: user-management
# ✅ Created directory structure
# ✅ Generated configuration files
# ✅ Created spec template
# ✅ Generated README
# ✅ Created guardrails
# ✅ Registered in workspace
# ✅ Git commit created
#
# Next steps:
# 1. Edit apps/user-management/spec/context.yaml
# 2. Run: just pipeline user-management
# 3. Implement domain logic in src/domain/
nx-workspace for project registrationsea-generator-first for handler generationgovernance-validation for CALM compliancespec-guardian for generated code protectionAfter initialization:
## SEA Context Initialized
**Context**: {name}
**Location**: apps/{name}/
**Spec**: apps/{name}/spec/context.yaml
**Status**: ready for development
### Structure Created
- src/domain/ - Domain logic
- src/application/ - Application services
- src/infrastructure/ - External integrations
- src/interfaces/ - API interfaces
- src/gen/ - Generated handlers (PROTECTED)
- spec/ - Context specification
- tests/ - Context tests
### Next Steps
1. Edit spec/context.yaml with domain definition
2. Run: just pipeline {name}
3. Implement domain logic
4. Write tests in tests/