Skip to content

Commit 124cd6a

Browse files
Merge pull request #324 from forecast-bio/release/v0.5.0
Release v0.5.0
2 parents 58f84c1 + 11529a6 commit 124cd6a

238 files changed

Lines changed: 39708 additions & 4896 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
}
1616
],
1717
"matcher": "Write|Edit"
18+
},
19+
{
20+
"hooks": [
21+
{
22+
"command": "HOOK=\"$(git rev-parse --show-toplevel 2>/dev/null)/.claude/hooks/heartbeat.py\"; if [ -f \"$HOOK\" ]; then python3 \"$HOOK\"; else exit 0; fi",
23+
"timeout": 3,
24+
"type": "command"
25+
}
26+
]
1827
}
1928
],
2029
"PreToolUse": [

.crosslink/.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@
22
agent.json
33
.hub-cache/
44
.knowledge-cache/
5+
.cache/
56
keys/
67
integrations/
78

8-
# Machine-local hook overrides
9+
# Machine-local state
10+
issues.db
11+
issues.db-wal
12+
issues.db-shm
13+
session.json
14+
daemon.pid
15+
daemon.log
16+
last_test_run
17+
18+
# Machine-local overrides
919
hook-config.local.json
20+
rules.local/

.crosslink/hook-config.json

Lines changed: 30 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,37 @@
11
{
2-
"allowed_bash_prefixes": [
3-
"crosslink ",
4-
"git status",
5-
"git diff",
6-
"git log",
7-
"git branch",
8-
"git show",
9-
"cargo test",
10-
"cargo build",
11-
"cargo check",
12-
"cargo clippy",
13-
"cargo fmt",
14-
"npm test",
15-
"npm run",
16-
"npx ",
17-
"tsc",
18-
"node ",
19-
"python ",
20-
"ls",
21-
"dir",
22-
"pwd",
23-
"echo"
24-
],
2+
"tracking_mode": "strict",
3+
"intervention_tracking": true,
4+
"cpitd_auto_install": true,
5+
"comment_discipline": "encouraged",
6+
"kickoff_verification": "local",
7+
"signing_enforcement": "audit",
8+
"auto_steal_stale_locks": false,
259
"blocked_git_commands": [
26-
"git push",
27-
"git merge",
28-
"git rebase",
29-
"git cherry-pick",
30-
"git reset",
31-
"git checkout .",
32-
"git restore .",
33-
"git clean",
34-
"git stash",
35-
"git tag",
36-
"git am",
37-
"git apply",
38-
"git branch -d",
39-
"git branch -D",
40-
"git branch -m"
10+
"git push", "git merge", "git rebase", "git cherry-pick",
11+
"git reset", "git checkout .", "git restore .", "git clean",
12+
"git stash", "git tag", "git am", "git apply",
13+
"git branch -d", "git branch -D", "git branch -m"
4114
],
42-
"comment_discipline": "encouraged",
43-
"cpitd_auto_install": true,
4415
"gated_git_commands": [
4516
"git commit"
4617
],
47-
"intervention_tracking": true,
48-
"kickoff_verification": "local",
49-
"reminder_drift_threshold": 5,
50-
"signing_enforcement": "audit",
51-
"tracking_mode": "strict"
18+
"allowed_bash_prefixes": [
19+
"crosslink ",
20+
"git status", "git diff", "git log", "git branch", "git show",
21+
"cargo test", "cargo build", "cargo check", "cargo clippy", "cargo fmt",
22+
"npm test", "npm run", "npx ",
23+
"tsc", "node ", "python ",
24+
"ls", "dir", "pwd", "echo"
25+
],
26+
"reminder_drift_threshold": 3,
27+
"agent_overrides": {
28+
"tracking_mode": "relaxed",
29+
"blocked_git_commands": [
30+
"git push --force", "git push -f",
31+
"git reset --hard",
32+
"git clean -f", "git clean -fd", "git clean -fdx",
33+
"git checkout .", "git restore ."
34+
],
35+
"gated_git_commands": []
36+
}
5237
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Forecast Visual Design System
2+
3+
Reference for the Forecast brand visual language as implemented in crosslink docs and reusable across projects.
4+
5+
## Brand Palette (from `_brand.yml`)
6+
7+
| Name | Hex | Usage |
8+
|--------|-----------|------------------------------------------|
9+
| Red | `#F95838` | Primary accent, CTAs, crosslink branding |
10+
| Green | `#007C35` | Success, agents, session markers |
11+
| Blue | `#00A6DB` | Links, info, agent identity |
12+
| Yellow | `#FFCE02` | Warnings, highlights, knowledge |
13+
| Pink | `#FFB6C6` | Soft backgrounds, decorative |
14+
| Grey | `#ede2e4` | Confetti base (warm pinkish grey) |
15+
| Bg | `#F9F4F5` | Page background |
16+
17+
## Typography
18+
19+
- **Headings (h1)**: Helvetica, bold
20+
- **Subheadings (h2)**: Times New Roman, italic
21+
- **Body text**: Helvetica
22+
- **Code / slash-commands only**: IBM Plex Mono — never use mono for non-code text
23+
24+
## Shape Vocabulary
25+
26+
Shapes use only: ellipses, circles, rounded rectangles. No triangles or crescents.
27+
28+
All shapes use `mix-blend-mode: multiply` — no alpha transparency on shapes. This creates the layered, overlapping Forecast look where colors interact.
29+
30+
## Confetti Dots
31+
32+
Small colored circles scattered as decorative accents, always with `mix-blend-mode: multiply`.
33+
34+
### Color distribution (from forecast.bio homepage)
35+
36+
Weighted random sampling matching the original site's `kConfetti` array:
37+
38+
| Color | Hex | Weight | Probability |
39+
|-------------|-----------|--------|-------------|
40+
| Warm grey | `#ede2e4` | 25 | 57% |
41+
| Blue | `#00A6DB` | 7 | 16% |
42+
| Yellow | `#FFCE02` | 6 | 14% |
43+
| Pink | `#FFB6C6` | 3 | 7% |
44+
| Red | `#F95838` | 3 | 7% |
45+
46+
Grey-dominant with colored accents. This keeps confetti subtle while the colored dots pop.
47+
48+
### Static confetti (SVG diagrams)
49+
50+
- Uniform radius (tunable via `CONFETTI_RADIUS` in `brand.py`, default: 5)
51+
- Wrapped in `<g style="mix-blend-mode: multiply">`
52+
- Uses solid brand colors only (red, green, blue, yellow, pink) — no grey in static diagrams
53+
54+
### Animated confetti (footer JS)
55+
56+
- 14 dots, 11px diameter
57+
- Positioned in a **cone shape** emanating up-right from the Forecast wordmark
58+
- Cone origin at logo baseline, slope drifts upward (-0.28 rise per px)
59+
- Spread grows with distance (cone half-angle 0.22)
60+
- Extra noise (±10px) on both axes for fuzzy edges
61+
- Fade in left-to-right on scroll (IntersectionObserver, 50ms stagger)
62+
- Random on every page load (`Math.random()`)
63+
64+
## Diagram Generation Pipeline
65+
66+
All diagrams generated programmatically via Python scripts in `scripts/`:
67+
68+
- `scripts/brand.py` — shared module: palette, primitives, confetti, typography CSS
69+
- `scripts/generate-banner.py` — home page banner (1500×500)
70+
- `scripts/generate-diagram-*.py` — per-guide diagrams
71+
- `scripts/generate-card-icons.py` — 12 feature card icons (150×100 each)
72+
- `scripts/generate-all.sh` — regenerates everything
73+
74+
### Diagram conventions
75+
76+
- Sentence case titles (not Title Case)
77+
- Mono class only for actual code/commands
78+
- Subheading (Times italic) for secondary labels
79+
- Background: `#F9F4F5` (brand bg)
80+
- Confetti in top corners, 4-6 dots per cluster
81+
- Seeded RNG for reproducible output
82+
83+
## Card Icons
84+
85+
Small 2-4 shape compositions for feature cards, each evocative of the feature:
86+
- Session Memory: linked ellipses (continuity)
87+
- Local-First: stacked DB layers
88+
- Multi-Agent: triangle of overlapping circles
89+
- Hooks: tall rail with guided shape
90+
- Swarm: honeycomb cluster
91+
- Knowledge: fanned pages with search lens
92+
- TUI: terminal with content lines
93+
- Web Dashboard: browser with panels
94+
- Containers: nested boxes
95+
- Workflow: diagonal arrow flow
96+
- Maintenance: interlocking gears
97+
- Everywhere: dispersed shapes (breadth)
98+
99+
## Footer
100+
101+
Matches forecast.bio card pages:
102+
1. Thin rule (`#ede3e3`, 220px)
103+
2. Wordmark + animated confetti cone (same row, flex, aligned to baseline)
104+
3. Copyright notice (`© 2026 Forecast Bio, Inc. · Built with Quarto`)
105+
106+
Footer is injected via `include-after-body` and JS-relocated into Quarto's `<main class="content">` for proper content-column alignment.
107+
108+
## Quarto Layout
109+
110+
- Two-column pattern: 35% / 5% spacer / 60% for chat-vs-command pages
111+
- `code-overflow: scroll` (not wrap)
112+
- `.column-page-right` on wider diagrams (>700px), wrapped in `:::` div fences
113+
- Full-width banner on index via CSS viewport breakout

.crosslink/rules/c.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
### C Best Practices
2+
3+
#### Memory Safety
4+
- Always check return values of malloc/calloc
5+
- Free all allocated memory (use tools like valgrind)
6+
- Initialize all variables before use
7+
- Use sizeof() with the variable, not the type
8+
9+
```c
10+
// GOOD: Safe memory allocation
11+
int *arr = malloc(n * sizeof(*arr));
12+
if (arr == NULL) {
13+
return -1; // Handle allocation failure
14+
}
15+
// ... use arr ...
16+
free(arr);
17+
18+
// BAD: Unchecked allocation
19+
int *arr = malloc(n * sizeof(int));
20+
arr[0] = 1; // Crash if malloc failed
21+
```
22+
23+
#### Buffer Safety
24+
- Always bounds-check array access
25+
- Use `strncpy`/`snprintf` instead of `strcpy`/`sprintf`
26+
- Validate string lengths before copying
27+
28+
```c
29+
// GOOD: Safe string copy
30+
char dest[64];
31+
strncpy(dest, src, sizeof(dest) - 1);
32+
dest[sizeof(dest) - 1] = '\0';
33+
34+
// BAD: Buffer overflow risk
35+
char dest[64];
36+
strcpy(dest, src); // No bounds check
37+
```
38+
39+
#### Security
40+
- Never use `gets()` (use `fgets()`)
41+
- Validate all external input
42+
- Use constant-time comparison for secrets
43+
- Avoid integer overflow in size calculations

.crosslink/rules/cpp.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
### C++ Best Practices
2+
3+
#### Modern C++ (C++17+)
4+
- Use smart pointers (`unique_ptr`, `shared_ptr`) over raw pointers
5+
- Use RAII for resource management
6+
- Prefer `std::string` and `std::vector` over C arrays
7+
- Use `auto` for complex types, explicit types for clarity
8+
9+
```cpp
10+
// GOOD: Modern C++ with smart pointers
11+
auto config = std::make_unique<Config>();
12+
auto users = std::vector<User>{};
13+
14+
// BAD: Manual memory management
15+
Config* config = new Config();
16+
// ... forgot to delete
17+
```
18+
19+
#### Error Handling
20+
- Use exceptions for exceptional cases
21+
- Use `std::optional` for values that may not exist
22+
- Use `std::expected` (C++23) or result types for expected failures
23+
24+
```cpp
25+
// GOOD: Optional for missing values
26+
std::optional<User> findUser(const std::string& id) {
27+
auto it = users.find(id);
28+
if (it == users.end()) {
29+
return std::nullopt;
30+
}
31+
return it->second;
32+
}
33+
```
34+
35+
#### Security
36+
- Validate all input boundaries
37+
- Use `std::string_view` for non-owning string references
38+
- Avoid C-style casts; use `static_cast`, `dynamic_cast`
39+
- Never use `sprintf`; use `std::format` or streams

.crosslink/rules/csharp.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
### C# Best Practices
2+
3+
#### Code Style
4+
- Follow .NET naming conventions (PascalCase for public, camelCase for private)
5+
- Use `var` when type is obvious from right side
6+
- Use expression-bodied members for simple methods
7+
- Enable nullable reference types
8+
9+
```csharp
10+
// GOOD: Modern C# style
11+
public class UserService
12+
{
13+
private readonly IUserRepository _repository;
14+
15+
public UserService(IUserRepository repository)
16+
=> _repository = repository;
17+
18+
public async Task<User?> GetUserAsync(string id)
19+
=> await _repository.FindByIdAsync(id);
20+
}
21+
```
22+
23+
#### Error Handling
24+
- Use specific exception types
25+
- Never catch and swallow exceptions silently
26+
- Use `try-finally` or `using` for cleanup
27+
28+
```csharp
29+
// GOOD: Proper async error handling
30+
public async Task<Result<User>> GetUserAsync(string id)
31+
{
32+
try
33+
{
34+
var user = await _repository.FindByIdAsync(id);
35+
return user is null
36+
? Result<User>.NotFound()
37+
: Result<User>.Ok(user);
38+
}
39+
catch (DbException ex)
40+
{
41+
_logger.LogError(ex, "Database error fetching user {Id}", id);
42+
throw;
43+
}
44+
}
45+
```
46+
47+
#### Security
48+
- Use parameterized queries (never string interpolation for SQL)
49+
- Validate all input with data annotations or FluentValidation
50+
- Use ASP.NET's built-in anti-forgery tokens
51+
- Store secrets in Azure Key Vault or similar

0 commit comments

Comments
 (0)