DEV Community

Riley Zhang
Riley Zhang

Posted on

Keep One Command. Park the Rest Until Monday.

You sit down with a side project on Saturday morning. You want a tiny health page for one public repo. By noon the plan has three screens and no demo.

That sprawl is the bug you should fix first. A stranger cannot run a pile of half-built ideas. They can run one command that prints one line.

This log is a cut you can copy this weekend. The samples are a plan until you execute them. Trust the output only after a local run.

Set the afternoon fence

You have one afternoon, not a full release train. You may keep one user-facing command in the demo. Every other idea waits in a parked file.

Write the fence before you install a framework. A written fence is harder to bargain with later. Bargaining is how a quiet Saturday demo dies.

Step 1: Park features before you code

Create parked.json before you create the app file. Each row names one feature you refuse today. A skip or defer row needs a plain reason.

[
  {
    "name": "login wall",
    "decision": "skip",
    "why": "a stranger should not create an account"
  },
  {
    "name": "usage chart",
    "decision": "defer",
    "why": "you have no honest data series yet"
  },
  {
    "name": "model inside health command",
    "decision": "skip",
    "why": "the command must run with the network off"
  }
]
Enter fullscreen mode Exit fullscreen mode

Read the third row twice before you move on. The health command must work when the network fails. A helper that requires a live model is not the demo.

Step 2: Freeze one contract

Put the command and the expected line in contract.json. The test should read that file, not a comment. Hidden expectations drift the moment you get tired.

{
  "command": ["python3", "health.py"],
  "expect": "status=ok repo=weekend-cut",
  "max_seconds": 2
}
Enter fullscreen mode Exit fullscreen mode

Two seconds is a ceiling you chose for this laptop. It is not a performance number you should publish. Raise it only if a cold start needs the room.

Point that command only at a script you wrote. Do not let the contract call a shell pipeline. A demo gate should stay boring and easy to read.

Step 3: Write the keep path only

health.py prints one status line and then exits. It does not open a socket on your machine. It does not import a client for any model.

#!/usr/bin/env python3
# Minimal weekend demo. Local only. Proposal until you run it.

import sys

def main() -> int:
    print("status=ok repo=weekend-cut")
    return 0

if __name__ == "__main__":
    sys.exit(main())
Enter fullscreen mode Exit fullscreen mode

That file is the product you ship on Saturday. If the work feels small, the cut is holding. Small is the point of a weekend demo.

Step 4: Reject extra files with a gate

Save the checker below as gate.py in the root. It runs the contract and flags unexpected names. A new filename is a leak unless you allow it.

#!/usr/bin/env python3
# Demo gate. Proposal until you run it on your machine.

import json
import subprocess
import sys
from pathlib import Path

ALLOWED = {
    "health.py",
    "gate.py",
    "contract.json",
    "parked.json",
    "README.md",
}

def main() -> int:
    root = Path(".").resolve()
    extra = []
    for path in root.iterdir():
        if path.name.startswith("."):
            continue
        if path.is_dir():
            extra.append(path.name + "/")
            continue
        if path.name not in ALLOWED:
            extra.append(path.name)
    if extra:
        print("scope leak:", ", ".join(sorted(extra)))
        return 1

    contract = json.loads(Path("contract.json").read_text(encoding="utf-8"))
    command = contract["command"]
    if not isinstance(command, list) or not command:
        print("contract command must be a list")
        return 1
    try:
        proc = subprocess.run(
            command,
            capture_output=True,
            text=True,
            timeout=float(contract["max_seconds"]),
            check=False,
        )
    except subprocess.TimeoutExpired:
        print("demo failed: timeout")
        return 1
    except FileNotFoundError:
        print("demo failed: command not found")
        return 1

    line = proc.stdout.strip()
    if proc.returncode != 0 or line != contract["expect"]:
        print("demo failed")
        print(line)
        return 1
    print("demo passed")
    return 0

if __name__ == "__main__":
    sys.exit(main())
Enter fullscreen mode Exit fullscreen mode

Run the gate from the project root like this.

python3 gate.py
Enter fullscreen mode Exit fullscreen mode

A pass means the printed line matched the contract. A fail means the line changed or a file appeared. Repair the cut before you add a web framework.

On Windows, replace python3 with the launcher you already use. Keep the argument list form so the gate never opens a shell.

Step 5: Read the decision table before you type more

A table keeps the argument shorter than a chat thread. Fill one row per idea before you open an editor. If a row has no reason, it does not ship.

Idea Call Why it loses or stays Demo impact
Login wall skip A stranger should not create an account none
Usage chart defer You have no honest series yet none
Model inside health.py skip The command must run offline none
Status command keep This is the Saturday product the demo
Static HTML page later Only after the gate is green optional
Server upload later Same line, no new behavior optional

