Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"permissions": {
"allow": [
"Bash(gh pr:*)",
"Bash(gh issue:*)",
"Bash(git fetch:*)",
"Bash(git merge:*)",
"Bash(git push:*)",
"Bash(git reset:*)",
"Bash(git config:*)",
"Bash(git commit:*)",
"Bash(git checkout:*)",
"Bash(git pull:*)",
"Bash(git cherry-pick:*)",
"Bash(cargo check:*)",
"Bash(cargo test:*)",
"Bash(git add:*)",
"Bash(cargo clippy:*)",
"Bash(git branch:*)",
"Bash(gh run:*)",
"Bash(cargo fmt:*)"
]
}
}
54 changes: 54 additions & 0 deletions rivet-cli/src/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,60 @@ Headings (`##`, `###`, etc.) are parsed into sections. Documents with more
than two sections automatically get a table of contents in the dashboard.
Section-level artifact reference counts are shown in the TOC.

## Computed Embeds

Use `{{name}}` syntax to embed computed project data inline in documents:

### Artifact embeds (legacy)

```markdown
{{artifact:REQ-001}} — inline artifact card
{{artifact:REQ-001:full}} — full card with description, tags, links
{{links:REQ-001}} — incoming/outgoing link table
{{table:requirement:id,title}} — filtered artifact table
```

### Stats embed

```markdown
{{stats}} — full stats table (types, status, validation)
{{stats:types}} — artifact counts by type only
{{stats:status}} — counts by status only
{{stats:validation}} — validation summary only
```

### Coverage embed

```markdown
{{coverage}} — all traceability rules with percentage bars
{{coverage:rule-name}} — single rule with uncovered artifact IDs
```

### Diagnostics embed

```markdown
{{diagnostics}} — all validation issues
{{diagnostics:error}} — errors only
{{diagnostics:warning}} — warnings only
```

### Matrix embed

```markdown
{{matrix}} — one matrix per traceability rule
{{matrix:requirement:feature}} — specific source→target matrix
```

### Error handling

Unknown or malformed embeds render as a visible error (`embed-error` class),
never an empty string. This ensures broken embeds are noticed during review.

### In HTML export

Computed embeds in exported HTML include a provenance footer with the git
commit hash and timestamp, so reviewers can trace when data was generated.

## Validation

Documents participate in validation:
Expand Down
Loading
Loading