Documentation
¶
Index ¶
- Constants
- func Base36Encode(data []byte) string
- func DefaultArcHome() string
- func GenerateIssueID(prefix, title string) string
- func GenerateName(dirPath string) (string, error)
- func GeneratePlanID(title string) string
- func GeneratePrefix(dirPath string) (string, error)
- func GeneratePrefixFromName(name string) string
- func GeneratePrefixWithCustomName(dirPath, customName string) (string, error)
- func GenerateProjectID(prefix, name string) string
- func NormalizePath(path string) string
- func NormalizePathPair(path string) (absPath, resolvedPath string)
- func SanitizeBasename(name string) string
Constants ¶
const MaxBasenameTruncation = 10
MaxBasenameTruncation is the max number of alphanumeric chars kept from the basename.
const MaxPrefixLength = MaxBasenameTruncation + 1 + PrefixHashSuffixLength
MaxPrefixLength is the maximum total prefix length: basename + hyphen + hash suffix.
const PrefixHashSuffixLength = 4
PrefixHashSuffixLength is the number of base36 hash characters in the suffix.
Variables ¶
This section is empty.
Functions ¶
func Base36Encode ¶ added in v0.12.0
Base36Encode converts bytes to a base36 string.
func DefaultArcHome ¶
func DefaultArcHome() string
DefaultArcHome returns the default arc home directory (~/.arc). Delegates to core.DefaultArcHome; kept for backward compatibility.
func GenerateIssueID ¶ added in v0.12.0
GenerateIssueID creates an issue ID from content. Format: prefix.{6-char-base36-hash} Uses period separator to distinguish from project prefixes which use hyphens.
func GenerateName ¶ added in v0.12.0
GenerateName creates a project name from a directory path. Format: {sanitized-basename}-{6-char-hex-hash} The hash is derived from the full absolute path, making it deterministic.
func GeneratePlanID ¶ added in v0.12.0
GeneratePlanID creates a plan ID from content. Format: plan.{6-char-base36-hash} Uses "plan" prefix to identify shared plans.
func GeneratePrefix ¶ added in v0.12.0
GeneratePrefix creates an issue prefix from a directory path. Format: {alphanumeric-basename-truncated}-{4-char-base36-hash} The hash is derived from the full absolute path, making it deterministic. Example: /home/user/projects/my-api -> "myapi-a3f2"
func GeneratePrefixFromName ¶ added in v0.12.0
GeneratePrefixFromName creates an issue prefix from a project name (without path). Format: {alphanumeric-name-truncated}-{4-char-base36-hash} Used when creating a project without an associated directory path. Includes timestamp for uniqueness when same name is used multiple times.
func GeneratePrefixWithCustomName ¶ added in v0.12.0
GeneratePrefixWithCustomName creates an issue prefix using a user-provided basename combined with a path-derived hash suffix for uniqueness. The custom name is normalized (lowercased, non-alphanumeric stripped) and truncated to MaxBasenameTruncation chars. Format: {normalized-custom-name}-{4-char-base36-hash}
func GenerateProjectID ¶ added in v0.12.0
GenerateProjectID creates a project ID from content. Format: prefix-{6-char-base36-hash} Uses hyphen separator consistent with project naming conventions.
func NormalizePath ¶ added in v0.12.0
NormalizePath resolves symlinks and returns the canonical absolute path. Delegates to core.NormalizePath; kept for backward compatibility.
func NormalizePathPair ¶ added in v0.12.0
NormalizePathPair returns both the absolute path and the symlink-resolved path. Delegates to core.NormalizePathPair; kept for backward compatibility.
func SanitizeBasename ¶ added in v0.12.0
SanitizeBasename normalizes a directory name for use in project names.
Types ¶
This section is empty.