Rapid specification-driven development of large-scale IT systems through full-scan MapReduce document analysis

Hi everyone,

I recently implemented a PoC application through specification-driven development in less than one hour. This included generating a specification from requirements using ChatGPT, reviewing the specification, using Codex to provision Azure resources and generate source code, and deploying the application to Azure App Service.

This is a demonstrated result for a small PoC. However, whether this approach can scale to IT systems containing thousands of functions remains an open question.

Could we significantly reduce development time for large-scale IT systems through specification-driven development?

One challenge is transforming enormous amounts of existing documentation into a coherent specification.

Could we use full-scan MapReduce document analysis with AI agents for this purpose?

RAG-based approaches can suffer from retrieval misses, potentially omitting critical requirements from detailed specifications. Full-scan analysis could reduce this risk, but maintaining contextual consistency and resolving contradictions across documents would remain essential.

For human-AI reciprocal understanding, ChatGPT could generate a specification in TeX and compile it into PDF. TeX/PDF would provide a high-quality, human-readable specification that engineers could carefully review.

After reviewing and modifying the specification, including Azure infrastructure design, we could potentially use Codex to automate everything from Azure resource provisioning to application deployment within a relatively short time.

We must also consider whether traditional high-level and detailed design documents are necessary for Codex-driven development, or whether a sufficiently precise specification could replace them.

Do you think this approach to specification-driven development could be used to modernize relatively large-scale IT systems?

I welcome your opinions, including critical feedback.

I have to note that I omitted two important aspects of large-scale system development in my article.

  1. Large context windows: According to the API specifications, certain models support a context window of approximately 1.05 million tokens. However, the actual context length available in Codex depends on the model and its configuration.

  2. Modular specification-driven development: developing a system through loosely coupled, encapsulated modules, each with its own specifications, may offer a way to address the scalability problem.

The fundamental challenge is that development time and staffing requirements can grow combinatorially, potentially even exponentially, as the number of modules increases. A properly modularized architecture, with clearly defined interfaces and independently verifiable specifications, could help prevent this combinatorial explosion.

You can just write your project spec as a simple Markdown file and you are good to go.

Generally the less verbose you are the better. Overspecifying limits severely the latent space these modern models can explore. At the same time you do need to steer them in the right direction, otherwise they will do lots of busy work, browse the web, create a billion tests, etc.

So: write a small spec in markdown, focus on goals and objectives, tell it what NOT to waste time on, and take it from there.

I actually came back from getting chatgpt to generate specs for me and I do it myself now. Why? Because i find that it’s me who knows how to best define the goals and outcomes.

Thank you so much for taking the time to share your insights and experience. I sincerely appreciate your thoughtful response and the valuable practical perspective you have offered.

However, the challenge I am particularly concerned with is the migration and development of large-scale IT systems involving thousands of functions, complex business rules, and numerous interdependent requirements.

In the case of migrating an existing enterprise system, for example, its specifications and business logic may be distributed across enormous volumes of documentation and source code.

My question is whether a concise Markdown specification alone can adequately capture all these requirements and enable an AI model to implement thousands of functions accurately, without overlooking important business rules, constraints, or exceptions.

My primary concern is not the format or simplicity of the specification itself, but rather how we can ensure requirements coverage, semantic consistency, and traceability to the original sources throughout the development process.

Interestingly, I recently came across AWS Transform, which appears to share some similarities with my own proposal. However, I have not been able to verify whether AWS Transform actually employs Hierarchical MapReduce Document Analysis in its implementation.

The hierarchical structure I propose is:

root > doc_class > doc > chapter > section > subsection > paragraph

In this approach, evidence is preserved at each level of the hierarchy, allowing requirements, constraints, exceptions, and potential contradictions to be analyzed and reconciled while maintaining traceability to their original sources.

