Files
projectmycelium/docs/dev/design/archive/threefold-marketplace-prompt.md
2025-09-01 21:37:01 -04:00

4.6 KiB
Raw Blame History

This content should be used as a prompt for the AI assistant to guide the developer in implementing the Project Mycelium. It should not be used directly. We copy paste this into an AI coder. Do not use this file for the Marketplace directly.

Project Mycelium Session Prompt

Objective

  • Use the single authoritative file docs/dev/design/current/projectmycelium-roadmap.md to:
    1. Analyze current state and gaps.
    2. Propose the most impactful next task(s) to move toward 100% completion.
    3. Implement and verify changes (code/docs).
    4. Update the roadmap with results and define the next step.
    5. Commit and push the changes.

Inputs

Guardrails (must follow)

  • CSP: no inline handlers; per-field JSON hydration (| json_encode with named-arg defaults); only top-level {% block head %} and {% block scripts %}.
  • ResponseBuilder: all API responses wrapped; frontend must const data = result.data || result;.
  • Persistent-only runtime: no mocks in prod paths; verify APP_ENABLE_MOCKS=0.
  • Currency: USD base; TFC supported; insufficient funds must be HTTP 402 with canonical JSON error.
  • Logging: zero log:: in main/dev branches (temporary logs only in feature branches and removed before merge).

Session Steps

  1. Analyze

    • Read the roadmap; confirm “Current state”, “Gaps”, and immediate/near-term items.
    • Choose the highest-impact, lowest-risk next task that unblocks others (e.g., mock removal, 402 unification, dashboard persistence, SLA list, cart flow).
  2. Plan

    • Propose 13 concrete tasks with:
      • Scope, files/routes/templates to touch (e.g., src/controllers/*.rs, src/static/js/*.js, src/views/**/*.html).
      • Acceptance criteria and tests.
      • Expected side-effects (if any).
  3. Execute

    • Make minimal, correct edits; imports at top; adhere to builder pattern + ResponseBuilder.
    • Maintain CSP compliance and persistent-only data usage.
  4. Verify

    • Run focused checks (fixtures mode; mocks disabled).
    • Validate acceptance criteria; outline manual verification steps if needed.
  5. Document

    • Update docs/dev/design/current/projectmycelium-roadmap.md:
      • Refresh “Last Updated”.
      • Add a brief “Changes in this session” note in relevant sections (state/gaps/roadmap).
      • Append to Troubleshooting/Dashboard Backlog/.env/Tests/CSP appendices if needed.
    • Ensure archived docs arent referenced.
  6. Git

    • Use a short, scoped branch name per task (e.g., feat/unify-402-insufficient-funds).
    • Commit referencing the roadmap section updated.
    • Commands (from repo root):
      git add -A
      git commit -m "roadmap: <short summary> — update doc + implement <feature/fix>"
      git push
      
    • Optionally open a PR targeting the correct branch (e.g., development).
  7. Next Step

    • Propose the next most impactful, bite-sized task with acceptance criteria.

Output Format (return exactly these sections)

  • Findings: brief analysis of current state vs roadmap.
  • Proposed Tasks: 13 items with scope + acceptance criteria.
  • Plan: exact edits to perform (files/functions/routes/templates).
  • Execution: commands/tests run and results (summarized).
  • Roadmap Update: exact lines/sections updated in projectmycelium-roadmap.md.
  • Git: branch/commit/push (and PR if applicable).
  • Next Step: 1 task with acceptance criteria.
  • Risks/Notes: any issues or follow-ups.

Constraints

  • Prefer incremental, reversible changes.
  • Dont introduce/enable mocks unless explicitly testing mock mode.
  • Keep the roadmap as the only source of truth; fix any residual references to archived docs if found.

Optional Checks (run when relevant)

  • Search for mock remnants: Mock|mock_|demo_|sample_.
  • Ensure insufficient funds uses HTTP 402 + canonical JSON across flows.
  • Ensure dashboards unwrap ResponseBuilder and hydrate via JSON script blocks.
  • Validate CSP: no inline handlers; only top-level head/scripts blocks; external JS in src/static/js/.