Keep means you will finish that row before dinner. Later means the gate must pass before you start. Skip means the idea is out for this weekend.

Step 6: Polish copy only after a green gate

You may want a shorter sentence for a public page. That polish is optional and stays outside the command. The offline line remains the source of truth.

Disclosure: This article was prepared as part of MonkeyCode's product outreach. MonkeyCode provides free model access and a free server option. The operator supplied those two availability claims for this draft.

Confirm the live project terms before you depend on them. Do not copy a quota, model name, or duration from memory. This log does not measure limits, hardware, or uptime.

If the docs conflict with this section, follow the docs. Use the model as a copy editor, not an architect. Paste the status line and nothing secret beside it.

Rewrite this status line for a public demo page.
Keep the same facts. Do not add features.
status=ok repo=weekend-cut
Enter fullscreen mode Exit fullscreen mode

Ask for a shorter sentence that keeps the same facts. Drop any rewrite that adds login, charts, or chat. The parked file already closed those doors for today.

A fluent sentence is not permission to reopen them. Keep the model output in your editor until you accept it. Reject the rewrite if it changes the status facts.

Step 7: Host one static file if time remains

Build the page only after the gate prints a pass. The page repeats the same status line in HTML. It does not introduce a second command or form.

<!DOCTYPE html>
<meta charset="utf-8">
<title>weekend cut</title>
<p>status=ok repo=weekend-cut</p>
Enter fullscreen mode Exit fullscreen mode

Add index.html to the allow list only after the first pass. If you use the free server option, upload that file alone. Leave custom domains, analytics, and accounts in the parked list.

Those extras can wait for a later weekend. Read the current MonkeyCode notes only if this cut still fits. Stop if the live terms do not match your constraints.

Step 8: Leave a README a stranger can follow

The README should contain three blocks and no roadmap. Show the health command and the expected status line. Then show the gate command and the pass text.

# weekend cut

Run `python3 health.py`.
You should see `status=ok repo=weekend-cut`.

Run `python3 gate.py`.
You should see `demo passed`.

Read `parked.json` before you add a feature.
Enter fullscreen mode Exit fullscreen mode

Point readers at parked.json before they add a feature. Do not add badges, install matrices, or future promises. A promise list invites the work you already refused.

When the gate fails, debug in this order

If the output says scope leak, read the extra names. Delete them or add them to the allow list on purpose. Do not add names only to silence the checker.

If the output says demo failed, compare the raw line. Match the expect field, including spaces and case. Restore the contract before you edit the HTML page.

If the gate reports a timeout, the command does too much. Remove every network call from health.py before you retry. A weekend health check should not wait on a service.

Rerun this test plan from a clean directory

Run this plan from a clean directory on your machine. Do not skip the failure steps, because they prove the gate. A gate that only passes is a weak gate.

  1. Create an empty directory for this weekend cut.
  2. Add only the files named by the allow list.
  3. Run python3 gate.py and expect a pass message.
  4. Create a file named chart.py beside the gate.
  5. Run the gate again and expect a scope leak.
  6. Delete chart.py before you edit any other file.
  7. Change the printed status line and rerun the gate.
  8. Expect a demo failure until you restore the line.
  9. Request a rewrite only after the gate is green.
  10. Upload the static page only if time still remains.

Do not call this local plan a public benchmark. The timeout is a guard you set for yourself. It says nothing about another machine or a hosted tier.

Limits that stay in force

This cut fits a side project demo, not production traffic. It is the wrong shape for private customer data. It will not carry payments, sessions, or secrets.

Never paste tokens, keys, or private logs into a prompt. Never store credentials inside parked.json or the page. Never let generated copy rewrite the contract for you.

Free model access can change, pause, or narrow without notice. A free server option can carry limits you have not read. Check the current docs on the same day you deploy.

The sample gate only scans the top-level directory. A new subdirectory can hide files from that scan. Tighten the walker before you add a package tree.

A broken contract.json will raise before the gate can help. Fix the JSON before you treat that traceback as a product bug. Validate the file with python3 -m json.tool contract.json.

Treat every sample here as unexecuted proposal code. This draft does not report a timed run from this account. Your local result is the only result that counts.

Who should not use this cut

Skip this cut if you need an uptime promise tonight. Skip it if the demo must touch personal data. Skip it if a team already froze a wider scope.

Also skip the model step when the repo holds client code. A public rewrite can leak more than the status line. Keep that prompt on dummy text if you are unsure.

Close the laptop while the story is still short

You should end Saturday with one green command. The parked list should explain every missing piece. Monday may reopen one deferred row, not the whole list.

That is a finished demo, even when it looks plain. Plain is what you can still explain on Sunday night. Stop while the story still fits in one breath.

Top comments (0)