一键导入
sruja-project
Procedural workflows for working with the Sruja codebase. Teaches AI editors how to add components, validate changes, and follow patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Procedural workflows for working with the Sruja codebase. Teaches AI editors how to add components, validate changes, and follow patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Discovers architecture from codebases and authors Sruja DSL (repo.sruja). Use when discovering architecture, generating or refactoring repo.sruja, validating architecture against code, maintaining architecture docs, or when the user mentions architecture-as-code, C4, or .sruja files.
Verification harness for any AI agent skill. Use with any other skills; before marking a task done, run verify-task. On failure, record a correction learning. Ensures lint, tests, drift, and intent checks pass regardless of which skill generated the code.
| name | sruja-project |
| version | 2026.07.1 |
| description | Procedural workflows for working with the Sruja codebase. Teaches AI editors how to add components, validate changes, and follow patterns. |
| license | Apache-2.0 |
Procedural workflows for working with the Sruja architecture-as-code platform.
Identify the tier for your crate:
Add to workspace in root Cargo.toml:
[workspace]
members = ["crates/sruja-new-crate"]
Add dependencies in crates/sruja-new-crate/Cargo.toml
Update CLI if exposing new commands:
src/cli/commands.rssrc/cli/run.rssrc/commands/mod.rsValidate:
cargo build --release
cargo test -p sruja-new-crate
cargo clippy -- -D warnings
Define the command in src/cli/commands.rs:
#[command(name = "my-command")]
MyCommand {
#[arg(long = "repo", short = 'r', default_value = ".")]
repo: String,
},
Add handler in src/cli/run.rs:
Commands::MyCommand { repo } => {
commands::my_module::my_command(&repo)
}
Implement the command in src/commands/my_module.rs
Export in src/commands/mod.rs:
pub use my_module::my_command;
Test:
cargo test -p sruja-cli
./target/release/sruja my-command --help
After any .sruja file change:
sruja lint repo.sruja
Check for drift:
sruja sync -r .
sruja drift -r .
Verify no layer violations:
sruja classify -r .
sruja drift -r . -a repo.sruja
# All tests
cargo test --workspace
# Specific crate
cargo test -p sruja-cli
# Single test
cargo test test_name
# With coverage
just test-coverage
Respect these tier dependencies:
| Tier | Crates | Can Depend On |
|---|---|---|
| Core Engine | sruja-diagnostics, sruja-language, sruja-engine, sruja-export, sruja-scan, sruja-graph-core | Only core crates |
| Extraction | sruja-graph, sruja-extract | Core Engine |
| Delivery | sruja-cli, sruja-wasm | Core Engine, Extraction |
| Secondary | sruja-diff, sruja-intent, sruja-agent, sruja-memory | Core Engine, Extraction |
| Task | Load only |
|---|---|
| Add crate | rules/add-crate.md |
| Add CLI command | rules/add-cli-command.md |
| Validate changes | rules/validate-changes.md |
| Run tests | rules/run-tests.md |
| Common patterns | rules/common-patterns.md |
| Anti-patterns | rules/anti-patterns.md |
When users share conventions, patterns, or workflows in conversation, automatically record them using the existing sruja_record_learning MCP tool.
Detect these patterns:
Capture using MCP tool sruja_record_learning:
{
"context": "user convention: [brief description]",
"hypothesis": "the convention/pattern shared",
"outcome": "success",
"guardrail_advice": "how to apply this"
}
This creates an auto-learning loop without explicit user action.
Use sruja-project skill. Help me add a new crate to the workspace.
Skills use CalVer: YYYY.MM.MICRO
Bump the version when:
The version field in frontmatter is required for discoverability and compatibility checking.