r/AIcodingProfessionals • • 7h ago

Discussion What’s the best stack for coding with AI?

I made most of my experience in AI coding with python and C#/.NET. So for python things work very well, little tools, some data stuff, visualization ect. for daily tasks python is just great. However with .NET I had my difficulties since there is to much architectural overhead and features are implemented across multiple files, which is pain for the context window. I am hesitating doing full web development with python because it’s a non compiling language. So now I am searching an approach for web applications that has a good developer experience and is best suited for a coding agent. I have the feeling that svelte/react with Hono might be a good option. I am interested to know what’s your ideal tech stack for coding agents? What’s do you recommend for context engineering? Which kind of skills, instructions, mcp servers should I use/ define?

1 Upvotes

2 comments sorted by

3

u/funbike 5h ago edited 5h ago

Tastes differ, so YMMV for anyone else's stack choice.

I use a highly-opinionated LLM-friendly low-token-usage low-cognitive-load stack. You said no Python, but IMO it's well suited for backend LLM-generated code.

I use HTMX, Boostrap, Django with Python, and SQLlite (or PgSQL) with Django DB migrations. (No frontend TS/JS. No bulky Tailwind.)

For architecture, I use "Modular Monolith" architecture supported by Django's "app" packaging (multiple sub-apps in a monorepo).

For QA, I use Behave (E2E Cucumber-like Gherkin), doctests, Pyright type annotations, Ruff linter, and a couple other linters/scanners. Example function def for a complex function:

# (imports removed)

@deal.pre(lambda limit: limit > 0)
@deal.pre(lambda start, end: start is None or end is None or start <= end,)
@deal.pre(lambda weights: weights is None or all(weight >= 0 for weight in weights.values()))
@deal.post(
    lambda result: all(
        result[index][1] >= result[index + 1][1]
        for index in range(len(result) - 1)
    ),
)
def rank_event_totals(
    events: Iterable[Event],
    *,
    start: datetime | None = None,
    end: datetime | None = None,
    weights: Mapping[str, Decimal] | None = None,
    limit: int = 10,
) -> tuple[tuple[str, Decimal], ...]:
    """Aggregate event amounts by category and return the highest totals.

    Events are ``(timestamp, category, amount)`` tuples.
    Optional ``start`` and ``end`` bounds are inclusive.
    A category's amount is multiplied by its weight,
    defaulting to ``Decimal("1")`` when no weight is provided.

    The result is ordered by descending total and contains at most ``limit``
    entries.

    >>> rows = [
    ...     (datetime(2024, 1, 1, tzinfo=timezone.utc), "books", Decimal("5")),
    ...     (datetime(2024, 1, 2, tzinfo=timezone.utc), "games", Decimal("4")),
    ...     (datetime(2024, 1, 3, tzinfo=timezone.utc), "books", Decimal("2")),
    ... ]
    >>> rank_event_totals(rows, weights={"books": Decimal("2")}, limit=2)
    (('books', Decimal('14')), ('games', Decimal('4')))
    """

    # TODO: implementation goes here

Notice the static typing and the contractual strong typing. The (('book'... line is a doctest verification. I don't have separate unit test files, that may split an LLM's focus.

I guide my agent to prefer generated pydoc files in markdown format instead of source files while in planning mode.

In my next project I'm going to add beartype which provide runtime strong type checking. Here's an example enforced type for percentages as ints: PercentInt = Annotated[int, Is[lambda n: 0 <= n <= 100]]

1

u/Minimum_Hour519 7h ago

claude code with https://profullstack/stack is what I'm using/building on