بنقرة واحدة
goga-cell-cpp
C++ CODEMANIFEST contract implementation rules
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
C++ CODEMANIFEST contract implementation rules
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | goga-cell-cpp |
| description | C++ CODEMANIFEST contract implementation rules |
Language skill for C++.
Apply the specification in the context of the calling skill. Do not retell the content — use it for decision-making.
Invoked through the goga-lang-disp router.
Full CODEMANIFEST example for C++ with all DSL constructs:
Imports:
- Types:
- Buffer
- StreamConfig AS Config
Usages:
- memory_layout
From: path/to/stream_cell
Usages:
conventions: .goga/usages/cpp_conventions.md
pattern: |
Use RAII for resource management. Prefer stack allocation over heap allocation.
testing: |
Use Catch2. Each public function must have test coverage.
Annotations: |
Use `conventions` for code style.
Use `testing` for test requirements.
Use `memory_layout` from Imports for buffer alignment rules.
Use value semantics only. No raw pointers or references in public API.
---
"lookup_entry(std::string key) -> value: int":
location: engine.hpp
annotations: |
Look up an entry by key.
`key`: lookup key string
`value`: found value or 0 if not found
Use `pattern` for implementation.
"Parser(input: std::string)":
location: parser.hpp
annotations: |
Configurable parser for structured input.
`input`: raw input string
Use `memory_layout` from Imports for buffer sizing.
Use `conventions` for code style.
properties:
"position -> int": |
Current parsing position.
"length -> int": |
Total input length.
methods:
"parse() -> tokens: std::vector<std::string>": |
Parse input into tokens.
`tokens`: parsed token list
Use `pattern` for implementation.
"reset()": |
Reset parser state to beginning.
"Buffer::StreamBuffer(config: Config)":
location: stream.hpp
annotations: |
Stream buffer extending Buffer with configurable capacity.
`config`: buffer configuration from `Config` type.
Use `memory_layout` from Imports for allocation strategy.
->Buffer: {}
---
Author: Goga
CreatedAt: 22/05/26
Description: |
Example CODEMANIFEST demonstrating all DSL constructs for C++.
A cell is a directory with a public header:
cell/
├── CODEMANIFEST
├── cell.hpp
Facade: the header file (cell.hpp) defines the public API. Everything declared in the header within the cell namespace
constitutes the facade. Implementation resides in the corresponding .cpp files.
Naming: PascalCase for user-defined classes and structs, snake_case for functions and variables.
Standard library types (std::string, std::vector) are used as-is (snake_case).
Namespace: each cell uses its own namespace for isolation.
Constructors: the Entity signature describes the class constructor. Constructor parameters are the input data.
Memory: pointers, references, and smart pointers are forbidden in the contract. Use value semantics.
| C++ | CODEMANIFEST | Note |
|---|---|---|
class / struct in namespace | Entity | Constructor → Entity signature |
| Free function in namespace | Routine | |
| Public member variable | Property | |
| Public member function | Method | |
| Constructor | Entity signature |
Allowed:
std::string
int, double, bool
std::vector<T>
std::map<K, V>
std::optional<T>
Forbidden:
pointers (*T)
references (&, &&)
smart pointers
void*
templates in DSL
Python rules for implementing CODEMANIFEST contracts
Verify each Cell's CODEMANIFEST against the implementation
Generate the final acceptance report with verdict
Defines the acceptance scope — the set of cells for a given functionality
Final acceptance orchestrator for contract-oriented workflows
Cell test coverage assessment for acceptance review