MCPcopy Create free account
hub / github.com/SethGammon/Citadel / loopId

Function loopId

core/loops/contract.js:31–36  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

29}
30
31function loopId(options = {}) {
32 const type = slugify(options.type || 'loop');
33 const source = options.title || options.command || options.goal || options.template || type;
34 const stamp = nowIso(options).replace(/[:.]/g, '-');
35 return options.id || `${type}-${slugify(source)}-${stamp}`;
36}
37
38function relativeLoopPath(id) {
39 return path.join('.planning', 'loops', `${id}.json`).replace(/\\/g, '/');

Callers 1

createLoopContractFunction · 0.85

Calls 2

slugifyFunction · 0.70
nowIsoFunction · 0.70

Tested by

no test coverage detected