Of course, I am also familiar with specification-driven development in practice. I have used both Kiro Crew and Codex extensively on numerous occasions for specification-driven development. My questions therefore arise not from a lack of experience with these tools, but from my interest in how such approaches can scale reliably to enterprise systems containing thousands of interconnected requirements.

I would be genuinely grateful to hear your thoughts on how your approach addresses these challenges at enterprise scale, particularly regarding completeness, consistency, and traceability.

Thank you once again for your time, generosity, and willingness to share your experience. I truly value this opportunity to exchange ideas and learn from your perspective.

The reason I use TeX/PDF is to facilitate mutual understanding between humans and AI. We cannot have Kiro or Codex implement anything before we’ve verified the specifications. Of course, I do provide Kiro and Codex with Markdown files. TeX/PDF is there for human oversight.

I originally posted a lengthy text in this message.
Following platypus-san’s advice below, I have substantially condensed it.
I sincerely apologize for any inconvenience I may have caused to the community.

Three key challenges are requirements completeness, semantic consistency, and source traceability.

RAG may miss critical information due to retrieval limitations. Hierarchical full-scan MapReduce could mitigate this by systematically analyzing all materials within a defined scope:

root > doc_class > doc > chapter > section > subsection > paragraph

Global context, fast overviews, and selective reanalysis could help preserve cross-document dependencies.
However, full scanning cannot guarantee semantic correctness, and hierarchical integration may introduce information loss.

A comparative PoC could evaluate:

RAG
RAG with static analysis and dependency graphs
Hierarchical full-scan MapReduce with global context

Key metrics include coverage, consistency, traceability, correctness, processing time, and cost.
Conclusion: Full-scan MapReduce is neither proven superior nor necessarily required. It is a testable architectural hypothesis that warrants experimental evaluation.

Technical criticism and alternative approaches are welcome.

I would like to emphasize two important points that emerged from my dialectical discussion with ChatGPT.

  1. Necessary and Sufficient Conditions

I am not claiming that full-scan MapReduce is a necessary condition for successful large-scale specification-driven development.

Rather, I am proposing that it may provide a sufficient approach to achieving useful improvements under appropriate conditions.

The existence of alternative approaches, such as RAG combined with static analysis and dependency graphs, does not by itself invalidate this proposal.

However, the possibility of sufficiency is not a proof of sufficiency. The effectiveness of the proposed approach remains to be demonstrated through comparative PoC experiments.

  1. Time and Costs Beyond Code Generation

I acknowledge that data migration, external system integration, testing, production deployment, and other engineering activities may require substantially more time and resources than code generation itself.

Accelerating code generation does not necessarily accelerate the entire software development lifecycle.

However, these activities also depend on the accuracy and completeness of specifications. Systematically analyzing existing documentation and source code may help identify undocumented requirements, dependencies, inconsistencies, and exceptional conditions before implementation.

This could potentially reduce downstream errors and rework, although full-scan MapReduce would introduce additional analysis costs.

Therefore, the relevant question is not simply whether full-scan MapReduce can accelerate code generation, but whether it can improve the overall quality, development time, and cost of large-scale system modernization.

I believe these two points justify further investigation through a comparative PoC, rather than claiming that the proposed approach has already been proven superior to existing methods.

This is a very large wall of text, I would advise you to keep things concise and on point. It is unfair on the others in the community. Even for their agents, it’s a massive context pollutant. Please keep things short and crisp.

I sincerely apologize. I became so absorbed in thinking about this topic that I couldn’t stop myself. I promise to keep my messages concise from now on.

I took some time to reflect on your feedback.

I believe that serious technical arguments deserve respectful consideration, even when they come from someone who is new to the community.

I felt that the phrase “massive context pollutant” was unnecessarily harsh. While I welcome criticism, I hope such criticism can be expressed in a way that encourages constructive discussion.

I remain confident that the ideas presented in this thread and in my other posts have technical value.

Nevertheless, I appreciate your feedback and am grateful to this community.