بنقرة واحدة
codebase-layout
Codebase organization for pikru. Use when you need to find where specific functionality lives.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Codebase organization for pikru. Use when you need to find where specific functionality lives.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Code annotation requirements for pikru. Use when writing or porting Rust functions from C code. All ported functions must have cref comments.
Debugging conventions for pikru. Use when adding debug traces or investigating issues. Important rule - leave debug traces in place.
Git command conventions for pikru. Use when running any git commands to avoid blocking on interactive pager.
Idiomatic Rust patterns for pikru C port. Use when writing or reviewing Rust code ported from C. Don't write C in Rust - the goal is correct behavior, not line-by-line translation.
Create minimal subtests to isolate and fix complex bugs. Use when a test fails and the issue is buried in complexity.
Testing conventions for pikru. Use when running tests to avoid timeouts. DO NOT run the full test suite.
| name | codebase-layout |
| description | Codebase organization for pikru. Use when you need to find where specific functionality lives. |
src/ - Main pikru library (parsing and rendering)crates/ - Supporting cratesvendor/pikchr-c/ - Original C implementation and test filesexamples/ - Example programstests/ - Integration testssrc/)src/lib.rs - Public API, exports key types and functionssrc/parse.rs - Parser implementation (statement parsing, token handling)src/ast.rs - AST types (Statement, Expr, ObjectClass, etc.)src/types.rs - Core types (ClassName, Direction, EdgePoint, etc.)src/render/mod.rs - Main renderer logic
src/render/eval.rs - Expression evaluation (positions, scalars, variables)src/render/svg.rs - SVG generation (converts shapes to SVG elements)src/render/geometry.rs - Shape geometry (boxes, circles, paths, files)src/render/shapes.rs - Shape rendering (specific shape implementations)src/render/types.rs - Render types (PObject, Style, PositionedText, etc.)src/render/path_builder.rs - Path construction (line/arrow building)src/render/context.rs - Render context (variable scopes, state)src/render/defaults.rs - Default values (line width, font size, etc.)src/errors.rs - Error types and reportingsrc/macros.rs - Helper macroscrates/pikru-compare/SVG comparison utilities for testing
src/lib.rs - Core comparison logic
compare_outputs() - Main comparison functionCompareResult::is_match() - Determines if test passescrates/pikru-mcp/MCP server for test running
src/tools.rs - MCP tool implementations
run_pikru_test() - Run single test, returns comparisonlist_pikru_tests() - List available testsdebug_pikru_test() - Run with trace outputsrc/main.rs - MCP server entry pointvendor/pikchr-c/tests/*.pikchr - Test input files from C implementation
test01-test81 - Numbered feature testsautochop*.pikchr - Arrow chopping testssrc/render/mod.rs:1265-1550 - ljust/rjust calculationsrc/render/svg.rs:294 - Text anchor assignmentsrc/render/types.rs - PositionedText structuresrc/render/shapes.rs - Shape-specific renderingsrc/render/geometry.rs - Geometric calculationssrc/render/svg.rs - SVG element generationsrc/parse.rs - Parser logicsrc/ast.rs - AST node definitionscrates/pikru-compare/src/lib.rs - Comparison logicMany functions include // cref: comments pointing to the original C implementation:
// cref: function_name (pikchr.c:line_number)