PhD consisting mainly of programming work I'm currently a second-year PhD student, in computer engineering.
My research area is in computer graphics and virtual reality.

I currently don't have a specific goal or problem to solve, except generally to improve the state of the art in some regard. (i.e. develop a method/algorithm that gives better visual quality output than others described in the literature). According to my supervisor I'm supposed to find during my work a more concrete path to follow (like an existing method, and an approach on how to improve it).

So far I have mainly been doing programming/software development work, and developing a C++ framework for flow based programming. My question is if such a software development project can qualify as a PhD topic. There are plenty of complex problems to solve, involving time synchronization, guaranteeing that the system is lock-free, scheduling, etc. Here there is a clear goal: The user defines a graph for the data flow with various attributes (time windows, parallel execution, ...), and the framework does the necessary transformations, etc. to be able to execute it.

However it seems more like an open-source programming project than like a research work. I'm basically choosing for myself which features I'm adding to it, and how to implement them. Most of the time is spent programming and refactoring code.
What you are describing is a common situation in applied computer science.

There are many academic sub-fields where a good chunk of the work is a bit menial. For example, in robotics, testing a new approach may involve several months of work in the lab even if the new approach can be concisely described on one page. This is because roboticists care about stuff actually working - it does not suffice to construct new algorithms that work well in theory, you have to demonstrate that they really do - and a video taken in the lab is one of the best ways to do so. A lot of code needs to be written for getting all parts of the robot working together, and often research groups develop software frameworks to support their work. The frameworks themselves are normally scientifically not so interesting, but they prepare the actual scientific work. The situation in your research group seems to be similar.

So how does scientific work in such an applied field? (1) First of all, once the framework is done, the interesting scientific questions can be tackled not only theoretically, but also experimentally. Also (2), when you try to put together something that just works, you often realize that the current state of the art is insufficient in some aspects. You improve them to get your example running, and then you check if your improvement is sufficient for publication.

You seem to have been told that case (2) is how things are supposed to work in your case. But you may also want to ask your advisor about her/his plans on research work of kind (1). Often, these frameworks are built with a question of part (1) in mind. Note that it may also be that during the research work, a lot of technical debt has accumulated in the framework of your research group. Often, Ph.D. students are the only ones who are working on that as BSc or MSc students are not experienced enough, and postdocs and professors are too busy for this. That is often seen to be OK as long as there is sufficient interaction in the group such that Ph.D. students working on the technical debt can still participate in the scientifically interesting work of the research group at the same time.