plugins/ruflo-cost-tracker/docs/adrs/0001-cost-tracker-contract.md
ruflo-cost-tracker (v0.2.1) tracks token usage per agent/task/model, computes USD cost attribution, and recommends optimizations. It already documents:
cost-tracking for usage records, cost-patterns for optimization patterns)federation_send caps: maxHops, maxTokens, maxUsd, hopCount, spent.{tokens,usd})report, breakdown, budget, optimize, history)The two skills (cost-report, cost-optimize) call agentdb_hierarchical-recall with a namespace: 'cost-tracking' argument and agentdb_pattern-store with namespace: 'cost-patterns'. Per ruflo-agentdb ADR-0001 §"Where namespace strings actually apply", neither tool family routes by namespace:
agentdb_hierarchical-* routes by tier (working|episodic|semantic). Namespace argument is silently ignored.agentdb_pattern-* routes through ReasoningBank. Namespace argument is silently ignored. Fallback writes to the reserved pattern namespace, not to cost-patterns.The CLI examples in the agent file have always been correct (memory store --namespace cost-tracking). The skills' MCP-tool mapping was wrong. This ADR fixes them.
cost-report/SKILL.md — replace agentdb_hierarchical-recall with memory_search / memory_list / memory_retrieve (namespace-routed). Update allowed-tools accordingly. Cross-link the namespace convention.cost-optimize/SKILL.md — replace the load step with memory_search. Document two write paths for optimization patterns:
agentdb_pattern-store (ReasoningBank-routed; no namespace arg; fallback lands in reserved pattern namespace)memory_store --namespace cost-patterns (namespace-routable; lands where the agent file's CLI examples promise)docs/adrs/0001-cost-tracker-contract.md. Cross-links the eight sibling ADRs.
Append:
@claude-flow/cli v3.6.cost-tracking (memory-routed) + cost-patterns (memory-routed). Reserved namespaces (pattern, claude-memories, default) MUST NOT be shadowed.Bump 0.2.1 → 0.2.2. Patch bump justified: skill fixes are functional changes (the skills weren't doing what they claimed), but the public command surface is unchanged. Keywords add namespace-routing, mcp.
scripts/smoke.sh)10 checks:
0.2.2 with new keywords.cost-report, cost-optimize) present with valid frontmatter.memory_search / memory_store for cost-tracking and cost-patterns namespaces (not agentdb_hierarchical-* / agentdb_pattern-* with a namespace arg).cost-optimize documents both pattern-store paths (ReasoningBank vs namespace-routable).@claude-flow/cli v3.6.Proposed.Positive:
cost-report reads from cost-tracking; cost-optimize writes to cost-patterns (or to ReasoningBank explicitly).Negative:
Neutral:
bash plugins/ruflo-cost-tracker/scripts/smoke.sh
# Expected: "10 passed, 0 failed"
plugins/ruflo-agentdb/docs/adrs/0001-agentdb-optimization.md — namespace convention; defines the routing contract this ADR fixes a violation ofplugins/ruflo-ruvector/docs/adrs/0001-pin-ruvector-0.2.25.mdplugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.mdplugins/ruflo-intelligence/docs/adrs/0001-intelligence-surface-completeness.mdplugins/ruflo-adr/docs/adrs/0001-adr-plugin-pattern.mdplugins/ruflo-aidefence/docs/adrs/0001-aidefence-contract.mdplugins/ruflo-autopilot/docs/adrs/0001-autopilot-contract.mdplugins/ruflo-core/docs/adrs/0001-core-contract.mdv3/docs/adr/ADR-097-federation-budget-circuit-breaker.md — federation budget envelope