"Zero technical debt. Do it right the first time."
Z6 follows Tiger Style — a disciplined approach to systems programming inspired by TigerBeetle. Contributions must meet high standards for:
- Safety — Correctness over convenience
- Performance — Predictability over throughput
- Developer Experience — Clarity over flexibility
MANIFESTO.md— Core principlesARCHITECTURE.md— System design- Tiger Style guidelines (in repository root)
- No dynamic scripting
- No garbage collection
- No unbounded complexity
- Zero technical debt policy
Be respectful, professional, and collaborative. We're building precision tools, not fighting.
Before writing code:
- Check existing issues
- For bugs: Provide reproduction steps
- For features: Discuss design first
Do not submit PRs without an associated issue.
git clone https://github.com/yourorg/z6.git
cd z6
git checkout -b fix/issue-123Branch naming:
fix/issue-N— Bug fixesfeat/issue-N— New featuresdocs/issue-N— Documentationtest/issue-N— Tests only
Follow Tiger Style:
Minimum 2 assertions per function:
fn send_request(handler: *HTTPHandler, req: Request) !Response {
assert(handler != null);
assert(req.path.len > 0);
assert(req.timeout_ns > 0);
// Implementation...
assert(response.request_id == req.id);
return response;
}All errors are explicit:
// BAD: Silent failure
fn parse(data: []const u8) ?Response {
if (invalid(data)) return null;
// ...
}
// GOOD: Explicit error
fn parse(data: []const u8) !Response {
if (invalid(data)) return error.InvalidResponse;
// ...
}Everything has limits:
// BAD: Unbounded
while (condition) {
process_item();
}
// GOOD: Bounded
for (0..MAX_ITERATIONS) |i| {
if (!condition) break;
process_item();
}
assert(i < MAX_ITERATIONS); // Loop must terminateChoose clarity over cleverness:
// BAD: Clever bit manipulation
const result = (x & 0xFF) | ((y & 0xFF) << 8);
// GOOD: Clear intent
const result = pack_u16(x, y);Test-driven development is mandatory:
test "HTTPParser: parse status line" {
const parser = HTTPParser.init();
const result = try parser.parse_status_line("HTTP/1.1 200 OK\r\n");
try std.testing.expectEqual(200, result.status_code);
}Verify tests pass:
zig build testAim for >90% coverage:
zig build test -DcoverageREQUIRED: Install Tiger Style pre-commit hooks:
./scripts/install-hooks.shThe pre-commit hook automatically enforces:
- Code formatting — Runs
zig fmt --check - Assertion density — Minimum 2 per function
- Bounded loops — No unbounded
while(true)without markers - Explicit errors — No silent
catch {} - Build success — Runs
zig build - All tests pass — Runs
zig build test
Hook execution time is < 30 seconds.
To bypass (NOT RECOMMENDED):
git commit --no-verifyzig fmt src/Z6 uses standard Zig formatting. No custom style.
# Unit tests
zig build test
# Integration tests
zig build test-integration
# Fuzz tests (1 minute)
zig build fuzz --timeout 60All must pass.
<type>: <summary> (#issue)
<body>
<footer>
Types:
fix:— Bug fixfeat:— New featuredocs:— Documentationtest:— Testsrefactor:— Code restructuringperf:— Performance improvement
Example:
fix: Handle ConnectionReset in HTTP parser (#42)
The HTTP parser didn't properly log ConnectionReset errors,
causing them to be lost. Now all connection errors emit
proper error events.
Added regression test to verify logging behavior.
Fixes #42
- One logical change per commit
- Reference issue number
- Explain why, not just what
- Keep commits small and focused
git push origin fix/issue-123Create pull request on GitHub.
## Problem
Describe the issue this PR solves.
## Solution
Explain your approach.
## Testing
- [ ] Unit tests added
- [ ] Integration tests added (if applicable)
- [ ] Fuzz tests added (if parsing/serialization)
- [ ] All tests pass
- [ ] Code formatted with `zig fmt`
## Checklist
- [ ] Assertions added (min 2 per function)
- [ ] Error handling is explicit
- [ ] All loops are bounded
- [ ] No technical debt introduced
- [ ] Documentation updated
Fixes #N-
Automated checks
- Tests pass
- Formatting correct
- No linter errors
-
Code review
- Correctness
- Tiger Style compliance
- Performance implications
- Test coverage
-
Approval
- Requires 1-2 approvals
- From maintainers
-
Merge
- Squash and merge
- Delete branch
- Solves one problem
- Has comprehensive tests
- Follows Tiger Style
- Clear commit messages
- No technical debt
- Multiple unrelated changes
- Missing tests
- Violates Tiger Style
- Vague commit messages
- Introduces technical debt
- Protocol handlers — gRPC, WebSocket
- Fuzz testing — New fuzz targets
- Documentation — Examples, guides
- Bug fixes — See issues
- Performance — Profiling, optimization
- Metrics — New metric types
- Output formats — New exporters
- UI/UX — CLI improvements
- Integrations — CI/CD examples
To add a new protocol (e.g., gRPC):
Create GRPC_PROTOCOL.md:
- Supported features
- Unsupported features
- Error handling
- Limits
Implement ProtocolHandler interface:
const GRPCHandler = struct {
pub fn init(allocator: Allocator, config: GRPCConfig) !*GRPCHandler {
// ...
}
pub fn connect(self: *GRPCHandler, target: Target) !ConnectionId {
// ...
}
// ... rest of interface
};- Unit tests for all functions
- Integration test with mock server
- Fuzz test for protobuf parsing
- Update
PROTOCOL_INTERFACE.md - Add examples to
docs/examples/
Good bug reports include:
## Description
Clear description of the bug.
## Reproduction
Steps to reproduce:
1. Run `z6 run scenario.toml`
2. Observe error
## Expected
What should happen.
## Actual
What actually happens.
## Environment
- Z6 version: `z6 version`
- OS: Linux/macOS/Windows
- Scenario: (attach or link)
## Logs
Error logs here
## Suggested Fix
(Optional) Your ideas for fixing it.
Good feature requests include:
## Use Case
Why is this needed? What problem does it solve?
## Proposed Solution
How would this work?
## Alternatives Considered
What other approaches did you consider?
## Compatibility
Does this affect existing functionality?
## Scope
How much work is this? (small/medium/large)For significant changes:
- Open issue with
[RFC]prefix - Provide detailed design document
- Discuss trade-offs
- Reach consensus
- Implement
Maintainers must:
- Review PRs within 48 hours
- Provide constructive feedback
- Enforce Tiger Style
- Maintain zero technical debt
- Be responsive to contributors
By contributing, you agree that your contributions will be licensed under the same license as Z6 (MIT or Apache 2.0, TBD).
Contributors are listed in CONTRIBUTORS.md.
- GitHub Discussions — General questions
- GitHub Issues — Bug reports, feature requests
- Email — [email address] — Security issues only
Contributing to Z6 requires:
- Discipline — Tiger Style is non-negotiable
- Tests — Comprehensive coverage
- Documentation — Clear explanations
- Patience — Reviews are thorough
We maintain high standards because correctness matters.
Version 1.0 — October 2025