paths
.gest/ layout (ADR-0016).Every entity type has a single function that produces the absolute filesystem
path inside a project’s gest_dir. The functions are pure — they do no I/O —
so they can be used both at write time (where we want to know where to put a
file) and at read time (where we walk the directory and need the inverse).
The corresponding repo-relative path (suitable for the sync_digests cache
key) is produced by relative, which strips the gest_dir prefix.
const PROJECT_FILE
pub const PROJECT_FILE: &str = "project.yaml";File name of the project metadata file.
const ARTIFACT_DIR
pub const ARTIFACT_DIR: &str = "artifact";Subdirectory name for artifact entity files.
const AUTHOR_DIR
pub const AUTHOR_DIR: &str = "author";Subdirectory name for author entity files.
const EVENT_DIR
pub const EVENT_DIR: &str = "event";Subdirectory name for event entity files (sharded by month).
const ITERATION_DIR
pub const ITERATION_DIR: &str = "iteration";Subdirectory name for iteration entity files.
const NOTES_DIR
pub const NOTES_DIR: &str = "notes";Subdirectory name nested under each entity type that owns notes.
const RELATIONSHIP_DIR
pub const RELATIONSHIP_DIR: &str = "relationship";Subdirectory name for relationship entity files.
const TAG_DIR
pub const TAG_DIR: &str = "tag";Subdirectory name for tag entity files.
const TASK_DIR
pub const TASK_DIR: &str = "task";Subdirectory name for task entity files.
fn artifact_path
pub fn artifact_path(gest_dir: &Path, id: &Id) -> PathBufPath to an artifact body file: artifact/<id>.md.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
id |
&Id | the artifact’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn artifact_note_path
pub fn artifact_note_path(gest_dir: &Path, note_id: &Id) -> PathBufPath to an artifact note file: artifact/notes/<note_id>.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
note_id |
&Id | the note’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn event_path
pub fn event_path(gest_dir: &Path, event_id: &Id, created_at: &DateTime<Utc>) -> PathBufPath to an event file: event/<yyyy-mm>/<event_id>.yaml.
Events are sharded into monthly subdirectories (per the event’s
created_at timestamp) so that no single directory grows without bound.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
event_id |
&Id | the event’s id |
created_at |
&DateTime<Utc> | the event’s created_at timestamp |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn event_shard
pub fn event_shard(created_at: &DateTime<Utc>) -> StringCompute the monthly shard segment for an event timestamp (e.g. 2026-04).
| Parameter | Type | Description |
|---|---|---|
created_at |
&DateTime<Utc> | the event’s creation time, in UTC |
| returns | String | The yyyy-mm folder name, with the year padded to four digits and the month to two. |
fn iteration_path
pub fn iteration_path(gest_dir: &Path, id: &Id) -> PathBufPath to an iteration file: iteration/<id>.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
id |
&Id | the iteration’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn iteration_note_path
pub fn iteration_note_path(gest_dir: &Path, note_id: &Id) -> PathBufPath to an iteration note file: iteration/notes/<note_id>.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
note_id |
&Id | the note’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn project_path
pub fn project_path(gest_dir: &Path) -> PathBufPath to the project metadata file: project.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
| returns | PathBuf | The path of project.yaml in gest_dir; nothing is created on disk. |
fn relative
pub fn relative(gest_dir: &Path, path: &Path) -> Option<String>Compute the repo-relative form of path against gest_dir.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
path |
&Path | a file path inside gest_dir |
| returns | Option<String> | Returns None if path is not contained in gest_dir. The result uses forward slashes regardless of host platform so that sync_digests keys are portable across operating systems. |
fn relationship_path
pub fn relationship_path(gest_dir: &Path, id: &Id) -> PathBufPath to a relationship file: relationship/<id>.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
id |
&Id | the relationship’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn tag_path
pub fn tag_path(gest_dir: &Path, id: &Id) -> PathBufPath to a tag file: tag/<id>.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
id |
&Id | the tag’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn task_path
pub fn task_path(gest_dir: &Path, id: &Id) -> PathBufPath to a task file: task/<id>.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
id |
&Id | the task’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |
fn task_note_path
pub fn task_note_path(gest_dir: &Path, note_id: &Id) -> PathBufPath to a task note file: task/notes/<note_id>.yaml.
| Parameter | Type | Description |
|---|---|---|
gest_dir |
&Path | the project’s .gest/ directory |
note_id |
&Id | the note’s id |
| returns | PathBuf | The path under gest_dir; nothing is created on disk. |